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 / 101 CCNP Labs Solutions / CCNP Lab 062 Solution: Embedded Event Manager Lab

CCNP Lab 062 Solution: Embedded Event Manager Lab

Lab Objective:

The focus of this lab is to understand Embedded Event Manager (EEM) implementation and configuration in Cisco IOS routers. Additional technologies include Cisco IOS ERM.

Lab Topology:

This lab requires only a single router running, at a minimum, Cisco IOS Software 12.4 Mainline. The router should have at least one Ethernet interface. The primary purpose of this lab is to reinforce configuration knowledge of the stated chapter.

IMPORTANT NOTE

If you have multiple devices and servers / hosts in your home lab and you would like to test solutions for topics such as Syslog, SNMP and NetFlow by setting up host and viewing charts or logging information, for example, please feel free to do so. While these labs include logging to ‘supposed’ hosts, there are no SNMP or Syslog servers in the http://www.howtonetwork.net racks and so you will not be able to test the solutions in those racks. If you only have a single router, you can bring up the Ethernet interface by implementing the following configuration:

!
interface fastethernet 0/0
loopback
no keepalive
no shut
!

Task 1

Configure the router with a hostname of R1. Next, enable the LAN interface of the router and assign it the IP address 150.1.1.1/24. Ensure that this interface is in an up / up state.

Task 2

Configure a Cisco IOS Embedded Resource Manager (ERM) policy for critical CPU and memory utilization. The router should generate a critical Syslog message when the CPU and memory utilization exceeds 80% within a 15 second interval. Additionally, a Syslog message should also be generated when the CPU and memory utilization falls below 50% within a 15 second interval. Verify the Embedded Resource Manager configuration using appropriate commands.

Task 3

Management is worried about someone accidentally shutting down and interface and locking themselves (and every one) out of the router. They have requested that you configure an EEM script so that if the FastEthernet0/0 interface is shut down, the router will automatically re-enable the interface. Verify and testing your configuration using the appropriate commands.

Task 4

Configure the following static routes on the router (NOTE: ensure that interface Fa0/0 is up):

  1. 10.0.0.0/24 via 150.1.1.254
  2. 10.0.1.0/24 via 150.1.1.254

 

Management has requested that until they get the Cisco ACS server installed, the router should not allow anyone to delete the static routes. Write an EEM applet that prevents these, and any other, static routes from being deleted until AAA is configured on the router. The router should print the message ‘ACTION NOT ALLOWED’ . Verify your EEM configuration and test the applet by attempting to delete a static route.

Lab Validation

Task 1

If your routers interface is not connected to a switch or hub, you need to complete this task as is shown below. If you do have a hub or switch, you can omit the loopback and no keepalive commands under the LAN interface. This example assumes a standalone router.

Router(config)#hostname R1
R1(config)#interface fastethernet 0/0
R1(config-if)#ip address 150.1.1.1 255.255.255.0
R1(config-if)#loopback
Loopback is a traffic-affecting operation
R1(config-if)#no keepalive
R1(config-if)#no shutdown
R1(config-if)#exit

Next, verify your configuration using the show ip interface brief command:

R1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 150.1.1.1 YES manual up up
Serial0/0 unassigned YES unset administratively down down
Serial0/1 unassigned YES unset administratively down down

Task 2

Embedded Resource Manager (ERM), while technically beyond the scope of the CCNP course, is an important tool that can be used to leverage additional monitoring tools in the real world. ERM allows you to monitor internal system resource utilization for specific resources such as the buffer, memory, and CPU. ERM monitors resource utilization from the perspective of various subsystems within the Cisco IOS software such as resource owners (ROs) and resource users (RUs). Additionally, ERM allows you to configure threshold values for system resources which allows alarm or Syslog generation when these thresholds are exceeded or fall belong specified values. Additional information on ERM can be found on the Cisco website. The URL for this information is located below (at the time of the writing of this guide):

http://www.cisco.com/en/US/docs/ios/12_3t/12_3t14/feature/guide/gt_rmimg.html

This task is completed on the router as follows:

R1(config)#resource policy
R1(config-erm)#policy HIGH-CPU-AND-MEMORY global
R1(config-erm-policy)#system
R1(config-policy-node)#cpu total
R1(config-owner-cpu)#critical rising 80 interval 15 falling 50 interval 15
R1(config-owner-cpu)#exit
R1(config-policy-node)#memory processor
R1(config-owner-memory)#critical rising 80 interval 15 falling 50 interval 15
R1(config-owner-memory)#exit
R1(config-erm-policy)#exit
R1(config-erm)#user global HIGH-CPU-AND-MEMORY
R1(config-erm)#exit

Next, verify ERM configuration using the show running-config command:

R1#show run | section resource policy
resource policy
policy HIGH-CPU-AND-MEMORY global
system
cpu total
critical rising 80 interval 15 falling 50 interval 15
!
memory processor
critical rising 80 interval 15 falling 50 interval 15
!
!
!
user global HIGH-CPU-AND-MEMORY
!

Task 3

R1(config)#event manager applet NO-SHUT
R1(config-applet)#$”FastEthernet0/0, changed state to administratively down” 
R1(config-applet)#action 1.0 cli command “enable”
R1(config-applet)#action 1.1 cli command “configure terminal”
R1(config-applet)#action 1.2 cli command “interface fastethernet 0/0”
R1(config-applet)#action 1.3 cli command “no shutdown”
R1(config-applet)#action 1.4 cli command “end”
R1(config-applet)#exit

