ROS软路由论坛 ROSABC.com 网络方案网络工程交流

 找回密码
 会员注册

QQ登录

只需一步,快速开始

查看: 13589|回复: 16

[交流] PCC 5线负载均衡脚本

[复制链接]
发表于 2006-8-13 13:46:30 | 显示全部楼层 |阅读模式

马上注册成为ROSABC会员,随时发帖回复。

您需要 登录 才可以下载或查看,没有账号?会员注册

x
以下为PCC 5线负载均衡脚本,能正常工作,但是有一个问题,中间有条线路PPPOE-out3,无论如何没有流量,
本人钻研数日,都无法开解,困惑至极,请高人指教!将之修改完善,造福大众!

100131094450266bd638dd768b.jpg 2010-1-31 09:44 上传
下载附件 (78.23 KB)


100131094450266bd638dd768b.jpg 2010-1-31 09:44 上传
下载附件 (83.45 KB)




/ip address add address=192.168.1.1/255.255.255.0 interface=ether1 comment=LAN
/ip dns set primary-dns=202.96.128.166 secondary-dns=202.96.128.68 allow-remote-requests=yes


/ip firewall mangle
add action=change-mss chain=forward comment="CHANGE MSS" disabled=no new-mss=1440 protocol=tcp tcp-flags=syn

add action=mark-connection chain=input comment="" disabled=no in-interface=pppoe-out1 new-connection-mark=pppoe-out1_conn passthrough=yes
add action=mark-connection chain=input comment="" disabled=no in-interface=pppoe-out2 new-connection-mark=pppoe-out2_conn passthrough=yes
add action=mark-connection chain=input comment="" disabled=no in-interface=pppoe-out3 new-connection-mark=pppoe-out3_conn passthrough=yes
add action=mark-connection chain=input comment="" disabled=no in-interface=pppoe-out4 new-connection-mark=pppoe-out4_conn passthrough=yes
add action=mark-connection chain=input comment="" disabled=no in-interface=pppoe-out5 new-connection-mark=pppoe-out5_conn passthrough=yes

add action=mark-routing chain=output comment="" connection-mark=pppoe-out1_conn disabled=no new-routing-mark=to_pppoe-out1 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=pppoe-out2_conn disabled=no new-routing-mark=to_pppoe-out2 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=pppoe-out3_conn disabled=no new-routing-mark=to_pppoe-out3 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=pppoe-out4_conn disabled=no new-routing-mark=to_pppoe-out4 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=pppoe-out5_conn disabled=no new-routing-mark=to_pppoe-out5 passthrough=yes

add action=mark-connection chain=prerouting comment="" disabled=no dst-address-type=!local in-interface=ether1 new-connection-mark=pppoe-out1_conn passthrough=yes per-connection-classifier=both-addresses:5/0 src-address=192.168.1.0/24
add action=mark-connection chain=prerouting comment="" disabled=no dst-address-type=!local in-interface=ether1 new-connection-mark=pppoe-out2_conn passthrough=yes per-connection-classifier=both-addresses:5/1 src-address=192.168.1.0/24
add action=mark-connection chain=prerouting comment="" disabled=no dst-address-type=!local in-interface=ether1 new-connection-mark=pppoe-out3_conn passthrough=yes per-connection-classifier=both-addresses:5/2 src-address=192.168.1.0/24
add action=mark-connection chain=prerouting comment="" disabled=no dst-address-type=!local in-interface=ether1 new-connection-mark=pppoe-out4_conn passthrough=yes per-connection-classifier=both-addresses:5/3 src-address=192.168.1.0/24
add action=mark-connection chain=prerouting comment="" disabled=no dst-address-type=!local in-interface=ether1 new-connection-mark=pppoe-out5_conn passthrough=yes per-connection-classifier=both-addresses:5/4 src-address=192.168.1.0/24

