Networking / Beginners

Displaying DNS records

One of the main uses of nslookup is to examine your DNS configuration to make sure that it's set up properly. To do that, follow these steps:

  1. At a command prompt, type nslookup without any parameters. nslookup displays the name of the default name server and displays the > prompt.
    C:\>nslookup
    Default Server: ns1.orng.twtelecom.net
    Address: 168.215.210.50
    >
    
  2. Type the subcommand set type=any.
    nslookup silently obeys your command and displays another prompt:
    > set type=any
    >
    
  3. Type your domain name.
    nslookup responds by displaying the name servers for your domain:
    > lowewriter.com
    Server: ns1.orng.twtelecom.net
    Address: 168.215.210.50
    Non-authoritative answer:
    lowewriter.com nameserver = NS000.NS0.com
    lowewriter.com nameserver = NS207.PAIR.com
    lowewriter.com nameserver = NS000.NS0.com
    lowewriter.com nameserver = NS207.PAIR.com
    >
    
  4. Use a server command to switch to one of the domain's name servers.
    For example, to switch to the first name server listed in Step 3, type server NS000.NS0.com. nslookup replies with a message that indicates the new default server:
    > server ns000.ns0.com
    Default Server: ns000.ns0.com
    Address: 216.92.61.61
    >
  5. Type your domain name again.
    This time, nslookup responds by displaying the DNS information for your domain:
    > lowewriter.com
    Server: ns000.ns0.com
    Address: 216.92.61.61
    lowewriter.com
    	primary name server = ns207.pair.com
    	responsible mail addr = root.pair.com
    	serial = 2001121009
    	refresh = 3600 (1 hour)
    	retry = 300 (5 mins)
    	expire = 604800 (7 days)
    	default TTL = 3600 (1 hour)
    lowewriter.com nameserver = ns000.ns0.com
    lowewriter.com nameserver = ns207.pair.com
    lowewriter.com MX preference = 50, mail exchanger =
        sasi.pair.com
    lowewriter.com internet address = 209.68.34.15
    >
  6. Type exit to leave the Nslookup program.
    You return to a command prompt.
    > exit
    C:\>
    

Locating the mail server for an e-mail address

If you're having trouble delivering mail to someone, you can use nslookup to determine the IP address of the user's mail server. Then, you can use the ping command to see whether you can contact the user's mail server. If not, you can use the tracert command to find out where the communication breaks down.

To find a user's mail server, start nslookup and enter the command set type=MX. Then, enter the domain portion of the user's e-mail address. For example, if the user's address is Doug@LoweWriter.com, enter LoweWriter.com. nslookup will display the MX (Mail eXchanger) information for the domain, like this:

C:\>nslookup
Default Server: ns7.attbi.com
Address: 204.127.198.19
> set type=mx
> lowewriter.com
Server: ns7.attbi.com
Address: 204.127.198.19
lowewriter.com MX preference = 50, mail exchanger = sasi.pair.com
lowewriter.com nameserver = ns000.ns0.com
lowewriter.com nameserver = ns207.pair.com
ns000.ns0.com internet address = 216.92.61.61
ns207.pair.com internet address = 209.68.2.52
>

Here, you can see that the name of the mail server for the LoweWriter.com domain is sasi.pair.com.

[Previous] [Contents] [Next]