The two main things I'm wondering are:
- What causes a computer/phone/device to do a DNS lookup for its own hostname/FQDN
- How long after a device leaves a network will it retain the "settings" set by DHCP? (e.g. domain, search, nameservers, etc) Would it be just until it connects to another wireless network?
As far as lookups for a device's hostname, I know if you're on Linux, for example, typing sudo <whatever>
often results in a hostname DNS lookup, since sudo rules can specify a hostname and your hostname might not be in /etc/hosts. Looks like maybe Apache and sendmail will lookup the hostname as well, as some kind of sanity check. But what about other operating systems (e.g. Android, iOS, etc), and other circumstances that will cause a device to lookup its own hostname?
The reason I'm asking this is I'm seeing a ton of lookups in query logs from our external authoritative DNS servers for <hostname>.subdomain.example.org
, which are the names we assign devices via DHCP when they join the network. I would only expect these names to be queried for while they're on our network, and they would be in our internal DNS servers' query logs. But for some reason they're also showing up in our external query logs, hence the second question above.
Note: this is a related/kind of follow-up question to Why create a reverse DNS record for every device that connects to a wireless network?