ASCII Strings Into Network Addresses.: How DNS Works
ASCII Strings Into Network Addresses.: How DNS Works
ASCII Strings Into Network Addresses.: How DNS Works
(RFC 1034/1035, app layer protocol runs over UDP, uses port 53)
Machines use IP addresses as names, humans use ASCII names, Mechanism to convert
ASCII strings into network addresses.
DNS is a hierarchical, domain-based naming schema and a distributed db system for
implementing this naming scheme.
Distributed throughout the world on millions of machines administered by millions of
people yet behaves like a single integrated database.
Importance of DNS
-
DNS caching
In a query chain, when a DNS server receives a DNS reply containing a mapping
from hostname to IP address, it can cache the info in its local memory.
Advantage : 1. Improves delay performance
2. Reduces number of DNS messages ricocheting around the net.
edu
uk
co
cs
bbc
Domain Names
-
Case-insensitive,
Component names up to 63 chars
Full path name up to 255 chars
Unique in a given domain but can be duplicated across domains
e.g. msn.com and msn.org
Resource Records
DNS system defines a number of RRs.
Two formats :
Binary/Wire Format : used in queries and responses
Text Format : Used in zone file (example on pg 585 Tanenbaum)
RR is a five-tuple (Domain name Time-to-Live
Name Servers
Name server is a computer server that implements the name service protocol.
It maps a computer-usable identifier of a host to a human-usable identifier.
It provides naming or directory service.
One cant have entire DNS db on single name server. Hence, DNS name space is divided
into non-overlapping zones. (fig 7-4 pg 586 T) Each zone contains some part of tree and
name servers holding info about the zone. Some servers are placed outside the zone to
improve reliability. Where zone boundaries are placed is up to the zones admin. E.g.
cs.yale.edu is a separate zone from yale.edu but eng.yale.edu is not.
Authoritative DNS
Servers needed for
every org with
publicly accessible
host, its own or pay
ISP
Yahoo.com
Authoritative DNS
Servers
Microsoft.com
Authoritative DNS
Servers
mit.edu
Authoritative DNS
Servers
cmrit.edu
Root DNS
Server
TLD DNS
Server Edu
Authoritative DNS
Server dns.cs.mit.edu
Requesting host
cs.cmrit.edu
Recipient
abc.cs.mit.edu
In practice, query from requesting host to local DNS server is recursive and remaing
queries are iterative.
Recursive query : From cs.cmrit.edu to dns.cmrit.edu as query asks dns.cmrit.edu to
obtain mapping on its behalf
Iterative query : replies are directly returned to local dns servers e.g queries 2, 4, 6
When resolver has a query about domain, it passes query to one of the local name
servers. If domain falls under its jurisdiction, the server will return the authoritative
RR. If domain is remote, and no info available locally, the name server will send
query to top-level name server. This is Recursive query as each server that does not
have requested info goes and finds it elsewhere and reports back.
# of authority RRs
# of additional RRs
Host Aliasing a host with complicated name can have simple, more mnemonic
alias. Application will invoke DNS to obtain canonical hostnames as well as IP
address for the supplied alias.
e.g. relay1.westcoast.enterprise.com can have alias www.enterprise.com