SlideShare ist ein Scribd-Unternehmen logo
1 von 30
NEED OF DNS
 To identify an entity, the Internet uses the IP address,
which uniquely identifies the connection of a host to the
Internet. However, people prefer to use names instead of
addresses. Therefore, we need a system that can map a
name to an address or an address to a name.
HISTORY OF DNS
 When the Internet was small, mapping was done using a
host file. The host file had only two columns: one for the
name and one for the address. Every host could store the
host file on its disk and update it periodically from a
master host file. When a program or user wanted to map
a name to an address, the host consulted the host file and
found the mapping.
 Today, however, it is impossible to have one single host
file relate every address to a name and vice versa. The
host file would be too large to store in every host.
 In addition, it would be impossible to update all the host
files in the world every time there is a change.
 One solution would be to store the entire host file in a
single computer and allow access to this centralized
information to every computer that needs a mapping. But
this would create huge amount of traffic on the Internet.
INTRODUCTION
 Another solution, the one used today, is to divide this
huge information into smaller parts and store each part
on a different computer. In this method, the host that
needs mapping can contact the closest computer holding
the needed information. This method is used by the
Domain Name System (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
 In practice, allocation of the domain names generally follows the allocation of IP
address, e.g.,
 All hosts with network prefix 128.143/16 have domain name suffix
virginia.edu
 All hosts on network 128.143.136/24 are in the Computer Science
Department of the University of Virginia
NAME SPACE
 A name space that maps each address to a unique name
can be organized in two ways:
a. FLAT NAME SPACE
In this, a name is assigned to an address. A name in
this space is a sequence without structure.
Disadvantage: Cannot be used in large systems like
Internet because it must be centrally controlled to
avoid ambiguity and duplication.
b. HIERARCHIAL NAME SPACE
• Each name is made of several parts.
• The first part can define the nature of organization, the
second part can define the name, the third part can define
departments and so on.
• The authority to assign and control the name spaces can be
decentralized.
DOMAIN NAME SPACE
 To have a hierarchical name space, Domain Name Space
was designed. In this design, the names are defined in an
inverted-tree structure with the root at the top. The tree
can have only 128 levels: level 0 (root) to level 127. Each
level of the tree defines a hierarchical level.
The DNS Name Space
A portion of the Internet domain name space.
 LABEL: Each node in a tree has a label, which is a string
with a maximum of 63 characters. The root label is a null
string. DNS requires that children of a node have different
labels, which guarantees the uniqueness of the domain
names.
 DOMAIN NAME: Each node in the tree has a domain
name. A full domain name is a sequence of labels
separated by dots(.). The domain names are always read
from the node upto the root.
Domain name system
 Each node in the DNS tree represents
a DNS name
 Each branch below a node is a DNS
domain.
 DNS domain can contain hosts or
other domains (subdomains)
 Example:
DNS domains are
., edu, virginia.edu, cs.virginia.edu
virginia.edu
cs.virginia.eduwww.virginia.edu
neon.cs.virginia.edu
edu
.
 FULLY QUALIFIED DOMAIN NAME (FQDN):
 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.
 In this, the label is terminated by a null string.
 It is a domain name that contains the full name of the host.
 It contains all labels, from the most specific to the most general,
that uniquely define the host.
 PARTIALLY QUALIFIED DOMAIN NAME (PQDN)
 In this, the label is not terminated by a null string.
 A PQDN starts with a node but does not reach the root.
 It is used when the name to be resolved belongs to the same site
as the client.
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 (in-addr.arpa) used for IP
address-to-name mapping
There are more than 200 top-level domains.
Organizational top-level domains
com Commercial organizations
edu Educational institutions
gov Government institutions
int International organizations
mil U.S. military institutions
net Networking organizations
org Non-profit organizations
Hierarchy of name servers
 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
root server
com servergov serveredu serverorg server
uci.edu
server
.virginia.edu
server
cs.virginia.edu
server
DISTRIBUTION OF NAME SPACE
Authority and Delegation
 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 Domains and Zones
 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
. (root)
.virginia.edu
.edu
.uci.edu
cs.virginia.edumath.virginia.edu
Domain
Zone
and
domain
Zone
Primary and Secondary Name Servers
 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 (“gold.cs.virginia.edu”) to a zone, the
administrator adds the IP information on the host (IP address and name) to
a configuration file on the primary server
RESOURCE RECORDS
 The database records of
the distributed data base
are called resource records
(RR)
 Resource records are
stored in configuration files
(zone files) at name
servers.
 Left Resource records for a
zone:
db.mylab.com
$TTL 86400
mylab.com. IN SOA PC4.mylab.com.
hostmaster.mylab.com. (
1 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)
;
mylab.com. IN NS PC4.mylab.com.
;
localhost A 127.0.0.1
PC4.mylab.com. A 10.0.1.41
PC3.mylab.com. A 10.0.1.31
PC2.mylab.com. A 10.0.1.21
PC1.mylab.com. A 10.0.1.11
Resource Records
The principal DNS resource records types.
Resource Records
db.mylab.com
$TTL 86400
mylab.com. IN SOA PC4.mylab.com. hostmaster.mylab.com. (
1 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)
;
mylab.com. IN NS PC4.mylab.com.
;
localhost A 127.0.0.1
PC4.mylab.com. A 10.0.1.41
PC3.mylab.com. A 10.0.1.31
PC2.mylab.com. A 10.0.1.21
PC1.mylab.com. A 10.0.1.11
Max. age of cached data
in seconds
* Start of authority (SOA) record.
Means: “This name server is
authoritative for the zone
Mylab.com”
* PC4.mylab.com is the
name server
* hostmaster@mylab.com is the
email address of the person
in charge
Name server (NS) record.
One entry for each authoritative
name server
Address (A) records.
One entry for each hostaddress
Resolver and name server
1. An application program on a host
accesses the domain system through
a DNS client, called the resolver
2. Resolver contacts DNS server, called
name server
3. 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
HTTP Resolver
Hostname (neon.tcpip-lab.edu)
IP address (128.143.71.21)
Name
server
Hostname
(neon.tcpip-lab.edu)
IPaddress(128.143.71.21)
Domain name resolution
1. User program issues a request for
the IP address of a hostname
2. Local resolver formulates a DNS
query to the name server of the host
3. Name server checks if it is
authorized to answer the query.
a) If yes, it responds.
b) Otherwise, it will query other
name servers, starting at the
root tree
4. When the name server has the
answer it sends it to the resolver.
HTTP Resolver
Hostname (neon.tcpip-lab.edu)
IP address (128.143.71.21)
Name
server
Hostname
(neon.tcpip-lab.edu)
IPaddress(128.143.71.21)
Recursive and Iterative Queries
 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 name server of a host cannot
