Address resolution service by a device that isn't a gateway or DNS server?

3

1

I have noticed that some non gateway devices offer a capability of accessing their web interface by a hostname.

Here is a reference for Hass.io. The question is not locked to a specific vendor it's just an example I found.

In short, the instructions say:

  • install the image to your Raspberry Pi
  • connect it to your WiFi
  • web interface is accessible at http://hassio.local:8123

My question is why can some other PC in the same subnet resolve hassio.local to an IP address.

Nobody edited /etc/hosts on that PC and the DNS server is defined by the router, nothing that the newly introduced hassio device could influence.

Is there another resolving mechanism I'm unaware about?

TheMeaningfulEngineer

Posted 2017-08-14T14:18:44.817

Reputation: 235

Your default gateway only acts as a DNS forwarder to an external name-server on the internet, so it's not an actual lookup service itself. But to answer your question, no, there's typically nothing else providing DNS on a SOHO network other than the localhost's etc\hosts file that you mentioned. It is possible that the Hassio links the MAC to a hostname somehow, but I'm not sure. – SamAndrew81 – 2017-08-14T14:29:00.077

Your router or whatever is acting as DNS can create entries for each host when it also hands out an IP via DHCP. There is also NetBios name resolution, that may or may not be in use here. – Appleoddity – 2017-08-14T14:39:19.207

@Appleoddity Your router or whatever is acting as DNS can create entries for each host when it also hands out an IP via DHCP this sounds promising. Is there a term for it? – TheMeaningfulEngineer – 2017-08-14T15:02:27.480

Not sure if there is a name. You can test this theory by using nslookup. Lookup the hosts in question and see if you get a response. This is proof positive the address is coming from DNS. – Appleoddity – 2017-08-14T15:05:44.397

Answers

2

It likely uses multicast DNS, which by default only resolves .local names.

Your client does a multicast DNS query for .local name by sending the query to multicast address. The host which claims the name replies by sending its own IP address back using multicast. Other clients in network may cache the reply in their own caches.

sebasth

Posted 2017-08-14T14:18:44.817

Reputation: 670