cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

229
Views
5
Helpful
6
Replies
Highlighted
Beginner

Interface Tracking

I have the below query:

- HSRP tracking allows to tracking of the status of the interface status for the line protocol

- Based on that I allows to decrement or increment the priority.

 

Would like to check is there any mechanism by which we can track the interface physical status rather than line protocol.

What  I want to check is that if an interface status is down I want to decrement the HSRP priority. (I don't want to check line protocol status)

 

Router# show interfaces
Ethernet 0 is down, line protocol is down

Let me know if this is possible.

Everyone's tags (1)
6 REPLIES 6
Highlighted
VIP Advocate

Re: Interface Tracking

Hi,

You can use the EMM Script. 

 

Reference book for configuration as  https://routerjockey.com/2010/06/14/working-with-the-embedded-event-manager-eem/

 

Regards,

Deepak Kumar

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution If this comment will make help you!
Highlighted
Beginner

Re: Interface Tracking

Thanks will go through it.

Wanted to check apart from scripting can this be achieved via IOS commands or it is not supported by IOS commands

Highlighted
VIP Mentor

Re: Interface Tracking

Hello,

 

Deepak is right, an EEM script is a good idea. I happen to have one on file. You actually need two scripts, one to apply when the interface is down, the other when it is up. 

You can do all this in IOS. The syslog pattern obviously needs to match your own interface (GigabitEthernet0/0 is just an example):

 

event manager applet INT_DOWN_HSRP_PRIO_DOWN
event syslog pattern "%LINK-3-UPDOWN: Interface GigabitEthernet0/0, changed state to down"
action 1.0 cli command "enable"
action 2.0 cli command "config t"
action 3.0 cli command "interface GigabitEthernet0/0"
action 4.0 cli command "standby 1 priority 50"
action 5.0 cli command "exit"
action 6.0 cli command "end"

 

event manager applet INT_UP_HSRP_PRIO_UP
event syslog pattern "%LINK-3-UPDOWN: Interface GigabitEthernet0/0, changed state to up"
action 1.0 cli command "enable"
action 2.0 cli command "config t"
action 3.0 cli command "interface GigabitEthernet0/0"
action 4.0 cli command "standby 1 priority 150"
action 5.0 cli command "exit"
action 6.0 cli command "end"

Highlighted
Beginner

Re: Interface Tracking

Hi Thanks for your inputs.

The below commands which you have shared are all are IOS commands. If I use this then my understanding is that I don't need to use any external scripts to do it.

Request you to please confirm this.

Highlighted
VIP Advocate

Re: Interface Tracking

Hi,

Yes, All are IOS commands. There is no need for any other script type. 

 

Regards,

Deepak Kumar

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution If this comment will make help you!
Highlighted

Re: Interface Tracking

The provided solution from the Deepak is correct and best for the IOS. I would like to add single command to make sure your scrip should works fine

 

event manager session cli username   ---> TACACS username if this device added into the TACACS server.

 

action 7.0 cli command "show run | append diskx:HSRP_EEM.txt"  To save the outputs.

 

Regards,

Tayyab  -  www.tayyabmunir.com

***Rate Please ***

*** Please rate all helpful responses and mark solutions***
CreatePlease to create content
Content for Community-Ad