Written by 4:33 pm DNS • 6 Comments

10 most used Nslookup commands

How to find A record

What is Nslookup?

First, let’s talk about what Nslookup is – it is a small but very powerful network administration command-line software. It has a simple interface, but it is useful. The Nslookup command is available on many of the popular computer operating systems like Windows, ReactOS, different, and Linux distros. You can use it to perform DNS queries and receive: domain names or IP addresses, or any other specific DNS Records.

There are Nslookup online tools too. You can access such a site full of online network tools and search for the option for nslookup. You can define your query for a specific DNS record, to identify the domain, the port in use, and timeout in seconds. For better security, we recommend you to use the software on your computer. 

If you want high speed, you must use Anycast DNS services! Check this article about Anycast DNS!

Here are the 10 most used Nslookup commands that will help you to understand better your domain’s management:

1. How to find the A record of а domain.

You can use this command to see how many A records are there and see the IP Addresses of each one. 

Command line:
$ nslookup example.com

Command line: $ nslookup


2. How to check the NS records of a domain.

By checking the NS records, you can see which is the authoritative server for a specific domain. 

Command line:
$nslookup -type=ns example.com

Command line: $nslookup -type=ns


3. How to query the SOA record of a domain.

With this one, you can see the start of authority and get information about the zone. 

Command line:
$nslookup -type=soa example.com

Command line: $nslookup -type=soa

30-day Free Trial for Premium Anycast DNS hosting

4. How to find the MX records responsible for the email exchange.

Here we are checking the MX records of the mail servers. You can see if all the mail servers are working well. 

Command line:
$ nslookup -query=mx example.com

Command line: $ nslookup -query=mx


5. How to find all of the available DNS records of a domain.

This lookup has a large scope. Here we want to see all the available DNS records. After seeing all of them, we can do specific lookups for different types of DNS records. 

Command line:
$ nslookup -type=any example.com

Command line: $ nslookup -type=any


6. How to check the using of a specific DNS Server.

Apart from checking DNS records, you can use the Nslookup to review a particular DNS server and how it works. You can check if it is active or if it responds on time. 

Command line:
$ nslookup example.com ns1.nsexample.com

Command line: $ nslookup example.com ns1.nsexample.com


7. How to check the Reverse DNS Lookup.

Many times you check the A records to see the IPs of a domain, but sometimes you need to verify if an IP address is related to a specific domain. For that purpose, we need a reverse DNS lookup. 

Command line:
$ nslookup 10.20.30.40

Command line: $ nslookup 10.20.30.40


8. Nslookup command to change the port number for the connection.

You can check the connection through different ports. This can help you to see if there are open ports that you don’t use. Later you can close them for security reasons. 

Command line:
$ nslookup -port=56 example.com

Command line: $ nslookup -port=56


9.How to change the timeout interval for a reply.

You can manually choose the timeout time in seconds. You can increase it to give more time for the server to respond. You can also shorter it to see which servers can respond quicker. 

Command line:
$ nslookup -timeout=20 example.com

Command line: $ nslookup -port=56


10. How to enable debug mode.

Debug mode provides important and detailed information both for the question and for the received answer.

Command line:
$ nslookup -debug example.com

Command line: $ nslookup -debug


Nslookup is one of the popular command-line software for DNS probing. You can use it to monitor your network and spot problematic areas. If you are interested in similar tools, you can see PingTraceroute, Dig, and Host too. You can use them together or find one that covers all of your diagnostic needs.

Need more details what is nslookup? Check the nslookup page on wikipedia.

Notes:

Authoritative answer – This is the answer that originates from the DNS Server which has the information about the zone file.
Non-authoritative answer – When a nameserver is not in the list for the domain you did a lookup on.
Different port – By default, the DNS servers use port 53.

30-day Free Trial for Premium Anycast DNS hosting

(Visited 82,102 times, 181 visits today)
Summary
10 most used Nslookup commands
Article Name
10 most used Nslookup commands
Description
What is Nslookup? Check the 10 most used Nslookup commands that will help you to understand better your domain's management.
Author
Publisher Name
ClouDNS.net
Enjoy this article? Don't forget to share.
Tags: , , , , , Last modified: July 13, 2020
Close