08-02-2012 07:40 PM - edited 03-04-2019 05:09 PM
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?
08-03-2012 09:17 AM
Careful with posting CCIE related content on public forums!
Here are some guidelines on how to approach this task:
http://ccie-in-3-months.blogspot.com/2008/11/solving-routing-asymmetry-due-to-hsrp.html
08-03-2012 11:50 AM
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.
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