0% found this document useful (0 votes)
62 views23 pages

DNS (Domain Name System)

The DNS system translates between domain names that are easy for people to remember and the IP addresses used by computers to connect to each other. It uses a hierarchical system of DNS servers, where each server is responsible for a portion of the domain name space. When a user enters a domain name, their computer's DNS resolver queries the DNS servers to find the domain name's corresponding IP address in a recursive lookup process that starts at the root servers.

Uploaded by

bavobavo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views23 pages

DNS (Domain Name System)

The DNS system translates between domain names that are easy for people to remember and the IP addresses used by computers to connect to each other. It uses a hierarchical system of DNS servers, where each server is responsible for a portion of the domain name space. When a user enters a domain name, their computer's DNS resolver queries the DNS servers to find the domain name's corresponding IP address in a recursive lookup process that starts at the root servers.

Uploaded by

bavobavo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 23

DNS (Domain Name System)

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., neon.cs.virginia.edu, www.google.com, ietf.org
• The domain name system (DNS) is an Internet-wide
distributed database that translates betweem domain names
and IP addresses

• How important is DNS?


Imagine what happens when the local DNS server is down.
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.
Resolver and name server

1. An application program on a host


accesses the domain system Hostname (neon.tcpip-lab.edu)

through a DNS client, called the HTTP IP address (128.143.71.21) Resolver


resolver
2. Resolver contacts DNS server,

IP address (128.143.71.21)
called name server

(neon.tcpip-lab.edu)
Hostname
3. DNS server returns IP address to
resolver which passes the IP
address to application

Name
• Reverse lookups are also server
possible, i.e., find the hostname
given an IP address
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

• Names of hosts can be assigned without regard of location on a link layer


network, IP network or autonomous system

• 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
DNS Name hierarchy

• DNS hierarchy can be


represented by a tree
. (root)
• Below top-level
domain, administration
of name space is Top-level
delegated to org edu gov com Domains
organizations

• Each organization can uci.edu virginia.edu


delegate further Managed
by UVA
math.virginia.edu cs.virginia.edu

Managed by
CS Dept.

neon.cs.virginia.edu
Domain name system

• Each node in the DNS tree .


represents a DNS name
• Each branch below a node is a
DNS domain. edu
– DNS domain can contain
hosts or other domains
(subdomains) virginia.edu

• Example:
www.virginia.edu cs.virginia.edu
DNS domains are
., edu, virginia.edu, cs.virginia.edu

neon.cs.virginia.edu
Domain names
• 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.

cs.virginia.edu or cs.virginia.edu.

• 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 contains characters, numerals, and dash character (“-”)
• FQDNs are not case-sensitive
Top-level domains

• Three types of top-level domains:


– Generic Top Level Domains (gTLD): 3-character code
indicates the function of the organization
• Used primarily within the US
• Examples: gov, mil, edu, org, com, net
– Country Code Top Level Domain (ccTLD): 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.


Generic Top Level Domains (gTLD)

com Commercial organizations

edu Educational institutions

gov Government institutions

int International organizations

mil U.S. military institutions

net Networking organizations

org Non-profit organizations

• gTLDs are authoritatively administered by the Internet


central name registration authority ICANN
Hierarchy of name servers

• The resolution of the hierarchical


root server
name space is done by a
hierarchy of name servers

• Each server is responsible


(authoritative) for a contiguous
portion of the DNS namespace,
com server
called a zone. org server edu server gov server

• DNS server answers queries uci.edu


server
.virginia.edu
server
about hosts in its zone

cs.virginia.edu
server
DNS domain and zones

• Each zone is anchored at a


specific domain node, but zones . (root)
are not domains.
Zone
• A DNS domain is a branch of the .edu

namespace
• A zone is a portion of the DNS .uci.edu
.virginia.edu

namespace generally stored in a


file (It could consists of multiple math.virginia.edu cs.virginia.edu

nodes)

Zone
• A server can divide part of its zone and
Domain
and delegate it to other servers domain
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
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

A.ROOT-SERVERS.NET. (VeriSign, Dulles, VA) 198.41.0.4


B.ROOT-SERVERS.NET. (ISI, Marina Del Rey CA) 192.228.79.201
C.ROOT-SERVERS.NET. (Cogent Communications) 192.33.4.12
D.ROOT-SERVERS.NET. (University of Maryland) 128.8.10.90
E.ROOT-SERVERS.NET. (Nasa Ames Research Center)192.203.230.10
F.ROOT-SERVERS.NET. (Internet Systems Consortium) 192.5.5.241
G.ROOT-SERVERS.NET. (US Department of Defense) 192.112.36.4
H.ROOT-SERVERS.NET. (US Army Research Lab) 128.63.2.53
I.ROOT-SERVERS.NET. (Autonomica/NORDUnet) 192.36.148.17
J.ROOT-SERVERS.NET. (Verisign, multiple cities) 192.58.128.30
K.ROOT-SERVERS.NET. (RIPE,Europe multiple cities) 193.0.14.129
L.ROOT-SERVERS.NET. (IANA, Los Angeles) 198.32.64.12
M.ROOT-SERVERS.NET. (WIDE, Tokyo, Seoul, Paris) 202.12.27.33
Domain name resolution

1. User program issues a request


for the IP address of a hostname
Hostname (neon.tcpip-lab.edu)
2. Local resolver formulates a DNS
HTTP Resolver
query to the name server of the IP address (128.143.71.21)

host

IP address (128.143.71.21)
3. Name server checks if it is

