How to Edit Standard ACLs

Network administrators sometimes want to edit standard ACLs. As you know that each new entry you add to the Access Control List (ACL) appears at the bottom of the list and router assign a sequence number to that entry automatically. The standard ACL statements are added to running-config files, but there is no built-in way to edit standard ACLs entries. We can edit standard ACLs using the following two methods.

How to Edit standard ACLs containing Numbers

Method 1: Using a Text Editor

If you are familiar with creating and editing ACLs, it is not difficult for you to write the ACLs statements using a text editor such as Notepad. When you construct an ACL using text editor then you can easily edit the ACL and then paste it into the router. For an existing ACL editing, you can use the show running-config command to display the ACL, copy and paste it into the text editor, make the necessary changes, and paste it back in.  For example, if the host IPv4 address was incorrectly entered. Instead of the host you entered, the steps for editing the IP address in ACL is following:

  1. Display the ACL entries using the show running-config
  2. Select the ACL, copy it into Microsoft Notepad and edit the list as required. After editing the ACL in Microsoft Notepad, select and copy it.
  3. Remove the access list using the access-list 1 Because without removing, the new statements would be appended to the existing ACL. Then paste the new edited ACL into global configuration mode…
  4. Again verify the ACL Using the show running-config

The no access-list command behaves differently in different IOS releases. If the deleted ACL is still applied to an interface, some IOS versions act as if no ACL is protecting your network while others deny all traffic. So for this, it is good to unlink the access-list from the interface before deleting the access-list.

How to edit standard acls

Method 2: Using the Sequence Number

We can also edit the ACL using sequence number. As shown in the figure below the ACL 1 included a permit statement for network This was in error. The permit statement only allows the network but we want to block only the host and allow all other traffic. So, to edit the ACL using sequence numbers using the three steps:

  1. Show the current ACL using the show access-lists <access-list-number> command as shown in the above figure step 1. The sequence number is displayed at the beginning of each statement. The IOS automatically assign sequence number when the access list statement entered. You can see the wrong configured statement with sequence number 20.
  2. Enter the ip access-lists standard <access-list-number> command that is used to configure named ACLs. The access-list- number 1, is used as the name. So first misconfigured statement needs to be deleted using the no 20  20 is the sequence number of the ACE. After deleting, a new sequence number 20 statement is added using the command, 20 deny permit any. The statements cannot be overwritten using the same sequence number as an existing statement. It is important to delete the current statement before entering the new statement with the current sequence number.
  3. Again verify the changes using the show access-lists
How to Edit Standard ACLs 3

How to Edit Standard ACLs with Name

As we edit the numbered standard ACL using the sequence number in the previous example, we can also edit the standard named ACLs using this method. The steps for editing the named standard ACL is the following:

  • First, enter the show access-list command; you can see that the ACL named {No_ACCESS} has two numbered lines indicating access rules for a host with the IPv4 addresses
  • Use the ip access-list standard <access-list-name> command to enter an ACL configuration mode. From named access-list configuration mode statements can be inserted or removed just like the previous example. The no <sequence-number> command is used to delete individual statements.
  • To add a statement with sequence number <sequence-number> deny or permit statement
  • Finally, use the show access-list command to verify the configuration. The figure illustrates the steps of the editing named standard ACL.
How to Edit Standard ACLs 4