Cisco ACLs

Understanding Cisco ACLs: Syntax and Examples

Ready to start learning? Individual Plans →Team Plans →

One wrong line in a Cisco ACL can block the wrong subnet, expose a management interface, or make a working service disappear. If you have ever stared at a rule that “looks right” but behaves wrong, this guide is for you. It breaks down cisco acl syntax, wildcard masks, placement, evaluation order, and real-world examples so you can read, write, and troubleshoot ACLs with confidence.

Featured Product

Cisco CCNA v1.1 (200-301)

Learn essential networking skills and gain hands-on experience in configuring, verifying, and troubleshooting real networks to advance your IT career.

Get this course on Udemy at the lowest price →

Quick Answer

cisco acl syntax is the rule format Cisco devices use to permit or deny traffic based on source, destination, protocol, and port criteria. ACLs are evaluated top to bottom, the first match wins, and every ACL ends with an implicit deny. Understanding wildcard masks and interface direction is the difference between a clean policy and an outage.

Definition

Access Control List (ACL) is an ordered list of permit and deny statements used on a Cisco® device to match traffic and enforce access control. Cisco processes ACL entries from top to bottom and stops at the first match, which makes order and syntax critical.

What it isPacket-filtering policy on Cisco routers and switches
Match logicTop-to-bottom evaluation with first-match behavior
Standard ACL focusSource IP only
Extended ACL focusSource, destination, protocol, and ports
Wildcard maskInverse matching mask used in ACL entries
Default end behaviorImplicit deny any at the end of every ACL
Common CCNA tie-inFoundational topic in Cisco CCNA v1.1 (200-301) study paths

Cisco ACL syntax matters because the command is only half the story. The other half is how the router interprets it, which interface it touches, and what traffic it silently drops at the end of the list. That is why ACLs are a common cause of “it worked before I touched it” troubleshooting calls.

What Cisco ACLs Are and Why They Matter

An ACL is a rule list that decides whether traffic is allowed or denied. The device checks each line in order, and the first line that matches the packet wins. That simple model makes ACLs easy to learn and easy to break.

ACLs still matter because they provide fast, local, and understandable traffic control without requiring a separate security appliance for every policy. You can use them to restrict user subnets, protect administrative access, filter specific protocols, and enforce segmentation on routed interfaces. For many networks, ACLs are the first layer of policy enforcement and a practical complement to routing and switching.

Why order is everything

Because ACLs stop at the first match, a broad permit near the top can override a later deny. That means syntax alone does not define behavior; sequence does. A common example is permitting an entire subnet too early and then wondering why a specific host is still reaching a blocked service.

ACLs are not just access rules. They are ordered decisions, and the order determines the outcome.

For official reference on Cisco access control behavior, see the Cisco documentation portal and the Microsoft Learn style of documentation discipline for exact command behavior examples. If you are following the Cisco CCNA v1.1 (200-301) study path, ACLs fit naturally alongside interface configuration, IP addressing, and routing basics.

How Does Cisco ACL Syntax Work?

Cisco ACL syntax is built from a small set of ideas: action, match criteria, and scope. In its simplest form, an ACL line says whether to permit or deny a packet, what traffic type to match, and which addresses or ports are relevant. Extended ACLs add more detail, while standard ACLs stay intentionally narrow.

  1. Choose the action: permit or deny.
  2. Match the traffic: source address, destination address, protocol, or port.
  3. Use wildcard masks to define what part of the address must match.
  4. Apply the ACL to an interface in the correct direction.
  5. Remember the implicit deny at the end unless your rules explicitly allow the traffic first.

Standard ACLs only inspect the source IP address, so they are useful when you want coarse filtering. Extended ACLs are more precise because they can filter by protocol and port, which makes them much better for controlling web, DNS, SSH, or ICMP traffic. The syntax becomes more powerful, but also more sensitive to mistakes.

Pro Tip

When reading an ACL, ask two questions first: “What is this line matching?” and “What will the device do when it matches?” That habit catches most configuration errors before they reach production.

For authoritative syntax details, use Cisco’s own reference material and pair it with official vendor docs from Cisco. That keeps the command structure grounded in the platform you are actually configuring.

