cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
679
Views
15
Helpful
7
Replies

EEM Question for Joe Clark

wilson_1234_2
Level 3
Level 3

Joe, I read your reply in this post:

javascript:newWin('http://forum.cisco.com/eforum/servlet/NetProf?page=netprof&forum=Network%20Infrastructure&topic=LAN%2C%20Switching%20and%20Routing&CommCmd=MB%3Fcmd%3Dpass_through%26location%3Doutline%40%5E1%40%40.1dddb7ff/6#selected_message')

In the link above, the poster after you stated that you need a monitoring program to monitor the interfaces and to launch a script.

You are saying that I do not need a script to do this.

How would I implement the applet you provided?

Would it be a stand alone funtion on the router itself with nothing else needed?

Do I need to configure EEM globally to initiate the applet you provided?

7 Replies 7

Joe Clarke
Cisco Employee
Cisco Employee

At the very simplest, just copy what I have posted into your config, and you will immediately have two EEM applet policies running. However, the interface names in that sample are not what you want, so you'd want to adjust them for your configuration. These policies require 12.4(2)T or higher (or 12.2(33)SRC). If you need something for earlier IOS, I can provide it.

EEM doesn't require anything else to be configured on the device. However, in the examples I provided to you, EEM is tied into the Object Tracking subsystem (shown in the configuration).

There is nothing that needs to be configured globally for EEM to execute applet policies.

thanks joe.

Joe, the below looks like it takes down the interface by tracking another interface, but does the interface that is taken down, dynamically come back up if the tracked interface comes back up?

Or is more needed to do that?

event manager track_interface

event track 1 state down

action 1.0 syslog msg "Interface FastEthernet0/0 has gone down; taking down Fa1/0 as well"

action 2.0 cli command "enable"

action 3.0 cli command "config t"

action 4.0 cli command "int fa1/0"

action 5.0 cli command "shut"

action 6.0 cli command "end"

If you don't have 12.4T, you can still do this using EEM by watching for the link down syslog message:

event manager watch_interface

event syslog pattern ".*UPDOWN.*FastEthernet0/0.* changed state to down"

action 1.0 syslog msg "Interface FastEthernet0/0 has gone down; taking down Fa1/0 as well"

action 2.0 cli command "enable"

action 3.0 cli command "config t"

action 4.0 cli command "int fa1/0"

action 5.0 cli command "shut"

action 6.0 cli command "end"

You'll need another policy to watch for the interface to come back up:

event manager track_interface_up

event track 1 state up

action 1.0 syslog msg "Interface FastEthernet0/0 has come back up; bringing up Fa1/0 as well"

action 2.0 cli command "enable"

action 3.0 cli command "config t"

action 4.0 cli command "int fa1/0"

action 5.0 cli command "no shut"

action 6.0 cli command "end"

Or:

event manager watch_interface

event syslog pattern ".*UPDOWN.*FastEthernet0/0.* changed state to up"

action 1.0 syslog msg "Interface FastEthernet0/0 has come back up; bringing up Fa1/0 as well"

action 2.0 cli command "enable"

action 3.0 cli command "config t"

action 4.0 cli command "int fa1/0"

action 5.0 cli command "no shut"

action 6.0 cli command "end"

Thanks joe.

Joe,

I have a 3845 router that is connected to our core network with a single etherent interface on one 6509 switch.

I have a second 6509 that I could connect the unused etherenet on this router.

Thsi router is connected to Verizon for our voice implementation and Verizon is bound to the ip address of this etherent interface.

What are your thoughts of using this method as sort of a stateful failover in the even I loose one of the core switches (something that recently happened).

on the router:

e0/0 is up and active --> core switch 1

e0/1 is admin down --> core switch 2

If I loose core switch 1, e0/0 goes down

policy brings up e0/1 configured with same ip address.

Do you think this would work?

I could also have the policy shut down e0/0 to make sure it stays down when the switch comes back up.

This could certainly work from an EEM perspective. Yes, it would be a good idea to admin down e0/0 to ensure you don't have an IP address conflict when switch 1 comes back online. This would also allow you to build in some hold time to ensure the connection is stable.

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: