module 2.2: domain name system
DESCRIPTION
Module 2.2: 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 - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Module 2.2: Domain Name System](https://reader034.vdocuments.mx/reader034/viewer/2022051316/568145f9550346895db302ab/html5/thumbnails/1.jpg)
K. Salah 1
Module 2.2: 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 runs over UDP and uses port 53 of messages less than 512 bytes; otherwise, it uses TCP port 53
![Page 2: Module 2.2: Domain Name System](https://reader034.vdocuments.mx/reader034/viewer/2022051316/568145f9550346895db302ab/html5/thumbnails/2.jpg)
K. Salah 2
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
![Page 3: Module 2.2: Domain Name System](https://reader034.vdocuments.mx/reader034/viewer/2022051316/568145f9550346895db302ab/html5/thumbnails/3.jpg)
K. Salah 3
DNS naming structure
• Top level domains (right-most 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 in a top-level domain:
kfupm.edu
macdonalds.com
• Organizations determine own internal structure
ccse.kfupm.edu
cs.purdue.edu
![Page 4: Module 2.2: Domain Name System](https://reader034.vdocuments.mx/reader034/viewer/2022051316/568145f9550346895db302ab/html5/thumbnails/4.jpg)
K. Salah 4
Geographic structure
• Top-level domains are US-centric
• Geographic 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.
![Page 5: Module 2.2: Domain Name System](https://reader034.vdocuments.mx/reader034/viewer/2022051316/568145f9550346895db302ab/html5/thumbnails/5.jpg)
K. Salah 5
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 eg.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
![Page 6: Module 2.2: Domain Name System](https://reader034.vdocuments.mx/reader034/viewer/2022051316/568145f9550346895db302ab/html5/thumbnails/6.jpg)
K. Salah 6
Domain name space
• Names are defined in an inverted-tree structure with the root at the top.
• Can have 128 levels: level 0 (root) to level 127.
• Label: – Each node in the tree has a level– Maximum of 63 characters.– Root label is a null string (empty string).– Children of a node have different labels.
![Page 7: Module 2.2: Domain Name System](https://reader034.vdocuments.mx/reader034/viewer/2022051316/568145f9550346895db302ab/html5/thumbnails/7.jpg)
K. Salah 7
Domain names and labels
• Full domain name is a sequence of labels separated by dots.
• Domain names are always read from the node up to the root. Last label is the label of root (null). So, full domain name always ends in a null label [means dot].
![Page 8: Module 2.2: Domain Name System](https://reader034.vdocuments.mx/reader034/viewer/2022051316/568145f9550346895db302ab/html5/thumbnails/8.jpg)
K. Salah 8
FQDN and PQDN
• Fully Qualified Domain Name (FQDN) or Absolute Domain Name– Label is terminated by a null string.– Contains the full name of a host.
• Partially Qualified Domain Name (PQDN) or Relative Domain Name– Not terminated by a null string.– Used when the name to be resolved belongs to the same
site as the client.– Resolver supplies the missing part called as suffix.
• Why Absolute and Relative? Convenience.
![Page 9: Module 2.2: Domain Name System](https://reader034.vdocuments.mx/reader034/viewer/2022051316/568145f9550346895db302ab/html5/thumbnails/9.jpg)
K. Salah 9
Domains
• Domain: – Subtree of the domain name space.– Name of the domain is the domain name of the node
at the top of the subtree.– A domain can be divided into subdomains.
![Page 10: Module 2.2: Domain Name System](https://reader034.vdocuments.mx/reader034/viewer/2022051316/568145f9550346895db302ab/html5/thumbnails/10.jpg)
K. Salah 10
DNS and client-server computing
•DNS names are managed by a hierarchy of DNS servers
•Root server at top of tree knows about next level servers.
•Next level servers, in turn, know about lower level servers
•Some Jargon– 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
![Page 11: Module 2.2: Domain Name System](https://reader034.vdocuments.mx/reader034/viewer/2022051316/568145f9550346895db302ab/html5/thumbnails/11.jpg)
K. Salah 11
Root Name Servers
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 2005
Root Server
![Page 12: Module 2.2: Domain Name System](https://reader034.vdocuments.mx/reader034/viewer/2022051316/568145f9550346895db302ab/html5/thumbnails/12.jpg)
K. Salah 12
Choosing DNS server architecture
• Small organizations can use a single 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
• All DNS servers are linked together to form a unified system. Each server knows how to reach a root server and how to reach servers that are authorities for names further down the hierarchy.
![Page 13: Module 2.2: Domain Name System](https://reader034.vdocuments.mx/reader034/viewer/2022051316/568145f9550346895db302ab/html5/thumbnails/13.jpg)
K. Salah 13
Name Resolution
requesting hostsurf.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
intermediate name serverdns.umass.edu
7
8
host surf.eurecom.fr wants IP address of gaia.cs.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”
![Page 14: Module 2.2: Domain Name System](https://reader034.vdocuments.mx/reader034/viewer/2022051316/568145f9550346895db302ab/html5/thumbnails/14.jpg)
K. Salah 14
Types of Queries
recursive query:
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
requesting hostsurf.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
![Page 15: Module 2.2: Domain Name System](https://reader034.vdocuments.mx/reader034/viewer/2022051316/568145f9550346895db302ab/html5/thumbnails/15.jpg)
K. Salah 15
DNS caching
•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
•Servers and hosts use caching to reduce the number of DNS requests
• Cache is a list of recently resolved names and IP addresses
• Authoritative server include time-to-live with each reply
•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
![Page 16: Module 2.2: Domain Name System](https://reader034.vdocuments.mx/reader034/viewer/2022051316/568145f9550346895db302ab/html5/thumbnails/16.jpg)
K. Salah 16
DNS records
DNS: distributed db storing resource records (RR)
•Type=NS– name is domain (e.g.
foo.com)– value is IP address of
authoritative name server for this domain
RR format: (name, TTL, class, type, value)
•Type=A– name is hostname– value is IP address
•Type=CNAME– name is alias name for some
“cannonical” (the real) name www.ibm.com is really servereast.backup2.ibm.com– value is cannonical name
•Type=MX– value is name of
mailserver associated with name
Class is typically “IN” information, and TTL is in seconds
![Page 17: Module 2.2: Domain Name System](https://reader034.vdocuments.mx/reader034/viewer/2022051316/568145f9550346895db302ab/html5/thumbnails/17.jpg)
K. Salah 17
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
![Page 18: Module 2.2: Domain Name System](https://reader034.vdocuments.mx/reader034/viewer/2022051316/568145f9550346895db302ab/html5/thumbnails/18.jpg)
K. Salah 18
DNS protocol, messages
Name, type fields for a query
RRs in reponseto query
records forauthoritative servers
additional “helpful”info that may be used
![Page 19: Module 2.2: Domain Name System](https://reader034.vdocuments.mx/reader034/viewer/2022051316/568145f9550346895db302ab/html5/thumbnails/19.jpg)
K. Salah 19
Example using “dig”
The number next to MX is the preference value in case you get multiple replies.
![Page 20: Module 2.2: Domain Name System](https://reader034.vdocuments.mx/reader034/viewer/2022051316/568145f9550346895db302ab/html5/thumbnails/20.jpg)
K. Salah 20
Content distribution networks (CDNs)
• A different business model than web caching
• The content providers(CNN, Yahoo, Lycos, Google, etc) are the CDN customers.
Content replication
• CDN company (e.g. Akamai.com) installs hundreds of CDN servers throughout Internet– in lower-tier ISPs, close to
users
• CDN replicates its customers’ content in CDN servers. When provider updates content, CDN updates servers
• But how it works?
origin server in North America
CDN distribution node
CDN serverin S. America CDN server
in Europe
CDN serverin Asia
![Page 21: Module 2.2: Domain Name System](https://reader034.vdocuments.mx/reader034/viewer/2022051316/568145f9550346895db302ab/html5/thumbnails/21.jpg)
K. Salah 21
CDN example
Origin server
• www.foo.com
• Distributes only GIF files to CDN
• In each HTML page, it replaces: http://www.foo.com/sports.ruth.gif with
http://www.cdn.com/www.foo.com/sports/ruth.gif
HTTP request for
www.foo.com/sports/sports.html
DNS query for www.cdn.com
HTTP request for
www.cdn.com/www.foo.com/sports/ruth.gif
1
2
3
Origin server
CDNs authoritative DNS server
NearbyCDN server
CDN company
• cdn.com
• distributes gif files
• uses its authoritative DNS server to return the IP of the nearby CDN server
Note: No changes is required to DNS, HTTP, or browser to implement this.
![Page 22: Module 2.2: Domain Name System](https://reader034.vdocuments.mx/reader034/viewer/2022051316/568145f9550346895db302ab/html5/thumbnails/22.jpg)
K. Salah 22
More about CDNs
routing requests
•CDN creates a “map”, indicating distances from leaf ISPs and CDN nodes
•when query arrives at authoritative DNS server:
– server determines ISP from which query originates
– uses “map” to determine best CDN server
shortest distance Least loaded
not just Web pages
•streaming stored audio/video
•streaming real-time audio/video