weisms 发表于 2009-5-26 17:41:28

2网通光纤叠加负载+1电信光纤策略(带宽叠加和策略路由混用)

本帖最后由 weisms 于 2009-5-27 10:39 编辑

网络是2跟10M网通和一根电信10M。自己瞎琢磨做的,有些心里没谱,不知道对不,现实效果还是不错的,下载网通的能有2M多的速度,电信也能够策略。我把我路由上的命令贴出来,希望大家看看有没有问题,有更好的方法希望高手说下。断线切换我用的是脚本,就不贴了,很简单,切换网关就行了。



0   chain=forward protocol=tcp tcp-flags=syn action=change-mss new-mss=1440

1   chain=prerouting in-interface=nei connection-state=new nth=1,1,0
   dst-address-list=CNC action=mark-connection new-connection-mark=odd
   passthrough=yes

2   chain=prerouting in-interface=nei connection-mark=odd action=mark-routing
   new-routing-mark=odd passthrough=no

3   chain=prerouting in-interface=nei connection-state=new nth=1,1,1
   dst-address-list=CNC action=mark-connection new-connection-mark=even
   passthrough=yes

4   chain=prerouting in-interface=nei connection-mark=even action=mark-routin>
   new-routing-mark=even passthrough=no

5   chain=prerouting src-address=192.168.0.0/24 dst-address-list=TEL
   action=mark-routing new-routing-mark=TEL passthrough=no


1   chain=srcnat src-address=192.168.0.0/24 connection-mark=even
   action=src-nat to-addresses=网通1 to-ports=0-65535
2    chain=srcnat src-address=192.168.0.0/24 connection-mark=even
   action=src-nat to-addresses=网通2 to-ports=0-65535

3   chain=srcnat src-address=192.168.0.0/24 action=src-nat
   to-addresses=电信 to-ports=0-65535

4chain=srcnat src-address=192.168.9.0/24 action=src-nat
   to-addresses=电信 to-ports=0-65535








/ ip route
add dst-address=0.0.0.0/0 gateway=网通1网关 scope=255 target-scope=10 \
    routing-mark=odd comment="cnc1" disabled=no
add dst-address=0.0.0.0/0 gateway=网通2网关scope=255 target-scope=10 \
    routing-mark=even comment="cnc2" disabled=no
add dst-address=0.0.0.0/0 gateway=网通2网关scope=255 target-scope=10 \
    comment="CNC" disabled=no
add dst-address=0.0.0.0/0 gateway=电信网关 scope=255 target-scope=10 \
    routing-mark=TEL comment="tel" disabled=no
页: [1]
查看完整版本: 2网通光纤叠加负载+1电信光纤策略(带宽叠加和策略路由混用)