Cisco删除及添加access-list中的条目
先看一下ACL 20Router#show access-lists Standard IP access list 20 10 permit host 172.18.0.10 20 permit host 172.18.0.11 30 permit host 172.18.0.12 40 permit host 172.18.0.13 50 permit host 172.18.0.14 60 permit host 172.18.0.15 70 permit host 172.18.0.16 80 permit host 172.18.0.17 90 permit host 172.18.0.18 100 permit host 172.18.0.19 110 permit host 172.18.0.20Router#show ip access-lists Standard IP access list 20 10 permit host 172.18.0.10 20 permit host 172.18.0.11 30 permit host 172.18.0.12 40 permit host 172.18.0.13 50 permit host 172.18.0.14 60 permit host 172.18.0.15 70 permit host 172.18.0.16 80 permit host 172.18.0.17 90 permit host 172.18.0.18 100 permit host 172.18.0.19 110 permit host 172.18.0.20删除ACL中的条目Router(config)#ip access-list standard 20Router(config-std-nacl)#no 40Router(config-std-nacl)#no 50Router(config-std-nacl)#no 60Router(config-std-nacl)#no 70Router(config-std-nacl)#no 80Router(config-std-nacl)#no 90再看一下条目,40 50 60 70 80 90已被删除Router#show ip access-lists Standard IP access list 20 10 permit host 172.18.0.10 20 permit host 172.18.0.11 30 permit host 172.18.0.12 100 permit host 172.18.0.19 110 permit host 172.18.0.20如果要在中间添加条目Router(config)#ip access-list standard 20Router(config-std-nacl)#50 permit 172.18.0.111Router(config-std-nacl)#60 permit 172.18.0.222Router(config-std-nacl)#55 permit 172.18.0.150再看一下Router#show access-lists Standard IP access list 20 10 permit host 172.18.0.10 20 permit host 172.18.0.11 30 permit host 172.18.0.12 50 permit host 172.18.0.111 55 permit host 172.18.0.150 60 permit host 172.18.0.222 100 permit host 172.18.0.19 110 permit host 172.18.0.20如果是扩展ACLRouter(config)#ip access-list extended xxx9:07 2018/4/4