Configuring IP Monitoring with Interface Failover Using Boolean Conditions
Using IP monitoring with interface failover, it is possible to incorporate AND and OR conditions for monitored IP addresses. For the probe to fail, each test that makes up a given probe must fail (AND logic). If any of the probes specified for a given IP-monitoring policy fail then the IP-monitoring action is triggered (OR logic). The following example shows how to use rpm probes and IP-monitoring to implement AND and OR combinations. Suppose you want to bring up a backup interface when both IP addresses 184.108.40.206 and 220.127.116.11 are unreachable and also bring up the backup interface when IP address 18.104.22.168 is unreachable, then this scenario can be expressed as the following Boolean statement– “If (22.214.171.124 is unreachable AND 126.96.36.199 is unreachable) OR (188.8.131.52 is unreachable) then enable the backup interface”.
The configuration below implements the logic required for the scenario. The following commands show how the Junos features are substituted into in the above statement and map to the configuration. Probe1 and probe2 are defined in the example configuration below. Probe1 consists of two tests which are connected together with the boolean AND condition. If (probe1 fails OR probe2 fails) then enable the backup interface.