Skip to main content

DNS and BIND – DNS Querying with BIND Utilities

Hands-On Lab

 

Photo of Cara Nolte

Cara Nolte

Linux Training Architect II

Length

00:15:00

Difficulty

Beginner

Name service queries are essential in retrieving information stored in DNS records. We will be using the tools in the bind-utils package to perform these requests. In this video, we will perform name service queries using the host, nslookup, and dig commands.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.

DNS and BIND - DNS Querying with BIND Utilities

Introduction

Name service queries are essential in retrieving information stored in DNS records. We will be using the tools in the bind-utils package to perform these requests. In this video, we will perform name service queries using the host, nslookup, and dig commands.

The Scenario

The DNS team at ABC Company has just rolled out a new DNS system. Part of this process was implementing three new caching name servers for the satellite offices outside of their main campus. The Technical Lead for Office XYZ has asked us to perform name service queries, to ensure new records are being returned to the offsite offices. He has also asked us to take this opportunity to train another staff member on name service query utilities.

To complete this lab, we must install the bind-utils package, then verify that queries resolve successfully using the host, nslookup, and dig commands.

Logging In

Use the credentials provided on the hands-on lab page to get into Server1 to begin with. Since we need root privileges, let's just run sudo -i right off and become root.

Install the bind-utils Package

$ yum install bind-utils -y

Display the Name Servers for the Domain google.com Using the host Command

$ host -t ns google.com

Use the host Command to Display the Mail Servers Configured for google.com

$ host -t mx google.com

Resolve the IP Address for ns4.google.com Using the nslookup Command

nslookup ns4.google.com

Using the nslookup Command, List the Name Servers for google.com

$ nslookup -type=ns google.com

Use the nslookup Command to List the Mail Servers Responsible for Mail Exchange for google.com

$ nslookup -query=mx google.com

Use the Debug Mode for nslookup to Provide More Details for google.com

$ nslookup -debug google.com

Resolve the IP for google.com Using the dig Command

$ dig google.com

Use the dig Command to List the Name Servers for google.com

$ dig ns google.com

Using dig, List Only the Four NS Records for google.com

$ dig ns google.com +noall +answer

Conclusion

Well, we got bind-utils installed and used several features of it to run all sorts of DNS-related queries. We've got all the information we need now. Congratulations!