I have Ubuntu in a VM on a home network connected to the internet by a modem/router that manages the network, providing DHCP and local DNS.
When the Ubuntu VM is booted it becomes accessible by name on the network, somehow registering its name with the modem's DNS.
When the modem plays up and has to be rebooted, the name disappears. The VM reconnects to the router, I can see its MAC address in the connected devices list, but it doesn't re-register its name. Rebooting the VM causes it to re-register but this is a rather heavyweight solution.
What is Ubuntu doing in its startup that registers the name with DNS? All of my VMs hosting Windows re-register their names automatically, can Ubuntu behave like this?
The host is Hyper-V, if that matters.
The first response suggests that it can be fixed with sudo systemctl restart systemd-networkd
. I can do this because ssh is possible specifying the ip address directly, but it would be nice if someone could suggest how this could be made self-repairing.