I'm trying to change my rpi's to be accessible directly by name, this can be done by DNS, although, I'm curious on how certain devices work without them (or seem to work without a DNS, hopefully I'm not wrong 🙃)

For instance, Home Assistant OS right off the bat is accessible by the homeassistant.local without any (extra) configuration, or how changing "server name" in a Synology NAS make it accessible by that name.

Does anyone know how is this done?


DNS is not the only name resolution technology out there. It is widespread in Internet (for which it was developed), but it needs to be configured explicitly, which makes it not suited for small networks.

There is a hosts file — a predecessor of DNS, a local file where you can write down associations of names and IP addresses. It is currently used to set up localhost resolution and has some other special uses. It requires manual configuration too, and it is not networked.

Widespread automated technologies are:

  • NetBIOS, which is heavily used in the Microsoft Windows, and it is possibly to use it in other systems (there is a nmbd, NetBIOS Name Service, in the samba package). It is automatic: hosts "register" themselves by sending broadcasts with their names periodically, so everybody who received such a broadcast will know there is a system with certain name. It also has a server variant, wins.
  • mDNS, "multicast DNS", which is a part of zeroconf ("zero configuration" networking) stack. From the name you can deduce it also floods network with packets hoping somebody will receive and use them. Apple's Bonjour for example implements this technology; other well-known implementation is AVAHI, used in Linux.

If local name resolution works without setup, it very likely it works because one of these technologies. To make it work, you just need to to have the corresponding service installed and enabled.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.