Difference between Mac OSX nslookup and resolveip

I assumed nslookup would either error when looking up non internet names or would give the correct answer but I'm confused by the following behaviour. Have I misunderstood how to use it or its output/limitations?

$ resolveip raspberrypi.local
IP address of raspberrypi.local is 192.168.0.41
$ nslookup raspberrypi.local
Server: 194.168.4.100
Address: 194.168.4.100#53
** server can't find raspberrypi.local: NXDOMAIN

The answer of 192.168.0.41 from resolveip is correct but the nslookup answer is not correct. Also I'm wondering what the #53 part of the address is referring to. Surely it's not port number. The man page for nslookup doesn't seem to explain it.

1 Answer

The behavior of resolveip vs nslookup was already discussed a little here already but it seems resolveip will check hosts and then move on to DNS checks while nslookup will go straight to DNS. So I would assume that it knows the pi from either the hosts file or from the local network via some other means (arp?), it seems that the pi is not registered with your DNS server.

Also the #53 refers to the port that responded from the server. See this discussion.

2

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