本文共 2465 字,大约阅读时间需要 8 分钟。
探测目的地址是否存活,多用于多链路出口探测使用。可用于关联路由、策略路由、防火墙双机切换等。实现高可用性,各个厂商都有相关技术,以下举例思科、华为、Juniper配置方法。
思科
ip sla 2 //SLA 编号
icmp-echo 192.169.9.66 source 192.168.1.2 //探测目的地址并指定源地址timeout 10000 //超时时间10000毫秒frequency 20 //探测频率20秒一次ip sla schedule 2 life forever start-time now //sla探测策略为永久,开始时间为现在track 2 ip sla 2 reachability //track与sla 关联ip route 192.192.9.0 255.255.255.0 192.168.1.1 track 2 //关联路由华为:ip-link
ip-link check enable // 全局使能ip-link 功能ip-link 1 destination x.x.x.z timer 5 mode icmp //ip-link 编号、超时时间、模式(除ICMP外还有arp模式)ip route-static 0.0.0.0 0.0.0.0 x.x.x.z preference 50 ip-link 1 //关联IP-linkJuniper: ip monitor
RPM Configuration
set services rpm probe Probe-Server test testsvr target address 1.1.1.1 >> RPM Probes test for the target in first ISP.set services rpm probe Probe-Server test testsvr probe-count 10set services rpm probe Probe-Server test testsvr probe-interval 5set services rpm probe Probe-Server test testsvr test-interval 10set services rpm probe Probe-Server test testsvr thresholds successive-loss 10set services rpm probe Probe-Server test testsvr thresholds total-loss 5set services rpm probe Probe-Server test testsvr destination-interface ge-0/0/0.0set services rpm probe Probe-Server test testsvr next-hop 1.1.1.1set services rpm probe Probe-Server1 test testsvr target address 2.2.2.2 >> RPM Probes test for the target in second ISP.
set services rpm probe Probe-Server1 test testsvr probe-count 10set services rpm probe Probe-Server1 test testsvr probe-interval 5set services rpm probe Probe-Server1 test testsvr test-interval 10set services rpm probe Probe-Server1 test testsvr thresholds successive-loss 10set services rpm probe Probe-Server1 test testsvr thresholds total-loss 5set services rpm probe Probe-Server1 test testsvr destination-interface ge-0/0/1.0set services rpm probe Probe-Server1 test testsvr next-hop 2.2.2.2IP-Monitoring Configurationset services ip-monitoring policy Server-Tracking match rpm-probe Probe-Serverset services ip-monitoring policy Server-Tracking then preferred-route routing-instances FBF-1 route 0.0.0.0/0 next-hop 2.2.2.2 >> Installs route in the first routing-instanceset services ip-monitoring policy Server-Tracking1 match rpm-probe Probe-Server1
set services ip-monitoring policy Server-Tracking1 then preferred-route routing-instances FBF-2 route 0.0.0.0/0 next-hop 1.1.1.1 >> Installs route in the second routing-instance转载于:https://blog.51cto.com/3796535/2070372