moonchen 发表于 2010-5-6 17:43:32

请高手帮帮看看下面的4线PCC脚本有什么问题

本帖最后由 moonchen 于 2010-5-7 12:22 编辑

这个脚本在ROS4.0B2的机器上运行后,却发现4条能上线,但没流量。

/ip address add address=192.168.1.1/255.255.255.0 interface=ether1 comment=LAN
/ip dns set primary-dns=202.96.134.133 secondary-dns=202.96. 128.166 allow-remote-requests=yes
/interface pppoe-client add name="pppoe-out1" interface=ether2 user=" sz00000001@163.gd" password="1" add-default-route=no disabled=no
/interface pppoe-client add name="pppoe-out2" interface=ether3 user=" sz00000002@163.gd" password="2" add-default-route=no disabled=no
/interface pppoe-client add name="pppoe-out3" interface=ether4 user=" sz00000003@163.gd" password="3" add-default-route=no disabled=no
/interface pppoe-client add name="pppoe-out4" interface=ether5 user=" sz00000004@163.gd" password="4" add-default-route=no disabled=no



/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-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-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:4/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:4/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:4/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:4/3 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


/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 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


/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

moonchen 发表于 2010-5-7 12:22:32

怎么没人帮顶。

can2008 发表于 2013-2-28 13:08:50

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
红色那条打错了。

qile 发表于 2013-2-28 13:22:17

我看你如果是 流量只走一条默认路由,可以在默认路由线路前面在加一个小路由,这样分配可能会好些,我听说做pcc 有些链接 尤其是外网主动链接内外的链接 ,会只走默认路由,ros默认路由前面加一个家用的路由,可以解决这个问题,我试过,你可以试试

xiasha11 发表于 2013-2-28 15:15:21

add comment=1 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=to_pppoe-out1 check-gateway=arp,以此类推
页: [1]
查看完整版本: 请高手帮帮看看下面的4线PCC脚本有什么问题