The reply must return
On this page
The request reaches web. A capture on web’s interface shows it arriving, but laptop receives nothing back. Repeating laptop’s route check cannot explain what happens after delivery. You will compare both directions and find the missing decision on the answering machine.
Before you start
Section titled “Before you start”Finish Reading routes and default routes. Leave machine shells and use the VM prompt. Keep modes off. Run netlab reset if earlier experiments left changes. This lesson applies one named fault and removes it afterward. Do not repair the VM’s own network settings.
Give the answer its own route decision
Section titled “Give the answer its own route decision”A reply is a new packet. Web becomes its sender and uses its own routing table to choose where to send it. The request arriving does not supply a route back. A return path is the path a reply takes from the answering machine to the original sender.
In the starting lab, laptop hands the remote request to router. Router chooses site and delivers to web. Web must then choose home-bound delivery through its own gateway. Router makes another destination decision for the reply before laptop can receive it.
The four numbered decisions name the route lines from Reading routes and default routes. The error label marks web’s default as missing with the fault. Switches pass frames within each network. They are omitted here so the route choices remain visible.
Remove web’s way back
Section titled “Remove web’s way back”At the VM prompt run netlab break no-return-route, then netlab status. The tool removes web’s default route. Answer the password question when it appears. It leaves laptop’s and router’s settings in place.
learner@rootvolt:~$ netlab break no-return-route[sudo] password for learner: Fault no-return-route applied.learner@rootvolt:~$ netlab statusLab is up. Modes on: none. Fault: no-return-route.
MACHINE NETWORK ADDRESS DEFAULT ROUTE COMPARED WITH THE START
laptop home 10.77.10.10/24 10.77.10.1 same
phone home 10.77.10.11/24 10.77.10.1 same
router home, site 10.77.10.1/24 10.77.20.1/24 - same
web site 10.77.20.80/24 - changed
Changed since the start:
web: default route none (start: 10.77.20.1)
Switch sw-home (home): laptop, phone, router
Switch sw-site (site): router, web
Services: web http 80, web https 443, web http 8080, web ssh 22learner@rootvolt:~$ Steps (9)
- Type
netlab break no-return-route - Press Enter
- Output:
[sudo] password for learner: - Type the password (the terminal shows nothing)
- Press Enter
- Output:
Fault no-return-route applied. - Type
netlab status - Press Enter
- Output:
Lab is up. Modes on: none. Fault: no-return-route. MACHINE NETWORK ADDRESS DEFAULT ROUTE COMPARED WITH THE START laptop home 10.77.10.10/24 10.77.10.1 same phone home 10.77.10.11/24 10.77.10.1 same router home, site 10.77.10.1/24 10.77.20.1/24 - same web site 10.77.20.80/24 - changed Changed since the start: web: default route none (start: 10.77.20.1) Switch sw-home (home): laptop, phone, router Switch sw-site (site): router, web Services: web http 80, web https 443, web http 8080, web ssh 22
Predict: with the fault applied, will the request appear in a capture on web?
In terminal 1 enter web, read ip route, then run sudo tcpdump -n -i eth0 icmp. In terminal 2 enter laptop, read its route and run ping -c 1 -W 1 10.77.20.80. The one-second reply wait keeps this failed test short. Return to terminal 1 and stop with Ctrl+C.
learner@web:~$ ip route10.77.20.0/24 dev eth0 proto kernel scope link src 10.77.20.80 learner@web:~$ sudo tcpdump -n -i eth0 icmp[sudo] password for learner: tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes15:08:31.702992 IP 10.77.10.10 > 10.77.20.80: ICMP echo request, id 169, seq 1, length 64^C1 packet captured
1 packet received by filter
0 packets dropped by kernellearner@web:~$ Steps (13)
- Type
ip route - Press Enter
- Output:
10.77.20.0/24 dev eth0 proto kernel scope link src 10.77.20.80 - Type
sudo tcpdump -n -i eth0 icmp - Press Enter
- Output:
[sudo] password for learner: - Type the password (the terminal shows nothing)
- Press Enter
- Output:
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes - Terminal 2 finished its tests. Return here and stop the listener with Ctrl+C.
- Output:
15:08:31.702992 IP 10.77.10.10 > 10.77.20.80: ICMP echo request, id 169, seq 1, length 64 - Press Ctrl + C
- Output:
1 packet captured 1 packet received by filter 0 packets dropped by kernel
learner@laptop:~$ ip routedefault via 10.77.10.1 dev eth0
10.77.10.0/24 dev eth0 proto kernel scope link src 10.77.10.10 learner@laptop:~$ ping -c 1 -W 1 10.77.20.80PING 10.77.20.80 (10.77.20.80) 56(84) bytes of data.
--- 10.77.20.80 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0mslearner@laptop:~$ Steps (6)
- Type
ip route - Press Enter
- Output:
default via 10.77.10.1 dev eth0 10.77.10.0/24 dev eth0 proto kernel scope link src 10.77.10.10 - Type
ping -c 1 -W 1 10.77.20.80 - Press Enter
- Output:
PING 10.77.20.80 (10.77.20.80) 56(84) bytes of data. --- 10.77.20.80 ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms
Check your answer
Yes. Web’s listener prints the arriving request and no echo reply. Its remaining connected route covers site, while laptop belongs to home. Web has no matching route for that answer.
The capture narrows the failure. It establishes arrival at web’s interface; it does not prove every part of the exchange works. Reading web’s own table then explains the absent reply without changing laptop’s correct route.
Restore and compare both directions
Section titled “Restore and compare both directions”Return to the VM prompt, outside every machine shell, and run netlab fix, then netlab status. Fix rebuilds the lab, ending programs running inside its machines. Stop your own listeners before using it. Start fresh listeners for a comparison after repair.
learner@rootvolt:~$ netlab fix[sudo] password for learner: Fault no-return-route removed.learner@rootvolt:~$ netlab statusLab is up. Modes on: none. Fault: none.
MACHINE NETWORK ADDRESS DEFAULT ROUTE COMPARED WITH THE START
laptop home 10.77.10.10/24 10.77.10.1 same
phone home 10.77.10.11/24 10.77.10.1 same
router home, site 10.77.10.1/24 10.77.20.1/24 - same
web site 10.77.20.80/24 10.77.20.1 same
Switch sw-home (home): laptop, phone, router
Switch sw-site (site): router, web
Services: web http 80, web https 443, web http 8080, web ssh 22learner@rootvolt:~$ Steps (9)
- Type
netlab fix - Press Enter
- Output:
[sudo] password for learner: - Type the password (the terminal shows nothing)
- Press Enter
- Output:
Fault no-return-route removed. - Type
netlab status - Press Enter
- Output:
Lab is up. Modes on: none. Fault: none. MACHINE NETWORK ADDRESS DEFAULT ROUTE COMPARED WITH THE START laptop home 10.77.10.10/24 10.77.10.1 same phone home 10.77.10.11/24 10.77.10.1 same router home, site 10.77.10.1/24 10.77.20.1/24 - same web site 10.77.20.80/24 10.77.20.1 same Switch sw-home (home): laptop, phone, router Switch sw-site (site): router, web Services: web http 80, web https 443, web http 8080, web ssh 22
After the fix, web again has default via 10.77.20.1 dev eth0. Re-enter both machines after the rebuild. Read web’s route, then repeat the listener and ping, adding -v to the listener this time. Stop it after laptop receives the reply. The response completes only after web and router can make the home-bound decisions.
Read the counter at the two ends
Section titled “Read the counter at the two ends”The counter noticed in Following one exchange is time to live (TTL). For these routed IPv4 packets, each forwarding router lowers it by one. A packet that would reach zero is dropped rather than forwarded. This bounds circulation if routes form a loop; it is not a stopwatch in seconds.
The listener’s -v option prints more packet details, including TTL. Compare its outgoing reply with laptop’s received reply below.
learner@web:~$ ip routedefault via 10.77.20.1 dev eth0
10.77.20.0/24 dev eth0 proto kernel scope link src 10.77.20.80 learner@web:~$ sudo tcpdump -n -v -i eth0 icmp[sudo] password for learner: tcpdump: listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes15:08:59.114286 IP (tos 0x0, ttl 63, id 39200, offset 0, flags [DF], proto ICMP (1), length 84)
10.77.10.10 > 10.77.20.80: ICMP echo request, id 171, seq 1, length 64
15:08:59.114295 IP (tos 0x0, ttl 64, id 11628, offset 0, flags [none], proto ICMP (1), length 84)
10.77.20.80 > 10.77.10.10: ICMP echo reply, id 171, seq 1, length 64^C2 packets captured
2 packets received by filter
0 packets dropped by kernellearner@web:~$ Steps (13)
- Type
ip route - Press Enter
- Output:
default via 10.77.20.1 dev eth0 10.77.20.0/24 dev eth0 proto kernel scope link src 10.77.20.80 - Type
sudo tcpdump -n -v -i eth0 icmp - Press Enter
- Output:
[sudo] password for learner: - Type the password (the terminal shows nothing)
- Press Enter
- Output:
tcpdump: listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes - Terminal 2 finished its tests. Return here and stop the listener with Ctrl+C.
- Output:
15:08:59.114286 IP (tos 0x0, ttl 63, id 39200, offset 0, flags [DF], proto ICMP (1), length 84) 10.77.10.10 > 10.77.20.80: ICMP echo request, id 171, seq 1, length 64 15:08:59.114295 IP (tos 0x0, ttl 64, id 11628, offset 0, flags [none], proto ICMP (1), length 84) 10.77.20.80 > 10.77.10.10: ICMP echo reply, id 171, seq 1, length 64 - Press Ctrl + C
- Output:
2 packets captured 2 packets received by filter 0 packets dropped by kernel
learner@laptop:~$ ip routedefault via 10.77.10.1 dev eth0
10.77.10.0/24 dev eth0 proto kernel scope link src 10.77.10.10 learner@laptop:~$ ping -c 1 10.77.20.80PING 10.77.20.80 (10.77.20.80) 56(84) bytes of data.
64 bytes from 10.77.20.80: icmp_seq=1 ttl=63 time=0.182 ms
--- 10.77.20.80 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.182/0.182/0.182/0.000 mslearner@laptop:~$ Steps (6)
- Type
ip route - Press Enter
- Output:
default via 10.77.10.1 dev eth0 10.77.10.0/24 dev eth0 proto kernel scope link src 10.77.10.10 - Type
ping -c 1 10.77.20.80 - Press Enter
- Output:
PING 10.77.20.80 (10.77.20.80) 56(84) bytes of data. 64 bytes from 10.77.20.80: icmp_seq=1 ttl=63 time=0.182 ms --- 10.77.20.80 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.182/0.182/0.182/0.000 ms
Web’s listener prints ttl 63 for the arriving request and ttl 64 for the reply it sends. Laptop’s ping prints ttl=63 for that reply after router. Match its echo identifier and sequence in the listener with the request it answers; this short experiment has one request and one reply. The reply’s count changes from 64 to 63 across router. You are comparing the same packet, rather than two independently sent requests.
Mistakes to recognize
Section titled “Mistakes to recognize”“If the request arrives, the network works.” The faulty capture shows delivery without a completed exchange.
“TTL is a time in seconds.” Compare the same packet across router: the count decreases at the forwarding step.
Good to know
Section titled “Good to know”Replies on larger networks can take another path. Never infer the return route from a forward-only observation. Times and identifiers vary; your number will differ.
Try it yourself
Section titled “Try it yourself”Suppose phone’s request reaches web, and web sends no reply. Which table should you read first, and why? Write your diagnosis. After repairing this lesson’s fault, run netlab shell phone -- ping -c 1 10.77.20.80, then netlab shell web -- ip route. Compare the working result with your explanation.
Solution
learner@rootvolt:~$ netlab shell phone -- ping -c 1 10.77.20.80[sudo] password for learner: PING 10.77.20.80 (10.77.20.80) 56(84) bytes of data.
64 bytes from 10.77.20.80: icmp_seq=1 ttl=63 time=0.182 ms
--- 10.77.20.80 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.182/0.182/0.182/0.000 mslearner@rootvolt:~$ netlab shell web -- ip routedefault via 10.77.20.1 dev eth0
10.77.20.0/24 dev eth0 proto kernel scope link src 10.77.20.80 learner@rootvolt:~$ Steps (9)
- Type
netlab shell phone -- ping -c 1 10.77.20.80 - Press Enter
- Output:
[sudo] password for learner: - Type the password (the terminal shows nothing)
- Press Enter
- Output:
PING 10.77.20.80 (10.77.20.80) 56(84) bytes of data. 64 bytes from 10.77.20.80: icmp_seq=1 ttl=63 time=0.182 ms --- 10.77.20.80 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.182/0.182/0.182/0.000 ms - Type
netlab shell web -- ip route - Press Enter
- Output:
default via 10.77.20.1 dev eth0 10.77.20.0/24 dev eth0 proto kernel scope link src 10.77.20.80
Read web’s table first because web must choose how to answer phone. Its default through the site gateway supplies the return route. The repaired lab lets phone receive the reply; a correct route on phone alone would not establish that.
- Treat the reply as another routed packet.
- Read the answering machine’s table when its reply is missing.
- Compare TTL for one packet across a forwarding router.
Next, ICMP, ping, and traceroute reads replies and errors.