soundtraining.net website links

Friday, December 31, 2004

How to use nslookup to troubleshoot DNS

DNS (Domain Name Service or System) is the name resolution technology used on the global Internet and in most local and wide area networks. It resolves hostnames and fully qualified domain names (such as www.soundtraining.net) to an IP address. DNS uses various types of Resource Records to associate hosts and services with IP addresses. Some of the most common are A records which map a host name to an IP address, NS records which identify name servers, SOA records which identify the name server that is “start of authority” for a domain (the primary name server), MX records which are mail exchanger records, CNAME records which are canonical name or alias records, and PTR records which are pointer records that map a known IP address to a name. There are others, but that’s beyond the scope of this article.

A widely-used tool for querying DNS servers is nslookup. nslookup is supported in Windows and Linux and offers a variety of options related to the type of record to be retrieved.

To use nslookup, at a command prompt, type “nslookup”. The prompt will change to a greater-than symbol (>). Try these commands:

  • >set type=soa
  • Next, enter your domain name.>soundtraining.net
  • nslookup will return information about the server that is SOA for the domain in question including timeout values, IP addresses, host names, etc.
  • Try the same thing substituting mx, ns, and other Resource Record types for soa.
  • Help is available by typing help at an nslookup prompt.
  • Exit nslookup by typing exit.

nslookup has fallen out of favor in the Linux/Unix world. Many Linux/Unix admins prefer to use dig or host. We cover the use of dig and host in our 2-day Linux training seminar and our 1-day BIND/DNS seminar.

No comments: