源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

双线路策略路由和脚本备份切换

  • 时间:2022-11-06 23:49 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:双线路策略路由和脚本备份切换
电信和网通的双线路策略路由.并且在其中一条线路断掉后自动切换为单线路,线路恢复后,恢复使用策略路由. 电信网关 190.168.1.10 网通网关 192.168.1.9 1 先设置用电信线路上网. 2.添加网通独立的路由表. [b]CODE[/b] / 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里添加策略路由规则 [b]CODE[/b] / ip policy-routing rule add src-address=0.0.0.0/0 dst-address=59.80.0.0/14 flow="" interface=all action=lookup table=test1 \    comment="" disabled=no .. .. 此处省略 记得把main移动到最后 4、配置自动切换脚本 [b]CODE[/b] / system script add name="test1down" source="/ ip policy-routing table test1 \nset \[/ ip policy-routing table test1 find \    dst-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 \    dst-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 \    dst-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 \    dst-address=0.0.0.0\] gateway 190.168.1.10" policy=ftp,reboot,read,write,policy,test 5 配置NETWATCH用于监视网络的通断情况 [b]CODE[/b] / 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 文章录入:csh    责任编辑:csh 
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部