Questions on NSlookup

xchiazyx
xchiazyx used Ask the Experts™
on
Hi Expert,

I have some question on command nslookup, can I check in what kind of scenario will you use nslookup? I know it's used to check DNS but do know what kind of situation would use it.

I did nslookup and get default server: unknown, Address: 192.168.1.254, can I check how come my default server is unknown and the IP address is same as my default gateway?

Also when I nslookup on www.google.com I am getting : www.google.com can't find nslookup: No response from server

Appreciate if any expert can advise me on, sorry if the question is too noob.

Thanks!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
David FavorFractional CTO
Distinguished Expert 2018

Commented:
Example of nslookup...

imac> nslookup www.google.com
Server:		127.0.0.1
Address:	127.0.0.1#53

Non-authoritative answer:
Name:	www.google.com
Address: 216.58.192.132

Open in new window


Or you can provide a DNS server...

imac> nslookup www.google.com 8.8.8.8
Server:		8.8.8.8
Address:	8.8.8.8#53

Non-authoritative answer:
Name:	www.google.com
Address: 216.58.192.228

Open in new window


You address 192.168.1.254 does look like a gateway address.

You'll may have to resolve this problem before proceeding.

And... if a bad gateway was really a problem, then you'd likely have all sorts of problems with all your connections.

So, if connections are working, likely this is a firewall problem blocking port 53 packets... although... if this was true, all lookups will likely break...

An odd one.
Also, you can see the answer here that may help.
nociSoftware Engineer
Distinguished Expert 2018

Commented:
If you realy want to verify DNS use the dig tool that only tests DNS queries & responses.
nslookup uses the resolver, so the host file may be involved.

That the address is your gateway may indicate your router SHOULD but fails to answer questions..
try:

dig www.google.com @1.1.1.1  or dig www.google.com @8.8.8.8
Principal Support Engineer
Commented:
nslookup uses the resolver, so the host file may be involved.

Nslookup uses a separate resolver from the Windows DNS client. It does the same thing as dig: sends queries wherever it's told and outputs the responses. Nslookup never checks the hosts file, which nowadays is really just a way to prepopulate the Windows resolver cache.

I did nslookup and get default server: unknown, Address: 192.168.1.254, can I check how come my default server is unknown and the IP address is same as my default gateway?

Nslookup uses the preferred DNS server configured on your network adapter by default, and it will try to perform a reverse lookup on that IP address to resolve it to a name. If this fails, you'll see that "Default Server: Unknown" line. It almost never indicates an actual problem.

Author

Commented:
Thanks!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial