Sub topic 1
Why Names Exist: IP Addresses and the Need for DNS
Prerequisites
This chapter assumes you know what a website and web browser are, can use a command line, and recognize that an IP address identifies a device on a network.
Why Names Exist: IP Addresses and the Need for DNS
A browser connects to an IP address, such as 192.0.2.10 for IPv4 or 2001:db8::10 for IPv6. These addresses are useful to computers but difficult for people to remember. A website may also move to a different server, changing its address.
The Domain Name System (DNS) is a distributed naming system. It maps names to information such as IP addresses. When you enter example.com, your computer asks a resolver for the records associated with that name. The resolver returns an address, and the browser uses that address to connect.
dig example.com A +short
dig example.com AAAA +shortThe first command asks for an IPv4 address. The second asks for an IPv6 address. +short limits the output to the answer values.
Anatomy of a Domain Name
A domain name is made of labels separated by dots. In www.example.com:
wwwis a subdomain label.exampleis the registered domain label.comis the top-level domain (TLD).- The complete name is a fully qualified domain name (FQDN). The DNS root is usually written as a final dot:
www.example.com.
Each label identifies a level in the DNS hierarchy. Labels are read from right to left when locating the responsible servers.
The DNS Hierarchy: Root, TLD, and Authoritative Servers
DNS resolution follows a hierarchy:
The root servers direct a resolver to the servers for the .com TLD. The TLD servers direct it to the authoritative servers for example.com. Authoritative servers hold the actual zone data and return the requested record.
Name Servers and Zones
A DNS zone is the portion of the namespace managed by one administrative authority. A name server stores or serves records for a zone. A domain commonly lists multiple authoritative name servers so the zone remains available if one server fails.
An NS record identifies those servers. Other records, such as A, AAAA, and MX, describe how the domain is used. Delegation connects a parent zone to a child zone by publishing the child zone's name servers.
Exercise
Which servers provide the final answer for a record in example.com?
Show answer
The authoritative name servers for the example.com zone.