LFCE Prep Course -- DNS Overview (Part 4)
Start exploring Linux Networking and Administration by downloading the free sample chapter today. Download Now
In this week's LFCE sneak peek blog, we learn about the domain name system, DNS, which powers the Internet and provides the underlying mechanism for converting domain names into IP addresses. We will cover the different types of DNS servers and review command-line tools.
In part 1 of our Linux Foundation Certified Engineer Training Course sneak peek blog, we reviewed the OSI network layers 7-4. These are the layers that involve application protocols, session data management, and transport protocols.
In part 2, we learned about OSI layers 3-1. These include routing and control protocols, Internet protocols, classed and classless IP addressing, subnetting, and the physical network hardware.
Part 3 reviewed basic network topologies: local area networks (LANs), wide area networks (WANs), virtual local area networks (VLANs), and bridged networks.
Domain Name System
The Domain Name System (DNS) is a distributed, hierarchical database for converting DNS names into IP addresses. The key-value store can be used for more than just IP address information. The DNS protocol runs in two different modes:
Recursive with caching mode.
When a network node makes a DNS query, it most often makes that query against a recursive, caching server. That recursive, caching server will then make a recursive query through the DNS database, until it comes to an authoritative server. The authoritative server will then send the answer for the query.
The DNS database consists of a tree-like, key-value store (Figure 1). The database is broken into tree nodes called domains. These domains are managed as part of a zone. Zones are the area of the namespace managed by authoritative server(s).
Recursive DNS Query
A theoretical, recursive DNS query for host1.foo.example.com. would take the following steps:
The client makes a recursive request for host1.foo.example.com. to the caching nameserver it has configured.
The caching nameserver makes a query to the root (".") zone nameservers.
The com zone nameservers refer the caching nameserver to the nameservers for the com. zone.
The caching nameserver makes a query to the nameservers for the com. zone.
The root zone nameservers send a response that points to the nameservers for the example.com. zone.
The caching nameserver makes a query to the nameservers for the example.com. zone.
The example.com. nameservers send a response that points to the nameservers for the foo.example.com. zone.
The caching nameserver makes a query for host1.foo.example.com. to the nameservers for the foo.example.com..
The foo.example.com. nameservers respond authoritatively for the address host1.foo.example.com. to the caching nameserver.
The caching nameserver stores all of these queries and their responses in a cache and responds back to the client with the answer to the original query (Figure 2).
DNS tools include servers and clients. The dominant DNS server is BIND (Berkeley Internet Name Daemon).
The primary DNS clients are:
dig: lots of info for debugging.
host: simple interface for DNS queries.
nslookup: deprecated tool.
If you are still using nslookup, you should learn one of the other tools. The Internet Systems Consortium (ISC), who maintains nslookup, has deprecated the tool in favor of dig and host.
Come back next week for "System Services and init Scripts." We'll learn about System V init scripts, BSD init scripts, Systemd, Upstart, and how to stop and start services.
The Linux Foundation offers both certification tests and training, which you can learn about at Linux Foundation Training. You can become a Linux Foundation Certified Sysadmin or a Linux Foundation Certified Engineer.
In this continuing series, you'll get an inside look at our new Linux Foundation Certified Engineer prep course. The full LFCE course has 12 chapters. Over the next few weeks, we will preview "Session 2: Linux Networking Concepts and Review."
Download the full sample chapter: Linux Networking Concepts and Review.
Read the next article in this series: LFCE Prep Course: System Services (Part 5)
Celebrate SysAdmin Day and sign up by July 29 to receive one free Linux tutorial each week for 22 weeks from Linux Foundation Training. You’ll be entered to win a free e-learning course or a free pass to LinuxCon North America. Sign Up Now »