Troubleshooting a DNS Zone

15 minutes
  • 2 Learning Objectives

About this Hands-on Lab

Understanding a service well enough to troubleshoot it is an important skill as a System Administrator. In this lab, we’ll go over troubleshooting BIND zone files.

This lab environment will start two linux servers, although you will only use the one labeled “Lab Server” to complete this lab. Due to security settings in the Cloud Playground, DNS resolution between nodes isn’t possible in that environment. The second server, named “Practice Server” is configured only as a sandbox for students to follow along with activities from other lessons in this section since a two node lab environment is needed for some tasks.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Use /var/named/new-forward.db as a new zone file moving forward.

The first thing we need to do is set up named to use this new zone file. Edit /etc/named.conf, find the mylabserver.com zone declaration, and change the file line.

From:
zone "mylabserver.com" IN {
    type master;
    file "/var/named/forward.db";
};

To:
zone "mylabserver.com" IN {
    type master;
    file "/var/named/new-forward.db";
};

Second, we need to edit the new-forward.db zone file and make sure it’s correct.

Open it with your favorite editor and take a look.

The first thing to notice is the domain that the file is set to SOA for. Since we’re using mylaberver.com and the file contains oldcompany.edu, we need to change that in every location.

Additionally, the IP scheme for the zone file doesn’t look right – our IP scheme is 10.0.1.XX while the one in the file is 10.10.1.XX. That should be fixed as well.

Verify the IP address of the ‘A’ record for dns.mylabserver.com is correct.

Verify that all FQDNs have a . at the end.

Once we have done all of that, we can verify that the file is correct by running:

named-checkzone mylabserver.com /var/named/new-forward.db

When we get a good result there, we can run:

systemctl restart named

Finally, we can check our work using nslookup in the next task.

Verify that dns, test1, db1, and web3 all resolve to the correct addresses.

Use the following commands to check what address a name resolves to:

nslookup dns.mylabserver.com localhost
nslookup test1.mylabserver.com localhost
nslookup db1.mylabserver.com localhost
nslookup web3.mylabserver.com localhost
  • dns.mylabserver.com should resolve to your local IP address.
  • test1.mylabserver.com should resolve to 10.0.1.30.
  • db1.mylabserver.com should resolve to 10.0.1.78.
  • web3.mylabserver.com should resolve to 10.0.1.230.

Additional Resources

You are your company's DNS administrator. As part of a merger, you've been tasked with bringing the DNS from the old company into your DNS setup. The server has named running on it, with a functional zone file. In /var/named there is a new-forward.db file that contains information for a new zone file.

Use the new-forward.db file to build a new zone file to use moving forward. Make sure that test1.mylabserver.com, db1.mylabserver.com, web3.mylabserver.com and dns.mylabserver.com all resolve correctly.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Get Started
Who’s going to be learning?

How many seats do you need?

  • $499 USD per seat per year
  • Billed Annually
  • Renews in 12 months

Ready to accelerate learning?

For over 25 licenses, a member of our sales team will walk you through a custom tailored solution for your business.


$2,495.00

Checkout
Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!