Following this, verify the EEM configuration using the show event manager command:

R1#show event manager policy registered
No. Class Type Event Type Trap Time Registered Name
1 applet user syslog Off Sat Jun 4 18:43:26 2011 NO-SHUT
pattern {FastEthernet0/0, changed state to administratively down}
action 1.0 cli command “enable”
action 1.1 cli command “configure terminal”
action 1.2 cli command “interface fastethernet 0/0”
action 1.3 cli command “no shutdown”
action 1.4 cli command “end”

Finally, test the applet by attempting to shut down the FastEthernet0/0 interface on the router:

R1(config)#interface fastethernet 0/0
R1(config-if)#shutdown
R1(config-if)#
*Jun 4 18:45:14.945: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down
*Jun 4 18:45:15.133: %SYS-5-CONFIG_I: Configured from console by on vty0 (EEM:NO-SHUT)
*Jun 4 18:45:17.113: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
R1(config-if)#do sh interfaces fastethernet 0/0
FastEthernet0/0 is up, line protocol is up 
Hardware is AmdFE, address is 000f.235e.ec80 (bia 000f.235e.ec80)
Internet address is 150.1.1.1/24
MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback set
Keepalive not set

[Truncated Output]

 

Task 4

R1(config)#ip route 10.0.0.0 255.255.255.0 fastethernet 0/0 150.1.1.254
R1(config)#ip route 10.0.1.0 255.255.255.0 fastethernet 0/0 150.1.1.254
R1(config)#event manager applet NO-DELETING-ROUTES
R1(config-applet)#event cli pattern “no ip route *” sync no skip yes
R1(config-applet)#action 1.0 syslog msg “ACTION NOT ALLOWED”
R1(config-applet)#exit

Next, verify the EEM applet configuration using the show event manager command:

R1#show event manager policy registered
No. Class Type Event Type Trap Time Registered Name
1 applet user syslog Off Sat Jun 4 18:43:26 2011 NO-SHUT
pattern {FastEthernet0/0, changed state to administratively down}
action 1.0 cli command “enable”
action 1.1 cli command “configure terminal”
action 1.2 cli command “interface fastethernet 0/0”
action 1.3 cli command “no shutdown”
action 1.4 cli command “end”

2 applet user cli Off Sat Jun 4 18:48:47 2011 NO-DELETING-ROUTES
pattern {no ip route *} sync no skip yes
action 1.0 syslog msg “ACTION NOT ALLOWED”

Next, verify that the static routes are installed into the IP routing table:

R1#show ip route static
10.0.0.0/24 is subnetted, 2 subnets
S 10.0.0.0 [1/0] via 150.1.1.254, FastEthernet0/0
S 10.0.1.0 [1/0] via 150.1.1.254, FastEthernet0/0

Finally, test your solution by attempting to delete a static route:

R1(config)#no ip route 10.0.1.0 255.255.255.0 fastethernet 0/0 150.1.1.254
R1(config)#
*Jun 4 18:51:52.113: %HA_EM-6-LOG: NO-DELETING-ROUTES: ACTION NOT ALLOWED

R1(config)#no ip route 10.0.0.0 255.255.255.0 fastethernet 0/0 150.1.1.254
R1(config)#
*Jun 4 18:52:08.205: %HA_EM-6-LOG: NO-DELETING-ROUTES: ACTION NOT ALLOWED

R1(config)#do show ip route static
10.0.0.0/24 is subnetted, 2 subnets
S 10.0.0.0 [1/0] via 150.1.1.254, FastEthernet0/0
S 10.0.1.0 [1/0] via 150.1.1.254, FastEthernet0/0
R1(config)#

 

Final Router Configurations

R1

 

R1#term len 0
R1#sh run
Building configuration…

Current configuration : 1607 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
policy HIGH-CPU-AND-MEMORY global
system
cpu total
critical rising 80 interval 15 falling 50 interval 15
!
memory processor
critical rising 80 interval 15 falling 50 interval 15
!
!
!
user global HIGH-CPU-AND-MEMORY
!
!
no network-clock-participate slot 1
no network-clock-participate wic 0
ip cef
!
!
!
!
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 150.1.1.1 255.255.255.0
loopback
duplex auto
speed auto
no keepalive
!
interface Serial0/0
no ip address
shutdown
!
interface Serial0/1
no ip address
shutdown
!
ip forward-protocol nd
ip route 10.0.0.0 255.255.255.0 FastEthernet0/0 150.1.1.254
ip route 10.0.1.0 255.255.255.0 FastEthernet0/0 150.1.1.254
!
!
no ip http server
no ip http secure-server
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
login
!
!
event manager applet NO-SHUT
event syslog pattern “FastEthernet0/0, changed state to administratively down”
action 1.0 cli command “enable”
action 1.1 cli command “configure terminal”
action 1.2 cli command “interface fastethernet 0/0”
action 1.3 cli command “no shutdown”
action 1.4 cli command “end”
event manager applet NO-DELETING-ROUTES
event cli pattern “no ip route *” sync no skip yes
action 1.0 syslog msg “ACTION NOT ALLOWED”
!
end

R1#

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.