resolve a query, the server issues a query to resolve the query
 Iterative queries: When the name server of a host cannot
resolve a query, it sends a referral to another server to the
resolver
Recursive queries
 In a recursive query, the resolver
expects the response from the name
server
 If the server cannot supply the
answer, it will send the query to the
“closest known” authoritative name
server (here: In the worst case, the
closest known server is the root
server)
 The root sever sends a referral to the
“edu” server. Querying this server
yields a referral to the server of
“virginia.edu”
 … and so on
root server
edu server
virginia.edu
server
cs.virginia.edu
server
Resolver
Name
server
query
response
Referral to edu name server
1st query: neon.cs.virginia.edu
2nd query: neon.cs.virginia.edu
Referral to virginia.edu name
server
3rd
query:
neon.cs.virginia.edu
Referral to
cs.virginia.edu
name server
4th query:
neon.cs.virginia.edu
IP address of
neon.cs.virginia.edu
Iterative queries
 In an iterative query, the name server
sends a closest known authoritative
name server a referral to the root
server.
 This involves more work for the
resolver
root server
edu server
virginia.edu
server
cs.virginia.edu
server
Resolver
Name
server
query
referraltorootserver
Referral to
edu
nam
e
server
1
st query: neon.cs.virginia.edu
2
nd query: neon.cs.virginia.edu
Referral to virginia.edu name
server
3
rd query: neon.cs.virginia.edu
Referral to cs.virginia.edu
name server
4th
query:
neon.cs.virginia.edu
IP address of
neon.cs.virginia.edu
Caching
 To reduce DNS traffic, name servers caches information on
