routeros负载均衡(ros软路由双线负载均衡)

本文为大家介绍routeros负载均衡(ros软路由双线负载均衡),下面和小编一起看看详细内容吧。
routeros双adsl负载均衡脚本
[清楚的]
# may/25/2013 09:26:48 由routeros 5.20
/ip 防火墙破坏
add action=mark-connection chain=input disabled=no in-interface=pppoe-out1 new-connection-mark=wan1_conn passthrough=是
add action=mark-connection chain=input disabled=no in-interface=pppoe-out2 new-connection-mark=wan2_conn passthrough=是
添加操作=标记路由链=输出连接标记=wan1_conn 禁用=无新路由标记=to_wan1 直通=是
添加操作=标记路由链=输出连接标记=wan2_conn 禁用=无新路由标记=to_wan2 直通=是
add action=mark-connection chain=prerouting disabled=no dst-address-type=!local in-interface=wan1 new-connection-mark=wan1_conn passthrough=是/
每个连接分类器=地址和端口:2/0
add action=mark-connection chain=prerouting disabled=no dst-address-type=!local in-interface=wan1 new-connection-mark=wan2_conn passthrough=是/
每个连接分类器=地址和端口:2/1
add action=mark-connection chain=prerouting disabled=no dst-address-type=!local in-interface=wan2 new-connection-mark=wan1_conn passthrough=是/
每个连接分类器=地址和端口:2/0
add action=mark-connection chain=prerouting disabled=no dst-address-type=!local in-interface=wan2 new-connection-mark=wan2_conn passthrough=是/
每个连接分类器=地址和端口:2/1
添加操作=标记路由链=预路由连接标记=wan1_conn 禁用=无接口=wan1 新路由标记=to_wan1 直通=是
添加操作=标记路由链=预路由连接标记=wan2_conn 禁用=无接口=wan1 新路由标记=to_wan2 直通=是
添加操作=标记路由链=预路由连接标记=wan1_conn 禁用=无接口=wan2 新路由标记=to_wan1 直通=是
添加操作=标记路由链=预路由连接标记=wan2_conn 禁用=无接口=wan2 新路由标记=to_wan2 直通=是
/ip 防火墙nat
添加操作=伪装链=srcnat 禁用=无输出接口=pppoe-out1
添加操作=伪装链=srcnat 禁用=无输出接口=pppoe-out2
/ip 路由
添加check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=to_wan1 scope=30 target-scope=10
添加check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=to_wan2 scope=30 target-scope=10
添加check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out1 scope=30 target-scope=10
添加check-gateway=ping disabled=no distance=2 dst-address=0.0.0.0/0 gateway=pppoe-out2 scope=30 target-scope=10
这个脚本是抄袭老外alex的。
好用啊,他竟然是4行。
可以往上加,修改2/0 2/1为4/0 4/1 4/2 4/3网银也好用,下载带宽可以叠加。
界面中拨号终端为wan1 wan2;
局域网连接是lanpppoe,拨号是pppoe-out1和pppoe-out2。最好使用此默认名称。
这些符号改变后很容易混淆。
网卡接口和拨号需要手动添加,主要是mangle和route。
复制后,粘贴到新的终端中。
好了,routeros负载均衡(ros软路由双线负载均衡)的介绍到这里就结束了,想知道更多相关资料可以收藏我们的网站。