CT320

CT320: Network and System Administration

Fall 2016

Domain Name System

See this page as a slide show

Domain Name System

The Problem

The Solution

Solution: The Domain Name System

DNS Development

    129.82.46.190  albany.cs.colostate.edu albany
    129.82.46.191  annapolis.cs.colostate.edu annapolis
    129.82.46.192  atlanta.cs.colostate.edu atlanta
    129.82.46.193  augusta.cs.colostate.edu augusta
    129.82.46.194  austin.cs.colostate.edu austin
    129.82.46.195  baton-rouge.cs.colostate.edu baton-rouge
    129.82.46.196  bismarck.cs.colostate.edu bismarck
    129.82.46.197  boise.cs.colostate.edu boise
    129.82.46.198  boston.cs.colostate.edu boston
    129.82.46.199  carson-city.cs.colostate.edu carson-city
    129.82.46.200  charleston.cs.colostate.edu charleston
    129.82.46.201  cheyenne.cs.colostate.edu cheyenne
    129.82.46.202  columbia.cs.colostate.edu columbia
    129.82.46.203  columbus-oh.cs.colostate.edu columbus-oh
    129.82.46.204  concord.cs.colostate.edu concord
    129.82.46.205  denver.cs.colostate.edu denver
    129.82.46.206  des-moines.cs.colostate.edu des-moines
    129.82.46.207  dover.cs.colostate.edu dover
    129.82.46.208  frankfort.cs.colostate.edu frankfort
    129.82.46.209  harrisburg.cs.colostate.edu harrisburg
    129.82.46.210  hartford.cs.colostate.edu hartford
    129.82.46.211  helena.cs.colostate.edu helena
    129.82.46.212  honolulu.cs.colostate.edu honolulu
    129.82.46.213  indianapolis.cs.colostate.edu indianapolis
    129.82.46.214  jackson.cs.colostate.edu jackson
    129.82.46.215  jefferson-city.cs.colostate.edu jefferson-city
    129.82.46.216  juneau.cs.colostate.edu juneau
    129.82.46.217  lansing.cs.colostate.edu lansing
    129.82.46.218  lincoln.cs.colostate.edu lincoln
    129.82.46.219  little-rock.cs.colostate.edu little-rock
    129.82.46.226  phoenix.cs.colostate.edu phoenix
    129.82.46.227  pierre.cs.colostate.edu pierre
    129.82.46.228  providence.cs.colostate.edu providence
    129.82.46.229  raleigh.cs.colostate.edu raleigh
    129.82.46.230  richmond.cs.colostate.edu richmond
    129.82.46.231  sacramento.cs.colostate.edu sacramento
    129.82.46.232  saint-paul.cs.colostate.edu saint-paul
    129.82.46.233  salem.cs.colostate.edu salem
    129.82.46.234  salt-lake-city.cs.colostate.edu salt-lake-city
    129.82.46.235  santa-fe.cs.colostate.edu santa-fe
    129.82.46.236  springfield.cs.colostate.edu springfield
    129.82.46.237  tallahassee.cs.colostate.edu tallahassee
    129.82.46.238  topeka.cs.colostate.edu topeka
    129.82.46.239  trenton.cs.colostate.edu trenton

An Early Centralized System:

DNS Development

DNS Today

Domain Name Service Data

A typical host name: “denver.cs.colostate.edu.” is a Fully Qualified Domain Name (FQDN) made up of parts:

Domain Name Space

A partial DNS hierarchy

                    root
                      │
           ┌──────────┼───────┬───────┐
           │          │       │       │
          edu        com     mil     se
           │          │       │       │
         ┌─┴────┐     │       │       │
         │      │     │       │       │
    colostate  mit    hp      │      mil
         │                    │
     ┌───┼────┐             ┌─┴──┐
     │   │    │             │    │
    engr cs  www           af  navy
         │                  │
     ┌───┴────┐             │
     │        │             │
    www     denver       buckley

