Inserting an ACE in an existing ACL
This action uses a sequence number to specify where to insert a new ACE into an existing sequence of ACLs.
Syntax:
ip access-list <standard|extended> <name-str|1-99|100-199>
<1-2147483647> <permit|deny> <standard-acl-ip-criteria> [log]
<1-2147483647> <permit|deny> <extended-acl-ip-criteria> [options]
The first command enters the "Named-ACL" context for the specified ACL. The remaining two commands insert a new ACE in a standard or extended ACL, respectively.
To insert a new ACE between existing ACEs in a list:
Procedure
-
Use
ip access-list
to enter the "Named-ACL" (nacl
) context of the ACE. This applies regardless of whether the ACE was originally created as a numbered ACL or a named ACL. - Begin the ACE command with a sequence number that identifies the position you want the ACE to occupy. (The sequence number range is 1-2147483647).
- Complete the ACE with the Command syntax appropriate for thetype of ACL you are editing.
For example, inserting a new ACE between the ACEs numbered 10 and 20 in the following figure requires a sequence number in the range of 11-19 for the new ACE.
In the following example, the first two ACEs entered become lines 10 and 20 in the list. The third ACE entered is configured with a sequence number of 15 and is inserted between lines 10 and 20.