Skip to main content

nslookup Command

A Network Administrator command  which help diagnosis DNS related issue. However to understand this,  you should better to know how DNS works.

How to troubleshoot DNS related issue.

1. NSLOOKUP example display "A Record" (IP Adress) of the domain


Non-authoritative answer:

A Non-Authoritative Answer is a response from Cache. A DNS server is
authoritative for zones actually holds it.

The above output shows "A Records" (IP Adress) of the domain
"". Which is actually query to the public Google DNS. If
you don't put DNS after the domain, it will used your default DNS, in my
case I have used public DNS.

2. MX Record using -query=mx

MX (Mail Exchange) record maps for the specific domain name to verify mail
exchaing servers on that domain.

C:\Users\jpudasaini>nslookup -query=mx

Non-authoritative answer:       MX preference = 40, mail exchanger
.com       MX preference = 20, mail exchanger
.com       MX preference = 10, mail exchanger
.com       MX preference = 30, mail exchanger
.com       MX preference = 5, mail exchanger

From the above example we can say that  4 MX records used for gmail
domain, the number associat with mx reference the preference of mail
server. Lower the number, higher the preference. So is the first server which received the mail at

3. NS Record using -query=ns

NS (Name Server) records maps a domain to a list of DNS servers
authoritative for that domain. Here is example of name server which are
associated with doamain.

C:\Users\jpudasaini>nslookup -query=ns

Non-authoritative answer:       nameserver =       nameserver =       nameserver =

4. SOA Record using -query=soa

 C:\Users\jpudasaini>nslookup -query=soa

Non-authoritative answer:
        primary name server =
        responsible mail addr =
        serial  = 1511030001
        refresh = 86400 (1 day)
        retry   = 7200 (2 hours)
        expire  = 2419200 (28 days)
        default TTL = 3600 (1 hour)

SOA record (start of authority) which provides the authoritative
information, as well as e-mail address, serial no of the respective

5. Reserve DNS lookup

The reverse DNS look-up using IP Adress as argument to nslookup


6. Using Specific DNS Server

Make query using particular name server instead of using default DNS server.

Server:  UnKnown



Popular posts from this blog

MongoDB Failed to start lsb an object/document-oriented database

After long gap I'm going to post new blog. Due to the work load and research I have little time.  MongoDB could not started after installation of 3.6 version, However downgrade to the 3.4, still the Mongodb couldn't start and show below error message. Search don't help to resolved the issue. After so much hit and trail nothing work. One Chinese forum posted this command and its works for me.  cd /var/lib sudo rm -rf ./mongodb sudo mkdir mongodb sudo chown -R mongodb mongodb/ sudo serivce mongodb restart

Unable to open kernel device . global vmx86 windows 7

Suddenly I encounter a weird problem with VMware 9 version. I install different OS for my education and testing purposed. Like MAC os, Ubuntu, CentOS, BT, WinXP, Win-server 2003. When I tried to run one of this OS a error message appear. unable to open kernel device "\\.Global\vmx86": The system cannot find the file specified. Did you reboot after installing VMware Workstation? Failed to initialize monitor device. Click ok you can see this window After googling I found one solution in developer forum but thread starter never use that method. So I tried it and here is my finding. Go to the directory of vmware installed  (In my case I run it as Administrator) C:\Program Files (x86)\VMware\VMware Workstation>   ( I've 32-bit apps on 64-bit OS, your may be different) Run this command vnetlib -- uninstall vmx86  reboot Go to the same directory and check net start command - this time it should say "service name  is invalid&quo

Mikrotik Hotspot Redirect After Login

This tutorial assumed you already create Hotspot in your router. If you don't know how to create a hotspot in Mikrotik router, click here and create the Hotspot. . After successfully creating the hotspot server go to "Files" Menu of  the main Window of Mikrotik router Copy "hotspot" folder into your PC. Open "alogin" file with text editor Replace "link-redirect" text with your desire URL Now you're done! After successfully logging into the Hotspot server your client automatically redirects to your external link.  Don't forget to copy this folder into Mikrotik Router "Files" Menu. You can also drag and drop this folder into "Files" menu.