The idea
Networks route by IP address. People remember names. Something has to turn
yahoo.com into an address before any packet can be sent, and it has to do
that for the whole Internet, quickly, without one machine holding every
answer.
DNS does it by splitting the job in the same shape as the names themselves. A name is made of parts, and each part is looked after by a different group of servers. A query walks down that structure until it reaches the server that knows.
How it works
The problem and the definition
TCP/IP protocols use an IP address to uniquely identify the connection of a
host. People prefer names, for example yahoo.com. The Domain Name System
(DNS) is an application-layer protocol that allows hosts and name servers to
communicate to resolve address and name translation.
How it works
Domain name space
The name space is hierarchical, so each name is made of several parts. Names are defined in an inverted-tree structure with the root at the top. Each node has a label and a domain name.
- A label is a string with a maximum of
63characters. - A domain name is a sequence of labels separated by dots, read from the node up to the root.
How it works
Domains and the hierarchy of name servers
A domain is a subtree of the domain name space. The information held in the name space is distributed among many computers called DNS servers. The servers form a hierarchy in the same way the names do, with top level domain (TLD) servers and local servers on the slide.
The lecture asks why DNS is not centralised, and answers in five reasons: a single point of failure, traffic volume, a distant centralised database, maintenance, and that it does not scale. No server has all the name-to-IP mappings.
| Server | Role in the lecture |
|---|---|
| Root server | Top of the hierarchy. Information about authoritative servers is added to the root servers when a domain is registered. |
| TLD server | Top level domain server, one level below the root. |
| Local name server | Each ISP or organisation has a default local name server. A host DNS query goes to it first. |
| Authoritative name server | Configured by an administrator with the hostname information for a particular domain. |
How it works
Name-address resolution
Resolution is mapping a name to an address. There are two styles.
- Recursive resolution: the DNS server that does not know the mapping makes queries to other DNS servers on behalf of the client. The slide gives its voice as “I don’t know this name, but I will find it out for you.”
- Iterative resolution: the DNS server that does not know the mapping sends the address of the next server back to the one that requested it. Its voice is “I don’t know this name, but you may ask this server.”
How it works
Iterated query, the lecture's example
A host at engineering.nyu.edu wants the IP address for
gaia.cs.umass.edu. Its local DNS server is dns.nyu.edu and the
authoritative server for the target is dns.cs.umass.edu. The slide numbers
the arrows 1 to 8. In an iterated query the contacted server replies with
the name of the server to contact. Following that rule, the exchange is:
- The requesting host asks its local DNS server.
- The local server asks the root DNS server.
- The root replies with the TLD DNS server to contact.
- The local server asks the TLD server.
- The TLD server replies with the authoritative server
dns.cs.umass.edu. - The local server asks the authoritative server.
- The authoritative server replies with the IP address.
- The local server returns the address to the requesting host.
The local server does all the asking, and every other server just points onward.
How it works
Recursive query, the same example
For the same lookup, a recursive query puts the burden of name resolution on the contacted name server. The root server contacts the next server itself instead of sending its address back. The slide asks, as a question, whether this means heavy load at the upper levels of the hierarchy.
Aside
Message order on the diagrams
The two figures are numbered 1 to 8, but the arrows and labels did not
extract, only the numbers and server names. The order above is built from the
lecture’s definitions of iterative and recursive resolution, not read off the
arrows. If a question depends on which arrow is which number, check the
slide.
Where marks get lost
Do not confuse the two styles by who the client is. In both, the host asks its local server with a simple request. What differs is whether the contacted server hands back another server’s address (iterative) or goes and fetches the answer itself (recursive).
In the exam
- Label limit:
63characters. Reading order: node up to the root. - Why distributed: single point of failure, traffic volume, distance, maintenance, does not scale.
- Server roles: local (default per ISP or organisation, queried first), authoritative (administrator-configured for a domain, registered with the root servers).
- Iterative versus recursive: one-line definition of each, and who carries the burden. Know the two quoted voices.
- The example: host
engineering.nyu.edu, targetgaia.cs.umass.edu, localdns.nyu.edu, authoritativedns.cs.umass.edu.
Check yourself
- DNS maps names to IP addresses using a distributed hierarchy of servers.
- Domain names are an inverted tree, labels of up to
63characters, read from the node up to the root. - Local server first, authoritative server holds the final answer.
- Iterative returns the next server’s address. Recursive resolves on the client’s behalf and loads the contacted server.