This article describes how to use the dig and nslookup tools to test DNS settings and troubleshoot name resolution issues. Microsoft Windows uses nslookup, while Mac OS X and Linux use dig. You can use these tools to determine the IP address associated with a domain name, obtain the mail server settings for a domain, and much more. You can use web-based tools or command-line tools to run these types of tests.
The Name Server Lookup (Nslookup.exe) tool displays information about Domain Name System records for specific IP addresses and/or host names so that you can troubleshoot DNS problems. Nslookup has a list of know command parameters/flags which you can use to execute specialized queries or filter the requested output. For instance nslookup followed by the command set q=mx will narrow down any subsequent lookups to MX records only.
The dig tool for Windows can be downloaded from http://nil.uniza.sk/linux-howto/how-install-dig-dns-tool-windows-10. Remember that dig.exe is part of the larger package to be downloaded. However none of the other tools are required for running dig. Dig.exe alongside its configuration file can be run as a standalone application. If you have never worked at the command line before, web-based network tools provide an easy way to start troubleshooting DNS. There are many web sites that provide these services for free. For example, to test if DNS propagation is complete, you can visit http://www.whatsmydns.net and specify a domain name. The site displays a global map showing the IP address associated with the domain name for a variety of DNS servers around the world. For more in-depth DNS testing, you can use the online dig interface at http://www.digwebinterface.com. Dig (on Mac OS X and Linux) and nslookup (on Microsoft Windows) are the primary command-line tools for troubleshooting DNS issues. While web-based tools are convenient and easy to use, it is often faster to use a command-line tool on your own system. The exact steps to do this depend on your computer’s operating system.
Other name resolution and network troubleshooting tools
On top of the above useful troubleshooting tools, you should make sure you utilize the following standard Windows tools for name resolution and network related issues:
- Get MAC Address (Getmac.exe)Discovers the Media Access Control (MAC) address and lists associated network protocols for all network cards in a computer, either locally or across a network.
- Hostname (Hostname.exe) Displays the host name of the current computer.
- IP Configuration Utility (Ipconfig.exe) Displays all current Transmission Control Protocol/Internet Protocol (TCP/IP) network configuration values, and refreshes Dynamic Host Configuration Protocol (DHCP) and DNS settings.
- Net services commands (Net.exe) Performs a broad range of network tasks. Type net with no parameters to see a full list of available command-line options.
- Netstat (Netstat.exe) Displays active TCP connections, ports on which the computer is listening, Ethernet statistics, the IP routing table, and IPv4/IPv6 statistics.
- Network Command Shell (Netsh.exe) Displays or modifies the network configuration of a local or remote computer that is currently running. This command-line scripting utility has a huge number of options, which are fully detailed in Help.
- PathPing (Pathping.exe) Combines the functions of Traceroute and Ping to identify problems at a router or network link.
- TCP/IP NetBIOS Information (Nbtstat.exe) Displays statistics for the NetBIOS over TCP/IP (NetBT) protocol, NetBIOS name tables for both the local computer and remote computers, and the NetBIOS name cache.
- TCP/IP Ping (Ping.exe) Verifies IP-level connectivity to another internet address by sending Internet Control Message Protocol (ICMP) packets and measuring response time in milliseconds.
- TCP/IP Route (Route.exe) Displays and modifies entries in the local IP routing table.
- TCP/IP Traceroute (Tracert.exe) Determines the path to an internet address, and lists the time required to reach each hop. It’s useful for troubleshooting connectivity problems on specific network segments.
- Network Monitoris a protocol analyzer that lets you capture network traffic, view it, and analyze it. You can get the free download from Microsoft. This has been replaced by Microsoft Message Analyzer. Or you can download the very popular Wireshark.