Linux Labs

Networking / Stage 9 of 14

Why the address works and the name does not

Not running Starting usually ~20 s
Leave the lesson

Step 6 of 8 · on a machine · 4 min

Fix the setting where it is taken from

The resolver asks the server named on the nameserver line. That line is what you fix: then every program on the machine gets addresses from the right server, for every name it knows.

An entry in /etc/hosts also yields an address, but for one name on one machine. The wrong nameserver stays in place, and the next name fails again. Such a workaround hides the fault, and the fault stays.

Exercise · do it

Point the system at the right server

Now the site api.lab.test does not open by name. The machine has two DNS servers. Find the one that knows this name and make curl http://api.lab.test:8080/health answer. Do not use /etc/hosts for this.

Sign in and start The machine is available after signing in

Goals · 0 of 2

  • Point the system at the DNS server that knows the name not done yet
  • Open the site by name not done yet

Step goals

0 of 2
  • Point the system at the DNS server that knows the name — not done yet
  • Open the site by name — not done yet
Ubuntu 24.04

Step goals

0 of 2
  • Point the system at the DNS server that knows the name — not done yet
  • Open the site by name — not done yet
Loading…