Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out

DNS Domain Name System

VIEWS: 33 PAGES: 30

									DNS: Domain Name System

            DNS paradigm
            Name servers
            DNS Queries
            DNS records and messages
            Sample namespace contents
            Scalable DNS
            End


Drs. Shu & Wu                           Computer Network, K&R
DNS: Domain Name System
     People:
      ❍   Already have many identifiers: SSN, name, passport #
      ❍   Not good at too many digits
      ❍   Like “name”, e.g., gaia.cs.umass.edu
     Internet hosts, routers:
      ❍   IP address (32 bit) - used for addressing datagrams
      ❍   Only good at binary numbers
     An application must convert a hostname to an IP
     address before proceed with TCP or UDP
      ❍   SSH, Telnet, ftp, WWW, email
 Q: map between IP addresses and name ?

Drs. Shu & Wu                                   Computer Network, K&R
DNS: Domain Name System
   Mapping function: domain names             IP addresses
                e.g. extrano.eece.unm.edu   129.24.24.130
   Basic scheme: a hierarchical name space implemented
   by a distributed database




                         called a zone

Drs. Shu & Wu                                  Computer Network, K&R
DNS: Domain Name System
     DNS Domain Name System, fully distributed database
     implemented in hierarchy of many name servers
      ❍   No single site knows all information
      ❍   A large-scale, hierarchical system
     Client-server model
      ❍   Client: name re-solver --- query request
      ❍   Server: name server --- query reply
     Application-layer protocol : host, routers, name servers to
     communicate to resolve names (address/name translation)
      ❍   note: core Internet function, implemented as
          application-layer protocol
      ❍   complexity at network’s “edge”



Drs. Shu & Wu                                        Computer Network, K&R
DNS: Domain Name System

            DNS paradigm
            Name servers
            DNS Queries
            DNS records and messages
            Sample namespace contents
            Scalable DNS
            End


Drs. Shu & Wu                           Computer Network, K&R
DNS: three types of name servers
     Local name server
      ❍   Listed in /etc/resolv.conf
      ❍   The first contact point from clients
     Authoritative name server
      ❍   Be either primary or secondary name server in the zone
     Root name server
      ❍   13 total, their IP address are known to all name servers
      ❍   Knows the IP address of an authoritative name server
          that has the mapping




Drs. Shu & Wu                                    Computer Network, K&R
DNS name servers
      Why not centralize DNS?       local name servers:
       single point of failure     each ISP, company has local
                                   (default) name server
       traffic volume
                                   host DNS query first goes
       distant centralized         to local name server
       database
       maintenance               authoritative name server:
                                   for a host: stores that
                                   host’s IP address, name
   doesn’t scale!                  can perform name/address
                                   translation for that host’s
                                   name



Drs. Shu & Wu                                Computer Network, K&R
DNS: root name servers
  contacted by local name server that can not resolve name
  Root name server:
   ❍ contacts authoritative                          a NSI Herndon, VA
                                                     c PSInet Herndon, VA          k RIPE London

       name server                                   d U Maryland College Park, MD
                                                     g DISA Vienna, VA
                                                                                   i NORDUnet Stockholm

                                                     h ARL Aberdeen, MD
       if name                                       j NSI (TBD) Herndon, VA                  m WIDE Tokyo

                   e NASA Mt View, CA
       mapping     f Internet Software C. Palo Alto,
                   CA

       not known
   ❍ returns mapping
      to local          b USC-ISI Marina del Rey, CA
                        l ICANN Marina del Rey, CA

      name
      server
  13 root name servers worldwide (USA 10; Japan 1; Europe 2)


Drs. Shu & Wu                                                             Computer Network, K&R
DNS: root name servers
     DNS name server itself must use UDP/TCP
     protocol to communicate with other name servers
       ❍   Must know IP address of the name server

     Linkage among name servers
       ❍   Each name server knows the IP addresses of the root
           servers
       ❍   Each name server knows the IP addresses of its
           immediate children on the name tree

     Check current root name servers’ status at:
          http://www.cymru.com/DNS/dns.html


Drs. Shu & Wu                                  Computer Network, K&R
DNS: Domain Name System

            DNS paradigm
            Name servers
            DNS Queries
            DNS records and messages
            Sample namespace contents
            Scalable DNS
            End


