Domain Name Service: Introduction To The DNS DNS Components DNS Structure and Hierarchy The DNS in Context
Domain Name Service: Introduction To The DNS DNS Components DNS Structure and Hierarchy The DNS in Context
https://github.com/syaifulahdan/ 1 to
Overview
• Introduction to the DNS
• DNS Components
• DNS Structure and Hierarchy
• The DNS in Context
https://github.com/syaifulahdan/ 2 to
DNS History
• ARPANET utilized a central file HOSTS.TXT
– Contains names to addresses mapping
– Maintained by SRI’s NIC (Stanford-Research-
Institute: Network-Information-Center)
• Administrators email changes to NIC
– NIC updates HOSTS.TXT periodically
• Administrators FTP (download) HOSTS.TXT
https://github.com/syaifulahdan/ 3 to
DNS History
• As the system grew, HOSTS.TXT had
problems with:
– Scalability (traffic and load)
– Name collisions
– Consistency
• In 1984, Paul Mockapetris released the first
version (RFCs 882 and 883, superseded by
1034 and 1035 …)
https://github.com/syaifulahdan/ 4 to
The DNS is…
https://github.com/syaifulahdan/ 5 to
The DNS is also…
https://github.com/syaifulahdan/ 6 to
DNS as a Lookup Mechanism
https://github.com/syaifulahdan/ 7 to
DNS as a Database
• Keys to the database are “domain names”
– www.foo.com, 18.in-addr.arpa, 6.4.e164.arpa
• Over 200,000,000 domain names stored
• Each domain name contains one or more
attributes
– Known as “resource records”
• Each attribute individually retrievable
https://github.com/syaifulahdan/ 8 to
Global Distribution
• Data is maintained locally, but retrievable
globally
– No single computer has all DNS data
• DNS lookups can be performed by any
device
• Remote DNS data is locally cachable to
improve performance
https://github.com/syaifulahdan/ 9 to
Loose Coherency
• Each version of a subset of the database (a zone)
has a serial number
– The serial number is incremented on each database change
• Changes to the master copy of the database are
propagated to replicas according to timing set by
the zone administrator
• Cached data expires according to timeout set by
zone administrator
https://github.com/syaifulahdan/ 10 to
Scalability
https://github.com/syaifulahdan/ 11 to
Reliability
• Data is replicated
– Data from master is copied to multiple slaves
• Clients can query
– Master server
– Any of the copies at slave servers
• Clients will typically query local caches
• DNS protocols can use either UDP or TCP
– If UDP, DNS protocol handles retransmission,
sequencing, etc.
https://github.com/syaifulahdan/ 12 to
Dynamicity
https://github.com/syaifulahdan/ 13 to
Overview
https://github.com/syaifulahdan/ 14 to
The Name Space
• The name space is the structure of the DNS database
– An inverted tree with the root node at the top
• Each node has a label
– The root node has a null label, written as “”
The root node
""
second-level node second-level node second-level node second-level node second-level node
https://github.com/syaifulahdan/ 15 to
An Analogy – E.164
• Root node maintained by the ITU (call it “+”)
• Top level nodes = country codes (1, 81, etc)
• Second level nodes = regional codes (1-402, 81-3, etc.)
"+"
... 1 81 ...
16 to
Labels
• Each node in the tree must have a
label
– A string of up to 63 bytes
""
– RFCs 852 and 1123 define legal
characters for “hostnames”
• A-Z, 0-9, and “-” only with a-z
and A-Z treated as the same top-1 top-2 top-3
• Sibling nodes must have unique
labels
• The null label is reserved for the
root node foo foo foo at&t bar baz
17 to
Domain Names
• A domain name is the sequence of labels from a node to the root,
separated by dots (“.”s), read left to right
– The name space has a maximum depth of 127 levels
– Domain names are limited to 255 characters in length
• A node’s domain name identifies its position in the name space
""
dakota tornado
18 to
Subdomains
https://github.com/syaifulahdan/ 19 to
Delegation
• Administrators can create subdomains to group hosts
– According to geography, organizational affiliation etc.
https://github.com/syaifulahdan/ 20 to
Delegation Creates Zones
https://github.com/syaifulahdan/ 21 to
Dividing a Domain into Zones
nominum.com
domain
nominum.com
""
zone
22 to
Overview
https://github.com/syaifulahdan/ 23 to
Name Servers
25 to
Types of Name Servers
https://github.com/syaifulahdan/ 26 to
Name Server Architecture
https://github.com/syaifulahdan/ 27 to
Name Server Architecture
Name Server Process Zone
From data
Authoritative Data
disk file
(primary master and Master
slave zones) Zone transfer server
Cache Data
(responses from
other name servers)
Agent
(looks up queries
on behalf of resolvers)
28 to
Authoritative Data
Name Server Process
Authoritative Data
(primary master and
slave zones)
Response
Cache Data
(responses from
other name servers)
Agent
(looks up queries
Resolver
on behalf of resolvers) Query
29 to
Using Other Name Servers
Name Server Process
Authoritative Data
(primary master and
slave zones)
Cache Data Response
(responses from Response
other name servers) Another
name
Agent server
Query
(looks up queries
Resolver
on behalf of resolvers) Query
30 to
Cached Data
Name Server Process
Authoritative Data
(primary master and
slave zones)
Response
Cache Data
(responses from
other name servers)
Agent
(looks up queries
Query Resolver
on behalf of resolvers)
31 to
Overview
• Introduction to the DNS
• DNS Components
– The name space
– The servers
– The resolvers
• DNS Structure and Hierarchy
• The DNS in Context
https://github.com/syaifulahdan/ 32 to
Name Resolution
https://github.com/syaifulahdan/ 33 to
Name Resolution
annie.west.sprockets.com
ping www.nominum.com.
https://github.com/syaifulahdan/ 35 to
The Resolution Process
• The workstation annie asks its configured name
server, dakota, for www.nominum.com’s address
dakota.west.sprockets.com
annie.west.sprockets.com
ping www.nominum.com.
https://github.com/syaifulahdan/ 36 to
The Resolution Process
• The name server dakota asks a root name server, m, for
www.nominum.com’s address
m.root-servers.net
dakota.west.sprockets.com
annie.west.sprockets.com
ping www.nominum.com.
https://github.com/syaifulahdan/ 37 to
The Resolution Process
• The root server m refers dakota to the com name servers
• This type of response is called a “referral”
m.root-servers.net
dakota.west.sprockets.com Here’s a list of the
com name servers.
Ask one of them.
https://github.com/syaifulahdan/ 38 to
The Resolution Process
• The name server dakota asks a com name server, f,
for www.nominum.com’s address
What’s the IP address
of
www.nominum.com?
m.root-servers.net
dakota.west.sprockets.com
f.gtld-servers.net
https://github.com/syaifulahdan/ 39 to
The Resolution Process
• The com name server f refers dakota to the
nominum.com name servers
Here’s a list of the
nominum.com
name servers.
Ask one of them.
m.root-servers.net
dakota.west.sprockets.com
f.gtld-servers.net
https://github.com/syaifulahdan/ 40 to
The Resolution Process
• The name server dakota asks a nominum.com name server,
ns1.sanjose, for www.nominum.com’s address
What’s the IP address
of
www.nominum.com?
m.root-servers.net
dakota.west.sprockets.com
ns1.sanjose.nominum.net
f.gtld-servers.net
annie.west.sprockets.com
ping www.nominum.com.
https://github.com/syaifulahdan/ 41 to
The Resolution Process
• The nominum.com name server ns1.sanjose
responds with www.nominum.com’s address
m.root-servers.net
dakota.west.sprockets.com
ping www.nominum.com.
annie.west.sprockets.com
https://github.com/syaifulahdan/ 42 to
The Resolution Process
• The name server dakota responds to annie with
www.nominum.com’s address
Here’s the IP
address for
www.nominum.com
m.root-servers.net
dakota.west.sprockets.com
ns1.sanjose.nominum.net
f.gtld-servers.net
ping www.nominum.com.
annie.west.sprockets.com
https://github.com/syaifulahdan/ 43 to
Resolution Process (Caching)
• After the previous query, the name server dakota now knows:
– The names and IP addresses of the com name servers
– The names and IP addresses of the nominum.com name servers
– The IP address of www.nominum.com
• Let’s look at the resolution process again
annie.west.sprockets.com
ping ftp.nominum.com.
https://github.com/syaifulahdan/ 44 to
Resolution Process (Caching)
• The workstation annie asks its configured name
server, dakota, for ftp.nominum.com’s address
m.root-servers.net
dakota.west.sprockets.com
f.gtld-servers.net
annie.west.sprockets.com
ping ftp.nominum.com.
https://github.com/syaifulahdan/ 45 to
Resolution Process (Caching)
• dakota has cached a NS record indicating ns1.sanjose is an
nominum.com name server, so it asks it for
ftp.nominum.com’s address
What’s the IP address
of ftp.nominum.com?
m.root-servers.net
dakota.west.sprockets.com
ns1.sanjose.nominum.net
f.gtld-servers.net
annie.west.sprockets.com
ping ftp.nominum.com.
https://github.com/syaifulahdan/ 46 to
Resolution Process (Caching)
• The nominum.com name server ns1.sanjose
responds with ftp.nominum.com’s address
m.root-servers.net
dakota.west.sprockets.com
Here’s the IP
address for ns1.sanjose.nominum.net
ftp.nominum.com
f.gtld-servers.net
annie.west.sprockets.com
ping ftp.nominum.com.
https://github.com/syaifulahdan/ 47 to
Resolution Process (Caching)
• The name server dakota responds to annie with
ftp.nominum.com’s address
Here’s the IP
address for
ftp.nominum.com
m.root-servers.net
dakota.west.sprockets.com
ns1.sanjose.nominum.net
f.gtld-servers.net
annie.west.sprockets.com
ping ftp.nominum.com.
https://github.com/syaifulahdan/ 48 to
Iterative Name Resolution
https://github.com/syaifulahdan/ 49 to
Recursive Name Resolution (1)
• The principle of recursive name resolution.
https://github.com/syaifulahdan/ 50 to
Recursive Name Resolution (2)
Server for Should Passes to Receives Returns to
Looks up
node resolve child and caches requester
Performance-wise,
Which
How about
works betterwhich
communication is cost?
better?
with caching?
https://github.com/syaifulahdan/ 52 to
Iterative versus Recursive
Resolution (2)
• Performance-wise, which is better?
– Recursive method puts higher performance demand
on each name server
https://github.com/syaifulahdan/ 54 to
Overview
https://github.com/syaifulahdan/ 55 to
DNS Structure and Hierarchy
• The DNS imposes no constraints on how the DNS
hierarchy is implemented except:
– A single root
– The label restrictions
– So, can we create a host with a name a.wonderful.world?
• If a site is not connected to the Internet, it can use any
domain hierarchy it chooses
– Can make up whatever TLDs (top level domains) you want
• Connecting to the Internet implies use of the existing
DNS hierarchy
https://github.com/syaifulahdan/ 56 to
Top-level Domain (TLD) Structure
• In 1983 (RFC 881), the idea was to have TLDs correspond
to network service providers
– e.g., ARPA, DDN, CSNET, etc.
• Bad idea: if your network changes, your name changes
• By 1984 (RFC 920), functional domains was established
– e.g., GOV for Government, COM for commercial, EDU for
education, etc.
• RFC 920 also
– Provided country domains
– Provided “Multiorganizations”
• Large, composed of other (particularly international) organizations
– Provided a stable TLD structure until 1996 or so
https://github.com/syaifulahdan/ 57 to
The Current TLDs
"."
ORG DZ EDU
Other Organizations Algeria Educational Institutions
...
YU
Yugoslavia
ZM
Zambia
ZW
Zimbabwe
58 to
Internet Corporation for Assigned
Names and Numbers (ICANN)
• ICANN’s role: to oversee the management of
Internet resources including
– Addresses
• Delegating blocks of addresses to the regional registries
– Protocol identifiers and parameters
• Allocating port numbers, etc.
– Names
• Administration of the root zone file
• Oversee the operation of the root name servers
https://github.com/syaifulahdan/ 59 to
The Root Nameservers
• The root zone file lists the names and IP addresses
of the authoritative DNS servers for all top-level
domains (TLDs)
61 to
Registries, Registrars, and Registrants
• A classification of roles in the operation of a domain name space
• Registry
– the name space’s database
– the organization which has edit control of that database
– the organization which runs the authoritative name servers for that
name space
• Registrar
– the agent which submits change requests to the registry on behalf of
the registrant
• Registrant
– the entity which makes use of the domain name
https://github.com/syaifulahdan/ 62 to
Registries, Registrars, and Registrants
Registry updates Master
zone updated
Registry Zone DB
Slaves
Registrar submits
updated
add/modify/delete
to registry
Registrants
63 to
Verisign: the registry and
registrar for gTLDs
• .COM, .NET, and .ORG
– By far the largest top level domains on the Internet
today
https://github.com/syaifulahdan/ 64 to
Overview
• Introduction to the DNS
• DNS Components
• DNS Hierarchy
• The DNS in Context
https://github.com/syaifulahdan/ 65 to
Load Concerns
• DNS can handle the load
– DNS root servers get approximately 3000
queries per second
• Empirical proofs (DDoS attacks) show root name
servers can handle 50,000 queries per second
– Limitation is network bandwidth, not the DNS protocol
– in-addr.arpa zone, which translates numbers to
names, gets about 2000 queries per second
https://github.com/syaifulahdan/ 66 to
https://github.com/syaifulahdan/ 67 to
Performance Concerns
• DNS is a very lightweight protocol
– Simple query – response
• Any performance limitations are the result
of network limitations
– Speed of light
– Network congestion
– Switching/forwarding latencies
https://github.com/syaifulahdan/ 68 to
Security Concerns
• Base DNS protocol (RFC 1034, 1035) is insecure
– DNS spoofing (cache poisoning) attacks are possible
• DNS Security Enhancements (DNSSEC, RFC
2565) remedies this flaw
– But creates new ones
• DoS attacks
• Amplification attacks
• DNSSEC strongly discourages large flat zones
– Hierarchy (delegation) is good
https://github.com/syaifulahdan/ 69 to
Questions?
70 to