Description

How to track two IP addresses in IP monitoring on SRX Branch Series?

Symptoms

An example SRX configuration and output is shown on the SRX configured to track two IP addresses.  When both of the tracked IPs are down, an ISP failover is done.

Solution


For more details on how to configure IP-monitoring, refer to KB article:  http://kb.juniper.net/KB22052 [juniper.net] .

In the current scenario, two tests in a probe have been added; this will result in a logical AND of these tests. Each test will be used to track an IP address. 

[edit services rpm]
root@210-3# show
probe Probe-1 {
    test test-1 {
        target address 2.2.2.2;
        probe-count 5;                           
        probe-interval 1;                           
        test-interval 2;
        next-hop 2.2.2.2;
        destination-interface ge-0/0/0.0
        thresholds {
            successive-loss 2;
            total-loss 4;
        }
    }
    test test-2 {
        target address 8.8.8.8;
        probe-count 5;         
        probe-interval 1;
        test-interval 2;
        next-hop 2.2.2.2;
        destination-interface ge-0/0/0.0
        thresholds {
            successive-loss 2;
            total-loss 4;
        }
    }
}

IP-monitoring policy will be configured as follows.  When the two IP addresses, 2.2.2.2 and 8.8.8.8, being tracked are down, a failover will occur.

[edit services ip-monitoring]
root@210-3# show
policy ISP1-mon {
    match {
        rpm-probe Probe-1;
    }
    then {
        preferred-route {
            route 0.0.0.0/0 {
                next-hop 3.3.3.2;
            }
        }
    }

}

The failover can be tested as follows:

  • When none of the IPs are down:
    root@210-3# run show services ip-monitoring status    
    Policy - ISP1-mon
      RPM Probes:
        Probe name             Address          Status   
        ---------------------- ---------------- ---------
        Probe-1                2.2.2.2          PASS     
        Probe-1                8.8.8.8          PASS     
      Route-Action:
        route-instance    route             next-hop         State
        ----------------- ----------------- ---------------- ------------- 
        inet.0            0.0.0.0           3.3.3.2          NOT-APPLIED  
    

  • When one of the IPs is down:
    root@210-3# run show services ip-monitoring status    
    Policy - ISP1-mon
      RPM Probes:
        Probe name             Address          Status   
        ---------------------- ---------------- ---------
        Probe-1                2.2.2.2          FAIL     
        Probe-1                8.8.8.8          PASS     
      Route-Action:
        route-instance    route             next-hop         State
        ----------------- ----------------- ---------------- ------------- 
        inet.0            0.0.0.0           3.3.3.2          NOT-APPLIED  
    

  • When both the IPs are down:
    root@210-3# run show services ip-monitoring status 
    Policy - ISP1-mon
      RPM Probes:
        Probe name             Address          Status   
        ---------------------- ---------------- ---------
        Probe-1                2.2.2.2          FAIL     
        Probe-1                8.8.8.8          FAIL     
      Route-Action:
        route-instance    route             next-hop         State
        ----------------- ----------------- ---------------- ------------- 
        inet.0            0.0.0.0           3.3.3.2          APPLIED