Hello all,
I have a strange thing happening. I want to run an EEM applet that will remove two BGP network statements when a BGP neighbor goes down. The equipment is an ASR1002, running IOS-XE. There is also AAA using an external Radius server configured on the router.
The equipment is already in production, so it is not easy to test things. First I wait for a syslog message that the neighbor is down. Then I want to execute some CLI commands. I configured the following:
event manager applet TEST-1
event syslog pattern "%BGP-5-ADJCHANGE: neighbor a.b.c.d vpn vrf XXX Down"
action 1.0 cli command "enable"
action 2.0 cli command "config term"
action 3.0 cli command "router bgp 23456"
action 4.0 cli command "address-family ipv4"
action 5.0 cli command "no network a.b.c.d mask 255.255.255.255"
action 6.0 cli command "no network a.b.c.e mask 255.255.255.255"
When I shut down the LAN interface, the neighbor goes down, the applet is triggered, I see that, but the networks are not removed from the config. Have I forgotten something?