NSLOOKUP fails while ping -a and Resolve-DnsName -DnsOnly succeeds

I am trying to complete an nslookup for a number of hosts on an affiliated domain, but all nslookups fail. The usual explanation is that the connection is due to NetBIOS however in this case Resolve-DnsName -DnsOnly should preclude that explanation. The same argument goes for ping -a.

So to explain. I am VPN'd into a network "DCCorpNet" and wish to complete an nslookup against the enterprises domain "enterprise.com". I know A records exist for the hosts I'm checking against so I expect 'nslookup SomeHost.enterprise.com' to return an IP address. However there is no response, and weirdly, 'ping -a SomeHost.enterprise.com' and 'Resolve-DnsName - DnsOnly SomeHost.enterprise.com' work as expected.

So how can I troubleshoot this? And, what more do I need to learn to learn what I need to update on the hosts DNS records for them to respond to nslookup?

(Things are set up so I expect DNS issues in the opposite direction but not as they are.)

4

2 Answers

Apparently something causes the wrong dns server to respond.

You can add a dns server as parameter for NSLookup to use the correct one.

For example:

nslookup -q=all example.com 8.8.8.8
1

The full answer is that nslookup does devolution. It isn't enough to simply point at the correct authoritative name server. You also need to include a '.' at the end of your hostname to suppress devolution.

Therefore, nslookup -q=all host.enterprise.com DnsServer.enterprise.com becomes nslookup -q=all host.enterprise.com. DnsServer.enterprise.com.

And there we go.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like