DNS Fundamentals
1Introduction
This lecture explains how the
2A Hierarchical, Distributed Namespace
A www.example.com, consists of hierarchically joined labels. The DNS namespace has a root at its top, followed by com and lower domains such as example.com.
DNS does not store all information on one server. It is a distributed system that delegates management of parts of the namespace to multiple organizations and servers.
3Resource Records
The units of information stored by DNS are called
| Type | Role |
|---|---|
| A | Associates a domain name with an IPv4 address |
AAAA | Associates a domain name with an IPv6 address |
CNAME | Associates an alias with a canonical name |
MX | Specifies a server that receives email |
NS | Specifies an authoritative name server for a domain |
TXT | Stores textual information |
DNS therefore does more than convert domain names to IP addresses. Address retrieval through an A record or AAAA record is one important use.
4Resolvers and Authoritative Name Servers
A
An authoritative name server supplies the official resource records for a delegated portion of the namespace. A recursive resolver performs iterative queries to multiple name servers on behalf of a client and returns the final answer to the client.
5Resolution and Caching
Retrieving an address for www.example.com conceptually proceeds as follows.
- An application requests a query through its stub resolver.
- The stub resolver queries a recursive resolver.
- If the recursive resolver has a valid cached answer, it returns that answer.
- If the required information is not cached, it follows delegations involving root, TLD, and authoritative name servers to obtain referrals and an answer. Cached delegation information can allow it to begin partway through this process.
- The recursive resolver caches the answer and returns it to the stub resolver.
A resource record has a
6DNS Transport
Traditional DNS communication normally uses UDP or TCP on port 53. UDP is widely used for ordinary queries, while TCP is used when a UDP response is truncated or an operation requires TCP.
DNS queries themselves operate over IP networks. DNS must therefore not be interpreted as a separate process that occurs before TCP/IP.
7From Resolution to Web Communication
When a URL host is written as a domain name, a client uses DNS to obtain one or more IP addresses and selects a destination. It then establishes a TCP connection for HTTP/1.1 or HTTP/2. HTTP/3 instead uses
8Key Points
- DNS is a hierarchical, distributed namespace and resource-record query system.
- A recursive resolver obtains an answer from its cache or through queries involving authoritative name servers.
- Caches reuse answers during their TTLs to reduce latency and load.
- DNS communication operates over IP using UDP, TCP, or encrypted alternatives.