TCP/IP: DNS
Network Security Lecture 8
The Domain Name System
- Database that primarily maps IP addresses (147.188.192.42) to names
(www.cs.bham.ac.uk) and viceversa
– Nice properties: distributed, coherent, reliable, autonomous, and hierarchical
- DNS namespace has tree structure
– Domain is a node in this tree – All nodes except the root have labels (e.g., www) – Fully qualified name: nodes labels, bottom up, each followed by a dot
- Nodes are grouped (clique) into zones (administrative boundaries)
– Apex is called the “start of authority” – Bottom edges with other zones below them are “delegation points” – Bottom nodes with no other zones below them are “leaf nodes” – Each zone is served by authority servers
- Nodes store actual content in resource records (RRs)
– RR: name, class, type, TTL, and data – Data can map IP to host name and viceversa – Data can specify the mail server for domain
- More: P. Vixie, “DNS Complexity”, ACM Queue, 2007
Eike Ritter Network Security - Lecture 8 2
Domain hierarchy
Eike Ritter Network Security - Lecture 8 3
. com net uk google ac co google bham cs ph lloydstsb arpa in-addr 147 188 192 42 (root)
Mapping names to IPs and viceversa
- Can a host name be mapped to many IP addresses?
– Yes. For example, load balancing
$ nslookup www.google.com Name: www.l.google.com Address: 209.85.143.99 Name: www.l.google.com Address: 209.85.143.104
- Can an IP address be mapped to many domain names?
– Yes. For example web hosting (Some) domains seen at 74.125.53.132: amomsrantings.blogspot.com, bloxee.blogspot.com, culturadohashi.blogspot.com, ocedeloguxuf.blogspot.com,
- pensocial.googleusercontent.com, www-blogger-,
ads.gmodules.com,, www.gmodules.com, … – Tool: Passive DNS replication @ BFK
Eike Ritter Network Security - Lecture 8 4
Servers
- Primary authoritative server
– Authoritative for a zone – Loads mappings from local configuration (file on disk)
- Secondary authoritative server
– Backup – Their zone data comes to them from primary servers via a zone transfer procedure
- Recursive and caching server
– Caches query results until their TTL expires – Implements the recursive algorithm needed to locate a RR
Eike Ritter Network Security - Lecture 8 5
Clients
- Often called “resolvers”
- Most often they do not cache (“stub
resolver”)
- Rely on recursive service of their designated
full resolver
- Tools: nslookup, dig, host
Eike Ritter Network Security - Lecture 8 6
$ cat /etc/resolv.conf search cs.bham.ac.uk nameserver 147.188.192.4 nameserver 147.188.192.8