CCNA 2.0 Starting Saturday, February 20 | 9:30 AM - 12:30 PM | Now $499 (reg. $699) | Free First Demo Class! Register now

Back to Blog
Networking

Cisco ACLs: Standard vs Extended and Wildcard Masks

Wildcard 0.0.0.255 checks the first 24 bits and ignores the last 8. Wildcard 0.0.0.254 matches only even addresses.

A Cisco access control list (ACL) is an ordered list of permit and deny statements that a router evaluates from the top down, first match wins. A standard ACL matches the source IP address only and belongs near the destination. An extended ACL matches protocol, source, destination and port, and belongs near the source. Every ACL ends in an invisible implicit deny.

That last sentence is where the outages come from. Every engineer breaks a network with an access list exactly once, and nearly always the same way. You write one line to permit the subnet you care about, apply it to an interface, and the rest of the building goes quiet. The ACL did exactly what you asked. The outage came from the line you never typed: the deny Cisco appends to every access list and then refuses to display.

What an ACL actually is

Cisco's IP Access List Overview states the rule that governs everything else:

After a match is found, no more criteria statements are checked. The first entry that the packet matches determines whether the software permits or denies the packet. Cisco, Security Configuration Guide: Access Control Lists, IP Access List Overview

A broad permit ip any any above a specific deny turns that deny into dead code: the order you type is not cosmetic, it is the logic. ACLs also identify traffic for NAT, QoS and route maps, and protect the management plane on VTY lines.

Standard, extended, numbered and named are two axes, not four types

Most study notes read these four words as four categories. They are two independent choices: standard versus extended decides what you match on, numbered versus named decides how you edit the list.

AttributeStandardExtended
Matches onSource IP onlyProtocol, source, destination, and port for TCP or UDP
Numbered ranges1 to 99, 1300 to 1999100 to 199, 2000 to 2699
Named syntaxip access-list standard NAMEip access-list extended NAME
Usual placementNear the destinationNear the source

The expanded ranges arrived in IOS 12.0.1, recorded in Cisco's Configure IP Access Lists.

Standard ACLs match the source and nothing else

access-list 10 permit host 192.168.10.7
access-list 10 permit 192.168.10.0 0.0.0.255
access-list 10 deny any log

The host entry has to sit above the subnet entry. Reverse them and the broad permit matches 192.168.10.7 first, leaving the specific line unreachable: anything under a wider permit is dead code.

Extended ACLs match protocol, addresses and ports

access-list 110 permit tcp 10.1.1.0 0.0.0.255 any eq 443
access-list 110 permit udp any host 10.1.1.53 eq 53
access-list 110 deny tcp any any eq 23
access-list 110 permit tcp any eq 80 10.1.1.0 0.0.0.255 established

The established keyword matches a TCP segment carrying the ACK or RST bit, a cheap way to allow replies to sessions your users started without permitting inbound session setup.

The operator's position, not the port number, decides whether you match a source or a destination port: after the source pair it is the source port, after the destination pair it is the destination port. Hold both addresses still and move only the operator to see it. permit tcp any eq 80 10.1.1.0 0.0.0.255 permits replies arriving from web servers, because port 80 sits with the source. permit tcp 10.1.1.0 0.0.0.255 any eq 80 permits your users going to web servers, because port 80 now sits with the destination. Same two addresses, one operator moved, opposite meanings.

deny tcp any any eq 23 blocks Telnet and leaves SSH on 22 wide open, and blocking port 80 does nothing to HTTPS on 443. Check the numbers against our ports and protocols reference.

Wildcard masks, and why ACLs do not use subnet masks

Inverting the subnet mask, the shortcut drilled in our subnetting guide, gives the right answer for every ordinary contiguous mask. But it is a shortcut, not the definition: a wildcard mask is a bit level instruction where a 0 bit means check this bit and a 1 bit means ignore it.

Wildcard 0.0.0.255 checks the first 24 bits and ignores the last 8. Wildcard 0.0.0.254 matches only even addresses.
Wildcard 0.0.0.255 checks the first 24 bits and ignores the last 8. Wildcard 0.0.0.254 matches only even addresses.

What the shortcut hides is that wildcard bits may be noncontiguous, which no subnet mask can express. In 10.1.1.0 0.0.0.254 the final octet is binary 11111110, so every bit is ignored except the last, which must match the 0 in the address: the 128 even numbered addresses in 10.1.1.0/24, including the network address itself, and no odd ones. Our wildcard mask calculator converts both directions.

ACL cheat sheet

Copy this onto the back of your subnetting notes.

ItemSyntax or value
Numbered standardaccess-list 1-99 {permit or deny} source wildcard
Numbered extendedaccess-list 100-199 {permit or deny} protocol source wildcard destination wildcard [operator port]
Named listip access-list {standard or extended} NAME
Apply to interfaceip access-group {number or NAME} {in or out}
Apply to VTY linesaccess-class {number} {in or out}
Single hosthost 10.1.1.2 equals 10.1.1.2 0.0.0.0
Any addressany equals 0.0.0.0 255.255.255.255
Port operatorseq, neq, gt, lt, range
TCP replies onlyestablished

