domain name system
Post on 19-Jan-2016
29 Views
Preview:
DESCRIPTION
TRANSCRIPT
Domain Name System
IP assigns 32-bit addresses to hosts (interfaces) Binary addresses easy for computers to manage All applications use IP addresses through the TCP/IP
protocol software Difficult for humans to remember:
% telnet 134.82.11.70
The Domain Name System (DNS) provides translation between symbolic names and IP addresses
DNS serves listen on UDP port 53 and TCP port 53. For short requests and replies UDP is used. TCP is used for ZONE transfer.
Domain names and IP addresses
People prefer to use easy-to-remember names instead of IP addresses
Domain names are alphanumeric names for IP addresses e.g., neon.ece.utoronto.ca, www.google.com, ietf.org
The domain name system (DNS) is an Internet-wide distributed database that translates between domain names and IP addresses
How important is DNS?
Imagine what happens when the local DNS server is down.
Before there was DNS ….
…. there was the HOSTS.TXT file
Before DNS (until 1985), the name-to-IP address was done by downloading a single file (hosts.txt) from a central server with FTP. Names in hosts.txt are not structured. The hosts.txt file still works on most operating systems. It can
be used to define local names.
DNS Services
Hostname to IP Address mapping Inverse Mapping: IP Address to Hostname mapping Mail Domain to Mail Server mapping; needed for mail
delivery by mail servers Host aliasing; Mail Domain aliasing
Canonical (real) and alias names
Load distribution Replicate a heavily accessed web site (e.g. “
www.cnn.com”) to multiple web servers (i.e. different hosts with different IP addresses)
Associate “www.cnn.com” with the IP addresses of web servers
Structure of DNS names
Each name consists of a sequence of alphanumeric components separated by periods
Examples: www.eg.bucknell.edu
www.netbook.cs.purdue.edu
charcoal.eg.bucknell.edu
Names are hierarchical, with most-significant component on the right
Left-most component is computer name Local name server, root name server, authoritative
name server
Domain Name Tree
b USC-ISI Marina del Rey, CAl ICANN Marina del Rey, CA
e NASA Mt View, CAf Internet Software C. Palo Alto, CA
i NORDUnet Stockholm
k RIPE London
m WIDE Tokyo
a NSI Herndon, VAc PSInet Herndon, VAd U Maryland College Park, MDg DISA Vienna, VAh ARL Aberdeen, MDj NSI (TBD) Herndon, VA
13 root name servers worldwide, according to www.dnso.org 2002
Root Server
Design principle of DNS
The naming system on which DNS is based is a hierarchical and logical tree structure called the domain namespace.
An organization obtains authority for parts of the name space, and can add additional layers of the hierarchy
Domain Names are assigned independent of geographic locations or IP addresses. However, in practice, allocation of domain names generally follows the allocation of IP address, e.g., All hosts with network prefix 128.143/16 have domain name suffix
virginia.edu All hosts on network 128.143.136/24 are in the Computer Science
Department of the University of Virginia
Top-level domains
Three types of top-level domains: Organizational: 3-character code indicates the function of the
organization• Used primarily within the US • Examples: gov, mil, edu, org, com, net
Geographical: 2-character country or region code• Examples: us, va, jp, de
Reverse domains: A special domain (in-addr.arpa) used for IP address-to-name mapping
gTLDS (generic TLDs) were originally meant to be US-centric. Nowadays, only mil and gov TLDs are for US.
ccTLDs (countrycode TLDs) used for organizations in other countries:
Countries define their own internal hierarchy: ac.uk and .edu.au are used for academic organizations in the United Kingdom and Australia. In SA, it is edu.sa.
gTLDs versus ccTLDs
DNS naming structure
Top level domains (rightmost components; also known as TLDs) defined by global authority
com Commercial organization
edu Educational institution gov Government organization mil Military organization Organizations apply for names under a top-level domain:
kfupm.edu
macdonalds.com Organizations determine their own internal structure
ccse.kfupm.edu
cs.purdue.edu
Domain names within an organization Organizations can create any internal DNS hierarchy Uniqueness of TLD and organization name guarantee
uniqueness of any internal name (much like file names in your directories)
All but the left-most component of a domain name is called the domain for that name:
• Authority for creating new subdomains is delegated to each domain
• Administrator of kfupm.edu has authority to create ri.kfupm.edu and need not contact any central naming authority
• DNS domains are logical concepts and need not correspond to physical location of organizations
• DNS domain for an organization can span multiple networks
DNS and client-server computing
DNS names are managed by a hierarchy of DNS servers There could be multiple ways of dividing up DNS name
space Root server at top of tree knows about next level servers. Next level servers, in turn, know about lower level servers Each DNS server is the authoritative server for the names it
manages What a server is responsible for or has authority over is
called a zone. A domain can span multiple servers. Primary server is also called authoritative server Second server has a copy
Distributed, Hierarchical Database
Root servers and TLD servers typically do not contain hostname to IP mappings; they contain mappings for locating authoritative servers.
Root DNS Servers
com DNS servers ca DNS servers edu DNS servers
poly.eduDNS servers
umass.eduDNS servers
yahoo.comDNS servers
amazon.comDNS servers
ucalgary.caDNS servers
TLDServers
usask.caDNS servers
Root name servers
The root name servers know how to find the authoritative name servers for all top-level zones.
There are only 13 root name servers
Root servers are critical for the proper functioning of name resolution
Addresses of root servers
A.ROOT-SERVERS.EDU. (formerly NS.INTERNIC.NET) 10.0.2.32A.ROOT-SERVERS.NET. (formerly NS1.ISI.EDU) 198.41.0.4B.ROOT-SERVERS.NET. (formerly C.PSI.NET) 128.9.0.107C.ROOT-SERVERS.NET. (TERP.UMD.EDU) 192.33.4.12D.ROOT-SERVERS.NET. (NS.NASA.GOV) 128.8.10.90E.ROOT-SERVERS.NET. (NS.ISC.ORG) 192.203.23F.ROOT-SERVERS.NET. (NS.NIC.DDN.MIL) 192.5.5.241G.ROOT-SERVERS.NET. (AOS.ARL.ARMY.MIL) 192.112.36.4H.ROOT-SERVERS.NET. (NIC.NORDU.NET) 128.63.2.53I.ROOT-SERVERS.NET. (at NSI (InterNIC)) 192.36.148.17J.ROOT-SERVERS.NET. (operated by RIPE NCC) 198.41.0.10K.ROOT-SERVERS.NET. (at ISI (IANA)) 193.0.14.129 L.ROOT-SERVERS.NET. (operated by WIDE, Japan) 198.32.64M.ROOT-SERVERS.NET. 202.12.27.33
TLD and Authoritative Servers
Top-level domain (TLD) servers: responsible for com, org, net, edu, etc, and all top-level country domains like: uk, fr, ca, jp. Network solutions maintains servers for COM TLD Educause for EDU TLD
Authoritative DNS servers: organization’s DNS servers, providing authoritative hostname to IP mappings for organization’s servers (e.g., Web and mail). Can be maintained by organization or service provider
Local Name Server
Each ISP (residential ISP, company, university) has one. Also called “default name server”
When a host makes a DNS query, query is sent to its local DNS server Acts as a proxy, forwards query into hierarchy. Reduces lookup latency for commonly searched
hostnames
Resolver and name server
1. An application program on a host accesses the domain system through a DNS client, called the resolver
2. Resolver contacts DNS server, called name server
3. DNS server returns IP address to resolver which passes the IP address to application
Reverse lookups are also possible, i.e., find the hostname given an IP address
HTTP Resolver
Hostname (neon.tcpip-lab.edu)
IP address (128.143.71.21)
Name server
Ho
stn
am
e
(ne
on
.tcp
ip-la
b.e
du
)
IP a
dd
ress (1
28
.14
3.7
1.2
1)
Managed by UofT
DNS Name hierarchy
DNS hierarchy can be represented by a tree
Root and top-level domains are administered by an Internet central name registration authority (ICANN)
Below top-level domain, administration of name space is delegated to organizations
Each organization can delegate further
Managed by ECE Dept.
. (root)
com
toronto.edu
goveduorg
uci.edu
ece.toronto.edumath.toronto.edu
neon.ece.toronto.edu
Top-level Domains
Domain name system
Each node in the DNS tree represents a domain (or a domain name)
Each branch below a node is a DNS domain. DNS domain can contain
hosts or other domains (subdomains)
Example: DNS domains are . (root domain), edu, virginia.edu, cs.virginia.edu
virginia.edu
cs.virginia.eduwww.virginia.edu
neon.cs.virginia.edu
edu
.
Hosts and DNS domains are named based on their position in the domain tree
Every node in the DNS domain tree can be identified by a unique Fully Qualified Domain Name (FQDN). The FQDN gives the position in the DNS tree.
A FQDN consists of labels (“cs”,“virginia”,”edu”) separated by a period (“.”)
There can be a period (“.”) at the end. Each label can be up to 63 characters long FQDN may contain letters, numerals, and dash character (“-”) FQDNs are not case-sensitive
Domain names
cs.virginia.edu cs.virginia.edu.or
Hierarchy of name servers
The resolution of the hierarchical name space is done by a hierarchy of name servers
Each server is responsible (authoritative) for a contiguous portion of the DNS namespace, called a zone.
Zone is a part of the subtree
DNS server answers queries about hosts in its zone
root server
com servergov serveredu serverorg server
uci.eduserver
.virginia.edu server
cs.virginia.edu server
Authority and delegation
Authority for the root domain is with the Internet Corporation for Assigned Numbers and Names (ICANN)
ICANN delegates to accredited registrars (for gTLDs) and countries for country code top level domains (ccTLDs)
Authority can be delegated further Chain of delegation can be obtained by reading domain
name from right to left. Unit of delegation is a “zone”.
DNS domain and zones
Each zone is anchored at a specific domain node, but zones are not domains.
A DNS domain is a branch of the namespace
A zone is a portion of the DNS namespace generally stored in a file (It could consists of multiple nodes)
A server can divide part of its zone and delegate it to other servers
. (root)
.virginia.edu
.edu
.uci.edu
cs.virginia.edumath.virginia.edu
DomainZone
anddomain
Zone
Primary and secondary name servers
For each zone, there must be a primary name server and a secondary name server The primary server (master server) maintains a zone file which has
information about the zone. Updates are made to the primary server The secondary server copies data stored at the primary server.
Adding a host: When a new host is added (“gold.cs.virginia.edu”) to a zone, the
administrator adds the IP information on the host (IP address and name) to a configuration file on the primary server
Domain name resolution
1. User program issues a request for the IP address of a hostname
2. Local resolver formulates a DNS query to the name server of the host
3. Name server checks if it is authorized to answer the query. a) If yes, it responds.
b) Otherwise, it will query other name servers, starting at the root tree
4. When the name server has the answer it sends it to the resolver.
HTTP Resolver
Hostname (neon.tcpip-lab.edu)
IP address (128.143.71.21)
Nameserver
Ho
stn
am
e(n
eo
n.tc
pip
-lab
.ed
u)
IP a
dd
ress (1
28
.14
3.7
1.2
1)
DNS server architecture
All DNS servers are linked together to form a unified system. Each server keeps a set of NS (Name Server) Resource Records that identify root servers and servers for child domains.
Small organizations can use a single “primary” server Easy to administer Inexpensive
Large organizations often use multiple servers Reliability through redundancy Improved response time through load-sharing Delegation of naming authority
Locality of reference applies - users will most often look up names of computers within same organization
Recursive and Iterative Queries
There are two types of queries: Recursive queries Iterative (non-recursive) queries
The type of query is determined by a bit in the DNS query
Recursive query: When the contacted Name Server cannot resolve a query, the server becomes a DNS client, issues a query, wait for reply and pass reply back to requestor
Iterative queries: When the contacted Name Server cannot resolve a query, it replies to the requestor with the IP address/name of another Name Server
Name Resolution
requesting hostsurf.eurecom.fr
www.umass.edu
root name serverA.ROOT-SERVERS.NET.
local name serverdns.eurecom.fr
1
23
4 5
6
authoritative name serverdns.umass.edu
edu name serverA.GTLD-SERVERS.NET.
7
8
host surf.eurecom.fr wants IP address of www.umass.edu
1. contacts its local DNS server, dns.eurecom.fr
2. dns.eurecom.fr contacts root name server, if necessary
3. root name server eventually contacts authoritative name server, dns.cs.umass.edu, if necessary
This is called “Recursive Resolution”
Types of Queries
recursive query:puts burden of name resolution on contacted name serverheavy load?
iterated query:contacted server replies with name of server to contact“I don’t know this name, but ask the following server(s)”Gives more control to client requesting host
surf.eurecom.fr
gaia.cs.umass.edu
root name server
local name serverdns.eurecom.fr
1
23
4
5 6
authoritative name serverdns.cs.umass.edu
7
8
iterated query
edu name serverA.GTLD-SERVERS.NET.
DNS: Root Name Servers
contacted by local name servers that can not resolve query (mapping)
Root Name Server: contacts authoritative name server if mapping not known gets mapping returns mapping to local name server
DNS Resource Records (RRs)A DNS server stores DNS info. in a DNS database (act. a simple txt file):
A set of records known as Resource Records (RRs)
Type=NS* name is some domain
name (e.g. foo.com) value is hostname of
authoritative name serverfor the domain
RR format: (class, name, type, value, TTL); class value set to “IN” for Internet
Type=A name is hostname value is IP address
Type=CNAME name is alias name for some
“canonical” (the real) name www.ibm.com is really servereast.backup2.ibm.com value is canonical name
Type=MX* name is a mail domain value is hostname of mail
server responsible for mail domain
*Note: IP addresses associated with the relevant hostnames are entered as A records
DNS Resource Records (RRs): continued
Type= PTR used to resolve IP-address to hostname queries name is IP address (e.g. 1.2.3.196.in-addr.arpa.) value is hostname
Type=SOA Start of Authority Record. The SOA is the first record in
entered in the zone’s file name is domain name for this zone value (MNAME, RNAME, SERIAL, REFRESH , RETRY, Min.
TTL); the Serial field acts as a time stamp that is cahnged whenever the zone’s file is modified. This filed is regularly checked by secondary to tell if a zone transfer is needed.
DNS protocol, messages
DNS protocol : query and reply messages, both with same message format
msg header identification: 16 bit #
for query, reply to query uses same #
flags: query or reply recursion desired recursion available reply is authoritative
DNS protocol, messages
Name, type fields for a query
RRs in responseto query
NS records forauthoritative servers
additional “helpful”info that may be used
Becoming Part of DNS
Example: just created startup “Network Utopia” Register name networkutopia.com at a Registrar (e.g., Network
Solutions) Need to provide Registrar with names and IP addresses of your
authoritative name servers (primary and secondary) Registrar inserts two RRs into the COM TLD server:
(networkutopia.com, NS, dns1.networkutopia.com)(dns1.networkutopia.com, A, 200.200.200.1)
Network Utopia adds it own RRs as part of the configuration of its DNS server (dns1.networkutopia.com), for example: Type A record for www.networkuptopia.com Type MX record for networkutopia.com
Measures to Improve Performance of DNS•DNS resolution can be very inefficient
• Every host referenced by name triggers a DNS request
• Every DNS request for the address of a host in a different organization goes through the root server
•Caching: Name Servers and hosts use caching of DNS replies to reduce the need to issue further DNS requests
• Cache is a list of recently resolved names and IP addresses
• A DNS reply (i.e. RR) is kept in Cache for no more than the time set by the TTL (time-to-live) field
• Replication of Name Servers
• There are 13 root name servers
• Every zone maintains at least two name servers (primary and secondary)
(DDNS) Dynamic Domain name System
• When a new node is added/deleted authoritative DNS server is updated accordingly.
• When a new domain is added, update message is sent to upper servers
• Servers query other servers periodically for latest changes update/notify mechanisms under design by IETF
RFC 2136 http://www.ietf.org/html.charters/dnsind-charter.html
top related