0

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.

1 Answer 1

0

Essentially when your Ubuntu VM requests an IP address via DHCP to your home router it sends its own name it the request. reference

On Windows is the same when requesting an IP address but it also broadcasts its name via NetBIOS. reference

3
  • Does this mean I can fix it with sudo systemctl restart systemd-networkd? I can still connect with ssh, I just have to specify the ip address directly.
    – Peter Wone
    Sep 8, 2021 at 3:01
  • I think what you're looking for is assigning a domain name for your home network? Something along the lines of Ubuntu VM is ubuntu.lan and your Windows VM as windows.lan? You can setup a DNS server for your home.
    – kleo
    Sep 8, 2021 at 7:08
  • Yes, exactly like that, but I have a DNS server, it's in the modem. When the modem flakes and I bounce it, state is lost. That's the situation I'm trying to deal with. Perhaps you're suggesting not using the modem for DNS.
    – Peter Wone
    Sep 8, 2021 at 8:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .