Knowledge Base

The nslookup Command KB0024807

This KB focuses on the Windows nslookup command. However, for Mac and Linux systems the only difference is that you will use Terminal instead of Command Prompt. The commands for nslookup work the same whether you are using Windows, Linux, or Mac systems.

The name system lookup or nslookup shows the A record (usually a server name) associated with an IP address and vice versa according to a DNS server.

Note: You almost always want to change the DNS server to DNS1.byu.edu (See the bottom of the KB)

A basic nslookup (using a local non-authoritative DNS server)
  1. Open a command prompt (Start > Run > type cmd)
  2. Type nslookup and then the hostname or IP address
  • After nslookup has been entered once you don't need to enter it again for other hosts that you are searching for, just type the host name.

    • Notice that the response is "Non-authoritative" meaning that this server does not provide DNS for this IP address. It is essentially making an educated guess about what the correct name is.


An nslookup on an alias or C name
  • an nslookup on an alias or C name will show the A record in addition to the IP address.


    • Within the BYU network, the alias is typically a URL for a webpage and the A record is the name of the server that hosts it.


An nslookup on DNS2-5 (Any DNS server other than DNS1)
  1. Run the following commands
  2. nslookup,  (enter)
  3. server [DNS server to be queried], (enter)
    1. Ex. "server dns2"
  4. Type the desired name or IP address


    • In this example, the nslookup is querying DNS2 instead of the default DNS1 server.