Linux Labs

Networking / Stage 3 of 14 · step 7 of 9

Netplan: restore the link to the neighbour

easy ~25 min
Not running Starting usually ~20 s
Report a problem

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

  1. In /etc/netplan/50-lab.yaml and in Netplan's merged configuration, lab0 has the single address 192.0.2.10/24, dhcp4: false and renderer: networkd; the file keeps its owner and mode, root:root and 600.
  2. The up lab0 now has exactly one IPv4 address, 192.0.2.10/24.
  3. The path to 192.0.2.1 goes directly through lab0 with the source address 192.0.2.10.
  4. The neighbour 192.0.2.1 answers ping and keeps its address.
  5. The rest of the machine's network, other network settings files and the lab0–peer0 pair are untouched, and there are no workaround services or scripts.

Constraints

  • A fix with a single ip command does not solve the task: after netplan apply or 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.

Visible only to you. Saved as you type.

All notes

Lab goals

0 of 5
  • Netplan gives lab0 only 192.0.2.10/24, dhcp4 false, renderer networkd — not checked yet
  • The up lab0 now has exactly one IPv4 address — 192.0.2.10/24 — not checked yet
  • The path to 192.0.2.1 goes directly through lab0 with source 192.0.2.10 — not checked yet
  • Neighbour 192.0.2.1 answers ping and keeps its address — not checked yet
  • The rest of the network, its settings and the training interface pair are untouched — not checked yet

Hints

0 of 3 open · they open one at a time
Hint 1
Show the solution after 3 failed checks

Leave the lab?

The machine keeps running for 10 more minutes, then it is removed. Files are lost; completed goals stay.

Loading…