In newer IOS versions sequence numbers can be used to quickly edit, add, and remove entries from a named extended access-list. However in all IOS versions that support named extended access-lists, numbered extended access-lists can actually be treated like named lists where their name is the number. Without sequence numbers you can’t add or edit lines, but if you need to remove a single line from somewhere in the list without deleting it you can. Take the following example:
R1#conf tNow let’s suppose that we want to remove the second line that permits udp. Normally we would have to say “no access-list 100″, then recreate the list without line number two. However by treating this like a named access-list we have a second option:
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#access-list 100 permit tcp any any
R1(config)#access-list 100 permit udp any any
R1(config)#access-list 100 permit ospf any any
R1(config)#access-list 100 permit eigrp any any
R1(config)#do show access-list 100
Extended IP access list 100
permit tcp any any
permit udp any any
permit ospf any any
permit eigrp any any
R1(config)#ip access-list extended 100Tada! The list stays intact but the second line has been removed.
R1(config-ext-nacl)#no permit udp any any
R1(config-ext-nacl)#end
R1#show access-list 100
Extended IP access list 100
permit tcp any any
permit ospf any any
permit eigrp any any
0 comments:
Post a Comment