Вы находитесь на странице: 1из 79

Domain Name System

( DNS )

Penguin Millennium

Networking Level-I

by Win Toe

What Is DNS

DNS is essential directory services for


the Internet.
It translates Internet Domain Name to IP
Address.
e.g. www.google.com => 74.125.71.147

DNS is backbone of Internet


If there is no DNS and DNS Server, there
will be no Internet

Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

History
Of
DNS
Penguin Millennium

Networking Level-I

by Win Toe

ARAPNET Advanced Research Project


Agency Network was started with a few
hosts as research project
This project was pioneer project to
become today Internet
When APARNET was small, hosts.txt file
was used for name resolution
Hosts.txt file contain unstructured IPv4
address and hostname

Penguin Millennium

Networking Level-I

by Win Toe

Hosts.txt file was stored on central


location
Every other hosts on the ARPANET
download hosts.txt file
When APARNET was small & new hosts
are less frequent, using hosts.txt was OK

Penguin Millennium

Networking Level-I

by Win Toe

But as ARPANET grew day-by-day, using


hosts.txt has the following problems
Hosts.txt file need to be downloaded more
than one time per day
Hosts.txt file size became larger daily and
unwieldy
As hosts.txt contain unstructured name &
IPv4 address, it is difficult to manage data
within it
Computer that store hosts.txt file became
overload

Penguin Millennium

Networking Level-I

by Win Toe

The problems mentioned above lead to


develop a solution with the following
needs
Distributed
Hierarchical name space
Delegate administration
Minimal Administrative overhead
Database Store with the followings req;

Well structured
Extensible data types
Virtually unlimited data size
Reasonable performance

Penguin Millennium

Networking Level-I

by Win Toe

DNS
System
Components
Penguin Millennium

Networking Level-I

by Win Toe

DNS System is composed of with the


following components
1. Domain Name Space & Resource
Record
2. Domain Name Server
3. DNS Client & Resolver

Penguin Millennium

Networking Level-I

by Win Toe

Domain
Name
Space
Penguin Millennium

Networking Level-I

by Win Toe

DNS define domain name space as inverted tree.

Penguin Millennium

Networking Level-I

by Win Toe

DNS Name Space


DNS name space is composed of labels.
There is a dot between the labels.
E.g. www.yahoo.com

Each label can be up to 63-characters


And total label length can be up to 255
characters in length.

Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

Domain Name

Domain name represent business name,


institution, etc ..
E.g. Yahoo.com, Microsoft.com, Google.com

Penguin Millennium

Networking Level-I

by Win Toe

Host Name/ FQDN Name

DNS hostname is also called fully


qualified domain name (FQDN)
FQDN Name = Computer Name +
Domain name

E.g. smtp.gmail.com, ns1.microsoft.com

Penguin Millennium

Networking Level-I

by Win Toe

Resource
Records
Penguin Millennium

Networking Level-I

by Win Toe

Resource record are records that are


stored in DNS database.

Penguin Millennium

Networking Level-I

by Win Toe

Resource Records
R Records

Descriptions

SOA

Start of Authority for a zone

IPv4 address

AAAA

IPv6 address

NS

Authoritative name servers for a given domain

PTR

Map IP address of FQDN name for reverse lookup

CNAME

Aliases name for a host

MX

Mail Exchanger for a domain

SRV

IP address of servers for specific services

WINS

IP Address of WINS server (Win-2003/2008 Only)

WINS-R

IP Address for WINS Reverse Lookup (Win2003/2008)

Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

Domain
Name
Server
Penguin Millennium

Networking Level-I

by Win Toe

DNS Server main functions


1. Store resource records and information
about domain tree in database
2. Answer client name resolution request

Penguin Millennium

Networking Level-I

by Win Toe

DNS Database

DNS server store domain name, IP


address, TTL, Mail Exchanger, etc in
hierarchical & distributed database.
This database is called DNS Database
Why DNS database is stored as
distributed ..?
Redundancy
Load balancing

Penguin Millennium

Networking Level-I

by Win Toe

DNS
Client
&
Resolver
Penguin Millennium

Networking Level-I

by Win Toe

Resolver are programs or library that run


on DNS client
DNS client use resolver for name query
operations
Resolver Functions;

Contact name server


Send name query
Extract name query
Give name query result to client

Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

Name
Server
Roles
Penguin Millennium

Networking Level-I

by Win Toe

There are three types of name servers


1. Primary/ Authoritative Name Server
2. Secondary Name Server
3. Cache Only Name Server

Penguin Millennium

Networking Level-I

by Win Toe

Primary Name Server


DNS server that store primary Zone Info for a
given domain in its local database ( Zone File)
is called Primary Name Server.
Primary Name Server
Store DNS info in its local database (Zone)
Answer name query from client

DNS info changes for a domain can only be


made on Primary Name Server level

Penguin Millennium

Networking Level-I

by Win Toe

DNS Zone
A DNS zone is admin unit for a domain
Continuous portion of domain name space
That have DNS database exist and managed
by particular organization

Each zone anchored at specific node


A zone do not need to contain complete tree
A domain can partition into several subdomains which are controlled by separate
DNS Servers
Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

Secondary Name
Secondary name server
Keep backup copy of name database from
primary name server
Answer name query from client and resolve it

The objectives;
Redundancy
Load balancing
Performance for remote locations
Penguin Millennium

Networking Level-I

by Win Toe

Master Name Server


DNS Server that acts as source of zone
database for secondary name server is
called Master Name Server
Master Name Server can be Primary or
Secondary Name server

Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