DNS Organization

                 root
                   │
           ┌───────┼────┬────┐
          edu     com  mil  se
         ┌─┴────┐  │    │    │
    colostate  mit hp   │   mil
     ┌───┼────┐       ┌─┴──┐
    engr cs  www     af  navy
     ┌───┴────┐       │
    www     denver buckley

DNS Query and Response

┌────────┐
│ Home   │
│ laptop │
│        │
└────────┘














My laptop’s browser wants the IP address of www.colostate.edu.

Step 1

┌────────┐                           ┌────────┐                                 
│ Home   │--“www.colostate.edu?”(1)-▷│ Home   │
│ laptop │                           │ router │
│        │                           │        │
└────────┘                           └────────┘














My laptop doesn’t know the IP address, so it asks its smart friend.

Step 2

┌────────┐                           ┌────────┐                                 
│ Home   │--“www.colostate.edu?”(1)-▷│ Home   │--“www.colostate.edu?”(2)┐
│ laptop │                           │ router │                         │
│        │                           │        │                         │
└────────┘                           └────────┘                         │
                                                                        ▽
                                                           ┌─────────────┐
                                                           │             │
                                                           │             │
                                                           │             │
                                                           │             │
                                                           │   Comcast   │
                                                           │     DNS     │
                                                           │   server    │
                                                           │             │
                                                           │             │
                                                           │             │
                                                           │             │
                                                           └─────────────┘

My router doesn’t know, either, so it asks its smart friend, the Comcast server.

Step 3

┌────────┐                           ┌────────┐                                 
│ Home   │--“www.colostate.edu?”(1)-▷│ Home   │--“www.colostate.edu?”(2)┐
│ laptop │                           │ router │                         │
│        │                           │        │                         │
└────────┘                           └────────┘                         │
                                                                        ▽
                                                           ┌─────────────┐
┌────────────────────┐◁----“www.colostate.edu?”(3)---------│             │
│ j.root-servers.net │                                     │             │
└────────────────────┘                                     │             │
                                                           │             │
                                                           │   Comcast   │
                                                           │     DNS     │
                                                           │   server    │
                                                           │             │
                                                           │             │
                                                           │             │
                                                           │             │
                                                           └─────────────┘

The Comcast server doesn’t know, either, so it asks a random root server.

Step 4

┌────────┐                           ┌────────┐                                 
│ Home   │--“www.colostate.edu?”(1)-▷│ Home   │--“www.colostate.edu?”(2)┐
│ laptop │                           │ router │                         │
│        │                           │        │                         │
└────────┘                           └────────┘                         │
                                                                        ▽
                                                           ┌─────────────┐
┌────────────────────┐◁----“www.colostate.edu?”(3)---------│             │
│ j.root-servers.net │                                     │             │
└────────────────────┘-----“Ask c.edu-servers.net”(4)-----▷│             │
                                                           │             │
                                                           │   Comcast   │
                                                           │     DNS     │
                                                           │   server    │
                                                           │             │
                                                           │             │
                                                           │             │
                                                           │             │
                                                           └─────────────┘

The root server doesn’t know the IP address, but it knows who handles .edu.

Step 5

┌────────┐                           ┌────────┐                                 
│ Home   │--“www.colostate.edu?”(1)-▷│ Home   │--“www.colostate.edu?”(2)┐
│ laptop │                           │ router │                         │
│        │                           │        │                         │
└────────┘                           └────────┘                         │
                                                                        ▽
                                                           ┌─────────────┐
┌────────────────────┐◁----“www.colostate.edu?”(3)---------│             │
│ j.root-servers.net │                                     │             │
└────────────────────┘-----“Ask c.edu-servers.net”(4)-----▷│             │
                                                           │             │
┌────────────────────┐◁----“www.colostate.edu?”(5)---------│   Comcast   │
│ c.edu-servers.net  │                                     │     DNS     │
└────────────────────┘                                     │   server    │
                                                           │             │
                                                           │             │
                                                           │             │
                                                           │             │
                                                           └─────────────┘

