Read a sample: 1. The Packet's Journey
A user reports that a web page will not load. The server is running, the address looks correct, and someone mentions that an access control list might be blocking the connection.
Before examining a single rule, ask a more basic question: Which packet are we talking about, and where would it travel?
An access control list, or ACL, makes decisions about traffic at a particular point in a network. A rule that appears relevant on paper may have no effect on a packet that never reaches it. Likewise, a filter on the correct router can be ineffective for the traffic in question if it is applied to the wrong interface or direction.
This chapter builds a packet-first model you can use throughout the book. We will follow individual IPv4 packets through a small topology, identify the routing and filtering points they encounter, and distinguish a request from its reply. We will not configure an ACL yet. First, we need a clear picture of the journey that an ACL can interrupt.
Imagine a small organization with two local networks connected by one router:
text
Office network Server network
192.0.2.0/24 198.51.100.0/24
PC-A WEB-1
192.0.2.10 198.51.100.20
| |
| |
+------ G0/0 R1 G0/1 -------------------+
.1 .1
R1 G0/0: 192.0.2.1/24
R1 G0/1: 198.51.100.1/24
PC-A uses 192.0.2.1 as its default gateway. WEB-1 uses 198.51.100.1 as its default gateway. Assume both hosts are correctly configured, the router interfaces are operational, and R1 has a route for each directly connected network. Unless a scenario says otherwise, assume no ACL is applied.
The lines represent connectivity, not necessarily a single physical cable between each host and the router. There could be a switch on either LAN. For our initial traces, those switches do not change which router interface receives or sends the IPv4 packet.
The addresses in this topology are examples. What matters is the relationship between them: PC-A is on one IPv4 subnet, WEB-1 is on another, and R1 connects the two.
Suppose PC-A opens a web connection to WEB-1. For our first trace, consider one IPv4 packet carrying a TCP segment with these characteristics:
Port 51500 is an example client-side port. Port 80 identifies the destination service in this example. The exact client port is less important than its role: it belongs to the source side of this particular packet.
This table describes one packet traveling from PC-A toward WEB-1. It is not a description of the entire conversation. A connection consists of traffic in both directions, and the packets returning from WEB-1 will have different source and destination values.
The distinction matters because filters inspect packet characteristics. A filter might care only about the source address, or it might also distinguish the destination, protocol, or transport ports. We will learn the syntax for expressing those conditions later. For now, treat the table as the information a troubleshooter should record before predicting what happens.
PC-A compares the destination address with its own subnet information. The destination, 198.51.100.20, is not on PC-A's 192.0.2.0/24 network. PC-A therefore sends the packet toward its default gateway, 192.0.2.1.
That gateway is the next hop for PC-A; it is not the packet's final IPv4 destination. The packet still has destination address 198.51.100.20.
On the local network, PC-A needs a way to deliver the traffic to R1's G0/0 interface. In an Ethernet example, PC-A uses the gateway's MAC address as the destination of the local Ethernet frame, resolving it with ARP if necessary. The frame carries the IPv4 packet to R1.
Keep the two layers separate:
- The Ethernet frame gets the packet across the local link to the next device.
- The IPv4 destination identifies where the packet is ultimately trying to go.
When R1 forwards the packet onto the server network, it sends a new link-layer frame appropriate for that link. In this ordinary routed example, the source and destination IPv4 addresses remain PC-A and WEB-1. The IPv4 time-to-live is reduced by the router. We are not assuming address translation or another feature that changes the addresses.
This separation prevents a common mistake: seeing the default gateway involved and concluding that the packet's IPv4 destination must be the gateway. The gateway receives the local frame because it is the next hop, while the IP packet remains addressed to WEB-1.
The frame reaches R1 on G0/0. From the router's perspective, the IPv4 packet is inbound on G0/0: it is entering the router through that interface.
“Inbound” does not mean “coming from the internet,” “coming from an untrusted network,” or “heading toward a server.” It describes direction relative to one interface on one device. Here, the office network could be entirely internal and the packet would still be inbound on R1's G0/0.
An IPv4 ACL applied inbound on G0/0 is positioned to inspect traffic entering through that interface. If such a filter denies this packet, R1 does not forward that packet to WEB-1. If the filter permits it, the packet can continue through the router's forwarding process, subject to routing and any other relevant conditions.
A permit at one point is not a promise of end-to-end delivery. There may be another filter later, a missing route, a host firewall, or a service that is not listening. Similarly, a packet that fails to arrive is not automatically evidence of an ACL deny.
For our baseline trace, no ACL is applied, so there is no ACL decision at G0/0.
R1 examines the packet's destination…