SimulatorUnit 3 Primer

Packet flow: follow a frame across switches and routers

Follow a frame across switches and a router, hop by hop.

New to this? Read the topic first: Primer: Networks.

Simulation · Packet flow [3.1.C.1, 3.4.A.2]

Simulator: follow one packet to a website

A laptop opens an HTTPS (hypertext transfer protocol secure) website. Follow its first packet link by link and watch which addresses change.

A laptop at 10.20.4.31 connects through a switch to the router, its default gateway, then a firewall at the network boundary, the internet and a web server at 203.0.113.50. Laptop 10.20.4.31 Switch same LAN Router default gateway Firewall boundary Internet 6 more routers Web server 203.0.113.50 Network icons: Cisco A laptop at 10.20.4.31 connects through a switch to the router, its default gateway, then a firewall at the network boundary, the internet and a web server at 203.0.113.50. Laptop 10.20.4.31 Switch same LAN Router default gateway Firewall boundary Internet 6 more routers Web server 203.0.113.50 Network icons: Cisco
Header trace · one packet, 4 of its 9 links shown
LinkSource MACDestination MACSource IPDestination IPTTL
1. Laptop to router3c:52:82:4a:9f:1000:1b:a9:3e:71:0110.20.4.31203.0.113.50128
2. Router to firewall00:1b:a9:3e:71:0258:8d:09:2c:10:a1198.51.100.2203.0.113.50127
3. Firewall to internet58:8d:09:2c:10:a27c:21:0e:55:0b:01198.51.100.2203.0.113.50126
9. Internet to server7c:21:0e:9a:33:019c:b6:54:21:7e:30198.51.100.2203.0.113.50120

Changed since the link before: highlighted. The payload stays encrypted on every link; devices read only the headers. MAC (media access control) addresses deliver a frame across one link. IP (internet protocol) addresses carry the packet end to end. TTL (time to live) drops by 1 at every router. A link is the path between two devices that route; the switch does not start a new link.

Read the steps without the simulator
  1. The laptop builds the packet. The IP header holds source 10.20.4.31 and destination 203.0.113.50, the TCP (transmission control protocol) header holds destination port 443, and the payload is encrypted by HTTPS. 203.0.113.50 is not in 10.20.4.0/24, so the laptop wraps the packet in a frame addressed to its default gateway's MAC address, which it learned with ARP (address resolution protocol).
  2. The switch forwards the frame. It reads the destination MAC address, finds the router's port in its MAC address table and sends the frame only there. It changes nothing.
  3. The router passes the packet to the next network. It removes the old frame, lowers the TTL (time to live) from 128 to 127 and wraps the packet in a new frame for the next link. Here the router also swaps the private source address 10.20.4.31 for a public one, 198.51.100.2 (network address translation, beyond the CED; on some networks the firewall does this instead). The destination IP address does not change.
  4. The firewall checks the headers. This firewall is stateless: it decides from header information such as IP addresses, ports and protocol [3.4.A.2], and it cannot read the encrypted payload. A rule allows outbound TCP to port 443, so the packet passes. The firewall also routes, so it lowers the TTL from 127 to 126 and writes a new frame for the link to the internet.
  5. The internet routers repeat the same job. Six more routers each lower the TTL by 1 and write a new frame for the next link (links 4 to 9), so the packet arrives with TTL 120.
  6. The web server receives it. The last frame is addressed to the server's MAC address. On every link the MAC addresses were new, but the destination IP address, 203.0.113.50, never changed. An adversary who captures the packet on a link can read these headers (who is talking to whom, and on which port) but not the encrypted payload. Network vulnerabilities that let adversaries intercept data in transit are a risk to confidentiality [3.1.C.1].
Check yourself: which address was the same on every link?

The destination IP address, 203.0.113.50. The MAC addresses change on every link because each frame only crosses one link. The source IP address changed once, at the router, because of network address translation.

Go to the topic: Networks

Was this page helpful?

No names are ever shown, and every public comment is checked by us first. Please do not include personal details. To get a reply, email [email protected].

Course map
↑ Top

Enlarged view of the selected figure