cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1183
Views
0
Helpful
6
Replies

Redistribute based on Track status?

paul.basford
Level 1
Level 1

Hi,

I am running EIGRP on a couple of routers and redistributing connected to advertise a loopback. Is it possible to stop advertising these loopbacks if a 'Track' status changes to down?

Basically I only want to advertise a specific loopback interface when the Track is up. Can anyone advise on a way to achieve this?


Thanks,

Paul.

1 Accepted Solution

Accepted Solutions

Hmm, given that you have EEM 2.1, direct tracking support will not be possible.  However, you do have syslog message support for tracked objects, so you can still use applets.  There are multiple ways to acommplish the redistribution change, but using your previous thought of an interface bounce, see the following.

This applet will detect when tracked object 1 goes down.  When it does, it will take down interface loopback0, thus preventing the route from being advertised.

event manager applet redist-track-down

event syslog pattern "TRACKING-5-STATE: 1 .*Up->Down"

action 1.0 cli command "enable"

action 2.0 cli command "config t"

action 3.0 cli command "int lo0"

action 4.0 cli command "shut"

action 5.0 cli command "end"

This next applet will do the opposite.  When the tracked object comes back up, the interface will be brought back up:

event manager applet redist-track-up

event syslog pattern "TRACKING-5-STATE: 1 .*Down->Up"

action 1.0 cli command "enable"

action 2.0 cli command "config t"

action 3.0 cli command "int lo0"

action 4.0 cli command "no shut"

action 5.0 cli command "end"

View solution in original post

6 Replies 6

Jon Marshall
Hall of Fame
Hall of Fame

Paul

EEM should be able to do this. I suggest you repost or move this thread to Network Management forum where Joe Clarke should be able to help you out.

Jon

Thanks Jon, moved to Network Management.

Now you mention the EEM approach, I suppose I could have an EEM script that simply shuts or no shuts my loopback interface when the track changes status. This would then control whether the interface is redistributed or not.

I was hoping I would be able to somehow incorporate the track into a route map or prefix list of some kind to control when I redistribute the connected interface rather than adding an additional element of complexity in EEM scripts.

I do not think you can directly control redistributions with a track.  EEM would be a viable solution, and depending on your IOS version, a script may not be required (i.e. what you want could be done with an applet).  Exactly which version of IOS do you have?

Currently running 12.4(25b)

Thanks for your help,

Paul.

Hmm, given that you have EEM 2.1, direct tracking support will not be possible.  However, you do have syslog message support for tracked objects, so you can still use applets.  There are multiple ways to acommplish the redistribution change, but using your previous thought of an interface bounce, see the following.

This applet will detect when tracked object 1 goes down.  When it does, it will take down interface loopback0, thus preventing the route from being advertised.

event manager applet redist-track-down

event syslog pattern "TRACKING-5-STATE: 1 .*Up->Down"

action 1.0 cli command "enable"

action 2.0 cli command "config t"

action 3.0 cli command "int lo0"

action 4.0 cli command "shut"

action 5.0 cli command "end"

This next applet will do the opposite.  When the tracked object comes back up, the interface will be brought back up:

event manager applet redist-track-up

event syslog pattern "TRACKING-5-STATE: 1 .*Down->Up"

action 1.0 cli command "enable"

action 2.0 cli command "config t"

action 3.0 cli command "int lo0"

action 4.0 cli command "no shut"

action 5.0 cli command "end"

That's perfect, I tried this out in a lab setup yesterday and it's working very nicely. I'm only just beginning to scratch the surface of EEM but I can see it's an extremely powerful tool and will likely be something I begin to use more often

Many thanks,

Paul.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: