Embedded Event Manager Not Just For
Embedded Event Manager Not Just For
This is a job for, da dada dahhh: Embedded Event Manager (EEM). In this example we will create a service policy
which we will apply to the control plane based on a interface threshold being exceeded. Full labs on Embedded
Event Manager can be found in our RS v5 Vol1 workbook in “System Management“. Let’s break down the
individual steps, first for the control plane policing policy, and then the EEM to apply it.
We will first create a policy map, which calls on a class map, which calls on an ACL. In this class map, we are going
to identify ICMP, by referencing an access list. So first we create the access list, and we will name it ICMP.
Now that the access list is created, we will create the class map called ICMP which will be referencing the access
list of the same name.
Next we will create the policy map, and for convenience we will name it ICMP (as well). This policy map will
reference the class map, and specify policing at 8000 bits per second with a burst rate of 1000 bytes.
policy-map ICMP
class ICMP
police 8000 1000
Ok, so now for the EEM part of the configuration. First, we will create our event manager applet. In this applet we
will be referencing serial 0/0, and we will be looking for the received load to be greater than 25. The 25 refers to
25 out of a possible 255 as reported by the interface. Once the ~10% is exceeded, the CLI commands
implemented in our applet will be executed. The CLI commands will simply apply the service policy to the logical
control plane host interface on the router. By doing this, any ICMP traffic destined TO the router, will be policed,
regardless of which interface the traffic is received on. The EEM policy will also generate a syslog message.
There are additional options which we could include, such as sending SNMP traps, e-mail messages and so forth.
bandwidth 64 Voice
Security
load-interval 30
end
Popular Posts
The following debug, will give us the Howard Cosell play-by-play of exactly what’s happening.
CCDE Open Study Session San
YOU!!
To view the details of the interfaces that are registered with an event manager policy, we would use the following
show command. New CCIE SPv3 Workbook
Updates
To verify what the current load is on the interface, we can use the command below.
Once the control plane policy has been applied, the actual details of how many packets have been permitted and
denied by that policy will be shown by the command below.
From the commands above, you’ll notice that the current load is at one, and there is no policy currently applied to
the control plane. Let’s go to the neighboring router and generate some traffic to trigger event manager and
the applet that we just created.
Cool, we got 3 back, even with a timeout of 0 seconds. Now lets go back to R2, and look at some results.
Back to the neighbor router, R3 to see how the policing of ICMP looks from the outside.
Based on results, the service policy is now applied to the control-plane host sub-interface, and is limiting ICMP.
This example of EEM is like a single ice-cube, compared to a titanic sized iceberg of possibilities. My intention is
to introduce the topic, and encourage you to study it further.
Enjoy your studies, and have fun exploring the world of EEM.
Thanks
Ronnie
Reply
Awesome post. EEM is a very handy tool for “automation” on cisco routers.
Reply
awesome post!
class-map ICMP
match prot icmp
*Dec 18 17:05:27.323: %HA_EM-6-LOG: DETECT : DEBUG(cli_lib) : : OUT : Unsupported protocol in ‘match protocol’
Reply
Nice.
Reply
IK- Great comments about the NBAR and enable secret. Thanks for passing that along.
Reply
one thing that I forgot – the service-policy will remain forever untill one manually delete it. Is there any way to remove it automatically
or we should consider writing another applet that will measure interface load?
Reply
Reply
Good idea Rick. Glad to hear from you. Honestly I haven’t even looked at the CCNA Security stuff yet but Im detinifely not
opposed to writing about it. I’ll have to take a look.
Reply
Great article.
Can think of a couple ways to use eem.
Reply
A little late to this party, but one thing I noticed while running through this. In the applet, you need to spell the interface exactly as it
appears when you do a show interface “…”. I had a policy monitoring fastethernet0/0 and it wouldn’t run, it needed to be
FastEthernet0/0, capitalization counts!
Reply
[...] had also improved his skills in MPLS, Multi-Protocol BGP, IOS IPS, EEM, and many other areas by using the sweet blog articles
at INE. (Shameless Plug [...]
Reply
Leave a Reply
Name (required)
Submit Comment
Congratulations to our IEOC Halfw ay through the first day of the Get the best #CCIE training now ! Time
Community Winners: Bassam Alkaff, #CCIE Security bootcamp w ith Brian is running out, just under 8 hours
CarlosG2, Qqabdal, Markus Wirth! McGahan, CCIEx3 #8593! remaining to save over 40% on
twitter.com/inetraining @brianmcgahan RS,VO,SC,SP. http://t.co/nrQVolVu
http://t.co/uxS0ZDS2
pdfcrowd.com