I have a domain name mapped to a local subnet address so I can easily test across devices (test.internetdancefloor.com maps to 192.168.1.88 or something like that). This address works from my Windows machines, however it does not work from my android devices or Mac. When I run nslookup on my mac, DNS fails:
users-mbp:~ user$ nslookup internetdancefloor.com Server: 192.168.1.1 Address: 192.168.1.1#53 Non-authoritative answer: Name: internetdancefloor.com Address: 184.108.40.206 users-mbp:~ user$ nslookup test.internetdancefloor.com Server: 192.168.1.1 Address: 192.168.1.1#53 Non-authoritative answer: *** Can't find test.internetdancefloor.com: No answer
Any idea why nslookup for test.internetdancefloor.com succeeds for some machines but not others?
My hypothesis is that the DNS client on mac and android devices rejects local subnet IP addresses, because I added a traditional DNS entry (version.internetdancefloor.com) later and it works fine across devices. I haven't been able to very this hypothesis otherwise.
users-MacBook-Pro:videoplayer user$ cat /etc/resolv.conf # # Mac OS X Notice # # This file is not used by the host name and address resolution # or the DNS query routing mechanisms used by most processes on # this Mac OS X system. # # This file is automatically generated. # nameserver 192.168.1.1
We observed that the Mac is using the router directly as a DNS server, rather than the DNS servers the router is configured to use. My windows machine does not use the router (192.168.1.1) as the DNS server, but rather picks up the static IPs the router is configured to use (via DHCP I guess).
When I use nslookup from my PC but select the DNS server, I see that the router is the one failing the DNS requests and not the upstream DNS servers. When I don't specify a DNS server, it does not default to 192.168.1.1 but rather uses the upstream DNS server directly (220.127.116.11)
C:\src> nslookup test.internetdancefloor.com Server: DNSresolver-A.spectrumnet.us Address: 18.104.22.168 Non-authoritative answer: Name: test.internetdancefloor.com Address: 192.168.1.88 C:\src> nslookup test.internetdancefloor.com 22.214.171.124 Server: DNSresolver-A.spectrumnet.us Address: 126.96.36.199 Non-authoritative answer: Name: test.internetdancefloor.com Address: 192.168.1.88 C:\src> nslookup test.internetdancefloor.com 192.168.1.1 Server: unknown Address: 192.168.1.1 *** No internal type for both IPv4 and IPv6 Addresses (A+AAAA) records available for test.internetdancefloor.com
It seems unnatural to configure my android and Mac devices to use a particular DNS server, though I suppose that would work. Maybe my router is filtering certain DNS results that point to the same subnet, and that can be undone. I wonder why my Mac/Android devices choose 192.168.1.1 for their DNS server? Those devices are on a wireless connection while my PCs are wired, so perhaps its a wireless/wired difference.