RouterOS 2ADSL雙線負載均衡

 

本次列出使用PCC負載均衡實例

網上看到過教程,感覺腳本來的快點,下面就是PCC2個ADSL的負載均衡的腳本:

/ip firewall mangle
add action=mark-connection chain=prerouting disabled=no new-connection-mark=1 \
passthrough=yes per-connection-classifier=both-addresses:2/0 src-address=\
10.20.20.0/24
add action=mark-connection chain=prerouting disabled=no new-connection-mark=2 \
passthrough=yes per-connection-classifier=both-addresses:2/1 src-address=\
10.20.20.0/24
add action=mark-routing chain=prerouting connection-mark=1 disabled=no \
new-routing-mark=1 passthrough=yes src-address=10.20.20.0/24
add action=mark-routing chain=prerouting connection-mark=2 disabled=no \
new-routing-mark=2 passthrough=yes src-address=10.20.20.0/24

 

/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out1 \
routing-mark=1 scope=30 target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out2 \
routing-mark=2 scope=30 target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out1 scope=30 \
target-scope=10
add disabled=no distance=2 dst-address=0.0.0.0/0 gateway=pppoe-out2 scope=30 \
target-scope=10

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章