The Comcast DNS server asks the .edu server to resolve www.colostate.edu.

Step 6

┌────────┐                           ┌────────┐                                 
│ Home   │--“www.colostate.edu?”(1)-▷│ Home   │--“www.colostate.edu?”(2)┐
│ laptop │                           │ router │                         │
│        │                           │        │                         │
└────────┘                           └────────┘                         │
                                                                        ▽
                                                           ┌─────────────┐
┌────────────────────┐◁----“www.colostate.edu?”(3)---------│             │
│ j.root-servers.net │                                     │             │
└────────────────────┘-----“Ask c.edu-servers.net”(4)-----▷│             │
                                                           │             │
┌────────────────────┐◁----“www.colostate.edu?”(5)---------│   Comcast   │
│ c.edu-servers.net  │                                     │     DNS     │
└────────────────────┘-----“Ask dns1.colostate.edu”(6)----▷│   server    │
                                                           │             │
                                                           │             │
                                                           │             │
                                                           │             │
                                                           └─────────────┘

The .edu server knows several authoritative servers for .colostate.edu.

Step 7

┌────────┐                           ┌────────┐                                 
│ Home   │--“www.colostate.edu?”(1)-▷│ Home   │--“www.colostate.edu?”(2)┐
│ laptop │                           │ router │                         │
│        │                           │        │                         │
└────────┘                           └────────┘                         │
                                                                        ▽
                                                           ┌─────────────┐
┌────────────────────┐◁----“www.colostate.edu?”(3)---------│             │
│ j.root-servers.net │                                     │             │
└────────────────────┘-----“Ask c.edu-servers.net”(4)-----▷│             │
                                                           │             │
┌────────────────────┐◁----“www.colostate.edu?”(5)---------│   Comcast   │
│ c.edu-servers.net  │                                     │     DNS     │
└────────────────────┘-----“Ask dns1.colostate.edu”(6)----▷│   server    │
                                                           │             │
┌────────────────────┐◁----“www.colostate.edu?”(7)---------│             │
│ dns1.colostate.edu │                                     │             │
└────────────────────┘                                     │             │
                                                           └─────────────┘

The Comcast server asks dns1.colostate.edu to resolve the name.

Step 8

┌────────┐                           ┌────────┐                                 
│ Home   │--“www.colostate.edu?”(1)-▷│ Home   │--“www.colostate.edu?”(2)┐
│ laptop │                           │ router │                         │
│        │                           │        │                         │
└────────┘                           └────────┘                         │
                                                                        ▽
                                                           ┌─────────────┐
┌────────────────────┐◁----“www.colostate.edu?”(3)---------│             │
│ j.root-servers.net │                                     │             │
└────────────────────┘-----“Ask c.edu-servers.net”(4)-----▷│             │
                                                           │             │
┌────────────────────┐◁----“www.colostate.edu?”(5)---------│   Comcast   │
│ c.edu-servers.net  │                                     │     DNS     │
└────────────────────┘-----“Ask dns1.colostate.edu”(6)----▷│   server    │
                                                           │             │
┌────────────────────┐◁----“www.colostate.edu?”(7)---------│             │
│ dns1.colostate.edu │                                     │             │
└────────────────────┘-----“It is 129.82.103.106”(8)------▷│             │
                                                           └─────────────┘

The dns1.colostate.edu server, on the CSU campus, replies with the IP address.

Step 9

┌────────┐                           ┌────────┐                                 
│ Home   │--“www.colostate.edu?”(1)-▷│ Home   │--“www.colostate.edu?”(2)┐
│ laptop │                           │ router │                         │
│        │                           │        │◁--“129.82.103.106”(9)   │
└────────┘                           └────────┘                     △   │
                                                                    │   ▽
                                                           ┌─────────────┐
┌────────────────────┐◁----“www.colostate.edu?”(3)---------│             │
│ j.root-servers.net │                                     │             │
└────────────────────┘-----“Ask c.edu-servers.net”(4)-----▷│             │
                                                           │             │
