Yesterday the lab0 interface ended up with 192.0.3.10/24 instead of 192.0.2.10/24. A colleague fixed it with the ip command, and the neighbour 192.0.2.1 started answering. Today the network configuration was restarted. Repeat that yourself.
lab0 is an interface of the machine itself: commands for it are written without -n. Start on the card prepares the machine.
The fix before and after the restart
Check ping to the neighbour, restart the network configuration with sudo netplan apply, then look at the address of lab0 and check ping again.
First, predict
Right now lab0 has the colleague's address, 192.0.2.10/24. Which address will ip show after sudo netplan apply?
Now start the exercise, run the command and compare your prediction with the output.
Why does lab0 have 192.0.3.10/24 again after sudo netplan apply?
-
The colleague's command worked: before the restart the neighbour answered the first
ping. -
Such an address has no expiry: it lasts until the network is configured again. Here
sudo netplan applyreplaced it within a minute. -
What changed was the address of
lab0on this machine, as theipoutput after the restart shows.
sudo netplan apply configured lab0 from the file, and the file says 192.0.3.10/24.