10-21-2015 06:20 AM - edited 03-08-2019 02:18 AM
Hello,
Is there any way to create a track object to track the BGP neighbor status ?!
My goal is when the CE router loses its neighborship it will decrement the priority of glbp.
Solved! Go to Solution.
10-21-2015 06:41 AM
Hi Guilherme,
There is not direct support for tracking a specific BGP peer. However, you can use a so-called stub tracking object whose state is set by an EEM script, and use this EEM script to react to logging messages that state that a particular BGP neighbor has gone up or down, and set the stub tracking object state appropriately. Then you can reference this tracking object in your GLBP configuration.
As an example, this would be the configuration for a pair of EEM scripts that check on the particular availability of the BGP peer 10.0.12.2, and set the stub track object accordingly:
track 1 stub-object default-state down ! event manager applet BGP-Neigh-Down event syslog pattern "%BGP-5-ADJCHANGE: neighbor 10.0.12.2 Down" action 1.0 track set 1 state down ! event manager applet BGP-Neigh-Up event syslog pattern "%BGP-5-ADJCHANGE: neighbor 10.0.12.2 Up" action 1.0 track set 1 state up
Feel free to adapt the IP address of the peer, names of the scripts and the track object number to your specific needs.
Best regards,
Peter
10-21-2015 06:41 AM
Hi Guilherme,
There is not direct support for tracking a specific BGP peer. However, you can use a so-called stub tracking object whose state is set by an EEM script, and use this EEM script to react to logging messages that state that a particular BGP neighbor has gone up or down, and set the stub tracking object state appropriately. Then you can reference this tracking object in your GLBP configuration.
As an example, this would be the configuration for a pair of EEM scripts that check on the particular availability of the BGP peer 10.0.12.2, and set the stub track object accordingly:
track 1 stub-object default-state down ! event manager applet BGP-Neigh-Down event syslog pattern "%BGP-5-ADJCHANGE: neighbor 10.0.12.2 Down" action 1.0 track set 1 state down ! event manager applet BGP-Neigh-Up event syslog pattern "%BGP-5-ADJCHANGE: neighbor 10.0.12.2 Up" action 1.0 track set 1 state up
Feel free to adapt the IP address of the peer, names of the scripts and the track object number to your specific needs.
Best regards,
Peter
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