cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1458
Views
5
Helpful
4
Replies

How to prevent repetitive command that is too fastly tried in certain seconds?

xidasd
Level 1
Level 1

Hello, I want to prevent repetitive command, which is tried certain times in certain seconds. 

For example, when i type the show ip route 3 times in 5 seconds, IOS block the 3rd command. How can i accomplish this? 

1 Accepted Solution

Accepted Solutions

Amine ZAKARIA
Spotlight
Spotlight

Hello,


You can try this script EEM that just created and tested works well :

 

event manager applet slow
event cli pattern "show ip route" sync yes occurs 3 period 5000
action 001 syslog msg "You are too fast! Please slow down"
action 002 wait 10

 

IIS.JPG

Hope that helps.

View solution in original post

4 Replies 4

Marvin Rhoads
Hall of Fame
Hall of Fame

As far as I know, it is not possible to enforce such a limit on the IOS device itself.

There is a similar feature for failed authentications (logins); but that's limited to that activity and not a general purpose command.

Amine ZAKARIA
Spotlight
Spotlight

Hello,


You can try this script EEM that just created and tested works well :

 

event manager applet slow
event cli pattern "show ip route" sync yes occurs 3 period 5000
action 001 syslog msg "You are too fast! Please slow down"
action 002 wait 10

 

IIS.JPG

Hope that helps.

Thanks, but I have another thing to ask. 

I want to print "Your command is blocked" like usual output, not the syslog message. Do you know how to achieve this? I tried to use "echo" command, but it doesn't work at all.

Hello,

If you want an output message instead of  syslog then :

action 001 puts "Your command is blocked"