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.
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.
Why did the site answer on lab-node2 but not from lab-node1?
-
On
lab-node2it answeredtwo-hosts-ok, so it is running. -
On
lab-node2the request went to192.0.2.12, and the site answered — it listens on that address. TheCouldn't connecterror is the same as with a server refusal, but the cause here is different. -
curlonlab-node1ran 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.