Score:0

Re-register name with DNS after modem reboot

md flag

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.

Score:0
us flag

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

md flag
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.
admin avatar
us flag
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.
md flag
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.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.