Example 33 Inserting an ACE in an existing ACL
From the global configuration context:
1. Insert a new ACE with a sequence number of 45 between the ACEs numbered 40 and 50
shown in “Appending an ACE to an existing list” (page 88).
Inserting an ACE in an existing ACL
HP Switch(Config)# ipv6 access-list My-list
1
HP Switch(config-ipv6-acl)# 45 permit icmp host 2001:db8:0:5ad::33 ::/0
2
HP Switch(config-ipv6-acl)# show run
. . .
ipv6 access-list "My-list"
10 permit ipv6 2001:db8:0:5ad::25/128 ::/0
20 permit ipv6 2001:db8:0:5ad::111/128 ::/0
30 permit icmp 2001:db8:0:5ad::115/128 ::/0
40 permit icmp 2001:db8:0:5ad::/64 ::/0
45 permit icmp 2001:db8:0:5ad::33 ::/0
3
50 permit icmp 2001:db8:0:5ad::19/128 ::/0
60 permit ipv6 ::/0 2001:db8:0:5ad::1/128
70 deny ipv6 2001:db8:0:5ad::/64 ::/0
80 permit ipv6 ::/0 ::/0
exit
2
3
1
Inserts a new ACE
assigned to line 45
Enters the
Named-ACL context
for “My-list”
2. In the context of an IPv6 ACL named List-01, insert a new ACE between two existing ACEs.
In this example, the first command creates a new ACL and enters the ACL context. The next
two ACEs entered become lines 10 and 20 in the list. The third ACE entered is inserted
between lines 10 and 20 using a sequence command with sequence number 11.
Inserting an ACE into an existing sequence
HP Switch(config)# Port_1_5400(config)# ipv6 access-list List-01
1
HP Switch(config-ipv6-acl)# permit ipv6 host fe80::100 host fe80::200
2
HP Switch(config-ipv6-acl)# permit ipv6 host fe80::103 any
HP Switch(config-ipv6-acl)# 11 permit ipv6 host fe80::110 host fe80::
3
HP Switch(config-ipv6-acl)# show run
Running configuration:
. . .
ipv6 access-list "List-01"
10 permit ipv6 fe80::100/128 fe80::200/128
11 permit ipv6 fe80::110/128 fe80::210/128
20 permit ipv6 fe80::103/128 ::/0
4
exit
1
Becomes Line 10
2
Becomes Line 20
3
4
Lines 10 and 20 were automatically numbered according to their order of entry in
the list.
Line 11 was explicitly numbered by the 11 permit command and was inserted in its
proper place in the list.
Deleting an ACE from an existing ACL
To delete and ACE, you can use either the sequence number of an ACE or the syntax of the ACE.
Editing an existing ACL 89