How to Troubleshoot Network Connections with Nslookup Command

NSLOOKUP is an amazingly complex program that you run from a Command Prompt. NSLOOKUP comes with all operating systems. It’s a handy tool that advanced techs use to query the functions of DNS servers. With NSLOOKUP, you can query all types of information from a DNS server and change how your system uses DNS.

If DNS should fail or return improper information, network communication can slow due to name resolution. If DNS fails, the client systems could have trouble authenticating, and domain controllers could have trouble communicating with one another, because locating a domain controller on the network is a function of DNS.

NSLOOKUP will query a DNS server for specific types of records and can be used to troubleshoot why a system cannot connect to another remote system. If there is an incorrect record in DNS, or no record at all, you will be able to determine this with NSLOOKUP.

If you can ping the server by IP address and not by the server DNS name, there is a DNS name-resolution issue. You can then pursue the issue further by using NSLOOKUP to verify that the DNS server is operational and that a record exists for the host in the DNS database.

There are two modes in which you can use NSLOOKUP: interactive and non-interactive. In interactive mode you simply type the NSLOOKUP command; you are then placed at the NSLOOKUP prompt, where you type one NSLOOKUP command after another.


The interactive mode command would be:

1. nslookup
2. set type=mx
3. dost-tech.com

How to Troubleshoot Network Connections with Nslookup Command QbcwM4x

Notice that the command nslookup was typed to go to interactive mode. In interactive mode, you would then type the different nslookup commands at the prompt that displays with a >. Notice that set type=mx was typed next—this tells nslookup that I want to find MX records for whatever domain i specify next. The MX records point to the mail servers for a company, which is what is specified in the next line (Dost-Tech.com). Notice that the nslookup returns the address of the MX record, which is equal to "mail.dost-tech.com".

With non-interactive mode, you will type the NSLOOKUP command followed by the command options. You can type interactive mode command in a single line with non-interactive mode.

Code:

nslookup -querytype=mx dost-tech.com


How to Troubleshoot Network Connections with Nslookup Command X80Agjp

To check for a specific record you need to specify the nslookup command, the record type — for example, A, MX, or TXT — and the host name you want to check. The following example shows how to check for any A records for dost-tech.com:

Code:

nslookup -type=A dost-tech.com


How to Troubleshoot Network Connections with Nslookup Command CFnB0x4

The Nslookup command has many more switches you can view by typing following command at interactive mode:

Code:

help


How to Troubleshoot Network Connections with Nslookup Command Pv5Nxsw