domain name/IP address mappings
 When an entry for a query is in the cache, the server does not
contact other servers
 Note: If an entry is sent from a cache, the reply from the
server is marked as “unauthoritative”
Domain name system

Weitere ähnliche Inhalte

Was ist angesagt? (20)

Domain Name System
Domain Name SystemDomain Name System
Domain Name System
 
DNS ( Domain Name System)
DNS ( Domain Name System)DNS ( Domain Name System)
DNS ( Domain Name System)
 
Domain name server
Domain name serverDomain name server
Domain name server
 
Dns 2
Dns 2Dns 2
Dns 2
 
Domain name system
Domain name systemDomain name system
Domain name system
 
DNS (Domain Name System)
DNS (Domain Name System)DNS (Domain Name System)
DNS (Domain Name System)
 
Presentation on Domain Name System
Presentation on Domain Name SystemPresentation on Domain Name System
Presentation on Domain Name System
 
Domain Name System
Domain Name SystemDomain Name System
Domain Name System
 
Intro to DNS
Intro to DNSIntro to DNS
Intro to DNS
 
DNS(Domain Name System)
DNS(Domain Name System)DNS(Domain Name System)
DNS(Domain Name System)
 
Domain name system
Domain name systemDomain name system
Domain name system
 
Dns presentation
Dns presentationDns presentation
Dns presentation
 
Dns ppt
Dns pptDns ppt
Dns ppt
 
Presentation on dns
Presentation on dnsPresentation on dns
Presentation on dns
 
Domain Name System
Domain Name SystemDomain Name System
Domain Name System
 
Dns(Domain name system)
Dns(Domain name system)Dns(Domain name system)
Dns(Domain name system)
 
DNS Record
DNS RecordDNS Record
DNS Record
 
Dns server
Dns serverDns server
Dns server
 
Chapter 29 Domain Name System.ppt
Chapter 29 Domain Name System.pptChapter 29 Domain Name System.ppt
Chapter 29 Domain Name System.ppt
 
Domain Name System (DNS)
Domain Name System (DNS)Domain Name System (DNS)
Domain Name System (DNS)
 

Ähnlich wie Domain name system (20)

Dns And Snmp
Dns And SnmpDns And Snmp
Dns And Snmp
 
The Application Layer
The Application LayerThe Application Layer
The Application Layer
 
CSE dns ppt.pptx
CSE dns ppt.pptxCSE dns ppt.pptx
CSE dns ppt.pptx
 
DNS AND DDNS
DNS AND DDNSDNS AND DDNS
DNS AND DDNS
 
Dns
DnsDns
Dns
 
Domain Name System ppt
Domain Name System pptDomain Name System ppt
Domain Name System ppt
 
Computer Networks - DNS
Computer Networks - DNSComputer Networks - DNS
Computer Networks - DNS
 
Domain name system
Domain name systemDomain name system
Domain name system
 
Linux basics andng hosti
Linux basics andng hostiLinux basics andng hosti
Linux basics andng hosti
 
Ch20 system administration
Ch20 system administration Ch20 system administration
Ch20 system administration
 
Dns
DnsDns
Dns
 
Internet dns introduction
Internet dns introductionInternet dns introduction
Internet dns introduction
 
Dns1111111111
Dns1111111111Dns1111111111
Dns1111111111
 
Domain name system presentation
Domain name system presentationDomain name system presentation
Domain name system presentation
 
6065165.ppt
6065165.ppt6065165.ppt
6065165.ppt
 
Dns
DnsDns
Dns
 
Application Layer.pptx
Application Layer.pptxApplication Layer.pptx
Application Layer.pptx
 
D.N.S
D.N.SD.N.S
D.N.S
 
Domainnamesystem
DomainnamesystemDomainnamesystem
Domainnamesystem
 
Domain Name System(ppt)
Domain Name System(ppt)Domain Name System(ppt)
Domain Name System(ppt)
 