add action=mark-routing chain=prerouting comment="" connection-mark=pppoe-out1_conn disabled=no in-interface=ether1 new-routing-mark=to_pppoe-out1 passthrough=yes src-address=192.168.1.0/24
add action=mark-routing chain=prerouting comment="" connection-mark=pppoe-out2_conn disabled=no in-interface=ether1 new-routing-mark=to_pppoe-out2 passthrough=yes src-address=192.168.1.0/24
add action=mark-routing chain=prerouting comment="" connection-mark=pppoe-out3_conn disabled=no in-interface=ether1 new-routing-mark=to_pppoe-out3 passthrough=yes src-address=192.168.1.0/24
add action=mark-routing chain=prerouting comment="" connection-mark=pppoe-out3_conn disabled=no in-interface=ether1 new-routing-mark=to_pppoe-out4 passthrough=yes src-address=192.168.1.0/24
add action=mark-routing chain=prerouting comment="" connection-mark=pppoe-out3_conn disabled=no in-interface=ether1 new-routing-mark=to_pppoe-out5 passthrough=yes src-address=192.168.1.0/24

/ip route
add comment=1 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=to_pppoe-out1 check-gateway=ping
add comment=2 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=to_pppoe-out2 check-gateway=ping
add comment=3 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out3 routing-mark=to_pppoe-out3 check-gateway=ping
add comment=4 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out4 routing-mark=to_pppoe-out4 check-gateway=ping
add comment=5 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out5 routing-mark=to_pppoe-out5 check-gateway=ping

add check-gateway=ping comment="pppoe-out1" disabled=no distance=10 dst-address=0.0.0.0/0 gateway=pppoe-out1
add check-gateway=ping comment="pppoe-out2" disabled=no distance=10 dst-address=0.0.0.0/0 gateway=pppoe-out2
add check-gateway=ping comment="pppoe-out3" disabled=no distance=10 dst-address=0.0.0.0/0 gateway=pppoe-out3
add check-gateway=ping comment="pppoe-out4" disabled=no distance=10 dst-address=0.0.0.0/0 gateway=pppoe-out4
add check-gateway=ping comment="pppoe-out5" disabled=no distance=10 dst-address=0.0.0.0/0 gateway=pppoe-out5

/ip firewall nat
add action=masquerade chain=srcnat comment="1" disabled=no out-interface=pppoe-out1
add action=masquerade chain=srcnat comment="2" disabled=no out-interface=pppoe-out2
add action=masquerade chain=srcnat comment="3" disabled=no out-interface=pppoe-out3
add action=masquerade chain=srcnat comment="4" disabled=no out-interface=pppoe-out4
add action=masquerade chain=srcnat comment="5" disabled=no out-interface=pppoe-out5
发表于 2006-8-13 22:44:54 | 显示全部楼层
我的PCC做出来,就是只跑默认路由的那一根线是怎么回事呢?望赐教啊。。。
发表于 2006-8-14 11:58:29 | 显示全部楼层
看看,还没有用过
发表于 2006-8-15 00:08:55 | 显示全部楼层
看看先!!
发表于 2006-8-15 00:41:37 | 显示全部楼层
111111111111111111111
发表于 2006-8-16 12:53:32 | 显示全部楼层
个人感觉PCC没有NTH好,PCC流量分配没有那么好用
发表于 2006-8-16 15:28:09 | 显示全部楼层
回。。。。。回。。。。。回。。。。。
发表于 2006-8-17 05:37:46 | 显示全部楼层
ddddddddddddddddddddd
发表于 2006-8-17 11:20:19 | 显示全部楼层
PCC流量分配的确没NTH好!PCC好就就在网银方面不用做专线~~~~~
发表于 2006-8-17 23:10:20 | 显示全部楼层
当然是PCC好。
您需要登录后才可以回帖 登录 | 会员注册

本版积分规则

不良信息举报Q:2000617

软路由

不良信息举报Q:2000617|Archiver|ROS软路由论坛 ROSABC.com 网络方案网络工程交流

GMT+8, 2025-8-4 22:04 , Processed in 0.212649 second(s), 22 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表