EEM Scripting


Scenario:

Ever since you switched your career from Linux engineer to networking you missed your good old scripting tools. You just heard about network engineer about EEM scripting for Cisco routers and you can’t wait to try it out!

Goal:

  • All IP addresses have been preconfigured for you.
  • Configure router Autobot so when the FastEthernet 0/0 interface goes down a script runs that also shuts down the FastEthernet1/0 interface.
  • You are only allowed to use EEM scripting to achieve this.

IOS:

c3640-jk9s-mz.124-16.bin

Topology:

You need to register to download the GNS3 Topology File. (Registration is Free!)

EEM Scripting

Configuration Files

You need to register to download the GNS3 topology file. (Registration is free!)

Once you are logged in you will find the configuration files right here.

Opt In Image
Do you want your CCNA or CCNP Certificate?

The How to Master series helps you to understand complex topics like spanning-tree, VLANs, trunks, OSPF, EIGRP, BGP and more.

Written by René Molenaar - CCIE #41726

You May Also Like

About the Author: Rene Molenaar

René - CCIE #41726 is the creator of GNS3Vault.com where he shares CCNA, CCNP and CCIE R&S labs. He also blogs about networking on http://networklessons.com

5 Comments

    1. This lab currently only has the startup-configs, not the final configs (still have to create it). The message that you need to be registered is always there….I need to change it so it only shows this to non-registered members.

  1. This script works for me:

    event manager applet interface_Shutdown
    event syslog pattern " Line protocol on Interface FastEthernet0/0, changed state to down"
    action 1.0 cli command "enable"
    action 1.5 cli command "config t"
    action 2.0 cli command "interface fa1/0"
    action 2.5 cli command "shutdown"
    action 3.0 cli command "end"

  2. event manager applet Shut_Fa0/0
    event syslog pattern “Line protocol on Interface FastEthernet0/0, changed state to down”
    action 1.0 syslog msg “EEM will now fix the issue”
    action 1.5 cli command “enable”
    action 2.0 cli command “conf t”
    action 2.5 cli command “int fa1/0”
    action 3.0 cli command “shut”
    action 3.5 cli command “end”
    !
    event manager applet NoShut_Fa0/0
    event syslog pattern “Line protocol on Interface FastEthernet0/0, changed state to up”
    action 1.0 syslog msg “EEM will now fix the issue”
    action 1.5 cli command “enable”
    action 2.0 cli command “conf t”
    action 2.5 cli command “int fa1/0”
    action 3.0 cli command “no shut”
    action 3.5 cli command “end”
    !

Comments are closed.