Blog

Junos RPM probe

Since recent Junos versions there is a possibility to monitor reachability of a remote host. In case of RPM (Realtime Performance Monitor) decides that remote host is unreachable, it can take an defined action. In our case, we are going to monitor the primary default gateway. If the route become inaccessible, RPM will take an action which will change the default gateway to a backup one.

 

Scenario:

– System has set static default route via 10.50.1.1
– In case of default route become unreachable, switch to backup route
– When default route become accessible again, switch it back

 

 

[edit]
 routing-options {
 static {
 route 0.0.0.0/0 {
 next-hop 10.50.1.1
 }
 }
}

services {
 rpm {
 probe ISP-PRIMARY {
 test CHECK-1 {
 target address 10.50.1.1;
 probe-count 2;
 probe-interval 5;
 test-interval 10;
 source-address 10.50.1.2;
 thresholds {
 successive-loss 2;
 total-loss 2;
 }
 }
 }
 probe ISP-BACKUP {
 test check-gw {
 target address 10.70.1.1;
 probe-count 2;
 probe-interval 10;
 }
 }
 }
 ip-monitoring {
 policy ISP-SWITCH {
 match {
 rpm-probe ISP-PRIMARY;
 }
 then {
 preferred-route {
 route 0.0.0.0/0 {
 next-hop 10.70.1.1;
 }
 }
 }
 }
 }
}
Tags: