cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
726
Views
5
Helpful
2
Replies

Automatically delete access-list

Daniel_Jara
Level 1
Level 1

Good day,

I would like to know how to automatically delete an access-list if certain interface state goes down and create it again if the interface state goes back up.

1 Accepted Solution

Accepted Solutions

balaji.bandi
Hall of Fame
Hall of Fame

You can use EEM Script for this, check the syslog and remove Access-list and create one based on your requirement.

 

basic EEM Script 

 

https://community.cisco.com/t5/networking-documents/cisco-eem-basic-overview-and-sample-configurations/ta-p/3148479

 

#track 1 interface FastEthernet 0/0 line-protocol

The above line is not related to EEM commands, it just a track command.

event manager applet if-down
event track 1 state down
action 1.0 cli command “enable”
action 1.1 cli command “config t”
action 1.2 cli command “no ip access-list 10”
action 1.3 cli command “end”

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

View solution in original post

2 Replies 2

balaji.bandi
Hall of Fame
Hall of Fame

You can use EEM Script for this, check the syslog and remove Access-list and create one based on your requirement.

 

basic EEM Script 

 

https://community.cisco.com/t5/networking-documents/cisco-eem-basic-overview-and-sample-configurations/ta-p/3148479

 

#track 1 interface FastEthernet 0/0 line-protocol

The above line is not related to EEM commands, it just a track command.

event manager applet if-down
event track 1 state down
action 1.0 cli command “enable”
action 1.1 cli command “config t”
action 1.2 cli command “no ip access-list 10”
action 1.3 cli command “end”

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Daniel_Jara
Level 1
Level 1
Thanks lot!!!
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: