Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

Redistribute based on Track status?

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
Cisco Employee

Re: Redistribute based on Track status?

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"

6 REPLIES
Hall of Fame Super Blue

Re: Redistribute based on Track status?

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

New Member

Re: Redistribute based on Track status?

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.

Cisco Employee

Re: Redistribute based on Track status?

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?

New Member

Re: Redistribute based on Track status?

Currently running 12.4(25b)

Thanks for your help,

Paul.

Cisco Employee

Re: Redistribute based on Track status?

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"

New Member

Re: Redistribute based on Track status?

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.

550
Views
0
Helpful
6
Replies
CreatePlease to create content