10-29-2009 11:27 AM - edited 03-06-2019 08:22 AM
Hi
How can I add a line without removing the deny statement and applying again.
access-list 50 permit 192.168.1.0 0.0.0.255
access-list 50 permit 192.168.2.0 0.0.0.255
access-list 50 permit 192.168.3.0 0.0.0.255
access-list 50 permit 192.168.4.0 0.0.0.255
access-list 50 permit 192.168.5.0 0.0.0.255
access-list 50 deny any any
10-29-2009 11:38 AM
You can not.
You need to remove and re-add the ACL.
10-29-2009 11:41 AM
Hi Joe.
If your IOS supports it then you can do it like this:
R1#show access-list 50
Standard IP access list 50
10 permit 192.168.1.0, wildcard bits 0.0.0.255
20 permit 192.168.2.0, wildcard bits 0.0.0.255
30 permit 192.168.3.0, wildcard bits 0.0.0.255
40 permit 192.168.4.0, wildcard bits 0.0.0.255
50 permit 192.168.5.0, wildcard bits 0.0.0.255
60 deny any
R1#config t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#ip access-list standard 50
R1(config-std-nacl)#51 permit 192.168.6.0 0.0.0.255
R1(config-std-nacl)#exit
R1(config)#exit
R1#show access-list 50
Standard IP access list 50
10 permit 192.168.1.0, wildcard bits 0.0.0.255
20 permit 192.168.2.0, wildcard bits 0.0.0.255
30 permit 192.168.3.0, wildcard bits 0.0.0.255
40 permit 192.168.4.0, wildcard bits 0.0.0.255
50 permit 192.168.5.0, wildcard bits 0.0.0.255
51 permit 192.168.6.0, wildcard bits 0.0.0.255
60 deny any
R1#
Simon
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide