To Previous Chapter To Table of Contents To Bottom of Page To Next Chapter

Chapter 11 - DNS

  1. Domain Name Service

    alternative to hard-coding entries into /etc/hosts

    • DNS Structure
      top-level domains (maintained by Network Information Center (NIC): ARPA (net), COM, EDU, GOV, MIL, ORG
      second-level domain names must be registered

    • The Name Server
      • each DNS name server manages a zone (distinct area of the network) [should have a backup name server]
      • communications between servers within a zone is by zone transfer protocol
      • messages between servers outside the same zone is by UDP except for the database updates which is by TCP
      • a request to resolve a symbolic name is sent from the application to a resolver process which sends the query to the name server (if the name server knows the network address, it returns it,otherwise it sends the query to a another name server
    • Resource Records
      Resource Record format
      DomainName (variable length)
      Type of resource record(16 bit)
      Class(16 bit)
      TTL(32 bit)
      Data Length (16 bit)
      Data (variable length)
      Resource Record types and data contents
      NbrCodeDescriptionData Fields
      1ANetwork Addressnet addr
      2NSAuthoritative Name Serverdomain name of host
      5CNAMECanonical alias namealias for the machine
      6SOAStart of zone authorityadmin fields
      8MGMailbox memberdomain name of mailbox
      11WKSWell-known serviceaddress;protocol;bitmap to identify ports
      12PTRPointer to a domain namePTRDNAME
      13HINFOhost informationCPU; OS
      14MINFOmailbox infoRMAILBX(mailbox responsible for mailing lists)
      EMAILBOX(mailbox for error messages)
      15MXMail exchangePREFERENCE (precedence for delivery)
      EXCHANGE(domain name of the mail exchange host)

      ex.
      TPCI_SCO_4    IN    A    143.23.25.7
      TPCI_SCO.TPCI.COM    IN    WKS    143.23.1.34.
                      FTP TCP SMTP TELNET

    • IN-ADDR-ARPA

      frodoINA192.132.89.65
      jaringINA192.132.89.167
      routeINA192.132.89.1
      INA204.134.108.1
      merlinINA192.132.89.3

      • file indexed on name, so name-to-address mapping easy
      • address-to-name requires IN-ADDR-ARPA
        65.89.132.192.IN-ADDR-ARPA.PTRfrodo.nmhu.edu
        167.89.132.192.IN-ADDR-ARPA.PTRjaring.nmhu.edu
        89.132.192.IN-ADDR-ARPA.PTRnmhu.edu
    • Messages
      DNS Message Format
      Header
      Question
      Answer
      Authority
      (name of other name servers that might have info)
      Additional info

    • The Name Resolver
      application sends a query to the name resolver which attempts to resolve address from its cache; if not available, it passes the query to a name server (uses both UDP and TCP for queries)
      Berkeley Internet Name Domain (BIND) server provides cache and iterative query capabilities
    • Configuring a UNIX DNS Server
      1. named.hosts - defines domain with hostname-to-IP mappings
      2. named.rev - uses IN-ADDR-ARPA for IP-to-hostname mappings
      3. named.local - used to resolve the loopback driver
      4. named.ca - lists root domain servers
      5. named.boot - used to set file and database locations

      • Entering the Resource Records
        ; named.hosts files
        ; Start of Autority RR
        nmhu.edu
        hitech.merlin.nmhu.edu (
        2 ; Serial Number
        7200 ; Refresh (2 hrs)
        3600 ; Retry (1 hr)
        151200 ; Expire (1 week)
        8640 ); min TTL
        INSOAfrodo.nmhu.edu
        ;
        ; Name Service RRs
        nmhu.eduINNSfrodo.nmhu.edu
        ;
        ; Address RRs
        jaringINA192.132.89.167
        triceraINA192.132.89.173
      • Completing the DNS Files
        ; named.rev files
        ; Start of Autority RR
        89.132.192.in-addr-arpa
        hitech.merlin.nmhu.edu (
        2 ; Serial Number
        7200 ; Refresh (2 hrs)
        3600 ; Retry (1 hr)
        151200 ; Expire (1 week)
        8640 ); min TTL
        INSOAfrodo.nmhu.edu
        ;
        ; Name Service RRs
        89.132.192.in-addr-arpaINNSfrodo.nmhu.edu
        ;
        ; Address RRs
        167.89.132.192.in-addr-arpaINPTRjaring

        ; named.local files
        ; Start of Autority RR
        0.0.127.in-addr-arpa
        hitech.merlin.nmhu.edu (
        2 ; Serial Number
        7200 ; Refresh (2 hrs)
        3600 ; Retry (1 hr)
        151200 ; Expire (1 week)
        8640 ); min TTL
        INSOAfrodo.nmhu.edu
        ;
        ; Name Service RRs
        0.0.127.in-addr-arpaINNSfrodo.nmhu.edu
        ;
        ; Address RRs
        1.0.0.127.in-addr-arpaINPTRlocalhist

        ; named.ca files
        ;
        ; servers for the root domain
        ;
        99999999INNSns.nic.ddn.mil
        99999999INNSns.nasa.gov
        99999999INNSns.internic.net
        ;
        ; servers by address
        ;
        ns.nic.ddn.mil 99999999INA192.112.36.4
        ns.nasa.gov 99999999INA192.52.192.10
        ns.internic.net 99999999INA198.41.0.4

        ; named.boot
        directory/usr/lib/named
        primarynmhu.edunamed.hosts
        primary89.132.192.in-addr-arpanamed.rev
        primary0.0.127.in-addr-arpanamed.local
        cache.named.ca

      • Starting the DNS Daemons
        rc startup script should include:
        # Run DNS server if named.boot exists
        if [ -f /etc/inet/named.boot -a -x /usr/sbin/in.named ] then
            /usr/sbin/in.named
        fi

      • Configuring a Client: modify the /etc/resolv.conf file:
        domain nmhu.edu
        nameserver 192.132.89.65

  2. BOOTP Protocol (bootstrap protocol)
    alternative to RARP; uses UDP (uses checksums & sets Do Not Fragment bit; uses timers to identify lost messages) to broadcast requests for IP addresses

    • BOOTP Messages

  3. Network Time Protocol (NTP) (maintains time standards based on a standard time source); uses port 37); timestamps are the number of seconds since Jan. 1, 1900 (64 bits)

To Previous Chapter To Table of Contents To top of page To Next Chapter