My objective is to check that all my domain's name servers are working with the following sequence of commands within nslookup (responses omitted here):
set type=soa example.com set type=a+aaaa example.com ns1.name_server.com example.com ns2.name_server.com example.com ns3.name_server.com example.com ns4.name_server.com
Where the name servers ns1, ns2, ns3 and ns4 are all taken from the list provided in the SOA.
The problem is that in Windows only, some but not all of the name server-specific commands consistently return
** ns2.name_server.com can't find example.com: No response from server
in the case of a Windows 10 Pro machine, and for Server 2008R2 it gives this:
DNS request timed out. timeout was 2 seconds. [it times out 4 times like this] ** Request to ns2.name_server.com timed-out
When tested with online tools, a Mac, and a Linux VM (with
host command) all name servers (ns1, ns2, ns3, ns4) instantly provide the correct A record. Therefore I believe all the DNS entries are correct and it is a Windows nslookup problem.
The workaround that I have found is to issue all the nslookup commands directly from the command prompt - not within nslookup's prompt. All these give the correct response:
c:>nslookup example.com ns1.name_server.com c:>nslookup example.com ns2.name_server.com c:>nslookup example.com ns3.name_server.com c:>nslookup example.com ns4.name_server.com
The very weird thing is that the name servers that fail (within nslookup's prompt) are specific and repeatable per machine machine, so for example my Win10 succeeds for ns1, but fails for ns2, ns3, and ns4. Over on the 2008R2 machine only ns2 fails and ns1, ns3 and ns4 work.
The problem still happens within the prompt even without doing the initial switch to the SOA type and back, i.e. issuing the
example.com ns1.name_server.com as the first command.
I suspected that the initial default server might be the problem, because nslookup hits it as you go into its command prompt. But I see the same behavior with the default of 220.127.116.11 or a low-end home router.
The only other clue I see is some inconsistency in how the specified name server is reported in terms of its IPv4 address and IPv6 address. Sometimes it is v4, sometimes both. But I have not been able to discern a consistent pattern.
Question: Am I using nslookup correctly? Is this a bug? Is there a IPv6 issue lurking here?
Example to try: Type these commands into an nslookup prompt on your Windows machine:
set type=soa superuser.com [check the current name servers and revise below accordingly if needed] set type=a+aaaa superuser.com ns-1699.awsdns-20.co.uk superuser.com ns-245.awsdns-30.com superuser.com ns-cloud-d1.googledomains.com superuser.com ns-cloud-d2.googledomains.com