Troubleshooting DNS with Command-Line Tools Print

  • 0

Dig (on Mac OS X and Linux) and nslookup (on Microsoft Windows) are the primary command-line tools for troubleshooting DNS issues.

It is faster to use a command-line tool on your own system. The exact steps to do this depend on your computer's operating system. Follow the appropriate procedures below for your operating system.

Using nslookup on Microsoft Windows

Microsoft Windows does not include the dig program. However, the nslookup program provides much of the same functionality. To run nslookup on Microsoft Windows, follow these steps:

  1. Open a DOS command window. To do this, click Start, click Run, type cmd, and then press Enter.
  2. At the command prompt, type the following command. Replace net with the domain that you want to test:

nslookup obhost.net

  • To use a specific DNS server for the query, add the server name or IP address to the end of the command. For example, the following command performs a DNS lookup on the comdomain using an OpenDNS server (which has IP address 208.67.222.222):

nslookup obhost.net 72.52.178.67

  • By default, nslookup looks up the Arecord for a domain. To look up a different DNS record, you must enter interactive mode. For example, to view the MX (mail exchanger) records for the com domain, type nslookup at the command line. At the > nslookup prompt, type the following commands:

set type=MX

obhost.net

  1. Interpret the output from nslookup. For example, the following output shows information for com:
  • Server:  obhost.net
  • Address:  72.52.178.67
  • Name:    obhost.net
  • Address:  72.52.178.67

 


Was this answer helpful?

« Back