Chapter 10: The life of a packet
The chapter introduces a review of packet delivery and explains the difference between a packet’s destination address and its frame addresses along the path.
After this chapter you will be able to
- Packet and frame destinations. Explain that the packet remains addressed to PC3 at Layer 3 throughout its journey, while at Layer 2 it is encapsulated in a new frame at each hop addressed to the next hop.
- Remote destination and default gateway. Explain why PC1 sends a packet for PC3 to its default gateway in a frame addressed to R1 G0/1, rather than in a frame addressed to PC3’s MAC address.
- Default gateway ARP exchange. Trace why PC1 uses ARP before sending the packet and what it learns from the exchange.
- R1 next-hop forwarding. Trace how R1 processes PC1’s frame, selects the route to 192.168.3.0/24, resolves the next hop’s MAC address, and forwards the packet toward R2.
- R2 next-hop forwarding. Trace how R2 handles the frame from R1: it examines the packet, selects the matching route, uses ARP to learn R3’s MAC address, and prepares to forward the packet to R3.
- Connected Route to PC3. Explain how R3 selects the most specific matching route and why it addresses the outgoing frame to PC3 rather than another router.
- ARP and Final Delivery. Trace how R3 learns PC3’s MAC address and delivers the frame through SW2.
- Reused forwarding information. Explain why delivering PC3’s response does not require new MAC address learning or ARP exchanges.
- PC3 reply forwarding path. Trace PC3’s reply through the default gateway, switches, and routers to PC1, including how its frame addresses change along the path.
What it builds on
- Data encapsulation and de-encapsulation (chapter 4) · The distinction between a packet and the frame that encapsulates it.
- How end hosts send packets (chapter 9) · How an end host sends packets to destinations outside its local network.
- Address Resolution Protocol (chapter 6) · ARP’s role in relating IP addresses to MAC addresses.
- Frame flooding and forwarding (chapter 6) · When a switch floods or forwards Ethernet frames.
- Route selection (chapter 9) · Selecting the most specific matching route.
- Ping (chapter 6) · Ping and ICMP echo messages
Section by section
Introduction
The chapter introduces a review of packet delivery and explains the difference between a packet’s destination address and its frame addresses along the path.
- Packet and frame destinations: Explain that the packet remains addressed to PC3 at Layer 3 throughout its journey, while at Layer 2 it is encapsulated in a new frame at each hop addressed to the next hop.
Why it matters: This distinction helps you follow the packet across multiple hops without confusing its final destination with each frame’s immediate destination.
Key terms: Layer 3, Layer 2, packet, frame, next hop
10.1 The life of a packet from PC1 to PC3
Introduces a step-by-step walkthrough of how a packet travels from PC1 to PC3.
10.1.1 PC1 to R1
This section traces how PC1 determines that PC3 is remote, learns its default gateway’s MAC address, and sends the packet toward R1 through SW1.
- Remote destination and default gateway: Explain why PC1 sends a packet for PC3 to its default gateway in a frame addressed to R1 G0/1, rather than in a frame addressed to PC3’s MAC address.
Why it matters: This explains why a packet for a remote host is first sent to a local router. - Default gateway ARP exchange: Trace why PC1 uses ARP before sending the packet and what it learns from the exchange.
Why it matters: ARP supplies the local MAC address PC1 needs before it can send the frame toward PC3. - Switch forwarding and address tables: Distinguish SW1’s frame-forwarding role and MAC address table from the ARP tables used by hosts and routers.
Why it matters: The two tables solve different problems in getting PC1’s frame through the local LAN.
Key terms: local network, /24 prefix length, default gateway, destination MAC address, ARP, R1 G0/1, ARP entry, encapsulate, SW1, MAC address table
10.1.2 R1 to R2
R1 selects a route for PC1’s packet, learns R2’s MAC address with ARP, and forwards the packet in a new frame.
- R1 next-hop forwarding: Trace how R1 processes PC1’s frame, selects the route to 192.168.3.0/24, resolves the next hop’s MAC address, and forwards the packet toward R2.
Why it matters: A router needs both a route to choose the next hop and that next hop’s MAC address to send the frame. - ARP broadcast on direct link: Explain why R1’s ARP request uses a broadcast MAC address even though only R2 receives it.
Why it matters: Broadcast addressing does not imply that multiple devices receive a request on this direct link.
Key terms: de-encapsulates, routing table lookup, most specific matching route, next hop, ARP, encapsulate, ARP request, broadcast MAC address, flood
10.1.3 R2 to R3
This section traces how R2 selects a route toward PC3 and learns R3’s MAC address so it can forward the packet.
- R2 next-hop forwarding: Trace how R2 handles the frame from R1: it examines the packet, selects the matching route, uses ARP to learn R3’s MAC address, and prepares to forward the packet to R3.
Why it matters: This connects R2’s routing decision to the address it needs to send the packet across the next link.
Key terms: de-encapsulates, routing table lookup, most specific matching route, static route, next hop, ARP request
10.1.4 R3 to PC3
R3 uses its connected route and ARP to deliver the packet to PC3, which then responds to the ICMP echo request.
- Connected Route to PC3: Explain how R3 selects the most specific matching route and why it addresses the outgoing frame to PC3 rather than another router.
Why it matters: The connected route determines who receives the frame on R3’s final hop. - ARP and Final Delivery: Trace how R3 learns PC3’s MAC address and delivers the frame through SW2.
Why it matters: Knowing the route is not enough: R3 also needs PC3’s MAC address to send the final frame. - PC3 Echo Reply: State how PC3 responds when PC1’s delivered message is an ICMP echo request.
Why it matters: PC3’s reply begins the return trip of the exchange.
Key terms: most specific matching route, connected route, directly connected network, ARP request, ARP reply, MAC address, ARP tables, ICMP echo request, ICMP echo reply
10.2 The life of a packet from PC3 to PC1
The section traces PC3’s reply to PC1 and explains why previously learned MAC addresses and ARP entries make the return trip simpler.
- Reused forwarding information: Explain why delivering PC3’s response does not require new MAC address learning or ARP exchanges.
Why it matters: It explains what changes when a packet is sent after the devices have already exchanged traffic. - PC3 reply forwarding path: Trace PC3’s reply through the default gateway, switches, and routers to PC1, including how its frame addresses change along the path.
Why it matters: It connects the routers’ packet-forwarding decisions with the frames used to carry the reply along each hop.
Key terms: MAC address learning, ARP table entries, default gateway, routing table lookups, next hop, frame, MAC addresses
10.3 Summary
Concepts explained in this chapter
- arpARP is a protocol that resolves an IPv4 address to the MAC address of a host on the local network.
- arp replyAn ARP reply is a unicast protocol message that provides a host's MAC address to the host that sent an ARP request.
- arp requestAn ARP request is a broadcast protocol message that asks the host using a specified IP address to provide its MAC address.
- frameA frame is a data-link-layer protocol data unit consisting of a packet combined with a Layer 2 header and trailer.
- most specific matching routeThe most specific matching route is the route whose network prefix has the greatest number of bits matching a packet's destination IP address.
- arp tableAn ARP table is a host-maintained list that associates IP addresses with corresponding MAC addresses.
- default gatewayA default gateway is the router or forwarding path used to send traffic toward destinations outside a device's known networks.
- known unicast frameA known unicast frame is a unicast frame whose destination MAC address has an entry in the receiving switch's MAC address table.
- mac agingMAC address learning is the switch process of associating source MAC addresses with the ports or interfaces on which frames arrive.
- network switchA Layer 2 switch is a switch that forwards frames within a local network without performing network-layer routing.
- unknown unicast frameAn unknown unicast frame is a unicast frame whose destination MAC address has no entry in the receiving switch's MAC address table.
- next hopA next hop is the adjacent router or forwarding address to which a packet is sent on its path toward a destination network.
- network packetA packet is a network-layer protocol data unit consisting of a segment combined with a Layer 3 header.
- broadcast addressA broadcast address is the last IPv4 address in a network, with every host-portion bit set to one, for delivery to all hosts in that network.
- broadcast frameBroadcast is one-to-all network communication directed to every host on the relevant network segment.
- local networkA local area network is a network that connects devices within a limited geographic area such as an office or building.
- mac addressA MAC address is a 48-bit link-layer address assigned to a network-device port, normally by the device manufacturer, for local hop-to-hop delivery.
- mac address tableA MAC address table is a switch data structure that maps learned MAC addresses to the ports through which their corresponding devices are reachable.
- netmaskA netmask is a 32-bit value paired with an IPv4 address to identify which address bits belong to the network portion and which belong to the host portion.
- network addressA network address is the first IPv4 address in a network, with all host bits set to zero, and cannot be assigned to a host.
- prefix lengthA prefix length is the number of leading bits in an IP address that constitute its network portion, written in slash notation such as /24.
- routerA network device that forwards packets between different networks based on network-layer addressing.
- routing tableA routing table is a data structure containing routes that describe reachable network destinations and how to forward packets toward them.
- IPv4An IPv4 address is a 32-bit network-layer address used to identify a source or destination in IPv4 communication.
- TCP/IP protocol suiteThe TCP/IP model is a layered conceptual framework that describes how network communication functions across application, transport, network, data-link, and physical layers.
- switchingA forwarding decision is a router's selection of the next forwarding action for a packet based on its destination and routing information.
- ICMP echo replyAn ICMP echo reply is an ICMP diagnostic message returned in response to an echo request.
- connected routeA connected route is a route to a network directly attached to an interface with an IP address that is operationally up.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