What Is the Difference Between Standard and Extended ACLs?

Standard ACLs match only the source IP address. Extended ACLs match much more: source and destination IPs, protocol type, and port numbers. If you need a blunt filter, standard ACLs are enough. If you need precise traffic control, extended ACLs are the better tool.

Standard ACL Use it for source-based filtering, especially when the destination does not matter.
Extended ACL Use it when protocol and port control matter, such as permitting HTTPS and blocking everything else.

A standard ACL is often used to protect management access or apply broad policy close to the destination. An extended ACL is more common for security rules because it can allow SSH while denying Telnet, or permit DNS while blocking other UDP traffic. That extra precision reduces collateral damage when the rule is written correctly.

When to use each one

  • Use standard ACLs when you care only about where traffic came from.
  • Use extended ACLs when you need to control a specific service or protocol.
  • Use standard ACLs cautiously because they can affect more traffic than intended.
  • Use extended ACLs for security policies that need exact matching.

A good access list configuration example starts with the policy goal, not the command. If the real goal is “allow management only from one subnet,” a standard ACL may be enough. If the goal is “allow web browsing but deny everything else,” an extended ACL is the right fit.

How Do Wildcard Masks Work in Cisco ACLs?

Wildcard masks are inverse masks that tell Cisco which bits must match and which bits can vary. Unlike subnet masks, where 1 means “network bit,” wildcard masks flip the logic: 0 means “must match,” and 1 means “ignore this bit.” That inversion is the source of most ACL confusion.

For example, 0.0.0.0 matches one exact host address, while 0.0.0.255 matches any address in a /24 network. A wildcard of 0.0.255.255 matches an entire /16. If you misread the mask, you can accidentally widen the rule from one host to an entire range.

Common wildcard patterns

  • 0.0.0.0 = one exact host
  • 0.0.0.255 = a /24 network
  • 0.0.255.255 = a /16 network
  • any = match all addresses

Here is a simple access control list example: permit 192.168.10.0 0.0.0.255 matches any host in 192.168.10.0/24. If you intended only one host, the correct wildcard would be 0.0.0.0 with the exact IP address. That one difference can change the scope of the policy dramatically.

Warning

Never treat a wildcard mask like a subnet mask. If you copy the wrong mask pattern from memory, your ACL may silently match far more traffic than you intended.

For foundational IP and matching concepts, the glossary definitions for IP Address, Subnet, and Network help keep the mental model clear.

How Does ACL Placement Change the Result?

ACL placement determines where traffic is filtered, and that changes both behavior and performance. Standard ACLs are usually placed near the destination because they only match source IPs and can accidentally block unrelated traffic if placed too early. Extended ACLs are usually placed near the source because they can stop unwanted traffic before it crosses the network.

Interface direction matters just as much. An ACL applied inbound filters packets as they enter an interface. An ACL applied outbound filters packets as they leave. If you choose the wrong direction, the ACL can behave like the opposite of what you intended.

  1. Identify the traffic flow from source to destination.
  2. Decide whether the policy is coarse or precise.
  3. Place standard ACLs near the destination.
  4. Place extended ACLs near the source.
  5. Apply inbound or outbound based on where the packet should be checked.

A classic mistake is applying a standard ACL on the wrong interface and wondering why users lose access to services they never meant to touch. Another mistake is applying an extended ACL outbound when the policy was meant to stop traffic before it traversed the network. The syntax can be perfect and the policy can still fail operationally if placement is wrong.

For a broader network perspective, ACL placement is part of the same design thinking that appears in routing policy and interface security. Cisco’s official documentation and the networking fundamentals covered in Cisco CCNA v1.1 (200-301) both reinforce this operational model.

How Does Cisco Evaluate ACLs Line by Line?

Cisco evaluates ACLs top to bottom and stops at the first matching line. That means the order of rules is often more important than the words permit or deny themselves. If a packet matches an earlier line, later lines never get a chance to apply.

This is why a broad permit placed too early can override a deny you thought would protect a service. It is also why a missing exception can create an outage when the implicit deny at the end catches traffic you forgot to permit. Reading the ACL as a sequence of decisions is the safest way to understand it.

