Domain name system
1 / 38

Domain Name System - PowerPoint PPT Presentation

  • Uploaded on

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

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about ' Domain Name System' - yagil

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Domain name system
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

  • 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
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.,,,

  • 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
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
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. “”) to multiple web servers (i.e. different hosts with different IP addresses)

    • Associate “” with the IP addresses of web servers

Structure of dns names
Structure of DNS names

  • Each name consists of a sequence of alphanumeric components separated by periods

  • Examples:

  • 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

a NSI Herndon, VA

c PSInet Herndon, VA

d U Maryland College Park, MD

g DISA Vienna, VA

h ARL Aberdeen, MD

j NSI (TBD) Herndon, VA

k RIPE London

i NORDUnet Stockholm

m WIDE Tokyo

e NASA Mt View, CA

f Internet Software C. Palo Alto, CA

b USC-ISI Marina del Rey, CA

l ICANN Marina del Rey, CA

Domain Name Tree

Root Server

13 root name servers worldwide, according to 2002

Design principle of dns
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

    • All hosts on network 128.143.136/24 are in the Computer Science Department of the University of Virginia

Top level domains
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 ( used for IP address-to-name mapping

Gtlds versus cctlds
gTLDs versus ccTLDs

  • gTLDS (generic TLDs) were originally meant to be US-centric. Nowadays, only mil and govTLDs are for US.

  • ccTLDs (countrycode TLDs) used for organizations in other countries:

  • Countries define their own internal hierarchy: and are used for academic organizations in the United Kingdom and Australia. In SA, it is

Dns naming structure
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:

  • Organizations determine their own internal structure

Domain names within an organization
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 has authority to create 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 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 DNS Servers



ca DNS servers

edu DNS servers

com DNS servers

DNS servers

DNS servers

DNS servers

DNS servers

DNS servers

DNS servers

Distributed, Hierarchical Database

Root servers and TLD servers typically do not contain hostname to IP mappings; they contain mappings for locating authoritative servers.

Root name 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
Addresses of root servers













L.ROOT-SERVERS.NET. (operated by WIDE, Japan) 198.32.64


Tld and authoritative servers
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
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

An application program on a host accesses the domain system through a DNS client, called the resolver

Resolver contacts DNS server, called name server

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

Resolver and name server

Dns name hierarchy

DNS hierarchy can be represented by a tree through a DNS client, called the

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 UofT

Managed by ECE Dept.

DNS Name hierarchy

Domain name system1
Domain name system through a DNS client, called the

  • 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,,

Domain names
Domain names through a DNS client, called the

  • 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

Hierarchy of name servers
Hierarchy of name servers through a DNS client, called the

  • 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

Authority and delegation
Authority and delegation through a DNS client, called the

  • 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
DNS domain and zones through a DNS client, called the

  • 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

Primary and secondary name servers
Primary and secondary name servers through a DNS client, called the

  • 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 (“”) 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
Domain name resolution through a DNS client, called the

  • User program issues a request for the IP address of a hostname

  • Local resolver formulates a DNS query to the name server of the host

  • Name server checks if it is authorized to answer the query.

    • If yes, it responds.

    • Otherwise, it will query other name servers, starting at the root tree

  • When the name server has the answer it sends it to the resolver.

Dns server architecture
DNS server architecture through a DNS client, called the

  • 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
Recursive and Iterative Queries through a DNS client, called the

  • 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

host through a DNS client, called the wants IP address of

1. contacts its local DNS server, contacts root name server, if necessary

3. root name server eventually contacts authoritative name server,, if necessary

This is called “Recursive Resolution”

local name server

edu name server


Name Resolution

root name server










authoritative name server

requesting host

Types of queries

recursive query: through a DNS client, called the

puts burden of name resolution on contacted name server

heavy 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

local name server

edu name server


Types of Queries

root name server

iterated query









authoritative name server

requesting host

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: Root Name Servers

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)


name is some domain name (e.g.

value is hostname of authoritative name serverfor the domain

RR format: (class, name, type, value, TTL); class value set to “IN” for Internet

DNS Resource Records (RRs)

  • Type=CNAME

    • name is alias name for some “canonical” (the real) name is really

    • value is canonical name

  • Type=A

    • name is hostname

    • value is IP address

  • 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
DNS Resource Records (RRs): continued simple txt file):

  • 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.

  • Type= PTR

    • used to resolve IP-address to hostname queries

    • name is IP address (e.g.

    • value is hostname

Dns protocol messages

DNS protocol : simple txt file): queryand reply messages, both with same message format

DNS protocol, messages

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 messages1
DNS protocol, messages simple txt file):

Name, type fields

for a query

RRs in response

to query

NS records for

authoritative servers

additional “helpful”

info that may be used

Becoming part of dns
Becoming Part of DNS simple txt file):

  • Example: just created startup “Network Utopia”

  • Register name 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:

      (, NS,

      (, A,

  • Network Utopia adds it own RRs as part of the configuration of its DNS server (, for example:

    • Type A record for

    • Type MX record for

Measures to improve performance of dns
Measures to Improve Performance of DNS simple txt file):

  • 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
(DDNS) Dynamic Domain name System simple txt file):

  • 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