┌────────────────────┐◁----“www.colostate.edu?”(5)---------│   Comcast   │
│ c.edu-servers.net  │                                     │     DNS     │
└────────────────────┘-----“Ask dns1.colostate.edu”(6)----▷│   server    │
                                                           │             │
┌────────────────────┐◁----“www.colostate.edu?”(7)---------│             │
│ dns1.colostate.edu │                                     │             │
└────────────────────┘-----“It is 129.82.103.106”(8)------▷│             │
                                                           └─────────────┘

The Comcast server sends the IP address to my home router.

Step 10

┌────────┐                           ┌────────┐                                 
│ Home   │--“www.colostate.edu?”(1)-▷│ Home   │--“www.colostate.edu?”(2)┐
│ laptop │                           │ router │                         │
│        │◁--“129.82.103.106”(10)----│        │◁--“129.82.103.106”(9)   │
└────────┘                           └────────┘                     △   │
                                                                    │   ▽
                                                           ┌─────────────┐
┌────────────────────┐◁----“www.colostate.edu?”(3)---------│             │
│ j.root-servers.net │                                     │             │
└────────────────────┘-----“Ask c.edu-servers.net”(4)-----▷│             │
                                                           │             │
┌────────────────────┐◁----“www.colostate.edu?”(5)---------│   Comcast   │
│ c.edu-servers.net  │                                     │     DNS     │
└────────────────────┘-----“Ask dns1.colostate.edu”(6)----▷│   server    │
                                                           │             │
┌────────────────────┐◁----“www.colostate.edu?”(7)---------│             │
│ dns1.colostate.edu │                                     │             │
└────────────────────┘-----“It is 129.82.103.106”(8)------▷│             │
                                                           └─────────────┘

My home router tells my laptop the IP address.

Caching

That was the worst case. Really, caching occurs at all levels:

Caching

But, for how long?

Redundancy

Multiple servers for each zone in case any one server fails:

Querying

Types of DNS Servers

Types of Queries

Recursive query:

Iterated query:

DNS Caching

DNS Record Types: SOA

The Start of Authority (SOA) record defines global parameters for a “zone”:

DNS Record Types: SOA (cont.)

DNS RFC defines a text representation for records as well as a binary or “wire” representation. SOA records have the following text format:

    ; Name             TTL  Class RType Email
    acns.colostate.edu 3600 IN    SOA   dnsadmin.colostate.edu. (
        249427 ; sn
        900    ; refresh (15 min)
        600    ; retry (10 min)
        86400  ; expiry (1 day)
        3600   ; minTTL (1 hour)
    )

DNS Record Types: NS

Name Server (NS): Defines the authoritative name server(s) for a domain. Actually located both at the root of the zone and at the point of delegation in the parent zone.

The NS records for acns.colostate.edu reside in the parent zone, “colostate.edu”, like this :

    Name    TTL	Class	RecordType  Data
    acns	IN	NS	    dns1.colostate.edu
    acns	IN	NS	    dns2.colostate.edu

And they exist in the acns.colostate.edu zone where they look like:

    Name    TTL	Class	RecordType  Data
    @		IN	NS	    dns1.colostate.edu
    @		IN	NS	    dns2.colostate.edu

DNS Record Types: A, AAAA

IPv4 Address (A): Associates a name with an IPv4 address The A record for chico.cs.colostate.edu resides in the “cs.colostate.edu” zone and looks like:

    Name    TTL	Class	RecordType  Data
    www		IN	A	    129.82.45.30

IPv6 Address (AAAA): Associates a name with an IPv6 address An AAAA record looks like:

    Name    TTL	Class	RecordType  Data
    www		IN	AAAA	    2002:8152:e6d2::8052:f8d1

DNS Record Types: CNAME

Canonical Name (CNAME): Associates an alias with another DNS name record. The CNAME record for www.cs.colostate.edu looks like:

    Name    TTL	Class	RecordType  Data
    www		IN	CNAME	    parsons.cs.colostate.edu