To troubleshoot an ACL, do not ask what the list says. Ask which line the packet matches first.

Think like the router

  • Does the packet match line 1? If yes, the router stops.
  • If not, does it match line 2? The router checks the next line.
  • What happens if no line matches? The implicit deny drops the packet.

This evaluation model is what makes ACLs predictable once you internalize it. It is also why a well-written access list command cisco example often starts with the most specific rules first, then broad allowances later. The most common troubleshooting question is not “Is there a deny line?” but “Where does the first match happen?”

For enterprise security context, this ordering model echoes principles used in policy enforcement frameworks such as NIST Cybersecurity Framework, where control logic must be explicit and auditable. Cisco ACLs are simpler than full security policy engines, but they rely on the same discipline.

Real-World Cisco ACL Examples

Real ACLs solve specific traffic problems, not abstract lab problems. The best way to understand syntax is to see how a rule list changes actual packet behavior. Below are practical examples that map command structure to expected results.

Example of a standard ACL

This example allows one source network and blocks another near a destination interface:

access-list 10 permit 192.168.10.0 0.0.0.255
access-list 10 deny 192.168.20.0 0.0.0.255
access-list 10 permit any

Line 1 permits traffic from 192.168.10.0/24. Line 2 denies traffic from 192.168.20.0/24. Line 3 allows everything else so the implicit deny does not block unrelated traffic. If you remove line 3, all other traffic falls into the implicit deny at the end.

Example of an extended ACL

This example permits web traffic and blocks other traffic to a server:

access-list 110 permit tcp any host 203.0.113.10 eq 80
access-list 110 permit tcp any host 203.0.113.10 eq 443
access-list 110 deny ip any host 203.0.113.10
access-list 110 permit ip any any

This is a simple access list configuration example for allowing HTTP and HTTPS to one server while denying other IP-based traffic to that host. The final permit keeps the ACL from blocking unrelated traffic. This pattern is common when you need tight control on a single destination without disrupting the rest of the network.

Example for management access

Suppose only the admin subnet should reach a router’s management interface:

access-list 15 permit 10.10.10.0 0.0.0.255
access-list 15 deny any

Applied correctly, this limits access to the router’s management plane to 10.10.10.0/24. This kind of source-based restriction is a common ACL use case in small and large networks alike because it is simple, auditable, and effective.

For protocol and port behavior, Cisco’s official learning and configuration references remain the best source. If you are pairing this topic with the Cisco CCNA v1.1 (200-301) course path, these examples align closely with common lab tasks involving IP services and interface policy.

What Are the Most Common ACL Mistakes That Cause Outages?

The most common ACL outage cause is a bad wildcard mask, but it is not the only one. Wrong interface direction, misplaced deny lines, and misunderstanding the implicit deny all cause production issues. ACLs are unforgiving because they apply immediately once attached.

  • Wrong wildcard mask: matches the wrong subnet or host range.
  • Wrong direction: inbound versus outbound behavior is reversed.
  • Deny placed too early: later permits never get checked.
  • Implicit deny forgotten: traffic not explicitly permitted is blocked.
  • Poor documentation: future changes break the original intent.

A subtle but painful mistake is writing a deny for one subnet and then placing a broad permit above it. Another common issue is assuming an ACL line affects only one service when it actually matches much more traffic because the wildcard mask is too broad. These errors are easy to miss during review and easy to catch only after users complain.

Good naming helps too. Even if your environment uses numbered ACLs, document the business reason beside each ACL so the next administrator knows why the rule exists. That documentation becomes critical when troubleshooting or during change windows.

Note

ACLs are easier to maintain when every deny has a business reason and every permit has a matching scope statement. “Because we needed it” is not enough six months later.

Security guidance from CIS Benchmarks and operational best practices from Cisco both reinforce the same lesson: control changes should be deliberate, documented, and testable.

How Do You Verify and Troubleshoot ACLs?

