DNS (Domain Name System)
DNS (Domain Name System)
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
• An organization obtains authority for parts of the name space, and can
add additional layers of the hierarchy
Managed by
CS Dept.
neon.cs.virginia.edu
Domain name system
• 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.
cs.virginia.edu
server
DNS domain and zones
namespace
• A zone is a portion of the DNS .uci.edu
.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
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
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
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
;
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
تعداد دامنه ها کاربرد اصلی محدودیت ثبت اپراتور ثبت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.
آمریکایی