Linux Labs

Networking / Stage 12 of 14

Diagnosing between two machines

Not running Starting usually ~20 s
Leave the lesson

Step 1 of 7 · on a machine · 5 min

The site answers at home, not to the neighbour

What you will learn

  • Attribute every observation to the machine where the command ran.
  • Find the route entry that overrides the connected network.
  • Tell which side has the fault and fix it without touching what works.

A site was set up on the lab-node2 machine, and its administrator writes: "It opens for me." From the neighbouring lab-node1 it does not open. Check from both sides.

The two machines in this lesson are the network namespaces lab-node1 and lab-node2 on this VM, as in the earlier modules. A command after sudo ip netns exec lab-node1 runs "on" lab-node1.

Exercise · look

The site from both sides

Request the /health page of the site at 192.0.2.12:8080 first on lab-node2 itself, then from lab-node1.

First, predict

The site answered on lab-node2. What will the same request from lab-node1 print?

Now start the exercise, run the command and compare your prediction with the output.

Sign in and start The machine is available after signing in
Check yourself 1 question

Why did the site answer on lab-node2 but not from lab-node1?

  • On lab-node2 it answered two-hosts-ok, so it is running.

  • On lab-node2 the request went to 192.0.2.12, and the site answered — it listens on that address. The Couldn't connect error is the same as with a server refusal, but the cause here is different.

  • curl on lab-node1 ran and printed a connection error, so it is there.

The site on lab-node2 works, while the request from lab-node1 never got to it.

Ubuntu 24.04
Loading…