Monday, March 15, 2010


A post on prompted me to look farther into this.  It is a pretty handy little scripting tool built into the IOS.  I played with a basic one in GNS3 today:

event manager applet ISR_CISCO
 event syslog pattern "Interface FastEthernet0/0, changed state to down"
 action 1.0 cli command "enable"
 action 2.0 cli command "conf t"
 action 3.0 cli command "interface fa0/0"
 action 4.0 cli command "no shut"
 action 5.0 cli command "ip address"

This will track if fa0/0 goes down, and if it does it will perform a no shut on it...and assign it an IP address.  Ya, I was just playing, but take a look:

Router(config)#int fa0/0
*Mar  1 00:04:06.723: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down
*Mar  1 00:04:07.723: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down
*Mar  1 00:04:08.299: %SYS-5-CONFIG_I: Configured from console by vty0
*Mar  1 00:04:10.051: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar  1 00:04:11.051: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
*Mar  1 00:04:17.815: %SYS-5-CONFIG_I: Configured from console by consolsh ip int b
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0       YES manual up                    up
FastEthernet0/1            unassigned      YES unset  administratively down down

Pretty slick...heres a link. I will have to come back to this sometime. But I can see its usefulness.
Cisco EEM

No comments:

Post a Comment