Skip to content

Following one exchange

Module
How Network Communication Is Organized
Difficulty
Easy
Updated
Tested on
Ubuntu 24.04.5 LTS, netlab 1.0, GNU Bash 5.2.21, tcpdump 4.99.4, curl 8.5.0
On this page

Between laptop and web stand a switch, a router, and another switch. The receiving frame has a link header, but does it match the one that left laptop? Compare one packet at four capture points instead of assuming every device handles it the same way.

By the end, you can identify what the router changes and explain why the switch does something different.

Read Encapsulation and decapsulation. Use these supplied captures; a learner lab is not required yet. The lab has two networks, home and site, joined by router. No address sharing mode or fault is enabled.

The author requested the same file from laptop, with captures listening simultaneously at laptop:eth0, router:eth0, router:eth1, and web:eth0. The router’s first interface belongs to home; its second belongs to site.

One request observed at four points
learner@laptop:~$ curl -sS http://10.77.20.80/hello.txtHello from web.learner@laptop:~$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, networking lab (netlab 1.0), GNU Bash 5.2.21. One request supplies all four simultaneous captures; it is not four separate requests.
Steps (3)
  1. Type curl -sS http://10.77.20.80/hello.txt — Make the request while all four captures listen
  2. Press Enter
  3. Output: Hello from web.

The frames at laptop:eth0, router:eth0, router:eth1, web:eth0 are one packet: the same IP identification 58012 and TCP sequence number 3243797573. Those matching fields tie the four observations together; similar-looking addresses alone would not establish that they are the same packet. Times, TCP sequence numbers, and IP identification values vary between runs. Your numbers will differ if you repeat the capture later in the course.

Read the IP pair first. It keeps naming laptop as the source and web as the destination at every point. End to end means concerning the original sender and final receiver across the path. Here the machine addresses have that scope.

The home frame names the router’s home interface as its link destination. It still contains a packet for web. Those are answers to different questions: which interface receives on this network, and which machine is the final destination.

sw-home reads the destination MAC address to forward the frame. It does not replace that address with its own. Compare the frame leaving laptop with the frame arriving at the router: the shown link and internet fields match.

The switch’s forwarding action is modeled from the observations on either side. These captures do not inspect its internal decision.

The router accepts a frame addressed to its home interface and removes the incoming link header. It reads the destination IP address to decide where to forward the packet. The packet still names the original two machines.

To send onto site, the router builds a replacement link header. Its source names the router’s site interface; its destination names web’s interface. Hop by hop means handling delivery separately along the path. A hop here is a routed step from one network toward the next; passing through a switch does not lower the packet’s hop counter.

Predict: after this router, which addresses differ: the machine addresses, the link addresses, or both?

The request crosses the router

  1. laptopmachine
  2. sw-homeswitch
  3. routerrouter
  4. sw-siteswitch
  5. webserver

In the capture4 capture points

  1. laptop:eth006:55:36.115669 02:77:10:00:00:10 > 02:77:10:00:00:01, ethertype IPv4 (0x0800), length 149: 10.77.10.10.48862 > 10.77.20.80.80: Flags [P.], seq 1:84, ack 1, win 63, options [nop,nop,TS val 2568119165 ecr 13033857], length 83: HTTP: GET /hello.txt HTTP/1.1
  2. router:eth006:55:36.115671 02:77:10:00:00:10 > 02:77:10:00:00:01, ethertype IPv4 (0x0800), length 149: 10.77.10.10.48862 > 10.77.20.80.80: Flags [P.], seq 1:84, ack 1, win 63, options [nop,nop,TS val 2568119165 ecr 13033857], length 83: HTTP: GET /hello.txt HTTP/1.1
  3. router:eth106:55:36.115672 02:77:20:00:00:01 > 02:77:20:00:00:80, ethertype IPv4 (0x0800), length 149: 10.77.10.10.48862 > 10.77.20.80.80: Flags [P.], seq 1:84, ack 1, win 63, options [nop,nop,TS val 2568119165 ecr 13033857], length 83: HTTP: GET /hello.txt HTTP/1.1
  4. web:eth006:55:36.115673 02:77:20:00:00:01 > 02:77:20:00:00:80, ethertype IPv4 (0x0800), length 149: 10.77.10.10.48862 > 10.77.20.80.80: Flags [P.], seq 1:84, ack 1, win 63, options [nop,nop,TS val 2568119165 ecr 13033857], length 83: HTTP: GET /hello.txt HTTP/1.1

