Login

Register

Troubleshooting DNS using nslookup and host commands in Linux

The most basic test after the DNS server has been set up properly is to ping the hostname of the nameserver
and the domain itself. If both return a reply, your nameserver is querying properly.
Step 1. Ping the hostname of the nameserver for your network—in this case, RHEL01:

If the results that you are expecting don’t match what is displayed, or if the hostname or IP address can’t be found, it is a good indication there is a problem with that particular zone file.
This is a good way to test a few of the entries in each zone file to verify functionality of the DNS server. Aside from the host command, you can also use the nslookup command that offers slightly different information about lookups.
Step 5. Query the domain name again:

This time you see the nameserver for the example.com domain respond. This is a good way to find out which DNS server is responsible for a particular domain.
Step 6. You can also use nslookup like the host command to perform forward lookups:

About iGURKUL

IGURKUL I.T. Training Hub offering various Career Certification courses in Computer Networking, Unix, Linux, Cloud Computing and DevOps Technologies. With its rich experience in IT training service sector, iGURKUL has been able to set Industry best practices in IT Training for the past five years.

In Past five years, more than 5000 professionals have been trained by iGURKUL for System administration, Cloud Computing and DevOps Skill set through our Online Training portal www.unixadminschool.com. And , each day , more than 10000 working professionals from all over the globe visiting our knowledge base www.unixadminschool.com/blog for the best practices and Knowledge learning.