|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
×
电信和网通的双线路策略路由.并且在其中一条线路断掉后自动切换为单线路,线路恢复后,恢复使用策略路由.电信网关 190.168.1.10网通网关 192.168.1.91 先设置用电信线路上网.2.添加网通独立的路由表.
CODE
/ ip policy-routing table test1 add dst-address=0.0.0.0/0 gateway=192.168.1.9 preferred-source=0.0.0.0 comment="" disabled=no
3 在rule里添加策略路由规则
CODE
/ ip policy-routing ruleadd src-address=0.0.0.0/0 dst-address=59.80.0.0/14 flow="" interface=all action=lookup table=test1 \ ??omment="" disabled=no....此处省略
记得把main移动到最后4、配置自动切换脚本
CODE
/ system script add name="test1down" source="/ ip policy-routing table test1 \nset \[/ ip policy-routing table test1 find \ ??st-address=0.0.0.0\] gateway 190.168.1.10\n" policy=ftp,reboot,read,write,policy,test add name="test1up" source="/ ip policy-routing table test1 \nset \[/ ip policy-routing table test1 find \ ??st-address=0.0.0.0\] gateway 192.168.1.9\n" policy=ftp,reboot,read,write,policy,test add name="maindown" source="/ ip policy-routing table main\nset \[/ ip policy-routing table main find \ ??st-address=0.0.0.0\] gateway 192.168.1.9" policy=ftp,reboot,read,write,policy,test add name="mainup" source="/ ip policy-routing table main\nset \[/ ip policy-routing table main find \ ??st-address=0.0.0.0\] gateway 190.168.1.10" policy=ftp,reboot,read,write,policy,test
5 配置NETWATCH用于监视网络的通断情况
CODE
/ tool netwatch add host=190.168.1.10 timeout=1s interval=20s up-script=mainup down-script=maindown comment="" disabled=no add host=192.168.1.9 timeout=1s interval=20s up-script=test1up down-script=test1down comment="" disabled=no |
|