An illustration of a person working on a laptop with a screen displaying commands for editing standard ACLs, titled "How to Edit Standard ACLs."

How to Edit Standard ACLs

How to Edit Standard ACLs

Network administrators sometimes want to edit standard ACLs. As you know, each new entry you add to the Access Control List (ACL) appears at the bottom of the list, and the router assigns a sequence number to that entry automatically. Standard ACL statements are added to running-config files, but there is no built-in way to edit standard ACL 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, writing the ACLs statements using a text editor such as Notepad is not difficult. When constructing an ACL using a text editor, you can easily edit it 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 192.168.3.2 host, you entered 192.168.2.2. The steps for editing the IP address in ACL are as follows:

  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 access-list 1 Because without removing it, the new statements would be appended to the existing ACL. Then, paste the newly 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 protects your network, while others deny all traffic. So, it is good to unlink the access list from the interface before deleting it.

The screenshot shows a command-line interface session on a network device, specifically a router labeled R2. The image is divided into sections showing the process of configuring, verifying, modifying, and then re-verifying an access control list (ACL).
How to Edit Standard ACLs 5

Method 2: Using the Sequence Number

We can also edit the ACL using sequence numbers. As shown in the figure below, ACL 1 included a permit statement for network 192.168.3.0. This was in error. The permit statement only allows the network 192.168.3.0, but we want to block only the host 192.168.3.2 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 assigns a sequence number when entering the access list statement. You can see the wrong configured statement with sequence number 20.
  2. Enter the ip access-lists standard <access-list-number>command used to configure named ACLs. The access list- number 1, is used as the name. So, the first misconfigured statement must 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
Configuration of an ACL on network device R2, showing the following entries: "deny host 192.168.3.2" and "permit any".
How to Edit Standard ACLs 6

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 192.168.2.4.
  • 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 editing steps, which are named standard ACL.
A screenshot of a terminal session showing the configuration of a standard IP access list named "No_ACCESS" on a router. The initial configuration denies access to the host 192.168.2.4 and permits any other traffic. The configuration is then modified in the terminal by removing the deny rule for host 192.168.2.4 and adding a new deny rule for host 192.168.2.2. The final configuration is displayed, showing the updated access list with the deny rule for host 192.168.2.2 and the permit any rule.
How to Edit Standard ACLs 7
Avatar of Asad Ijaz

Asad Ijaz

NetworkUstad's lead networking architect with CCIE certification. Specializes in CCNA exam preparation and enterprise network design. Authored 2,800+ technical guides on Cisco systems, BGP routing, and network security protocols since 2018. Picture this: I'm not just someone who writes about tech; I'm a certified expert in the field. I proudly hold the titles of Cisco Certified Network Professional (CCNP) and Cisco Certified Network Associate (CCNA). So, when I talk about networking, I'm not just whistling in the dark; I know my stuff! My website is like a treasure trove of knowledge. You'll find a plethora of articles and tutorials covering a wide range of topics related to networking and cybersecurity. It's not just a website; it's a learning hub for anyone who's eager to dive into the world of bits, bytes, and secure connections. And here's a fun fact: I'm not a lone wolf in this journey. I'm a proud member and Editor of Team NetworkUstad. Together, we're on a mission to empower people with the knowledge they need to navigate the digital landscape safely and effectively. So, if you're ready to embark on a tech-savvy adventure, stick around with me, Asad Ijaz Khattak. We're going to unravel the mysteries of technology, one article at a time!"