Instructions
Introduction
The nslookup command is a standard tool which is available on most operating systems, such as Linux, macOS, UNIX, and Windows.
To perform a single query, you can pass the name and nameserver on the command line.
EXAMPLE: nslookup www.cisco.com 129.118.1.47
Additional information
- Open your terminal or command app, such as Command Prompt in Windows, or Terminal in macOS.
- Type nslookup on a command line and press Enter/return.
- It will default to a nameserver, but you can change which nameserver you query against by typing server 129.118.1.46, for instance. From that point, you'll be querying against that nameserver (for example, 129.118.1.46)
- To perform a query, just type the name at the prompt (for example, www.cisco.com)
- By default, nslookup will only query for A and CNAME alias records, which are the most commonly accessed record types. If you want to do a comprehensive search, type set type=any, and nslookup will return any matching records, such as MX, NS, and SOA.
- Use your operating system's help documentation to review the various commands available within nslookup on your operating system.
EXAMPLE:
For MX (mail exchange) records in the DNS server:
C:\Users\jdoe>nslookup
Default Server: netdnssoaac01.ttu.edu
Address: 129.118.1.46
> set type=mx
> ttu.edu
Server: netdnssoaac01.ttu.edu
Address: 129.118.1.46
ttu.edu
primary name server = netdcac01.ttu.edu
responsible mail addr = noc.ttu.edu
serial = 1243965417
refresh = 3600 (1 hour)
retry = 900 (15 mins)
expire = 3600000 (41 days 16 hours)
default TTL = 3600 (1 hour)
>