ACL troubleshooting starts with confirming what is configured, where it is applied, and how the router is matching traffic. Do not begin by changing lines randomly. Start by reading the ACL exactly as the device will read it.

  1. Check the ACL contents and confirm the rule order.
  2. Verify the interface assignment and direction.
  3. Test the wildcard mask against the intended IP range.
  4. Generate known traffic from a controlled source.
  5. Observe counters and matches to see which line is being hit.

Testing should be methodical. If an HTTPS connection fails, ask whether the ACL permits TCP 443, whether the destination IP is correct, and whether the ACL is applied on the expected interface. If a subnet is unexpectedly blocked, check whether a broader deny line matched before the permit line could be reached.

A useful workflow is to compare before and after behavior. Verify the working state, apply the ACL, test again, and record the difference. That habit shortens outage time and gives you a clear rollback path if the change is wrong.

For a practical skills path, this is exactly the kind of troubleshooting work emphasized in Cisco CCNA v1.1 (200-301) labs. Being able to read the rule list is not enough; you also need to predict how live traffic will behave under that rule list.

What Are the Best Practices for Writing Cleaner ACLs?

Clean ACLs are specific, documented, and easy to review. The best ACL is not the longest one or the shortest one. It is the one another engineer can read in thirty seconds and understand without guessing.

  • Write the most specific rules first when they should take priority.
  • Keep ACLs focused on one policy objective.
  • Document the reason for every permit and deny.
  • Use clear naming or numbering so the list is easy to identify later.
  • Test in a controlled environment before production whenever possible.

Another practical habit is to separate policy layers. Do not cram unrelated rules into one ACL if they serve different goals. A list that mixes user filtering, admin access, and service restriction becomes hard to validate and even harder to troubleshoot during an incident.

Readable ACLs age better than clever ACLs.

Documentation is not optional. A future change request is much safer when the original reason for a deny or permit is written down. That reduces accidental service impact and makes audits easier.

For broader standards thinking, ISACA and NIST both emphasize traceable controls and repeatable change management. ACLs are a small but important example of that discipline.

How Do ACLs Fit Into the Bigger Cisco Networking Picture?

ACLs are a foundation skill because they show how policy enforcement works on routed and switched networks. They support segmentation, limit exposure, and control access without requiring a separate security platform for every problem. That makes them one of the first policy tools network engineers learn and one of the most useful tools they keep using.

ACL knowledge also connects directly to routing, NAT, and interface design. If you understand how packets are matched and filtered, you can better understand why some traffic is translated, forwarded, or stopped. ACLs are also a gateway concept for more advanced access control thinking later in the career path.

  • Routing: ACLs often interact with path selection and traffic flow.
  • NAT: ACLs may define which addresses are translated.
  • Interface security: ACLs help restrict administrative and user traffic.
  • Segmentation: ACLs can enforce policy between subnets and VLANs.

That is why ACLs show up so often in Cisco CCNA v1.1 (200-301) study paths. They are not just a test topic. They are a practical building block for everyday network operations, from branch routing to edge filtering.

For workforce context, networking roles continue to value hands-on fundamentals. The U.S. Bureau of Labor Statistics Occupational Outlook Handbook remains a useful source for understanding how network support and administration skills map to real job expectations. ACL literacy is one of those baseline skills.

Key Takeaway

Cisco ACLs are simple in structure but sensitive to order, wildcard masks, and placement.

Standard ACLs match source IPs only; extended ACLs add protocol and port control.

Every ACL is evaluated top to bottom, and the first match wins.

The implicit deny at the end can block traffic you forgot to permit.

Good ACLs are specific, documented, and tested before production.

Featured Product

Cisco CCNA v1.1 (200-301)

Learn essential networking skills and gain hands-on experience in configuring, verifying, and troubleshooting real networks to advance your IT career.

Get this course on Udemy at the lowest price →

Conclusion

Cisco ACL syntax becomes much easier once you understand the few rules that drive it: first match wins, wildcard masks control address matching, standard ACLs are source-based, extended ACLs are more precise, and placement changes everything. The commands are simple. The consequences are not.

