nslookup

What is nslookup

nslookup is a commandline tool used to query DNS servers to provide mapping of domain names to IP addresses or other DNS records.

nslookup usage

Non-interactive mode (command and domain name are entered in one line):

nslookup yaroslavgrebnov.com

In interactive mode, after entering nslookup, user is entering a shell, where he/she can execute queries.

Interactive mode also allows to change server which is used to perform lookups, or the type of DNS records which are queried.

In order to change DNS server in interactive mode:

server domain name or IP address of the server

In order to change the type of DNS records which are being queried:

set type=MX (set q=MX on Windows)

In the example above, the type of records is set to mail records.