cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1898
Views
0
Helpful
2
Replies

How to get the router to monitor the interface

Earl Granger IV
Level 1
Level 1

I need to know how to create an applet to monitor an interface and if it recieves a specific IP do a shut no shut on the interface.

Thanks,

-Earl

2 Replies 2

Joe Clarke
Cisco Employee
Cisco Employee

You could use ACLs for this.  Apply an inbound ACL on the interface with logging enabled.  It could be as simple as:

access-list 100 permit ip any any log

int gi0/0

ip access-group 100 in

Then, when you get a hit, that will generate a syslog message that your EEM policy can react to:

event manager applet watch-ip

event syslog pattern "list 100 .*10.1.1.1"

action 1.0 cli command "enable"

action 2.0 cli command "config t"

action 3.0 cli command "int gi0/0"

action 4.0 cli command "shut"

action 5.0 cli command "end"

Cool, thanks.  I would need it to do a no shut as well.  Thanks