找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2305|回复: 6

[其它] 请bow兄和各位高手进来

[复制链接]
发表于 2006-1-17 16:05:12 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
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 \[/ip route find comment=TEL\] gateway \
  电信网关\n" policy=ftp,reboot,read,write,policy,test,winbox,password

add name="CNCup" source="/ip route set \[/ip route find comment=CNC\] 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
routeros
legou 该用户已被删除
发表于 2006-1-18 03:40:07 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
routeros
回复

使用道具 举报

 楼主| 发表于 2006-1-18 08:39:51 | 显示全部楼层
哪怎么把adsl去掉啊,帮我一下了,大哥
routeros
回复

使用道具 举报

 楼主| 发表于 2006-1-18 12:00:32 | 显示全部楼层
这也是朋友给我的。但我不会改哪位大哥帮我改一下,万分感谢
routeros
回复

使用道具 举报

发表于 2006-1-18 14:28:48 | 显示全部楼层
精华里有双线切换的例子,可以看看。
http://www.routerclub.com/viewth ... &extra=page%3D1

[ 本帖最后由 bow 于 2006-1-18 20:12 编辑 ]
routeros
回复

使用道具 举报

 楼主| 发表于 2006-1-18 17:12:27 | 显示全部楼层
麻烦版主给我把这个改一下行吗,我要急用,我的配置是:内网192.168.0.1 电信的网关是:219.150.235.101 网通的网关是192.168.0.254,麻烦版主,万分感谢
routeros
回复

使用道具 举报

 楼主| 发表于 2006-1-18 17:23:32 | 显示全部楼层
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
这个我不太懂,谁能翻译一下谢谢
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-9-30 13:18 , Processed in 0.090855 second(s), 6 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表