cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1664
Views
0
Helpful
1
Replies

EEM Bandwidth input / shut intrface Help

Wan_Whisperer
Level 1
Level 1

All,

 

I am brand new to EEM and have a good understanding but I need some clarification.  

 

Long story short I am duel homed and sometimes but very rare data switches and enters my secondary router.  Without writing a 10 page essay on my network I would like to have the primary router use an applet to check incoming data.  If the incoming data is "5 minute input rate 200000 bits/sec, 5 packets/sec" or lower then I want to shut interface G0/0/0.  Here is what I have so far but I need to understand 100% what each command is before I test and deploy.

 

 

event manager applet BPS_IN

This creates the EEM and names it
event tag 1 interface name FastEthernet0 parameter receive_rate_bps entry-op lt entry-val 20000 entry-type value poll-interval 180

I understand this unit "entry-op lt entry-val 20000" I assume that entry-op compares the data BPS received and "It" compairs it to "enty-cla" is this right so far?  I want to take action if less than this " 5 minute input rate 20000 bits/sec, 5 packets/sec"
.  Not sure how to enter this amount in the above statement.

action 1.0 cli command "enable"
action 2.0 cli command "config t"
action 3.0 cli command "interface g0/0/0"
action 4.0 cli command "shut"
action 5.0 syslog msg "Interface g0/0/0 was shut via EEM"

I understand all of the actions

 

Once complete I will remove all actions except 5.0 so I can test.  How does this sound. 

 

 

 

Thanks everyone!

 

 

 

 

1 Reply 1

Wan_Whisperer
Level 1
Level 1

Replying to myself to maybe help someone else.

 

I have it working in a test state and here is my configs:


event manager applet TEST_BPS_IN
event tag 1 interface name GigabitEthernet0/0/0 parameter receive_rate_bps entry-op lt entry-val 3000 entry-type value poll-interval 180
action 1.0 syslog msg "EEM Test Worked Value over 3000 bits/sec in"


event manager applet TEST_BPS_OVER
event tag 1 interface name GigabitEthernet0/0/0 parameter receive_rate_bps entry-op gt entry-val 10000 entry-type value poll-interval 180
action 1.0 syslog msg "EEM Test Worked Value over 10000 bits/sec in"

 

I will run this for a week and check logs to ensure it works like I expect then I will use these configs:

 

event manager applet TEST_BPS_IN
event tag 1 interface name GigabitEthernet0/0/0 parameter receive_rate_bps entry-op lt entry-val 3000 entry-type value poll-interval 180
action 1.0 cli command "enable"
action 2.0 cli command "config t"
action 3.0 cli command "interface g0/0/0"
action 4.0 cli command "shut"
action 5.0 syslog msg "Interface g0/0/0 was shut via EEM"

event manager applet TEST_BPS_OVER
event tag 1 interface name GigabitEthernet0/0/0 parameter receive_rate_bps entry-op gt entry-val 10000 entry-type value poll-interval 180
action 1.0 cli command "enable"
action 2.0 cli command "config t"
action 3.0 cli command "interface g0/0/0"
action 4.0 cli command "no shut"
action 5.0 syslog msg "Interface g0/0/0 was no shut via EEM"

 

I will update once I use the finial configs

Review Cisco Networking for a $25 gift card