Using Boolean Operations to Track Static Routes with Watcher Profiles
The following task configures a watcher profile to monitor two pre-configured IPPM profiles, "p1" and "p2", and configure actions based on their validation results. It selects static routes to track against a watcher profile so that the device modifies the static route mapped to the watcher profile based on the reachability of the profile.
- Enter global configuration mode.
- Configure a watcher. This example creates a watcher called "w2" and places the device in watcher configuration mode.
- Specify the IPPM profile to
monitor, and the frequency at which the watcher checks for the IPPM test
validation results.This example specifies that the IPPM profile called "p2" is monitored, and that the watcher checks for the IPPM test validation results every 90 seconds.
- Specify another IPPM profile to
monitor, and the frequency at which the watcher checks for the IPPM test
validation results.This example specifies that the IPPM profile called "p1" is monitored, and that the watcher checks for the IPPM test validation results every 90 seconds.
- Configure the watcher profile using a boolean condition.
- Configure an action for a
watcher configuration upon successful validation. This command specifies that syslog messages are logged when the IPPM profile p1 indicates success, meaning the target is reachable, and the IPPM profile p2 indicates failure, meaning the target is unreachable.
- Configure an action for a
watcher configuration upon successful validation. This command enables logging syslog messages upon successful IPPM validation tests.
- Configure an action for a watch
configuration upon failed validation. This command enables logging syslog messages upon failed IPPM validation tests.
- Return to global configuration mode.
- Select a static route to track against a watcher profile.This command configures a static route (10.5.5.1/24) with a next-hop address of 10.4.4.4. It associates this static route with the watcher profile "w2".
The following example configures a watcher profile to monitor two pre-configured IPPM profiles, "p1" and "p2", and configure actions based on their validation results. It selects static routes to track against a watcher profile so that the device modifies the static route mapped to the watcher profile based on the reachability of the profile.
device# configure terminal device(config)# watcher name w2 device(config-watcher-w2)# watch ippm p2 frequency 90 device(config-watcher-w2)# watch ippm p1 frequency 90 device(config-watcher-w2)# success and ippm p2 fail ippm p1 success device(config-watcher-w2)# action success logging enable device(config-watcher-w2)# action failure logging enable device(config-watcher-w2)# exit device(config)# ip route 10.5.5.1/24 10.4.4.4 watcher w2