Drs. Shu & Wu                           Computer Network, K&R
DNS queries
      Host resolution
    ❍     Hostname      IP address
      Mail host location
    ❍     Domain name     IP address of mail server
      Reverse resolution
    ❍     IP address    hostname
      Host information
    ❍     Hostname      host information


Drs. Shu & Wu                              Computer Network, K&R
DNS: example                                  root name server



host surf.eurecom.fr                      2                  4
  wants IP address of                          5         3
  gaia.cs.umass.edu
1. contacts its local DNS
    server, dns.eurecom.fr
2. dns.eurecom.fr contacts local name server           authorititive name server
                                  dns.eurecom.fr           dns.umass.edu
    root name server, if
    necessary                         1    6
3. root name server contacts
    authoritative name server,
    dns.umass.edu, if
    necessary                  requesting host          gaia.cs.umass.edu
                             surf.eurecom.fr


Drs. Shu & Wu                                      Computer Network, K&R
DNS: example                              root name server



Root name server:                     2                      6
    may not know                             7       3
    authoritative name
    server
    may know
    intermediate name    local name server       intermediate name server
    server: who to       dns.eurecom.fr               dns.umass.edu
    contact to find                                      4       5
                                 1    8
    authoritative name
    server
                                                 authoritative name server
                                                   dns.cs.umass.edu
                         requesting host
                         surf.eurecom.fr

                                                   gaia.cs.umass.edu
Drs. Shu & Wu                                    Computer Network, K&R
DNS: queries                                root name server


recursive query:                        2
                                                          iterated query
    puts burden of name                        3
    resolution on                                  4
    contacted name
    server                                          7
    heavy load?            local name server       intermediate name server
                           dns.eurecom.fr               dns.umass.edu
iterated query:                                            5    6
                                   1    8
    contacted server
    replies with name of
                                                   authoritative name server
    server to contact                                dns.cs.umass.edu
    “I don’t know this     requesting host
    name, but ask this     surf.eurecom.fr
    server”
                                                        gaia.cs.umass.edu
Drs. Shu & Wu                                      Computer Network, K&R
DNS: Domain Name System

            DNS paradigm
            Name servers
            DNS Queries
            DNS records and messages
            Sample namespace contents
            Scalable DNS
            End


Drs. Shu & Wu                           Computer Network, K&R
DNS records
DNS: distributed db storing resource records (RR)
                RR format: (name,   value, type,ttl)


   Type=A                           Type=CNAME
    ❍   name is hostname            ❍   name is alias name for some
    ❍   value is IP address             “cannonical” (the real) name
   Type=NS                              www.ibm.com is really
    ❍   name is domain (e.g.            servereast.backup2.ibm.com
        foo.com)                    ❍   value is cannonical name
    ❍   value is IP address of
        authoritative name server   Type=MX
        for this domain
                                    ❍   value is name of mailserver
                                        associated with name
Drs. Shu & Wu                                    Computer Network, K&R
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




Drs. Shu & Wu                                Computer Network, K&R
DNS protocol, messages

    Name, type fields
         for a query

        RRs in reponse
              to query

         records for
authoritative servers

   additional “helpful”
info that may be used



Drs. Shu & Wu             Computer Network, K&R
DNS namespace contents
      DNS name format
    ❍     A domain name is a sequence of labels
    ❍     A label is 1-byte length followed by the string
    ❍     A domain name ends with a NULL byte (a
          zero-length label)
    ❍     Case insensitive
Example:
                4eece3unm3edu0


Drs. Shu & Wu                              Computer Network, K&R
DNS: Domain Name System

            DNS paradigm
            Name servers
            DNS Queries
            DNS records and messages
            Sample namespace contents
            Scalable DNS
            End


Drs. Shu & Wu                           Computer Network, K&R
DNS namespace contents
      Sample SOA RR