According to the RFC, you may not create any other records with the same name as a CNAME record. Recently added exceptions for DNSSEC record types RRSIG, NSEC and KEY.

Other DNS Record Types

Others… There are ~71 record types. The other, more common records include:

DNS Forward and Reverse Lookups

This is also a tree structure, delegated in a similar fashion. All reverse space is rooted in the special domain called “IN-ADDR.ARPA”

For delegation to work as in the forward space, the networks are listed most specific to least specific. Thus CSU’s IP space (129.82.0.0) has a reverse DNS zone of “82.129.IN-ADDR.ARPA”

DNS Reverse Data Organization

chico.cs.colostate.edu

129.82.45.30

30.45.82.129.in-addr.arpa

                 root
                   │
                 arpa
                   │
                in-addr
                   │
             ┌─────┼─────┐	
            128   129   130
                   │
             ┌─────┼─────┐	
            81    82    83 
                   │
             ┌─────┼─────┐
            44    45    46 
                   │
             ┌─────┼─────┐
            29    30    31 

DNS Authorities

Internet Assigned Numbers Authority (IANA) and Internet Network Information Center (InterNIC) originally established by various US Government agencies and now run under contract by a private, non-profit organization.

Internet Corporation for Assigned Names and Numbers (ICANN) is responsible for:

DNS Registries and Registrars

DNS Registry – the authoritative source for a DNS domain.

DNS Registrar – entity authorized to manage registry data.

DNS Server Software

Dynamic DNS

Dynamic DNS (DDNS) – Allows clients to update A and PTR records on the fly. It’s handy when your ISP doesn’t guarantee a constant IP address.

DNS Commands

CommandPurpose
pingPing and incidentally reveal IP address
nslookupShow DNS record info
digGet DNS record info
hostGet DNS record info
whoisGet contact information

nslookup example

    % nslookup denver.cs.colostate.edu
    Server:         129.82.45.181
    Address:        129.82.45.181#53

    Name:   denver.cs.colostate.edu
    Address: 129.82.46.205

dig example

    % dig frii.com

    ;; ANSWER SECTION:
    frii.com.               2363    IN      A       216.17.136.180

    ;; AUTHORITY SECTION:
    frii.com.               2363    IN      NS      ns2.frii.net.
    frii.com.               2363    IN      NS      ns1.frii.net.

    ;; ADDITIONAL SECTION:
    ns1.frii.net.           430763  IN      A       216.17.128.1
    ns2.frii.net.           430763  IN      A       216.17.128.2
    ns2.frii.net.           516     IN      AAAA    2607:fa88:1::2

    ;; SERVER: 129.82.45.181#53

What is all this‽

host example

    % host amazon.com
    amazon.com has address 54.239.25.192
    amazon.com has address 54.239.25.208
    amazon.com has address 54.239.25.200
    amazon.com has address 54.239.17.6
    amazon.com has address 54.239.26.128
    amazon.com has address 54.239.17.7
    amazon.com mail is handled by 5 amazon-smtp.amazon.com.

Six different IP addresses‽

whois example

    % whois boneheads.us
    Domain Name:                BONEHEADS.US
    Sponsoring Registrar:       GODADDY.COM, INC.
    Registrar URL:              whois.godaddy.com
    Registrant Name:            Bret McKee
    Registrant Address1:        ×××× ××××××× ×××× Road
    Registrant City:            Fort Collins
    Registrant State/Province:  Colorado
    Registrant Postal Code:     80526
    Registrant Country:         United States
    Registrant Phone Number:    +1.970×××××××
    Registrant Email:           ×××××@boneheads.us

Web sites

These websites can look up things for you:

Modified: 2016-07-20T11:53

User: Guest

Check: HTML CSS
Edit History Source
Apply to CSU | Contact CSU | Disclaimer | Equal Opportunity
Colorado State University, Fort Collins, CO 80523 USA
© 2015 Colorado State University
CS Building