Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Shut/No Shut a Loopback based on HSRP status of another interface

Example:

!

interface FastEthernet 0/0

ip address 10.0.0.2 255.255.255.0

standby 1 ip 10.0.0.1

standby 1 preempt

standby 1 priority 150

!

interface Loopback 99

ip address 10.99.0.1

!

What I want is that:

- when HSRP(or could be with VRRP) status of interface FastEthernet 0/0 is active, then interface Loopback is in "no shutdown".

- when HSRP status of interface FastEthernet 0/0 is stantdby(or something else), then interface Loopback is in "shutdown".

I thought that it can be mid with embedded event manager, or some cyclical TCL script.

But how?

Somebody has any suggestion?

Everyone's tags (4)
2 REPLIES
Hall of Fame Super Bronze

How to Shut/No Shut a Loopback based on HSRP status of another i

Re: How to Shut/No Shut a Loopback based on HSRP status of anoth

Just after posting this question I found that link that you sent:

http://ccie-in-3-months.blogspot.com.br/2008/11/solving-routing-asymmetry-due-to-hsrp.html

I used it as base for my config on a lab, and I hadn't good results.

For some reason my commands on EEM are to been well interpreted

I attached:

- A ScreenShot of my Lab diagram

- The configs of two routers

- The output debug of event manager of two router when I force the physical interface down.

P.S.: I'm starting to think that test the output of the Syslog will not be a good Idea.

I thing that a TCL(with the below logic) been repeated every second will be more reliable:

if standby group name hsrp-Fa0/1.1000-10 == active

{

  if interface loopback 9901 protocol != up

    {

     action 2.1 cli command "enable"

     action 2.2 cli command "configure terminal"

     action 2.3 cli command "interface Loopback9901"

     action 2.4 cli command " no shutdown"

    }

}

else

{

  if interface loopback 9901 protocol != down

    {

     action 2.1 cli command "enable"

     action 2.2 cli command "configure terminal"

     action 2.3 cli command "interface Loopback9901"

     action 2.4 cli command "shutdown"

    }

}

I just still don't know how to do it...

A mensagem foi editada por: Douglas Fernando Fischer Oops.. I had made a mistake on the Loopback name at the action section.

1058
Views
0
Helpful
2
Replies
CreatePlease to create content