Sunday, March 29, 2009

Trouble shoot domain name issue using nslookup

nslookup is a computer program used in Windows and Unix to query Domain Name System (DNS) servers to find DNS details, including IP addresses of a particular computer, MX records for a domain and the NS servers of a domain. The name nslookup means "name server lookup".

nslookup is also use as a command-line administrative tool for testing and troubleshooting DNS servers. In the very simple usage, if you enter a domain name, you get back the IP address to which it corresponds, and if you enter an IP number, then you get back the domain name to which it corresponds.

There are two modes available in nslookup: interactive and non-interactive. Interactive mode allows the user to query name servers for information about various hosts and domains or to print a list of hosts in a domain. Non-interactive mode is used to print just the name and requested information for a host or domain. Following is an example in using interactive mode of nslookup.
C:\>nslookup
Default Server: dns3.maxonline.com.sg
Address: 202.156.1.58

> ipcnetworking.com
Server: dns3.maxonline.com.sg
Address: 202.156.1.58

Non-authoritative answer:
Name: ipcnetworking.com
Address: 74.220.215.82

You may also use nslookup to find out the mail server for a particular domain. In this case we will need the MX record. For example:
C:\>nslookup
Default Server: dns3.maxonline.com.sg
Address: 202.156.1.58

> set type=MX
> ipcnetworking.com.
Server: dns3.maxonline.com.sg
Address: 202.156.1.58

Non-authoritative answer:
ipcnetworking.com MX preference = 0, mail exchanger = aspmx.l.google.com

ipcnetworking.com nameserver = ns1.hostmonster.com
ipcnetworking.com nameserver = ns2.hostmonster.com
aspmx.l.google.com internet address = 209.85.143.27
In this example, it shows that the MX record for ipcnetworking.com is 209.85.143.27. In another words, an email towards ipcnetworking.com should be forwarded to email gateway with the IP address of 209.85.143.27. As you can see, the MX record is rather important. Suppose however that your domain was having trouble receiving E-mail and you suspected that a DNS server issue was to blame. You could use nslookup to confirm that the domain does indeed have an MX record and that the MX record is pointed to the correct IP address.

No comments:

Post a Comment