---
title: "DNS: How Names Become Addresses"
domain: networking
level: beginner
duration: "2h 30min total"
---

# DNS: How Names Become Addresses

People type names; networks need addresses. The **Domain Name System (DNS)** is the distributed database that turns one into the other, and when it fails, almost everything looks broken. This module explains how a name is resolved step by step, which record types you will meet, how to query and read DNS answers, how DNS traffic can be encrypted, and which attacks target DNS and how DNSSEC helps.

## Learning objectives
By the end of this module you will be able to:
1. Explain the DNS hierarchy and how a name is resolved: stub resolver, recursive resolver, root, top-level domain (TLD) and authoritative servers, caching and time to live (TTL).
2. Identify the common record types (A, AAAA, CNAME, MX, NS, TXT, PTR, SOA, CAA) and what each is used for.
3. Query DNS with `dig` and interpret the answer, authority and additional sections and the response flags.
4. Compare DNS transports: UDP and TCP on port 53, DNS over TLS (port 853) and DNS over HTTPS (port 443).
5. Assess DNS threats (cache poisoning, domain hijacking) and explain what DNSSEC protects and what it doesn't.

## Prerequisites
- [05 — IP Addressing](../05-ip-addressing/README.md) and [08 — Transport Layer: TCP, UDP and Ports](../08-tcp-udp/README.md).
- For the lab: `dig` (BIND utilities) and Podman or Docker to run a local authoritative DNS server.

## Contents
| Type | Duration |
|---|---|
| [Theory](lesson.md) | 50 min |
| [Hands-on lab: tracing a resolution and running your own zone](lab.md) | 60 min |
| [Assessment (10 questions)](quiz.md) | 15 min |

## Further reading
- [RFC 1034](https://www.rfc-editor.org/rfc/rfc1034) — Domain Names: Concepts and Facilities
- [RFC 1035](https://www.rfc-editor.org/rfc/rfc1035) — Domain Names: Implementation and Specification
- [RFC 7858](https://www.rfc-editor.org/rfc/rfc7858) — DNS over Transport Layer Security (TLS)
- [RFC 8484](https://www.rfc-editor.org/rfc/rfc8484) — DNS Queries over HTTPS (DoH)
- [RFC 4033](https://www.rfc-editor.org/rfc/rfc4033) — DNS Security Introduction and Requirements
- [RFC 8659](https://www.rfc-editor.org/rfc/rfc8659) — DNS Certification Authority Authorization (CAA) Resource Record
