www.howtonetwork.org

CCNA & CCNP Certifcation Training

  • About
  • Contact
  • FAQ
  • Join
  • Home
  • CCNA
    • ICND1
    • ICND2
    • 101 CCNA LABS
  • CCNP
    • ROUTE
    • SWITCH
    • TSHOOT
    • 101 CCNP LABS
  • CompTIA
    • Security+
    • Network+
  • Design
    • CCDA
    • CCDP
You are here: Home / ROUTE / Module 5 / Path Control – Cisco Embedded Event Manager

Path Control – Cisco Embedded Event Manager

Cisco IOS Embedded Event Manager (EEM) is yet another tool that can be used for availability monitoring. EEM is a powerful and flexible subsystem that provides real-time network event detection and onboard automation. EEM also increases the intelligence of network devices, allowing them to act on and facilitate management actions for specific network events. A series of event detector processes designed to monitor explicit operational aspects of the switch are built into Cisco IOS Software. These can be primed to look for a specific event, and when that event occurs, they can act as a trigger to start up a user-loaded script. These scripts are programmed using either simple Command Line Interface (CLI) commands or using a scripting language called Tool Command Language (Tcl).

NOTE: You are not required to implement any IOS EEM configurations in the current ROUTE exam. The following section is included only to demonstrate the configuration and verification of a basic CLI EEM implementation using Cisco IOS software.

Configuring and Verifying Cisco IOS Embedded Event Manager

When using the CLI to configure EEM, you must first configure an EEM applet. The EEM applet is a simple form of policy that is defined within the CLI configuration using the event manager applet [name] global configuration command. After you have configured the EEM applet, the router then transitions to EEM applet configuration mode. This configuration mode supports three commands, which are event, action, and set commands.

The event commands are used to specify the event criteria which trigger the applet to run. The action commands are used to specify an action to perform when the EEM applet is triggered. And finally, the set command is used to set the value of an EEM applet variable.  Following the configuration, the show event manager policy registered command can then be used to display a list of registered applets.

The following configuration example shows how to configure a basic EEM applet using the CLI. This applet will be triggered when the message Serial0/0, changed state to down is logged by the router. When triggered by this event, the applet will print a Syslog message that reads ‘Switch To Backup’ and then configure a default route via Serial0/1. This configuration is implemented as follows:

R2(config)#event manager applet INSTALL-BACKUP-ROUTE
R2(config-applet)#event syslog pattern “Serial0/0, changed state to down”
R2(config-applet)#action 1.1 syslog msg “Switch To Backup”
R2(config-applet)#action 1.2 cli command “enable”
R2(config-applet)#action 1.3 cli command “configure terminal”
R2(config-applet)#action 1.4 cli command “ip route 0.0.0.0 0.0.0.0 se 0/1”
R2(config-applet)#exit

Next, another EEM applet is configured to monitor the router log for the message Serial0/0, changed state to up. When this message is seen, the applet is triggered and prints the message ‘Switch To Primary’. The applet is then configured to remove the previously configured static route via Serial0/1, allowing traffic to the Internet to flow through the Serial0/0 interface, which is the primary path to the Internet. This is implemented as follows:

R2(config)#event manager applet RESTORE-PRIMARY-ROUTE
R2(config-applet)#event syslog pattern “Serial0/0, changed state to up”
R2(config-applet)#action 1.1 syslog msg “Switch To Primary”
R2(config-applet)#action 1.2 cli command “enable”
R2(config-applet)#action 1.3 cli command “configure terminal”
R2(config-applet)#action 1.4 cli command “no ip route 0.0.0.0 0.0.0.0 se 0/1”
R2(config-applet)#exit

Before verifying the EEM configuration, the current state of the routing table is verified and shows the default route pointing out the Serial0/0 interface:

R2#show ip route | b Gateway
Gateway of last resort is 0.0.0.0 to network 0.0.0.010.0.0.0/24 is subnetted, 2 subnets
C       10.0.2.0 is directly connected, Serial0/1
C       10.0.0.0 is directly connected, Serial0/0
S*   0.0.0.0/0 is directly connected, Serial0/0

To test this configuration, the Serial0/0 interface is disabled using the shutdown command:

R2(config)#interface serial 0/0
R2(config-if)#shutdown
R2(config-if)#
*Mar  2 02:00:55.630: %LINK-5-CHANGED: Interface Serial0/0, changed state to administratively down
*Mar  2 02:00:56.632: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down
*Mar  2 02:00:56.648: %HA_EM-6-LOG: INSTALL-BACKUP-ROUTE: Switch To Backup

When the Serial0/0, changed state to down message is logged, Cisco IOS EEM prints the configured message, which states that the backup path is being used, and the router is then transparently configured using the commands specified the applet configuration. The routing table on R2 now shows the following entries:

R2#show ip route | b Gateway
Gateway of last resort is 0.0.0.0 to network 0.0.0.010.0.0.0/24 is subnetted, 1 subnets
C       10.0.2.0 is directly connected, Serial0/1
S*   0.0.0.0/0 is directly connected, Serial0/1

To verify the operation of the restoration configuration, Serial0/0 is enabled as follows:

R2(config)#interface serial 0/0
R2(config-if)#no shutdown
R2(config-if)#
*Mar  2 02:02:00: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up
*Mar  2 02:02:00: %HA_EM-6-LOG: RESTORE-PRIMARY-ROUTE: Switching To Primary

The backup static route is removed and the routing table on R2 shows the following:

R2#show ip route | b Gateway
Gateway of last resort is 0.0.0.0 to network 0.0.0.010.0.0.0/24 is subnetted, 2 subnets
C       10.0.2.0 is directly connected, Serial0/1
C       10.0.0.0 is directly connected, Serial0/0
S*   0.0.0.0/0 is directly connected, Serial0/0

While the example above is a very basic example of the capabilities of EEM, the flexibility that is afforded by EEM allows for advanced configurations. For example, EEM can be used in conjunction with IP SLA and SNMP notifications and then implement the desired configuration or action on the router. The capabilities of EEM are limited only by your imagination.

Prev

Next

About Us

This is a free bonus site for members of www.howtonetwork.com

Copyright

The content on this copyright Reality Press Ltd.
Copyright Reality Press Ltd.