01-30-2013 05:24 AM
Hello everybody!
I've 2 questions related to above topic:
1.) how do I get the vrf information for a route beeing changed.
2.) how do I track all routes in the routing table. including default-route
The following command: event routing network 0.0.0.0/0 ge 1; does not match the default-route.
Complete applet:
event manager applet route-table-monitor
event routing network 0.0.0.0/0 ge 1
action 1.0 syslog msg "Route changed: Type: $_routing_type, Network: $_routing_network, Mask/Prefix: $_routing_mask, Protocol: $_routing_protocol, GW: $_routing_lastgateway, Intf: $_routing_lastinterface"
!
As a workaround for the above: (This monitors all routes inclouding default-route; however there is still no vrf info)
event manager applet route-table-monitor
event tag e1 routing network 0.0.0.0/0
event tag e2 routing network 0.0.0.0/0 ge 1
trigger occurs 1
correlate event e1 or event e2
action 1.0 syslog msg "Route changed: Type: $_routing_type, Network: $_routing_network, Mask/Prefix: $_routing_mask, Protocol: $_routing_protocol, GW: $_routing_lastgateway, Intf: $_routing_lastinterface"
Best regards
Robert
02-04-2013 06:10 AM
Your workaround for the default route is correct. You have to watch the 0.0.0.0 route, and you can't have the ge value be 0 :-(.
For VRF, this was added in EEM 4.0. There is now a "vrf" keyword for the routing ED.
02-05-2013 03:04 AM
Hi Joseph!
Thx for your reply. I found the same fot the VRF thing and changed the applet to:
event manager applet route-table-monitor
event tag e1 routing network 0.0.0.0/0 ge 1 vrf name mandant1 maxrun 2
event tag e2 routing network 0.0.0.0/0 ge 1 vrf name mandant1
trigger occurs 1
correlate event e1 or event e2
action 1.0 syslog msg "Route changed: Type: $_routing_type, VRF: $_routing_vrf_name, $_routing_protocol, $_routing_network/$_routing_mask [$_routing_distance/$_routing_metric] via $_routing_lastgateway, $_routing_lastinterface"
!
Unfrotunately, almost all of our devices do not support eem 4.0
Once again thank's a lot.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide