Step 7 of 9 · lab · 25 min
Netplan: restore the link to the neighbour
The training interface lab0 is up, yet the neighbour 192.0.2.1 does not answer. Find the cause and fix the persistent network configuration without touching anything else.
Situation
This machine has a training interface, lab0. A veth pair connects it to the neighbour
192.0.2.1, which lives in the lab-peer network namespace. The interface is up, but the
neighbour does not answer ping.
According to the address plan, lab0 has 192.0.2.10/24, and the address must come from the
persistent Netplan configuration: lab0 is described in /etc/netplan/50-lab.yaml. lab0 is an
interface of the machine itself: it needs no -n or ip netns exec.
Task
- In
/etc/netplan/50-lab.yamland in Netplan's merged configuration,lab0has the single address192.0.2.10/24,dhcp4: falseandrenderer: networkd; the file keeps its owner and mode,root:rootand600. - The up
lab0now has exactly one IPv4 address,192.0.2.10/24. - The path to
192.0.2.1goes directly throughlab0with the source address192.0.2.10. - The neighbour
192.0.2.1answerspingand keeps its address. - The rest of the machine's network, other network settings files and the
lab0–peer0pair are untouched, and there are no workaround services or scripts.
Constraints
- A fix with a single
ipcommand does not solve the task: afternetplan applyor a reboot the address comes from the configuration again. - Don't recreate the neighbour or the interface pair, and don't set a global
renderer.
The tools you need are already installed. There's no internet on this machine.
Lab · on your own
No commands are given in this lab: type them in the terminal yourself. Goals are checked on the machine after every command.
Goals
0 of 5-
Netplan gives lab0 only 192.0.2.10/24, dhcp4 false, renderer networkd — not done yet
-
The up lab0 now has exactly one IPv4 address — 192.0.2.10/24 — not done yet
-
The path to 192.0.2.1 goes directly through lab0 with source 192.0.2.10 — not done yet
-
Neighbour 192.0.2.1 answers ping and keeps its address — not done yet
-
The rest of the network, its settings and the training interface pair are untouched — not done yet
The machine is starting
Hints
0 of 3Lab goals
0 of 5-
Netplan gives lab0 only 192.0.2.10/24, dhcp4 false, renderer networkd — not done yet
-
The up lab0 now has exactly one IPv4 address — 192.0.2.10/24 — not done yet
-
The path to 192.0.2.1 goes directly through lab0 with source 192.0.2.10 — not done yet
-
Neighbour 192.0.2.1 answers ping and keeps its address — not done yet
-
The rest of the network, its settings and the training interface pair are untouched — not done yet
Goals are checked on the machine after every command.