Chapter 7 - ACL Concepts
Chapter 7 - ACL Concepts
Chapter 7 - ACL Concepts
ACL Concepts
07
Module Objectives
Module Title: ACL Concepts
An ACL is a series of IOS commands that are used to filter packets based on
information found in the packet header. By default, a router does not have any
ACLs configured. When an ACL is applied to an interface, the router performs
the additional task of evaluating all network packets as they pass through the
interface to determine if the packet can be forwarded.
• An ACL uses a sequential list of permit or deny statements, known as
access control entries (ACEs).
Note: ACEs are also commonly called ACL statements.
• When network traffic passes through an interface configured with an ACL,
the router compares the information within the packet against each ACE,
in sequential order, to determine if the packet matches one of the ACEs.
This process is called packet filtering.
What is an ACL? (Cont.)
Several tasks performed by routers require the use of ACLs to identify traffic:
• Limit network traffic to increase network performance
• Provide traffic flow control
• Provide a basic level of security for network access
• Filter traffic based on traffic type
• Screen hosts to permit or deny access to network services
• Provide priority to certain classes of network traffic
Packet Filtering
A wildcard mask is similar to a subnet mask in that it uses the ANDing process
to identify which bits in an IPv4 address to match. Unlike a subnet mask, in
which binary 1 is equal to a match and binary 0 is not a match, in a wildcard
mask, the reverse is true.
• An IPv4 ACE uses a 32-bit wildcard mask to determine which bits of the
address to examine for a match.
• Wildcard masks use the following rules to match binary 1s and 0s:
• Wildcard mask bit 0 - Match the corresponding bit value in the address
• Wildcard mask bit 1 - Ignore the corresponding bit value in the address
Wildcard Mask Overview (Cont.)
Decimal Binary
IPv4 address 192.168.1.1 11000000.10101000.00000001.00000001
Wildcard Mask 0.0.0.0 00000000.00000000.00000000.00000000
Permitted IPv4
192.168.1.1 11000000.10101000.00000001.00000001
Address
Wildcard Mask Types (Cont.)
Wildcard Mask to Match an IPv4 Subnet
• ACL 10 needs an ACE that permits all hosts in the 192.168.1.0/24 network. The
wildcard mask 0.0.0.255 stipulates that the very first three octets must match
exactly but the fourth octet does not.
• When processed, the wildcard mask 0.0.0.255 permits all hosts in the
192.168.1.0/24 network. The resulting ACE in ACL 10 would be access-list 10
permit 192.168.1.0 0.0.0.255.
Decimal Binary
IPv4 address 192.168.1.1 11000000.10101000.00000001.00000001
Wildcard Mask 0.0.0.255 00000000.00000000.00000000.11111111
Permitted IPv4
192.168.1.0/24 11000000.10101000.00000001.00000000
Address
Wildcard Mask Types (Cont.)
Wildcard Mask to Match an IPv4 Address Range
• ACL 10 needs an ACE that permits all hosts in the 192.168.16.0/24,
192.168.17.0/24, …, 192.168.31.0/24 networks.
• When processed, the wildcard mask 0.0.15.255 permits all hosts in the
192.168.16.0/24 to 192.168.31.0/24 networks. The resulting ACE in ACL 10 would
be access-list 10 permit 192.168.16.0 0.0.15.255.
Decimal Binary
IPv4 address 192.168.16.0 11000000.10101000.00010000.00000000
Wildcard Mask 0.0.15.255 00000000.00000000.00001111.11111111
192.168.16.0/24 11000000.10101000.00010000.00000000
Permitted IPv4
to
Address
192.168.31.0/24 11000000.10101000.00011111.00000000
Wildcard Mask Calculation
The Cisco IOS provides two keywords to identify the most common uses of
wildcard masking. The two keywords are:
• host - This keyword substitutes for the 0.0.0.0 mask. This mask states that
all IPv4 address bits must match to filter just one host address.
• any - This keyword substitutes for the 255.255.255.255 mask. This mask
says to ignore the entire IPv4 address or to accept any addresses.
4.3 Guidelines for ACL Creation
Limited Number of ACLs per Interface
There is a limit on the number of ACLs that can be applied on a router
interface. For example, a dual-stacked (i.e, IPv4 and IPv6) router interface can
have up to four ACLs applied, as shown in the figure.
Specifically, a router interface can have:
• One outbound IPv4 ACL.
• One inbound IPv4 ACL.
• One inbound IPv6 ACL.
• One outbound IPv6 ACL.
Guideline Benefit
Base ACLs on the organizational security This will ensure you implement organizational
policies. security guidelines.
Use a text editor to create, edit, and save all This will help you create a library of reusable
of your ACLs. ACLs.
Document the ACLs using This will help you (and others) understand
the remark command. the purpose of an ACE.
Test the ACLs on a development network
before implementing them on a production This will help you avoid costly errors.
network.
4.4 Types of IPv4 ACLs
Standard and Extended ACLs
R1(config)# access-list ?
<1-99> IP standard access list
<100-199> IP extended access list
<1100-1199> Extended 48-bit MAC address access list
<1300-1999> IP standard access list (expanded range)
<200-299> Protocol type-code access list
<2000-2699> IP extended access list (expanded range)
<700-799> 48-bit MAC address access list
rate-limit Simple rate-limit specific access list
template Enable IP template acls
Router(config)# access-list
Numbered and Named ACLs (Cont.)
Named ACLs
• Named ACLs are the preferred method to use when configuring ACLs. Specifically,
standard and extended ACLs can be named to provide information about the
purpose of the ACL. For example, naming an extended ACL FTP-FILTER is far better
than having a numbered ACL 100.
• The ip access-list global configuration command is used to create a named ACL, as
shown in the following example.