在虚拟路由器中配置 IP 监控
可以从虚拟路由器发送实时性能监控 (RPM) 探测。您可以从 IP 监控配置中指定要添加到虚拟路由器中的路由。您还可以指定要在虚拟路由器中启用的备份接口。
以下是在虚拟路由器中使用路由故障转移进行 IP 监控的示例配置:
set services rpm probe Probe-Payment-Server test paysvr target address 5.1.1.2 set services rpm probe Probe-Payment-Server test paysvr probe-count 5 set services rpm probe Probe-Payment-Server test paysvr probe-interval 5 set services rpm probe Probe-Payment-Server test paysvr test-interval 3 set services rpm probe Probe-Payment-Server test paysvr routing-instance one set services rpm probe Probe-Payment-Server test paysvr thresholds successive-loss 5 set services rpm probe Probe-Payment-Server test paysvr hardware-timestamp set services ip-monitoring policy test-remote-server match rpm-probe Probe- Payment-Server set services ip-monitoring policy test-remote-server then preferred-route routing-instances one route 5.1.1.0/24 next-hop 2.1.1.2 set routing-instances one instance-type virtual-router set routing-instances one interface fe-0/0/1.0 set routing-instances one interface fe-0/0/2.0 set routing-instances one interface fe-0/0/7.0 set routing-instances one routing-options static route 5.1.1.0/24 next-hop 1.1.1.2
以下是在虚拟路由器中使用接口故障转移进行 IP 监控的示例配置:
set services rpm probe Probe-Payment-Server test paysvr target address 5.1.1.2 set services rpm probe Probe-Payment-Server test paysvr probe-count 5 set services rpm probe Probe-Payment-Server test paysvr probe-interval 5 set services rpm probe Probe-Payment-Server test paysvr test-interval 3 set services rpm probe Probe-Payment-Server test paysvr hardware-timestamp set services rpm probe Probe-Payment-Server test paysvr routing-instance one set services rpm probe Probe-Payment-Server test paysvr thresholds successive-loss 5 set services ip-monitoring policy test-remote-server match rpm-probe Probe- Payment-Server set services ip-monitoring policy test-remote-server then interface fe-0/0/2 enable set routing-instances one instance-type virtual-router set routing-instances one interface fe-0/0/1.0 set routing-instances one interface fe-0/0/2.0 set routing-instances one interface fe-0/0/7.0 set routing-instances one routing-options static route 5.1.1.0/24 qualified-nexthop 2.1.1.2 metric 1 set routing-instances one routing-options static route 5.1.1.0/24 qualified-nexthop 1.1.1.2 metric 10 set routing-instances one routing-options static route 5.1.1.2/32 next-hop 1.1.1.2 set routing-instances one routing-options static route 5.1.1.2/32 metric 1 set routing-instances one routing-options static route 5.1.1.2/32 preference 1
注意:
在虚拟路由器中定义 RPM 探测时,不应在层次结构级别输入 [edit set services rpm probe probe-owner test test-name]
下一跃点路由器的值。这是因为 RPM 守护程序始终在路由表中查找下一跃点地址,即使您在 inet.0
路由实例配置中指定了虚拟路由器也是如此。由于无法在 RPM 配置节中指定下一跃点路由器,因此需要将优先级为 1 的 /32 路由添加到跟踪的 IP 地址,以便系统始终使用通过 RPM 探测的主链路的路由。