Linux+ 5.3.2: Addressing, routing and DNS problems
Working through the layers: the route a packet takes, a missing default route, and a name that resolves to the wrong address.
Before you start
The peer, at 10.99.0.2 (name peer), is another machine on this VM's
second network, 10.99.0.0/24; this VM, 10.99.0.1, is its gateway. Get a
shell there with sudo ip netns exec lepeer bash. From the peer,
198.51.100.9 stands in for an internet address such as 9.9.9.9. The
peer reads its network settings at boot from /etc/netns/lepeer/network
(ip -batch commands), so fix that file as well as the running system.
The lab has also changed something on this VM. Task 3 needs the internet.
Write answers to the files in /root/lab-answers/.
Tasks
- Walk the method on this VM: addresses, routes, the gateway, an internet
address, a name, a port. Write the gateway address and the interface
this VM uses to reach
9.9.9.9to/root/lab-answers/1. - The peer can't reach
198.51.100.9. Find out why from the error, and fix it, now and at boot. - On this VM,
www.kernel.orgresolves to a wrong address for most programs, butdiggets the right one. Find out where the wrong address comes from, write that source to/root/lab-answers/3, and fix it. - Compare IPv4 and IPv6 to
www.kernel.org(dig AAAA,curl -4,curl -6). Not graded.
Hints
ip -br addr,ip route,ip route get 9.9.9.9,ping,getent hosts,nc -zv.- "Network is unreachable" means no route;
ip route add default via. Lines in the peer's file areipcommands without theip. getent hostsfollows/etc/nsswitch.conf;digasks the DNS server only (dnf install bind-utilsorapt install dnsutilsif it's missing).