The Basics of Configuring and Using Cisco Access Control Lists
The Basics of Configuring and Using Cisco Access Control Lists
The Basics of
Configuring and
Using Cisco
Access Control Lists
1-800-COURSES www.globalknowledge.com
The Basics of Configuring and Using
Cisco Access Control Lists
Raymond B. Dooley, MBA, CCSI, CCNA, CCNP, CCDA, CCDP, SE, FE, Global
Knowledge Course Director, Global Knowledge Course Director
Introduction
Cisco Access Control Lists (ACLs) are used in nearly all product lines for several purposes, including filtering
packets (data traffic) as it crosses from an inbound port to an outbound port on a router or switch, defining
classes of traffic, and restricting access to devices or services. Knowing how to design, configure, and
troubleshoot ACLs is required for all network engineers working within a Cisco network.
The objective is to provide a fundamental explanation of Cisco ACLs with the following topics:
• The Pink Line trolley passes all the beach hotels and the shopping center. If the passenger is
staying at a beach hotel and has a key, then there is no fare. Otherwise, it is $2.50.
• Charted Trolleys have the same route as the Pink Line but the passenger must show proof of
having paid for the service as part of a vacation tour package.
• The city bus will go anywhere on the island for a fare of $2.50 or $1.00 for seniors. However
each bus has a strict route and schedule.
• Shuttle Buses and Taxis will follow any route chosen but with a higher metered or published
fare. In other words, the only criterion is cash.
The point of the analogy is that filtering happens all of the time everywhere, not just in networks. Depending on
the type of transportation service chosen, the passenger will be permitted if the fare conditions are met and
denied if the conditions are not met. So, as the graphic shows, there are multiple levels of service and well
defined permit/deny conditions. Another way to state this is that if proper criteria is matched, either a permit or
deny is executed. With networks, the method to match must be defined and the application of the filter must be
designed as well, and using an ACL is a method to do it.
As the graphic shows, a good place for a filter is between the enterprise network and the Internet. An entire
range of firewalling technologies exist here, and ACLs are one tool.
The graphic further clarifies the idea. It is the company’s policy that not all traffic from the computer on the left
will be allowed to exit the router via the interface on the right. Virtually all companies have detailed security
policy (or should have one) and the policy is followed to implement proper filtering.
Also, routers and multi-layer switches run dynamic routing protocols such as Open Shortest Path First (OSPF) and
Enhanced Interior Gateway Protocol (EIGRP) to exchange lists of reachable IP networks. These updates can be
filtered with ACLs to limit the number of IP addresses in the list of routes learned.
Types of ACLs
Standard ACL
– Checks source address
– Generally permits or denies entire protocol suite
Extended ACL
– Checks source and destination address
– Generally permits or denies specific protocols and applications
Two methods used to identify standard and
extended ACLs:
– Numbered ACLs use a number for identification
– Named ACLs use a descriptive name or number for
identification
Access lists are categorized based on the granularity of the filtering. Similar to the analogy, the match criteria to
ride the chartered trolleys is much more specific than to ride the city bus. Multiple protocols have ACLs in Cisco,
but IP is by far the most common and the only one described here.
Standard Access Lists use the simplest matching criteria of all—the source IP address in the IP packet.
Based on matching the source IP address, permit or deny logic can be applied.
As the name implies, Extended Access Lists use a much more detailed list of match criteria, including
source IP address, destination IP address, protocol type field in the IP header, TCP/UDP port number,
and additional criteria such as time range.
For both types, the wildcard mask identifies a “range” or block of addresses or a specific host.
Cisco ACLs may be numbered or named. A range of numbers for each type of list has been defined by Cisco, and
numbered ACLs have been used for years. The named access list is more convenient and easier to edit. The
operation of each is identical. Named access lists are recommended for engineers learning ACLs for the first time.
Configuration syntax will be covered later.
Since the entries in an ACL are processed in order from the top down, and since ACLs require computer and
memory resources in the device, a set of strict rules are applied as shown in the graphic.
The graphic shows router logic in checking for the existence of and using an outbound ACL. One thing to note
with an outbound list is that the router has already expended the resources to route the packet before the
permit/deny logic is applied to the packet. If the ACL is inbound, the permit/deny logic is applied before the
routing process occurs.
Wildcard Masks
Binary masks are used in IP address subnetting and planning to identify the bit boundary between the network
portion of the address and the host part. With a network mask, the ones in the mask imply network and the
zeroes imply hosts. For example,192.168.34.0 255.255.255.0 or 192.168.34.0/24 means that 24 bits of the address
are network and 8 bits are host. Using the proper address and mask (subnetting) can be more complex than this
example and is covered in Cisco training courses.
To identify IP addresses and blocks of addresses for ACLs, a wildcard mask is used. The principal is the same as
subnetting but the bit order of the mask is reversed or “inverted.”
To identify the same hosts as in the previous example with a wildcard mask, it would be 192.168.34.0 0.0.0.255,
where the zeroes in the mask mean match and the ones mean irrelevant.
The matching for the permit or deny action using IP addresses can then be very granular. The graphic provides
another example of matching with the wildcard mask.
RouterX(config-if)#
ip access-group name {in | out}
In the standard access list shown in the graphic, an individual host is denied and the rest of that host’s subnet is
permitted. Remember, all traffic from the host is denied including responses to packet sent to the denied host.
The ACL is applied outbound on the E0 interface with the access-group command.
Example:
ip access-list standard notelnet
permit 192.168.1.0 0.0.0.255
(implicit deny any)
line vty 0 4
access-class notelnet in
A named access-list is depicted in the graphic. Notice that the source and destinations are both shown along with
a destination TCP port. It is applied to the interface with the same commands as a standard access list.
Or
RouterX(config)#
access-list access-list-number remark remark
Creates a numbered ACL comment
Comments or remarks in the ACL are helpful in that they provide information about the purpose of the list to
others who may look at it for troubleshooting or monitoring. The graphic shows how these comments may be
added.
1. Show access-list is used to determine if the ACL is written properly to meet the security policy objectives.
Verifying ACLs
RouterX# show ip interfaces e0
Ethernet0 is up, line protocol is up
Internet address is 10.1.1.11/24
Broadcast address is 255.255.255.255
Address determined by setup command
MTU is 1500 bytes
Helper address is not set
Directed broadcast forwarding is disabled
Outgoing access list is not set
Inbound access list is SALES
Proxy ARP is enabled
Security level is default
Split horizon is enabled
ICMP redirects are always sent
ICMP unreachables are always sent
ICMP mask replies are never sent
IP fast switching is enabled
IP fast switching on the same interface is disabled
IP Feature Fast switching turbo vector
IP multicast fast switching is enabled
IP multicast distributed fast switching is disabled
<text ommitted>
2. Show ip interface is used to determine the interface on which the ACL has been implemented and in
what direction—in or out.
Conclusion
If the configuration files on a thousand or more Cisco multilayer devices in enterprise networks were analyzed,
there would be ACLs in almost every one of them. There are also many trouble tickets generated in network
operations centers every day requiring the repair of an ACL. From this, it is simple to conclude that
understanding, designing, implementing, and troubleshooting ACLs are required skills for network engineers. The
topic also appears in the CCNA examination in multiple questions and simulations.
Learn More
Learn more about how you can improve productivity, enhance efficiency, and sharpen your competitive edge
through training.
ICND1 v2.0 - Interconnecting Cisco Networking Devices, Part 1
ICND2 v2.0 - Interconnecting Cisco Networking Devices, Part 2
CCNAX v2.0 - CCNA Routing and Switching Boot Camp
IINS 2.0 - Implementing Cisco IOS Network Security