Querying DNS Client Configuration from the Command Line

45 minutes
  • 4 Learning Objectives

About this Hands-on Lab

In this hands-on lab, we’ll verify the network DNS configuration settings and perform several DNS queries. Knowing how to locate this information, and how to perform queries using the configured DNS host (as well as other hosts), is a useful skill.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Determine the Configured DNS Host

cat /etc/resolv.conf

Perform a DNS Lookup of www.linuxacademy.com Using the Configured DNS Server
host www.linuxacademy.com
dig www.linuxacademy.com
Perform a DNS Lookup of www.linuxacademy.com Using Another DNS Host
dig @1.1.1.1 www.linuxacademy.com

We could also use:

host www.linuxacademy.com 1.1.1.1
Test Connectivity to www.linuxacademy.com

Try ping:

ping -c1 www.linuxacademy.com

The ping should fail. Let’s try curl as a better way of seeing if thhe server is alive:

curl -I www.linuxacademy.com

Additional Resources

We have been asked to troubleshoot an issue with www.linuxacademy.com. One of the developers is having trouble reaching the host from this server, and has asked us to verify connectivity.

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.

Sign In
Welcome Back!

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

Get Started
Who’s going to be learning?