Written by: Paul Rubin
Primary Source: OR in an OB World
Like a lot of people, I have a home WiFi network, and I recently changed my Internet service provider. That required replacing my cable modem. Both the old and new modems provided a DHCP service that doled out local IP addresses to devices connecting to the home WiFi network. Both modems allowed me to designate static addresses for some devices. The old modem also provided a local name lookup service. The new modem does not.
What do I mean by “local name lookup service”? Each of my machines has a “host name”, something like “MainPC”, “Paul_laptop” etc. With the old modem, when I was logged into one machine and needed to connect remotely to another, I could just use the host name (e.g., working on laptop and connecting to “MainPC”), and the modem would find the correct IP address to use. With the new modem, “MainPC” just comes back as “host not found” or something similar. I can still get one machine to talk to another by typing in the IP address of the destination machine, but that’s a PITA.
After some searching around, I found the answer to my problems here. Note that this only applies to Linux-based machines, which all mine are. In short, I needed to make sure the following four packages (and any dependencies) were installed:
- avahi-dnsconfd; and
For some reason, all my machines had the first two and none had the third and fourth. Now that they are installed, all I have to do is remember to qualify my machine names with the pseudo-domain “local” (e.g., “MainPC.local”, “Paul_laptop.local”), and I can connect from one machine to another without fishing around for IP addresses.
I’ll end with one last comment. Two of my machines run Linux Mint, and on them the name discovery service worked as soon as I installed the missing packages. One other machine runs a somewhat dated version of Mythbuntu, and that one had to be rebooted after installing the same two packages before the service worked. I’m not sure why, but I also don’t really care. All’s well that ends well, as some Brit said.