Path monitor state tracking on routes required by that monitor
Suppose that you configure a static route to track the status of a monitor/policy pair, and that route is required for the associated monitor to reach it's target; if the monitor/policy pair ever becomes non-compliant then the route will be removed from the FIB and the monitor will never recover (triggering the route to be re-installed) since it no longer has a route to reach its target.
For example, suppose you have a monitor targeting
$ set service path-monitor host DC target 10.10.10.10 $ set service path-monitor monitor DC type ping host DC
If you have only one static route to reach
10.10.10.10, and you associate the DC monitor with it, the route will be withdrawn and the monitor will never recover should a non-compliant state ever be reached.
$ show ip route 10.10.10.10 Routing entry for 10.10.10.10/32 Known via "static", distance 1, metric 0, tag 0, best * via 10.10.1.2, dp0p1s1
set protocols static route 0.0.0.0/0 next-hop 10.10.1.2 path-monitor monitor DC policy 'DC' set protocols static route 0.0.0.0/0 next-hop 10.10.1.2 distance 10 set protocols static route 0.0.0.0/0 next-hop 10.10.2.2 distance 20 set protocols static route 10.10.10.10/32 next-hop 10.10.1.2 interface 'dp0p1s1'
10.10.1.2is the preferred next hop so long as the
DCmonitor is in compliance with the
10.10.2.2next hop will be used if this ever changes. The
/32static route ensures that the monitor always has a route to its target via
10.10.1.2, even if the default route is withdrawn.