eece.unm.edu IN SOA {
     origin = tierra.eece.unm.edu // zone primary name server
     mail addr = warren.eece.unm.edu // contact person
     serial = 2002020403        // change for every update
     refresh = 3600 (1H)        // 2nd refresh its copy every
     1H                                       if serial changed
     retry = 1200 (20M)         // 2nd keep trying refresh
     every                                    20M if failed
     expire = 86400 (1D)
     minimum ttl = 43200 (12H) // TTL for all RR


Drs. Shu & Wu                                  Computer Network, K&R
DNS namespace contents
      Sample query of the root server
    > www.eece.unm.edu
    Server: a.root-servers.net
    Address: 198.41.0.4

    Authoritative answers can be found from:
    unm.edu nameserver = ARIEL.unm.edu
    unm.edu nameserver = DEIMOS.unm.edu
    unm.edu nameserver = PRISM.NMT.edu
    ARIEL.unm.edu internet address = 129.24.8.1
    DEIMOS.unm.edu internet address = 129.24.8.4
    PRISM.NMT.edu internet address = 129.138.4.216
Drs. Shu & Wu                           Computer Network, K&R
DNS namespace contents

     > www.eece.unm.edu 129.24.8.4
     Server: [129.24.8.4]
     Address: 129.24.8.4
       www.eece.unm.edu           canonical name =
            quark.eece.unm.edu
       eece.unm.edu
               origin = tierra.eece.unm.edu
               mail addr = warren.eece.unm.edu
               serial = 2002021103
               refresh = 3600 (1H)
               retry = 1200 (20M)
               expire = 86400 (1D)
Drs. Shu & Wu
               minimum ttl = 43200 (12H)        Computer Network, K&R
DNS namespace contents
      Sample zone file from eece.unm.edu
    eece          IN     CNAME quark.eece.unm.edu.
    mailhost    IN      CNAME quark.eece.unm.edu.
    mail           IN     CNAME quark.eece.unm.edu.
    imap          IN     CNAME quark.eece.unm.edu.
    www           IN     CNAME quark.eece.unm.edu.
    extreme      IN      A     129.24.24.1
                     IN     MX     0 mail.eece.unm.edu.
    smtp          IN      A     129.24.24.6
                     IN     MX     0 mail.eece.unm.edu.
    ns              IN     A     129.24.24.10
                IN      MX     0 mail.eece.unm.edu.
Drs. Shu & Wu                              Computer Network, K&R
DNS namespace contents

        Sample zone file from eece.unm.edu
      tormenta IN    A       129.24.24.14
                  IN     MX      0 mail.eece.unm.edu.
                  IN     HINFO "Dell PowerEdge 2300"
         "SuSE Linux 6.0"
      $ORIGIN 24.24.129.in-addr.arpa.
      ;0    reserved network address
      ;1         IN      PTR    gateway24001.eece.unm.edu.
      4          IN      PTR    develrouter.eece.unm.edu.
      5          IN      PTR    heavy.eece.unm.edu.
      6          IN      PTR    quark.eece.unm.edu.

Drs. Shu & Wu                            Computer Network, K&R
DNS namespace contents
      PTR RR: reverse mapping
    ❍     Special domain name “in-addr.arpa”
    ❍     IP address    hostname
    ❍     Example of PTR RR:
         •      130.24.24.129.in-addr.arpa   (129.24.24.130)
         •       name = extrano.eece.unm.edu
         •      This PTR RR is maintained by eece.unm.edu instead
                of in-addr.arpa




Drs. Shu & Wu                                     Computer Network, K&R
DNS: Domain Name System

            DNS paradigm
            Name servers
            DNS Queries
            DNS records and messages
            Sample namespace contents
            Scalable DNS
            End


Drs. Shu & Wu                           Computer Network, K&R
DNS and server selection

        DNS Round Robin
      ❍     Used for server replicas, example:
      Name:    cnn.com
      Addresses: 207.25.71.20, 207.25.71.25,
         207.25.71.27, 207.25.71.28, 207.25.71.29,
         207.25.71.5
      Name:    cnn.com
      Addresses: 207.25.71.29, 207.25.71.5,
         207.25.71.20, 207.25.71.25, 207.25.71.27,
         207.25.71.28
      ❍     What about DNS caching?
      ❍     How to handle server failures?
Drs. Shu & Wu                                Computer Network, K&R
DNS: scalable to large-scale
    Utilize hierarchical partitioning
     ❍   Every domain name maintains their own most updated
         naming information
    Replication of naming data
     ❍   We have at least two or more name servers keeping
         the most updated information
    Caching
     ❍   Every name server can cache naming information from
         anywhere else
     ❍   cache entries timeout (disappear) after some
         time


Drs. Shu & Wu                                  Computer Network, K&R
DNS: Domain Name System

            DNS paradigm
            Name servers
            DNS Queries
            DNS records and messages
            Sample namespace contents
            Scalable DNS
            End


Drs. Shu & Wu                           Computer Network, K&R

								
To top