If you can define the policy, choose the right ACL type, place it on the right interface in the right direction, and verify the result, you already know the workflow that prevents most ACL mistakes. That is the practical skill set behind the syntax, and it is exactly the kind of foundation covered in Cisco CCNA v1.1 (200-301) study paths.

Use the examples in this guide the next time you build or review an ACL. Start with the traffic you want to control, write the cleanest rules you can, and test before users find the problem for you.

Cisco® and Cisco® ACLs are referenced for educational purposes. Cisco® is a registered trademark of Cisco Systems, Inc.

[ FAQ ]

Frequently Asked Questions.

What is the basic syntax of a Cisco ACL?

The basic syntax of a Cisco ACL involves specifying permit or deny statements followed by the protocol, source and destination IP addresses, and optional port numbers or services. For example, a simple ACL entry might look like: “permit tcp 192.168.1.0 0.0.0.255 any eq 80”.

This syntax allows network administrators to define rules that control traffic flow based on various criteria. The order of the rules is crucial because Cisco devices evaluate ACLs sequentially, stopping at the first match. Understanding this syntax helps in designing effective ACLs that enforce security policies without unintended disruptions.

How do wildcard masks differ from subnet masks in Cisco ACLs?

Wildcard masks are used in Cisco ACLs to specify which bits of an IP address should be ignored during matching. Unlike subnet masks, which specify the network portion of an IP address, wildcard masks use inverse logic where 0 bits must match exactly and 255 bits are ignored.

For example, a wildcard mask of 0.0.0.255 allows any address within a particular /24 subnet. Proper understanding of wildcard masks is essential because incorrect masks can inadvertently permit or block traffic, leading to security vulnerabilities or connectivity issues.

Where should ACLs be placed on a Cisco router for optimal security?

ACLs should be strategically placed either inbound or outbound on interfaces to control traffic effectively. Generally, inbound ACLs are applied to the interface facing the source of traffic to filter unwanted packets early, while outbound ACLs can be used to control traffic leaving the interface.

For optimal security, place ACLs close to the source of traffic to prevent unwanted packets from consuming network resources. Additionally, ensure that the ACLs are ordered correctly because Cisco evaluates rules sequentially, and an incorrectly ordered ACL can cause unintended access or blockage.

What is the evaluation order of ACL rules, and why is it important?

Cisco ACLs are evaluated in a sequential, top-down manner. The first rule that matches the packet criteria is applied, and subsequent rules are ignored for that packet. This evaluation order is crucial because it determines the effectiveness of your security policies.

If a more permissive rule is placed before a restrictive one, it could unintentionally allow traffic that should be blocked. Proper ordering ensures that specific rules are matched first, and general rules are only applied if no prior match occurs. Understanding this order helps in troubleshooting and designing accurate ACLs.

How can I troubleshoot an ACL that is blocking legitimate traffic?

When troubleshooting an ACL that blocks legitimate traffic, start by verifying the ACL rules and their order. Use the command “show access-lists” to review active ACLs and identify potential conflicts or overly broad rules.

Next, utilize packet-tracer tools or debug commands to simulate traffic flow through the ACLs. This helps in pinpointing which rule is causing the blockage. Adjust the ACL rules accordingly, ensuring proper placement and order, then test again to confirm the issue is resolved.

Related Articles

Ready to start learning? Individual Plans →Team Plans →
Discover More, Learn More
Understanding the Cisco ASA and It's Role in Security Learn how Cisco ASA enhances network security by enforcing traffic policies and… Mastering Network Security: A Deep Dive into Cisco Access Control Lists (ACL) Discover essential strategies to master Cisco Access Control Lists and prevent costly… Mastering Cisco Networking: Trunking, VTP, and EtherChannels Explained Learn essential Cisco networking concepts like trunking, VTP, and EtherChannels to optimize… Understanding the Cisco OSPF Network Discover how to troubleshoot and optimize Cisco OSPF networks by understanding common… Cisco ACLs: How to Configure and Manage Access Control Lists Learn how to effectively configure and manage Cisco ACLs to enhance network… Cisco EIGRP Configuration: A Quick How To Learn how to correctly configure and troubleshoot EIGRP on Cisco routers to…
FREE COURSE OFFERS