Deleting ACL

Unanswered Question
Jul 20th, 2008

Hi All,

How can I remove single ACL line from my ACL list?

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Edison Ortiz Sun, 07/20/2008 - 20:02

Let's take this ACL as an example:

R2#sh ip access-lists

Extended IP access list 101

10 permit ip host 1.1.1.1 host 2.2.2.2

20 permit ip host 1.1.1.1 host 3.3.3.3

30 permit ip host 1.1.1.1 host 4.4.4.4

You noticed how the output has a number from 10 to 30 on each ACE?

Now, let's say I want to knock out line number 20.

R2(config)#ip access-list extended 101

R2(config-ext-nacl)#no 20 permit ip host 1.1.1.1 host 3.3.3.3

R2(config-ext-nacl)#end

R2#sh ip access-lists

Extended IP access list 101

10 permit ip host 1.1.1.1 host 2.2.2.2

30 permit ip host 1.1.1.1 host 4.4.4.4

HTH,

__

Edison.

Please rate helpful posts

jamesl0112 Mon, 07/21/2008 - 00:06

Edison,

That's pretty handy - I didn't know you could edit a numbered ACL as if it was a named ACL.

gojericho0 Mon, 07/21/2008 - 07:16

Also, i believe you need at least version 12.3 of the IOS in order to delete numbered access-lists line by line

AJAZ NAWAZ Mon, 07/21/2008 - 08:47

just tested on 65k with 12.2 - all good. I suspect this method has been available for longtime, it's just been hidden (not to be confused with 'hidden' commands).

Ajaz

Actions

This Discussion