Kürzlich hochgeladen

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Kürzlich hochgeladen (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

Domain name system

  • 1.
  • 2. NEED OF DNS  To identify an entity, the Internet uses the IP address, which uniquely identifies the connection of a host to the Internet. However, people prefer to use names instead of addresses. Therefore, we need a system that can map a name to an address or an address to a name.
  • 3. HISTORY OF DNS  When the Internet was small, mapping was done using a host file. The host file had only two columns: one for the name and one for the address. Every host could store the host file on its disk and update it periodically from a master host file. When a program or user wanted to map a name to an address, the host consulted the host file and found the mapping.  Today, however, it is impossible to have one single host file relate every address to a name and vice versa. The host file would be too large to store in every host.
  • 4.  In addition, it would be impossible to update all the host files in the world every time there is a change.  One solution would be to store the entire host file in a single computer and allow access to this centralized information to every computer that needs a mapping. But this would create huge amount of traffic on the Internet.
  • 5. INTRODUCTION  Another solution, the one used today, is to divide this huge information into smaller parts and store each part on a different computer. In this method, the host that needs mapping can contact the closest computer holding the needed information. This method is used by the Domain Name System (DNS).
  • 6. 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  In practice, allocation of the domain names generally follows the allocation of IP address, e.g.,  All hosts with network prefix 128.143/16 have domain name suffix virginia.edu  All hosts on network 128.143.136/24 are in the Computer Science Department of the University of Virginia
  • 7. NAME SPACE  A name space that maps each address to a unique name can be organized in two ways: a. FLAT NAME SPACE In this, a name is assigned to an address. A name in this space is a sequence without structure. Disadvantage: Cannot be used in large systems like Internet because it must be centrally controlled to avoid ambiguity and duplication.
  • 8. b. HIERARCHIAL NAME SPACE • Each name is made of several parts. • The first part can define the nature of organization, the second part can define the name, the third part can define departments and so on. • The authority to assign and control the name spaces can be decentralized.
  • 9. DOMAIN NAME SPACE  To have a hierarchical name space, Domain Name Space was designed. In this design, the names are defined in an inverted-tree structure with the root at the top. The tree can have only 128 levels: level 0 (root) to level 127. Each level of the tree defines a hierarchical level.
  • 10. The DNS Name Space A portion of the Internet domain name space.
  • 11.  LABEL: Each node in a tree has a label, which is a string with a maximum of 63 characters. The root label is a null string. DNS requires that children of a node have different labels, which guarantees the uniqueness of the domain names.  DOMAIN NAME: Each node in the tree has a domain name. A full domain name is a sequence of labels separated by dots(.). The domain names are always read from the node upto the root.
  • 12. Domain name system  Each node in the DNS tree represents a DNS name  Each branch below a node is a DNS domain.  DNS domain can contain hosts or other domains (subdomains)  Example: DNS domains are ., edu, virginia.edu, cs.virginia.edu virginia.edu cs.virginia.eduwww.virginia.edu neon.cs.virginia.edu edu .
  • 13.  FULLY QUALIFIED DOMAIN NAME (FQDN):  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.  In this, the label is terminated by a null string.  It is a domain name that contains the full name of the host.  It contains all labels, from the most specific to the most general, that uniquely define the host.  PARTIALLY QUALIFIED DOMAIN NAME (PQDN)  In this, the label is not terminated by a null string.  A PQDN starts with a node but does not reach the root.  It is used when the name to be resolved belongs to the same site as the client.
  • 14. 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 (in-addr.arpa) used for IP address-to-name mapping There are more than 200 top-level domains.
  • 15. Organizational top-level domains com Commercial organizations edu Educational institutions gov Government institutions int International organizations mil U.S. military institutions net Networking organizations org Non-profit organizations
  • 16. Hierarchy of name servers  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 root server com servergov serveredu serverorg server uci.edu server .virginia.edu server cs.virginia.edu server DISTRIBUTION OF NAME SPACE
  • 17. Authority and Delegation  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”.
  • 18.
  • 19. DNS Domains and Zones  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 . (root) .virginia.edu .edu .uci.edu cs.virginia.edumath.virginia.edu Domain Zone and domain Zone
  • 20. Primary and Secondary Name Servers  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 (“gold.cs.virginia.edu”) to a zone, the administrator adds the IP information on the host (IP address and name) to a configuration file on the primary server
  • 21. RESOURCE RECORDS  The database records of the distributed data base are called resource records (RR)  Resource records are stored in configuration files (zone files) at name servers.  Left Resource records for a zone: db.mylab.com $TTL 86400 mylab.com. IN SOA PC4.mylab.com. hostmaster.mylab.com. ( 1 ; serial 28800 ; refresh 7200 ; retry 604800 ; expire 86400 ; ttl ) ; mylab.com. IN NS PC4.mylab.com. ; localhost A 127.0.0.1 PC4.mylab.com. A 10.0.1.41 PC3.mylab.com. A 10.0.1.31 PC2.mylab.com. A 10.0.1.21 PC1.mylab.com. A 10.0.1.11
  • 22. Resource Records The principal DNS resource records types.
  • 23. Resource Records db.mylab.com $TTL 86400 mylab.com. IN SOA PC4.mylab.com. hostmaster.mylab.com. ( 1 ; serial 28800 ; refresh 7200 ; retry 604800 ; expire 86400 ; ttl ) ; mylab.com. IN NS PC4.mylab.com. ; localhost A 127.0.0.1 PC4.mylab.com. A 10.0.1.41 PC3.mylab.com. A 10.0.1.31 PC2.mylab.com. A 10.0.1.21 PC1.mylab.com. A 10.0.1.11 Max. age of cached data in seconds * Start of authority (SOA) record. Means: “This name server is authoritative for the zone Mylab.com” * PC4.mylab.com is the name server * hostmaster@mylab.com is the email address of the person in charge Name server (NS) record. One entry for each authoritative name server Address (A) records. One entry for each hostaddress
  • 24. Resolver and name server 1. An application program on a host accesses the domain system through a DNS client, called the resolver 2. Resolver contacts DNS server, called name server 3. 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 HTTP Resolver Hostname (neon.tcpip-lab.edu) IP address (128.143.71.21) Name server Hostname (neon.tcpip-lab.edu) IPaddress(128.143.71.21)
  • 25. Domain name resolution 1. User program issues a request for the IP address of a hostname 2. Local resolver formulates a DNS query to the name server of the host 3. Name server checks if it is authorized to answer the query. a) If yes, it responds. b) Otherwise, it will query other name servers, starting at the root tree 4. When the name server has the answer it sends it to the resolver. HTTP Resolver Hostname (neon.tcpip-lab.edu) IP address (128.143.71.21) Name server Hostname (neon.tcpip-lab.edu) IPaddress(128.143.71.21)
  • 26. Recursive and Iterative Queries  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 name server of a host cannot resolve a query, the server issues a query to resolve the query  Iterative queries: When the name server of a host cannot resolve a query, it sends a referral to another server to the resolver
  • 27. Recursive queries  In a recursive query, the resolver expects the response from the name server  If the server cannot supply the answer, it will send the query to the “closest known” authoritative name server (here: In the worst case, the closest known server is the root server)  The root sever sends a referral to the “edu” server. Querying this server yields a referral to the server of “virginia.edu”  … and so on root server edu server virginia.edu server cs.virginia.edu server Resolver Name server query response Referral to edu name server 1st query: neon.cs.virginia.edu 2nd query: neon.cs.virginia.edu Referral to virginia.edu name server 3rd query: neon.cs.virginia.edu Referral to cs.virginia.edu name server 4th query: neon.cs.virginia.edu IP address of neon.cs.virginia.edu
  • 28. Iterative queries  In an iterative query, the name server sends a closest known authoritative name server a referral to the root server.  This involves more work for the resolver root server edu server virginia.edu server cs.virginia.edu server Resolver Name server query referraltorootserver Referral to edu nam e server 1 st query: neon.cs.virginia.edu 2 nd query: neon.cs.virginia.edu Referral to virginia.edu name server 3 rd query: neon.cs.virginia.edu Referral to cs.virginia.edu name server 4th query: neon.cs.virginia.edu IP address of neon.cs.virginia.edu
  • 29. Caching  To reduce DNS traffic, name servers caches information on domain name/IP address mappings  When an entry for a query is in the cache, the server does not contact other servers  Note: If an entry is sent from a cache, the reply from the server is marked as “unauthoritative”