(neon.tcpip-lab.edu)
authorized to answer the query.

Hostname
a) If yes, it responds.
b) Otherwise, it will query other
name servers, starting at the
root tree Name
server
4. When the name server has the
answer it sends it to the resolver.
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
root server
• In a recursive query, the resolver 1st query: neon.cs.virginia.edu
expects the response from the
Referral to edu name server
name server

• If the server cannot supply the 2nd query: neon.cs.virginia.edu

answer, it will send the query to Referral to virginia.edu name


the “closest known” authoritative server
name server (here: In the worst Name edu server
case, the closest known server is server rd
3 query:
neon.cs.virginia.edu
the root server)
Referral to
response

query
cs.virginia.edu
• The root sever sends a referral to name server virginia.edu
the “edu” server. Querying this server
4th query:
server yields a referral to the neon.cs.virginia.edu
server of “virginia.edu” Resolver IP address of
• … and so on neon.cs.virginia.edu
cs.virginia.edu
server
Iterative queries
root server
• In an iterative query, the name
server sends a closest known”
authoritative name server the a
Name u
referral to the root server. .ed
server a
g ini ve
r
i r r
s.v se
. c e
e on n am
• This involves more work for the y:
n du

referral to root server


r e
ue l to
resolver 1
st q
r ra
i a .ed
u
edu server
efe rgi n
R .v i e
.cs m
na

query
o n u
e d
r y :n ia.e
ue g in u
nd q vir rver i a .ed
2 o
t se g i n
e rral . c s .vir
f n
Re : neo virginia.edu
er y ed u
rd qu i a . server
3 . v irgin server
s
a l to c name
er r
Ref
Resolver 4th query:
neon.cs.virginia.edu

IP address of cs.virginia.edu
neon.cs.virginia.edu server
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”
Resource Records

• The database records of the db.mylab.com


DNS distributed data base
are called resource records $TTL 86400
mylab.com. IN SOA PC4.mylab.com.
(RR) hostmaster.mylab.com. (
1 ; serial
• Resource records are stored 28800 ; refresh
7200 ; retry
in configuration files (zone 604800 ; expire
files) at name servers. 86400 ; ttl
)

;
Resource records for a zone 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

db.mylab.com

Max. age of cached data


$TTL 86400 in seconds
mylab.com. IN SOA PC4.mylab.com.
[email protected]. ( •Start of authority (SOA) record.
1 ; serial Means: “This name server is
28800 ; refresh
authoritative for the zone
7200 ; retry
604800 ; expire
Mylab.com”
86400 ; ttl •PC4.mylab.com is the
) name server
; •[email protected] is the
mylab.com. IN NS PC4.mylab.com. email address of the person
; in charge
localhost A 127.0.0.1
PC4.mylab.com. A 10.0.1.41 Name server (NS) record.
PC3.mylab.com. A 10.0.1.31 One entry for each authoritative
PC2.mylab.com. A 10.0.1.21 name server
PC1.mylab.com. A 10.0.1.11
Address (A) records.
One entry for each hostaddress
‫درباره دامنه ها (جهت اطالع)‬

‫تعداد دامنه ها‬ ‫کاربرد اصلی‬ ‫محدودیت ثبت‬ ‫اپراتور ثبت‪NIC/‬‬ ‫تاریخ ایجاد‬ ‫نوع‬ ‫نام دامنه‬

‫حدود ‪ 80‬میلیون‬ ‫سایت شرکت ها‬ ‫ندارد‬ ‫‪VeriSign‬‬ ‫‪1985‬‬ ‫‪gTLD‬‬ ‫‪com.‬‬
‫زیرساخت شکبه‬ ‫ندارد‬ ‫‪VeriSign‬‬ ‫‪1985‬‬ ‫‪gTLD‬‬ ‫‪net.‬‬
‫حدود ‪ 8‬میلیون‬ ‫موسسات‬ ‫ندارد‬ ‫‪Public Interest‬‬ ‫‪1985‬‬ ‫‪gTLD‬‬ ‫‪org.‬‬
‫غیرتجاری‬ ‫‪Registry‬‬
‫موسسات‬ ‫موسسات‬ ‫‪Educause‬‬ ‫‪1985‬‬ ‫‪gTLD‬‬ ‫‪edu.‬‬
‫آموزشی‬ ‫آموزشی آمریکا‬
‫حدود ‪ 5‬میلیون‬ ‫سایت های‬ ‫ندارد‬ ‫‪Afilias‬‬ ‫‪2001‬‬ ‫‪gTLD‬‬ ‫‪info.‬‬
‫اطالعاتی‬
‫حدود ‪ 150‬هزار‬ ‫سایت های‬ ‫دامنه های سطح‬ ‫‪IPM‬‬ ‫‪1994‬‬ ‫‪ccTLD‬‬ ‫‪ir.‬‬
‫ایرانی‬ ‫‪ 3‬فقط برای‬
‫ایرانیان‬
‫حدود ‪ 1.5‬میلیون‬ ‫سایت های‬ ‫حضور در‬ ‫‪CIRA‬‬ ‫‪1987‬‬ ‫‪ccTLD‬‬ ‫‪ca.‬‬
‫کانادایی‬ ‫کانادا‬
‫سایت های‬ ‫آمریکایی بودن‬ ‫‪NeuStar‬‬ ‫‪1985‬‬ ‫‪ccTLD‬‬ ‫‪us.‬‬
‫آمریکایی‬

You might also like