Prefix to wildcard:

PrefixSubnet maskWildcard mask
/24255.255.255.00.0.0.255
/25255.255.255.1280.0.0.127
/26255.255.255.1920.0.0.63
/27255.255.255.2240.0.0.31
/28255.255.255.2400.0.0.15
/29255.255.255.2480.0.0.7
/30255.255.255.2520.0.0.3

The implicit deny you cannot see

Every ACL ends with a statement you did not write: in Cisco's words, each access list ends with an unwritten, implicit deny, so a packet that reaches the bottom unpermitted is dropped. The danger is that it is invisible. show access-lists does not print it and its drops are never counted, so a list of three permit lines looks like a list with no deny in it.

One permit line is never enough unless you meant to block everything else, and a list of only deny statements drops every packet: a blacklist has to end with permit ip any any.

Placement: standard near the destination, extended near the source

Standard ACL outbound near the destination, extended ACL inbound near the source.
Standard ACL outbound near the destination, extended ACL inbound near the source.

A standard ACL matches the source only, so near the source it blocks that host from every destination instead of the one server you meant: it belongs as close to the destination as possible. An extended ACL names protocol, destination and port, so it drops exactly the flow you intended at the first hop, keeping that traffic off every link in between.

Direction, and the one-per-interface rule

In and out are relative to the router interface, never to the network or to a conversation. Inbound is evaluated as the packet arrives, before the routing decision, so denied packets are never routed. Outbound is routed first, then checked on the egress interface.

Cisco allows one access list per interface, per protocol, per direction, so one interface can carry an IPv4 inbound ACL and an IPv4 outbound ACL at once.

interface GigabitEthernet0/1
 ip access-group 110 in
line vty 0 4
 access-class 10 in

Note the second command. VTY lines take access-class, not ip access-group. Cisco's 15M&T guide scopes VTY filtering to numbered lists, though current IOS and IOS XE images accept a named list there. An ACL you never apply filters nothing.

Editing without destroying the list

Named ACLs earn the extra typing on editability alone. Enter ip access-list extended BLOCK-TELNET and entries are numbered from 10, incrementing by 10. One line goes with no 20, and ip access-list resequence BLOCK-TELNET 100 15 renumbers. From IOS XE 16.12 those sequence numbers are saved to the configuration and survive a reload.

Numbered lists are different. That document scopes sequence numbering to named lists only, and the overview is blunt: you cannot delete an entry from a numbered list, and trying to do so deletes the whole list.

Lab: configure it, break something on purpose, then prove it

The pod layout we use in class: two routers, one client, one server.

DeviceInterfaceAddressRole
R1Gi0/010.1.1.1/24User subnet gateway
R1 to R2Gi0/1 both ends192.0.2.0/30Transit link
R2Gi0/0203.0.113.1/24Server subnet gateway
PC1Gi0/010.1.1.20/24Test client
SRV1Gi0/0203.0.113.10/24Test server

The requirement: users on 10.1.1.0/24 may reach HTTPS and DNS on the server subnet, must not Telnet anywhere, and everything else is dropped and logged.

Routing is already up, so take a baseline first. The lab client is itself a router, which is why the ping output is IOS style.

PC1# ping 203.0.113.10
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 203.0.113.10, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

Five exclamation marks, five replies. Now build the list. Extended, so it belongs near the source: inbound on R1 Gi0/0.

R1(config)# ip access-list extended USERS-OUT
R1(config-ext-nacl)# permit tcp 10.1.1.0 0.0.0.255 any eq 443
R1(config-ext-nacl)# permit udp 10.1.1.0 0.0.0.255 any eq 53
R1(config-ext-nacl)# deny tcp any any eq 23 log
R1(config-ext-nacl)# deny ip any any log
R1(config-ext-nacl)# exit
R1(config)# interface GigabitEthernet0/0
R1(config-if)# ip access-group USERS-OUT in

The explicit deny ip any any log duplicates the implicit deny on purpose: the implicit one drops silently and counts nothing, so it leaves no evidence. The explicit one gives you a counter and a syslog line.

Prove it is applied, in the direction you think:

R1# show ip interface GigabitEthernet0/0
GigabitEthernet0/0 is up, line protocol is up
  Internet address is 10.1.1.1/24
  Broadcast address is 255.255.255.255
  Outgoing access list is not set
  Inbound  access list is USERS-OUT

"Inbound access list is USERS-OUT" is the line that matters. If it reads "not set", you built a list that filters nothing, the most common reason an ACL lab appears to do nothing.

Now retest. ICMP was never permitted, so the baseline ping should stop working:

PC1# ping 203.0.113.10
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 203.0.113.10, timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)

U means the router returned an ICMP unreachable instead of forwarding, which is what an ACL deny looks like from the client. On R1's console the explicit deny logs it:

%SEC-6-IPACCESSLOGDP: list USERS-OUT denied icmp 10.1.1.20 -> 203.0.113.10 (8/0), 1 packet

Telnet from PC1 hits the dedicated deny line:

