3

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?

  • 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 Aug 14 '17 at 14:29
  • 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 Aug 14 '17 at 14:39
  • @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 Aug 14 '17 at 15:02
  • 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 Aug 14 '17 at 15:05
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.

| improve this answer | |

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.