Step-by-step model built from captured frames · Frames captured at laptop:eth0, router:eth0, router:eth1 and web:eth0 while running curl -sS http://10.77.20.80/hello.txt, on Ubuntu 24.04.5 LTS, netlab 1.0, tcpdump 4.99.4, curl 8.5.0. The values are the capture's; what each device reads is the model. Four observations follow one request through laptop, sw-home, router, sw-site, and web.
Steps (6)
  1. laptop sends. laptop sends toward web, using the router's home interface as the next link destination.06:55:36.115669 02:77:10:00:00:10 > 02:77:10:00:00:01, ethertype IPv4 (0x0800), length 149: 10.77.10.10.48862 > 10.77.20.80.80: Flags [P.], seq 1:84, ack 1, win 63, options [nop,nop,TS val 2568119165 ecr 13033857], length 83: HTTP: GET /hello.txt HTTP/1.1
  2. sw-home. The home switch reads the destination MAC address and forwards the frame unchanged. Its action is modeled from the capture after it. Read: Destination MAC address.06:55:36.115671 02:77:10:00:00:10 > 02:77:10:00:00:01, ethertype IPv4 (0x0800), length 149: 10.77.10.10.48862 > 10.77.20.80.80: Flags [P.], seq 1:84, ack 1, win 63, options [nop,nop,TS val 2568119165 ecr 13033857], length 83: HTTP: GET /hello.txt HTTP/1.1
  3. router in. The router accepts the incoming frame and reads the packet's destination IP address. Read: Destination MAC address and Destination address.06:55:36.115671 02:77:10:00:00:10 > 02:77:10:00:00:01, ethertype IPv4 (0x0800), length 149: 10.77.10.10.48862 > 10.77.20.80.80: Flags [P.], seq 1:84, ack 1, win 63, options [nop,nop,TS val 2568119165 ecr 13033857], length 83: HTTP: GET /hello.txt HTTP/1.1
  4. router out. The router replaces the link header for the site network and lowers the internet header's time-to-live counter. Rewritten: Source MAC address 02:77:10:00:00:10 to 02:77:20:00:00:01, Destination MAC address 02:77:10:00:00:01 to 02:77:20:00:00:80 and Time to live 64 to 63.06:55:36.115672 02:77:20:00:00:01 > 02:77:20:00:00:80, ethertype IPv4 (0x0800), length 149: 10.77.10.10.48862 > 10.77.20.80.80: Flags [P.], seq 1:84, ack 1, win 63, options [nop,nop,TS val 2568119165 ecr 13033857], length 83: HTTP: GET /hello.txt HTTP/1.1
  5. sw-site. The site switch reads the destination MAC address and forwards the frame unchanged. Its action is modeled from the capture after it. Read: Destination MAC address.06:55:36.115673 02:77:20:00:00:01 > 02:77:20:00:00:80, ethertype IPv4 (0x0800), length 149: 10.77.10.10.48862 > 10.77.20.80.80: Flags [P.], seq 1:84, ack 1, win 63, options [nop,nop,TS val 2568119165 ecr 13033857], length 83: HTTP: GET /hello.txt HTTP/1.1
  6. web receives. web accepts the frame addressed to its interface and the packet addressed to its machine. Read: Destination MAC address and Destination address.06:55:36.115673 02:77:20:00:00:01 > 02:77:20:00:00:80, ethertype IPv4 (0x0800), length 149: 10.77.10.10.48862 > 10.77.20.80.80: Flags [P.], seq 1:84, ack 1, win 63, options [nop,nop,TS val 2568119165 ecr 13033857], length 83: HTTP: GET /hello.txt HTTP/1.1
Check your answer

The link addresses differ. The machine addresses stay the same in this lab state.

Point MACs IPs TTL
laptop:eth0 02:77:10:00:00:10
02:77:10:00:00:01
10.77.10.10
10.77.20.80
64
router:eth0 02:77:10:00:00:10
02:77:10:00:00:01
10.77.10.10
10.77.20.80
64
router:eth1 02:77:20:00:00:01
02:77:20:00:00:80
10.77.10.10
10.77.20.80
63
web:eth0 02:77:20:00:00:01
02:77:20:00:00:80
10.77.10.10
10.77.20.80
63

Each address cell shows source above destination. The counter is time to live (TTL), a number in the internet header. It drops by one at the router. The router also updates that header’s check value as required; the internet header is not byte-for-byte unchanged. Calling the addresses end to end does not mean every internet-header field stays fixed.

sw-site forwards the router’s outgoing frame without replacing its addresses. The observation at web matches the router’s site-side observation for the fields shown. The server’s interface accepts the frame, and the layers pass the request up to the application.

“laptop puts web’s MAC on the first frame.” The home-side evidence names the router’s home interface. web is beyond that network.

“A switch rewrites the frame at each stop.” The paired observations show matching fields before and after each switch.

“IP addresses change at every router.” These captures retain the original IP pair. Some configurations can rewrite addresses; none is enabled here.

Goal: Complete the reply’s link destinations and name who writes them.

The following table follows the response in its travel order, from web back to laptop. Each row comes from the same capture session as the request. Fill the lower line of each MAC cell before opening the solution.

Point MACs IPs TTL
web:eth0
frame 6
02:77:20:00:00:80
?
10.77.20.80
10.77.10.10
64
router:eth1
frame 6
02:77:20:00:00:80
?
10.77.20.80
10.77.10.10
64
router:eth0
frame 6
02:77:10:00:00:01
?
10.77.20.80
10.77.10.10
63
laptop:eth0
frame 6
02:77:10:00:00:01
?
10.77.20.80
10.77.10.10
63

Expected: Four destinations and an explanation of which machine built each of the two link headers.

Hint

Use the source to identify the network. Decide which interface can receive the response on that network before thinking about its final machine destination.

Solution
Point MACs
web:eth0
frame 6
02:77:20:00:00:80
02:77:20:00:00:01
router:eth1
frame 6
02:77:20:00:00:80
02:77:20:00:00:01
router:eth0
frame 6
02:77:10:00:00:01
02:77:10:00:00:10
laptop:eth0
frame 6
02:77:10:00:00:01
02:77:10:00:00:10

These response frames match by IP identification 23551 and TCP sequence number 1764072362; their application bytes also match.

web builds the site-side header. The router builds the home-side header. The switches forward those headers; they do not supply either source address.

Reaching Another Device explains how laptop discovers the router’s MAC, how forwarding chooses a next link, and why TTL decreases. TCP, UDP, and Ports explains address sharing, where addresses can be rewritten.

  • The request’s machine addresses survive this path.
  • A switch forwards the frame without replacing its link addresses.
  • The router replaces the link header and lowers TTL.
  • A matching packet can appear inside different frames on different links.

Next, Practice: How Network Communication Is Organized checks your explanation against another client request.