找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2182|回复: 5

[其它] 双adsl同网关问题

[复制链接]
发表于 2009-4-1 09:04:10 | 显示全部楼层 |阅读模式

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

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

×
:local ip1 [/ip add get [/ip add find broa=0.0.0.0 interface="ADSL1"] address]
:local ip2 [/ip add get [/ip add find broa=0.0.0.0 interface="ADSL2"] address]
:local ip3 [/ip fir nat get [/ip fir nat find connection-mark=odd] to-addresses]
:local ip4 [/ip fir nat get [/ip fir nat find connection-mark=even] to-addresses]
:local ip5 [/ip route get [/ip route find routing-mark=odd] gateway]
:local ip6 [/ip route get [/ip route find routing-mark=even] gateway]
:set ip1 [:pick $ip1 0 ([:len $ip1]-3)]
:set ip2 [:pick $ip2 0 ([:len $ip2]-3)]
:if ($ip1 != $ip3) do={/ip fir nat set [/ip fir nat find connection-mark=odd] to-addresses $ip1}
:if ($ip1 != $ip5) do={/ip route set [/ip route find routing-mark=odd] gateway $ip1}
:if ($ip2 != $ip4) do={/ip fir nat set [/ip fir nat find connection-mark=even] to-addresses $ip2}
:if ($ip2 != $ip6) do={/ip route set [/ip route find routing-mark=even] gateway $ip2}


用的这个脚本更新路由列表,可是每次重启,或重拨号之后 如下图的那个 To addresses  这个IP是不会更新的,要手动更新之后才能上网,请高手指点是那里问题!
1.jpg
routeros
 楼主| 发表于 2009-4-1 09:24:02 | 显示全部楼层
高手帮忙!
routeros
回复

使用道具 举报

发表于 2009-4-1 17:36:23 | 显示全部楼层
把broa=0.0.0.0  换成dynamic=yes试试
routeros
回复

使用道具 举报

 楼主| 发表于 2009-4-1 20:53:37 | 显示全部楼层
好了。谢了。。 我试下
routeros
回复

使用道具 举报

发表于 2009-4-1 20:56:10 | 显示全部楼层
晕,还用这样设置,有静态的不用
routeros
回复

使用道具 举报

 楼主| 发表于 2009-4-3 05:16:51 | 显示全部楼层
楼上的能指点一下吗。。 静态是什么
routeros
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-9-30 09:29 , Processed in 0.055509 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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