Zone Transfer
Transferring DNS Database from Master
Name Server Secondary Name Server
is called Zone Transfer
Zone transfer take places;
When Secondary Name Server starts, it
contact to Primary Name Server and start
zone transfers
Periodically according to SOA records
Penguin Millennium

Networking Level-I

by Win Toe

Primary & Secondary


IANA recommend for organization to have
at least two DNS servers for a domain
To reduce cost and maintenance, a DNS
server can be configured as Primary for a
domain & as Secondary for other domain
E.g. Ns1.a.com.mm
Ns1.b.com.mm

Penguin Millennium

- Primary for a.com.mm


- Secondary for b.com.mm
- Primary for b.com.mm
- Secondary for a.com.mm
Networking Level-I

by Win Toe

Authoritative Name Server


Authoritative name server return name
query request of client from its local zone
database
Primary & Secondary name servers are
authoritative servers for a given domain

Penguin Millennium

Networking Level-I

by Win Toe

Cache Only Name Server


Dont store resource record of any domain
Cache Only Name Server is not
authoritative for any domain
Cache only name server does;
Accept name query from client
Send name query to name server
Give name query result to client
Cache name query result for future request
Penguin Millennium

Networking Level-I

by Win Toe

Cache only name server can make better


name query performance
Most router consists of Cache Only Name
server features (called DNS Proxy )

Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

Domain
Hierarchy
Levels
Penguin Millennium

Networking Level-I

by Win Toe

Domain define different levels of authority


in hierarchical structure as below
Root Domain
Top Level Domain
Second Level Domain
Sub-domains

Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

DNS Hierarchy & TLDs

Penguin Millennium

Networking Level-I

by Win Toe

Root Domain
Top level hierarchy of domain is called root
domain
Root domain use null label and
represented by a single dot (.) in inverted
domain tree
Root domain and top-level domain are
managed by IANA

Penguin Millennium

Networking Level-I

by Win Toe

Top-level Domain
All domains under the root domain are
called top-level domain
Top level domain are assigned by
organization type and country
There are 8 top level domains in original
DNS specification
But today some top level domains are
approved e.g. .car, .video .
Penguin Millennium

Networking Level-I

by Win Toe

.com

Commercial organizations

.edu

Educational Institutions

.gov

Government organizations

.int

International organizations

.mil

Military

.net

Networking organization

.org

Non-commercial organization

.xx

Country Domains
.mm (Myanmar)
.us (USA)
.au (Australia)

Penguin Millennium

Networking Level-I

by Win Toe

Second Level Domain


Domain under the top-level domains are
called second level domain.
Second level domain are managed by the
organization that own it
For e.g. Microsoft.com is managed by
Microsoft Corp

Penguin Millennium

Networking Level-I

by Win Toe

Sub-Domains / Child Domains


Domains under the second level domains
are called sub-domain or child domains
Child domains are also managed by
organization that own domain

Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

Root
DNS
Server
Penguin Millennium

Networking Level-I

by Win Toe

There are a special DNS servers that offer


name query service to all DNS servers around
the world.
These DNS servers are called Root DNS
Server ( Root Servers)
There are currently (13) root servers

A.root-servers.net, B.root-servers.net, M.rootservers.net

Nearly all root servers run UNIX & BIND


A, C, F, I, J, K, L and M servers now exist in
multiple locations on different continents

Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

Name
Query
Process
Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

Local
Name
Reosolution
Penguin Millennium

Networking Level-I

by Win Toe

Local name resolution can be performed


with hosts file
But host file location differs with OS and
mentioned below
OS Name
Hosts File Location
------------------------------------------Win9x-ME
C:\Windows
NT-XP++
C:\Windows\system32\drivers\etc
Apple
System Folder
Linux/UNIX /etc

Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

Round
Robin
DNS
Penguin Millennium

Networking Level-I

by Win Toe

DNS Round Robin (RFC-1794)


DNS Round Robin is a technique used for
Load balancing
To avoid single point of failure

Penguin Millennium

Networking Level-I

by Win Toe

How It Works
DNS Server provide more than one IP
address of a domain to client query ( in
cycling order
1st Req: www.abc.com =>1.1.1.1, 2.2.2.2, 3.3.3.3
2nd Req: www.abc.com => 2.2.2.2, 3.3.3.3, 1.1.1.1
3rd Req: www.abc.com => 3.3.3.3, 1.1.1.1, 2.2.2.2

DNS Client use the first ip address from


list of IP Address
Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

Dynamic
DNS
Update
( DDNS Update)
Penguin Millennium

Networking Level-I

by Win Toe

What is Dynamic DNS


Before DHCP standard was defined, all
hosts are assigned static IP address and
DNS database is updated accordingly
But when DHCP was used, all DHCP
clients use dynamic IP Address
Thus it is difficult to manually update DNS
database for every hosts

Penguin Millennium

Networking Level-I

by Win Toe

To communicate among hosts, DNS info


should be always up to date
To keep up to date DNS info, DHCP
server is responsible to update DNS
database whenever it release IP address
to clients.
This is called Dynamic DNS Update (or)
DDNS Update

Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

DNS
Miscellaneous
Penguin Millennium

Networking Level-I

by Win Toe

DNS Forward Lookup


Forward lookup is just a normal lookup
You provide domain name
And you get IP Address of a domain name

Penguin Millennium

Networking Level-I

by Win Toe

Reverse Lookup
Query IP => Name resolution
Typical use of reverse query
Tracert command
Email Server
Web site blocking

Penguin Millennium

Networking Level-I

by Win Toe

Penguin Millennium

Networking Level-I

by Win Toe

Вам также может понравиться