Pages

Thursday, July 6, 2017

NSLOOKUP, DIG and HOST Command

a) nslookup

This is deprecated by Bind developers. But still used to resolve Hostname into IP address.

b) host  

Host is also used to convert names into IP addresses and vice versa. Without arguments it will give the list of options.

Sample output of host command : ansim0.example.local has address 192.168.1.10

c) dig

Dig and host commands basically output the same info. 

dig +short www.yahoo.com
host www.yahoo.com
dig www.yahoo.com
host -d www.yahoo.com

basically prints the same output. The dig command includes some timing stats and the actual query that will be performed.

nslookup -debug www.yahoo.com

Although the output is in a different format, the information that is printed out is basically the same as dig.

If you want the full enchilada...

nslookup -d2 www.yahoo.com
...or
dig -d2 www.yahoo.com

No comments:

Post a Comment