cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1131
Views
0
Helpful
4
Replies

EEM script to clear particular subnet route

apadmanaban1312
Level 1
Level 1

Hi,

 

I’m working on automatically  clearing inaccessible routes from show ip eigrp topology | I In command.

 

so is there any expert EEM script that can run  show ip eigrp topology | I In , once we have output , if there are any inaccessible I need to clear the particular routes alone.

 

Is there any automation script for that

4 Replies 4

brselzer
Cisco Employee
Cisco Employee

Hello,

 

Do you have a script you are working with that isn't working? If you want to post it, I would be happy to take a look and see if I can make improvements. Thanks!

-Bradley Selzer
CCIE# 60833

Hi,



I don't have script prepared. I just want to know is that possible to create a EEM script to execute a command and do some more execution using the outout we have received.


Hello,

 

I would think this would be possible. The variable $_cli_result stores the output of the last command then you could regex it to see if something exists. For example, the below would check to see if this mac address exists in the arp table

 

action 1 cli command "show ip arp | in aaaa.aaaa.aaaa"
action 2 regexp ".*(ARPA).*" $_cli_result

 

Hope that helps!

-Bradley Selzer
CCIE# 60833

Hi,



Thank you for the response.



Can you please send me a sample EEM script to run sho ip eigrp toplo | I Inaccesible and clear Inaccesible routes from the output.



Once I have , I can create other EEM scripts using it.