%SEC-6-IPACCESSLOGP: list USERS-OUT denied tcp 10.1.1.20(1042) -> 203.0.113.10(23), 1 packet

The counters tie it together after a round of HTTPS, DNS, ping and Telnet:

R1# show ip access-lists USERS-OUT
Extended IP access list USERS-OUT
    10 permit tcp 10.1.1.0 0.0.0.255 any eq 443 (24 matches)
    20 permit udp 10.1.1.0 0.0.0.255 any eq 53 (6 matches)
    30 deny tcp any any eq 23 log (4 matches)
    40 deny ip any any log (10 matches)

Read it the way you would at 2am. Line 10 matching means HTTPS works. Counts on line 30 mean somebody is still trying to Telnet. Counts on line 40 mean something legitimate may be hitting the catch-all, and that is what you investigate first.

Two caveats. Logging is throttled: the first packet logs immediately, then later matches are collected over five minute intervals, so the log is a sample, not a capture. On Catalyst switches the count ignores packets access controlled in hardware, so a zero counter does not prove the list is idle.

What students get wrong in class

I have run this lab with Toronto CCNA cohorts for years, and the same mistakes surface in the first ACL session of nearly every intake.

  • The list is built and never applied. The config looks perfect, nothing is filtered, and the student rechecks the ACL instead of the interface. show ip interface settles it in one line.
  • The wildcard mask is omitted. permit 10.1.1.0 silently becomes a single host. Nothing errors. The subnet just never matches.
  • `ip access-group` gets typed on a VTY line. The command does not exist there. VTY lines take access-class, and the parser error sends students hunting for a platform bug that is not there.
  • Direction is guessed. An inbound list on the wrong interface filters the return traffic instead of the request, which looks exactly like a routing problem until you read the counters.

The counters above are lab scale, not production volumes, and the output is trimmed for length. Build it yourself and break it on purpose first: the engineers who never take a building down are the ones who already took a lab pod down.

Then test whether it stuck: our CCNA practice questions include wildcard and implicit-deny items in the exam's format.

What changes on the exam in February 2027

Blueprint detailv1.1, through February 2, 2027v2.0, from February 3, 2027
Topic number5.64.6
Exact topic stringConfigure and verify access control listsConfigure IPv4 access control lists (standard, extended, numbered, and named ACLs)
Domain and weight5.0 Security Fundamentals, 15%4.0 Network Services and Security, 20%

The technology does not change, so nothing you learn now is wasted. Only the emphasis moves: v2.0 drops "and verify" and scopes the topic to IPv4. The CCNA v2.0 vs v1.1 comparison covers every other topic that moves, the CCNA study guide lays out the full sequence, and in our CCNA course ACLs land in module 3, taught live with hands on Packet Tracer labs.

Sources

The primary references this guide relies on:

Frequently Asked Questions

What is the difference between a standard and an extended ACL?

A standard ACL matches the source IP address only: it can permit or deny a host or subnet, but not the service it reaches. An extended ACL matches protocol, source, destination and, for TCP and UDP, ports, so it can let a subnet reach HTTPS on 443 while denying Telnet on 23.

What are the Cisco ACL number ranges?

Standard IP access lists use 1 to 99 plus the expanded range 1300 to 1999. Extended lists use 100 to 199 plus 2000 to 2699. Both expanded ranges arrived in IOS 12.0.1 and are examinable on the CCNA 200-301.

Why do ACLs use wildcard masks instead of subnet masks?

A wildcard mask tells the router which address bits to check and which to ignore: a 0 bit must match, a 1 bit is ignored. Wildcard bits may also be noncontiguous, which no subnet mask can be. 10.1.1.0 0.0.0.254 ignores the final octet except its last bit, matching only the even addresses in that subnet.

What is the implicit deny at the end of an ACL?

Every Cisco access list ends with an unwritten, implicit deny, so any packet not explicitly permitted is dropped at the bottom of the list. It never appears in show access-lists output and its drops are not counted, so a list of nothing but permit lines is still denying everything else.

Where should you place a standard ACL versus an extended ACL?

Place a standard ACL close to the destination: it matches the source only, so near the source it would block that host from every destination rather than the one you meant. Place an extended ACL close to the source, where it can match protocol, destination and port precisely enough to drop only the intended flow.

How do you verify a Cisco ACL is working?

Run show ip access-lists NAME to see each entry with its match counter, and show ip interface GigabitEthernet0/0 to confirm the list is bound to the right interface in the right direction. A counter stuck at zero on a line you expect to match usually means the list was never applied, or was applied in the wrong direction. Add log to an explicit deny so drops produce a syslog line, because the implicit deny counts nothing.

Can you delete a single line from a numbered ACL?

Cisco documents that you cannot delete an entry from a numbered access list: attempting it deletes the entire list. Sequence numbering, which removes one entry with no 20 or renumbers with ip access-list resequence, is a named list feature only. That is the strongest argument for building new ACLs as named.

Ready to Advance Your IT Career?

Get in touch to find the right certification path for your goals.

Get in Touch
CCNAAWSSecurity+CompTIA A+PMP