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

ACL

joe.marcelo9
Level 1
Level 1

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

2 Replies 2

Lucien Avramov
Level 10
Level 10

You can not.

You need to remove and re-add the ACL.

simontibbitts
Level 1
Level 1

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

Review Cisco Networking products for a $25 gift card