请bow兄和各位高手进来
bow兄帮我一下,我现在有两条光纤,一条电信100m和一条网通100m。我想做策略路由,玩电信的游戏自动走电信,玩网通的游戏自动走网通,下面这个帮我看一下有什么问题第一:
/ ip address
add address=192.168.1.1/24 network=192.168.1.0 broadcast=192.168.1.255 \
interface=lan comment="" disabled=no
add address=电信地址/掩码 network=自动设置 broadcast=自动设置
interface=TEL comment="" disabled=no
add address=网通地址/掩码 network=自动设置 broadcast=自动设置
interface=CNC comment="" disabled=no
第二:
添加 网通的路由网关
ip route
add dst-address=59.80.0.0/14 gateway=网通网关 check-gateway=ping \
distance=0 scope=255 target-scope=10 comment="CNC" disabled=no
add dst-address=60.0.0.0/13 gateway=网通网关 check-gateway=ping \
distance=0 scope=255 target-scope=10 comment="CNC" disabled=no
add dst-address=60.8.0.0/15 gateway=网通网关 check-gateway=ping \
distance=0 scope=255 target-scope=10 comment="CNC" disabled=no
略
第三
设置好监控的开关
/ tool netwatch
add host=电信网关 timeout=1s interval=1m up-script=dxup \
down-script=dxdown comment="TEL" disabled=no
add host=网通网关 timeout=1s interval=1m up-script=CNCup \
down-script=CNCdown comment="CNC" disabled=no
第四
脚本自动切换
/ system script
add name="dxup" source="/ip route set \ gateway \
电信网关\n" policy=ftp,reboot,read,write,policy,test,winbox,password
add name="CNCup" source="/ip route set \ gateway \
网通网关\n" policy=ftp,reboot,read,write,policy,test,winbox,password
add name="dxdown" source=":if \(\[/tool netwatch get \[/tool netwatch find \
comment=CNC\] status\]=\"down\"\) do {/ip route set \[/ip route find \
comment=TEL\] gateway \[/ip address get \[/ip address find \
interface=pppoe-out1\] network\]} else {/ip route set \[/ip route find \
comment=TEL\] gateway 网通网关}" \
policy=ftp,reboot,read,write,policy,test,winbox,password
add name="CNCdown" source=":if \(\[/tool netwatch get \[/tool netwatch find \
comment=TEL\] status\]=\"down\"\) do {/ip route set \[/ip route find \
comment=CNC\] gateway \[/ip address get \[/ip address find \
interface=pppoe-out1\] network\]} else {/ip route set \[/ip route find \
comment=CNC\] gateway 电信网关}" \
policy=ftp,reboot,read,write,policy,test,winbox,password 哪怎么把adsl去掉啊,帮我一下了,大哥 这也是朋友给我的。但我不会改哪位大哥帮我改一下,万分感谢 精华里有双线切换的例子,可以看看。
http://www.routerclub.com/viewthread.php?tid=6899&extra=page%3D1
[ 本帖最后由 bow 于 2006-1-18 20:12 编辑 ] 麻烦版主给我把这个改一下行吗,我要急用,我的配置是:内网192.168.0.1 电信的网关是:219.150.235.101 网通的网关是192.168.0.254,麻烦版主,万分感谢 add name="dxdown" source=":if \(\[/tool netwatch get \[/tool netwatch find \
comment=CNC\] status\]=\"down\"\) do {/ip route set \[/ip route find \
comment=TEL\] gateway \[/ip address get \[/ip address find \
interface=pppoe-out1\] network\]} else {/ip route set \[/ip route find \
comment=TEL\] gateway 网通网关}" \
policy=ftp,reboot,read,write,policy,test,winbox,password
这个我不太懂,谁能翻译一下谢谢
页:
[1]