SlideShare a Scribd company logo
1 of 28
A
Presentation
On
“Domain Name Server”
by: Vipul Vaid
History of DNS
 Through the 1970s, the ARPAnet was a small, friendly
community of a few hundred hosts. A single file,
HOSTS.TXT, contained a name-to-address mapping for
every host connected to the ARPAnet. The familiar Unix
host table, /etc/hosts, was compiled from HOSTS.TXT
(mostly by deleting fields Unix didn't use).
 As the ARPAnet grew, however, this scheme became
unworkable. The size of HOSTS.TXT grew in proportion
to the growth in the number of ARPAnet hosts.
 Problems with HOSTS.TXT
 Consistency
 Name collision
“The Domain Name System”
What is DNS ?
 The Domain Name System is a distributed database with
hierarchal structure and serve the basis for name
resolution process in TCP/IP network.
 Domain Name System (DNS) converts the name of a
Web site (www.vipul.com) to an IP address
(65.115.71.34) and vice-versa.
 This IP is the IP address of a Web site's server, not the
Web site's name, and is used in routing traffic over the
Internet.
Key Components of DNS
 Domain namespace
 Zones
 Nameservers
 Resolver
Domain namespace
 DNS namespace is the hierarchical structure of the
domain name tree. It is defined such that the names of
all similar components must be similarly structured, but
similarly identifiable. The full DNS name must point to a
particular address.
host: mail
 The mail is the host configured in the google.com
domain. The fully qualified domain name (FQDN) of the
host mail is mail.google.com. No two hosts can have the
same FQDN.
Root '.'
edu
com
gov
org
dtd
www mail
google
sales
support training
microsoft
Zones
• All top-level domains, and many domains at the
second and lower levels, are broken into zones.
• Zones: smaller, more manageable units by
delegation.
Name server
 The programs that store information about the domain
namespace are called nameservers. Nameservers
generally have complete information about some part of
the domain namespace, called a zone
 Primary name server (Master)
 Secondary name server (Slave)
microsoft
sales
support training
Master
Slave
Resource
Record
Resolver
 Resolvers are the clients that access nameservers.
Programs running on a host that need information from
the domain namespace use the resolver. The resolver
handles:
 Querying a nameserver.
 Interpreting responses (which may be resource
records or an error).
 Returning the information to the programs that
requested it.
 In BIND, the resolver is a set of library routines that is
linked to programs.
 Ex. gethostbyname() in standard socket library
inC programming language.
What is DNS query
 A query is a request for name resolution to a DNS
server. There are two types of queries: recursive and
iterative.
 Recursive
 The queried nameserver is obliged to respond with the
requested data or with an error.
 Iterative
 In iterative resolution, a nameserver simply gives the best
answer it already knows back to the querier. No additional
querying is required.
query for
1. www.yahoo.com?
client
www.yahoo.com
Root name server
Local DNS
.com DNS
yahoo.com DNS
8. 65.10.2.2
How Iterative
query works
client
Local DNS
Root Name server
.com
yahoo.com
4.
www.yahoo.com?
1. Recursive query for
www.yahoo.com?
Host : www
5.
65.10.2.2
8. 65.10.2.2
How Recursive
Query Works
Host : mail
Master Server Slave Server
1. SOA Request
2. SOA Response
3. AXFR / IXFR Request
DNS DNS
4. Full / Partial zone file transfer
How Zone Transfer Works
INTRANET
INTERNET
Forwarder
Local Name server
Client
vipul.com domain(not connected to internet directly)
google.com
yahoo.com
hotmail.com
1. www.google.com ?
3. www.google.com ?
How Forwarder Works
4. 65.29.4.2
6. 65.29.4.2
Some domain
connected
to internet
Installation
 Packages
 bind,bind-utils
 Daemons
 /usr/sbin/named
 Scripts
 /etc/init.d/named
 Ports
 53/{tcp,udp}
 Configuration
 /etc/named.conf ,/var/named/*
 Related
 caching-nameserver, bind-chroot
Configuring DNS
 Main configuration file
 /etc/named.conf
 It define access controls
 Defines listing interfaces
 List authoritative zones (collection of records)
 Other global configuration
 Recursive query or not
 etc.
/etc/named.conf
acl “mynetwork” { 192.168.0.0/24; };
options {
listen-on port 53 { 127.0.0.1 ; 192.168.0.254 ; };
directory "/var/named";
allow-query { mynetwork ; };
allow-recursion { none ; };
// allow-transfer { any; };
// forwarders { 0.0.0.0; };
recursion no;
};
/etc/named.conf cont.
// zone declaration
zone “vipul.com” in { // forward zone
type master;
file “vipul.com.db”; };
zone “0.168.192.in-addr.arpa” in { // reverse zone
type master;
File “192.168.0.db”; };
zone “0.0.127.in-addr.arpa” in { // localhost zone
type master;
file “127.0.0.db”; };
Resource Records
NOTE: A resource record (RR) is a standard DNS database structure
containing information used to process DNS queries
Type Meaning Value
SOA Start of Authority Parameter for this zone
A address 32 bit integer
MX Mail exchange Domain willing to accept
mail
NS Name server Domain name
PTR pointer Alias of an IP address
HINFO Host description CPU and OS info
TXT text Uninterpreted ASCII text
Forward zone
$TTL 3D
vipul.com. IN SOA ns.vipul.com. root.vipul.com (
42;
3H;
15M;
1W;
1D; )
vipul.com. IN NS ns.vipul.com.
vipul.com. IN MX mail.vipul.com.
localhost.vipul.com. IN A 127.0.0.1
ns.vipul.com IN A 192.168.0.254
n1.vipul.com IN A 192.168.0.1
n2.vipul.com IN A 192.168.0.2
www IN CNAME ns
carrie IN CNAME n1
Shrek IN CNAME n2
mail IN CNAME ns
Reverse zone for
192.168.0.0/24
$TTL 3D
0.168.192.in addr.arrpa. IN SOA ns.vipul.com. root.vipul.com. (
42 ; serial
3H ; slave refresh
15M ;slave retry
1W ;slave timeout
1D ; minimum cache TTL for negative answer
)
0.168.192.in-addr.arpa. IN NS ns.vipul.com.
0.168.192.in-addr.arpa. IN MX mail.vipul.com.
254.0.168.192.in-addr.arpa IN PTR ns.vipul.com.
1.0.168.192.in-addr.arpa IN PTR n1.vipul.com.
2.0.168.192.in-addr.arpa IN PTR n2.vipul.com.
Reverse zone for 127.0.0.0/8
$TTL 3D
0.0.127.in addr.arrpa. IN SOA ns.vipul.com. root.vipul.com. (
42 ; serial
3H ; slave refresh
15M ;slave retry
1W ;slave timeout
1D ; minimum cache TTL for negative answer
)
0.0.127.in-addr.arpa. IN NS ns.vipul.com.
0.0.127.in-addr.arpa. IN MX mail.vipul.com.
1.0.0.127.in-addr.arpa IN PTR localhost.
Check for errors
 named-checkconf
 Command use to check /etc/named.conf for
errors
 named-checkzone
 Command used to check zone database files
Starting bind
 All named related files should be accessible by named
 chown root:named /var/named/vipul.com.db
 chown root:named /var/named/192.168.0.db
 chown root:named /var/named/127.0.0.db
 Turn selinux off if not familiar: setenforce 0
 To start named deamon
 service named start , or
 /etc/init.d/named start
Resolver Configuration
 /etc/nsswitch
 hosts: dns files
 /etc/resolv.conf
 On Clients
 search vipul.com
 nameserver 192.168.0.254
 On Server
 nameserver 127.0.0.1
Resolver Client
 gethostip
 Queries using stub resolver.
 host and dig
 Only query DNS (not /etc/hosts).
 more flexible and powerful then gethostip.
 host provides concise output by default.
 Dig provide verbose output by default.
 nslookup
 Standard DNS query tool.
 Interactive and non interactive mode.
Conclusion
• DNS serve the basis for name resolution process on internet. DNS consists of the
domain namespace, name servers that store resource records, and DNS resolvers.
• A domain is a branch of the DNS namespace beginning at its root node. All of the
resource records in a domain are stored in zones on DNS servers. A zone is a
contiguous portion of a DNS domain whose information is stored in a file on a DNS
server.
• On the Internet, DNS consists of the root domain, top-level domains, and second-
level domains. IANA manages the names and DNS servers of the root domain and the
top-level domains. Individual organizations are responsible for managing the names in
their second-level domains.
• DNS resolvers use either recursive or iterative queries
• Forward lookups provide an IP address based on an FQDN. Reverse lookups provide
an FQDN based on an IP address.
• Zone transfers can transfer either the entire zone file (known as a full zone transfer) or
just the records that have changed (known as an incremental zone transfer). DNS
Notify is a standard mechanism by which a master name server notifies secondary
name servers to check .
Query?
Reach me at vipul.vid@gmail.com

More Related Content

What's hot

How to configure dns server(2)
How to configure dns server(2)How to configure dns server(2)
How to configure dns server(2)Amandeep Kaur
 
Domain name system
Domain name systemDomain name system
Domain name systemDiwaker Pant
 
Chapter 29 Domain Name System.ppt
Chapter 29 Domain Name System.pptChapter 29 Domain Name System.ppt
Chapter 29 Domain Name System.pptwebhostingguy
 
DNS - Domain Name System
DNS - Domain Name SystemDNS - Domain Name System
DNS - Domain Name SystemPeter R. Egli
 
Domain name server
Domain name serverDomain name server
Domain name serverMobile88
 
DNS server configuration
DNS server configurationDNS server configuration
DNS server configurationSanguine_Eva
 
DNS(Domain Name System)
DNS(Domain Name System)DNS(Domain Name System)
DNS(Domain Name System)Vishal Mittal
 
Subnetting (FLSM & VLSM) with examples
Subnetting (FLSM & VLSM) with examplesSubnetting (FLSM & VLSM) with examples
Subnetting (FLSM & VLSM) with examplesKrishna Mohan
 
Computer Networking: Subnetting and IP Addressing
Computer Networking: Subnetting and IP AddressingComputer Networking: Subnetting and IP Addressing
Computer Networking: Subnetting and IP AddressingBisrat Girma
 
Presentation on dns
Presentation on dnsPresentation on dns
Presentation on dnsAnand Grewal
 
Presentation on Domain Name System
Presentation on Domain Name SystemPresentation on Domain Name System
Presentation on Domain Name SystemChinmay Joshi
 

What's hot (20)

How to configure dns server(2)
How to configure dns server(2)How to configure dns server(2)
How to configure dns server(2)
 
Domain name system
Domain name systemDomain name system
Domain name system
 
Dns
DnsDns
Dns
 
Domain Name System (DNS)
Domain Name System (DNS)Domain Name System (DNS)
Domain Name System (DNS)
 
Chapter 29 Domain Name System.ppt
Chapter 29 Domain Name System.pptChapter 29 Domain Name System.ppt
Chapter 29 Domain Name System.ppt
 
DNS - Domain Name System
DNS - Domain Name SystemDNS - Domain Name System
DNS - Domain Name System
 
Dns 2
Dns 2Dns 2
Dns 2
 
Dns presentation
Dns presentationDns presentation
Dns presentation
 
Domain name server
Domain name serverDomain name server
Domain name server
 
DNS server configuration
DNS server configurationDNS server configuration
DNS server configuration
 
DNS(Domain Name System)
DNS(Domain Name System)DNS(Domain Name System)
DNS(Domain Name System)
 
Subnetting (FLSM & VLSM) with examples
Subnetting (FLSM & VLSM) with examplesSubnetting (FLSM & VLSM) with examples
Subnetting (FLSM & VLSM) with examples
 
DHCP Protocol
DHCP ProtocolDHCP Protocol
DHCP Protocol
 
DHCP
DHCPDHCP
DHCP
 
Computer Networking: Subnetting and IP Addressing
Computer Networking: Subnetting and IP AddressingComputer Networking: Subnetting and IP Addressing
Computer Networking: Subnetting and IP Addressing
 
Presentation on dns
Presentation on dnsPresentation on dns
Presentation on dns
 
Domain name system
Domain name systemDomain name system
Domain name system
 
DHCP
DHCPDHCP
DHCP
 
Presentation on Domain Name System
Presentation on Domain Name SystemPresentation on Domain Name System
Presentation on Domain Name System
 
Vlsm
VlsmVlsm
Vlsm
 

Similar to Domain Name Server (20)

Dns
DnsDns
Dns
 
Dns
DnsDns
Dns
 
Dns
DnsDns
Dns
 
CSE dns ppt.pptx
CSE dns ppt.pptxCSE dns ppt.pptx
CSE dns ppt.pptx
 
Domainnamesystem
DomainnamesystemDomainnamesystem
Domainnamesystem
 
Domain Name System ppt
Domain Name System pptDomain Name System ppt
Domain Name System ppt
 
D.N.S
D.N.SD.N.S
D.N.S
 
Dns And Snmp
Dns And SnmpDns And Snmp
Dns And Snmp
 
Linux basics andng hosti
Linux basics andng hostiLinux basics andng hosti
Linux basics andng hosti
 
Wintel
WintelWintel
Wintel
 
Dns1111111111
Dns1111111111Dns1111111111
Dns1111111111
 
DNS for Developers - NDC Oslo 2016
DNS for Developers - NDC Oslo 2016DNS for Developers - NDC Oslo 2016
DNS for Developers - NDC Oslo 2016
 
What is dns
What is dnsWhat is dns
What is dns
 
Introduction
IntroductionIntroduction
Introduction
 
Lecture 5- url-dns
Lecture  5- url-dnsLecture  5- url-dns
Lecture 5- url-dns
 
Domain Name Service
Domain Name ServiceDomain Name Service
Domain Name Service
 
Dns
DnsDns
Dns
 
008094493.pdf
008094493.pdf008094493.pdf
008094493.pdf
 
DHCP
DHCPDHCP
DHCP
 
Domain name system
Domain name systemDomain name system
Domain name system
 

Recently uploaded

Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 

Recently uploaded (20)

Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 

Domain Name Server

  • 2. History of DNS  Through the 1970s, the ARPAnet was a small, friendly community of a few hundred hosts. A single file, HOSTS.TXT, contained a name-to-address mapping for every host connected to the ARPAnet. The familiar Unix host table, /etc/hosts, was compiled from HOSTS.TXT (mostly by deleting fields Unix didn't use).  As the ARPAnet grew, however, this scheme became unworkable. The size of HOSTS.TXT grew in proportion to the growth in the number of ARPAnet hosts.  Problems with HOSTS.TXT  Consistency  Name collision
  • 3. “The Domain Name System”
  • 4. What is DNS ?  The Domain Name System is a distributed database with hierarchal structure and serve the basis for name resolution process in TCP/IP network.  Domain Name System (DNS) converts the name of a Web site (www.vipul.com) to an IP address (65.115.71.34) and vice-versa.  This IP is the IP address of a Web site's server, not the Web site's name, and is used in routing traffic over the Internet.
  • 5. Key Components of DNS  Domain namespace  Zones  Nameservers  Resolver
  • 6. Domain namespace  DNS namespace is the hierarchical structure of the domain name tree. It is defined such that the names of all similar components must be similarly structured, but similarly identifiable. The full DNS name must point to a particular address. host: mail  The mail is the host configured in the google.com domain. The fully qualified domain name (FQDN) of the host mail is mail.google.com. No two hosts can have the same FQDN. Root '.' edu com gov org dtd www mail google
  • 7. sales support training microsoft Zones • All top-level domains, and many domains at the second and lower levels, are broken into zones. • Zones: smaller, more manageable units by delegation.
  • 8. Name server  The programs that store information about the domain namespace are called nameservers. Nameservers generally have complete information about some part of the domain namespace, called a zone  Primary name server (Master)  Secondary name server (Slave) microsoft sales support training Master Slave Resource Record
  • 9. Resolver  Resolvers are the clients that access nameservers. Programs running on a host that need information from the domain namespace use the resolver. The resolver handles:  Querying a nameserver.  Interpreting responses (which may be resource records or an error).  Returning the information to the programs that requested it.  In BIND, the resolver is a set of library routines that is linked to programs.  Ex. gethostbyname() in standard socket library inC programming language.
  • 10. What is DNS query  A query is a request for name resolution to a DNS server. There are two types of queries: recursive and iterative.  Recursive  The queried nameserver is obliged to respond with the requested data or with an error.  Iterative  In iterative resolution, a nameserver simply gives the best answer it already knows back to the querier. No additional querying is required.
  • 11. query for 1. www.yahoo.com? client www.yahoo.com Root name server Local DNS .com DNS yahoo.com DNS 8. 65.10.2.2 How Iterative query works
  • 12. client Local DNS Root Name server .com yahoo.com 4. www.yahoo.com? 1. Recursive query for www.yahoo.com? Host : www 5. 65.10.2.2 8. 65.10.2.2 How Recursive Query Works Host : mail
  • 13. Master Server Slave Server 1. SOA Request 2. SOA Response 3. AXFR / IXFR Request DNS DNS 4. Full / Partial zone file transfer How Zone Transfer Works
  • 14. INTRANET INTERNET Forwarder Local Name server Client vipul.com domain(not connected to internet directly) google.com yahoo.com hotmail.com 1. www.google.com ? 3. www.google.com ? How Forwarder Works 4. 65.29.4.2 6. 65.29.4.2 Some domain connected to internet
  • 15. Installation  Packages  bind,bind-utils  Daemons  /usr/sbin/named  Scripts  /etc/init.d/named  Ports  53/{tcp,udp}  Configuration  /etc/named.conf ,/var/named/*  Related  caching-nameserver, bind-chroot
  • 16. Configuring DNS  Main configuration file  /etc/named.conf  It define access controls  Defines listing interfaces  List authoritative zones (collection of records)  Other global configuration  Recursive query or not  etc.
  • 17. /etc/named.conf acl “mynetwork” { 192.168.0.0/24; }; options { listen-on port 53 { 127.0.0.1 ; 192.168.0.254 ; }; directory "/var/named"; allow-query { mynetwork ; }; allow-recursion { none ; }; // allow-transfer { any; }; // forwarders { 0.0.0.0; }; recursion no; };
  • 18. /etc/named.conf cont. // zone declaration zone “vipul.com” in { // forward zone type master; file “vipul.com.db”; }; zone “0.168.192.in-addr.arpa” in { // reverse zone type master; File “192.168.0.db”; }; zone “0.0.127.in-addr.arpa” in { // localhost zone type master; file “127.0.0.db”; };
  • 19. Resource Records NOTE: A resource record (RR) is a standard DNS database structure containing information used to process DNS queries Type Meaning Value SOA Start of Authority Parameter for this zone A address 32 bit integer MX Mail exchange Domain willing to accept mail NS Name server Domain name PTR pointer Alias of an IP address HINFO Host description CPU and OS info TXT text Uninterpreted ASCII text
  • 20. Forward zone $TTL 3D vipul.com. IN SOA ns.vipul.com. root.vipul.com ( 42; 3H; 15M; 1W; 1D; ) vipul.com. IN NS ns.vipul.com. vipul.com. IN MX mail.vipul.com. localhost.vipul.com. IN A 127.0.0.1 ns.vipul.com IN A 192.168.0.254 n1.vipul.com IN A 192.168.0.1 n2.vipul.com IN A 192.168.0.2 www IN CNAME ns carrie IN CNAME n1 Shrek IN CNAME n2 mail IN CNAME ns
  • 21. Reverse zone for 192.168.0.0/24 $TTL 3D 0.168.192.in addr.arrpa. IN SOA ns.vipul.com. root.vipul.com. ( 42 ; serial 3H ; slave refresh 15M ;slave retry 1W ;slave timeout 1D ; minimum cache TTL for negative answer ) 0.168.192.in-addr.arpa. IN NS ns.vipul.com. 0.168.192.in-addr.arpa. IN MX mail.vipul.com. 254.0.168.192.in-addr.arpa IN PTR ns.vipul.com. 1.0.168.192.in-addr.arpa IN PTR n1.vipul.com. 2.0.168.192.in-addr.arpa IN PTR n2.vipul.com.
  • 22. Reverse zone for 127.0.0.0/8 $TTL 3D 0.0.127.in addr.arrpa. IN SOA ns.vipul.com. root.vipul.com. ( 42 ; serial 3H ; slave refresh 15M ;slave retry 1W ;slave timeout 1D ; minimum cache TTL for negative answer ) 0.0.127.in-addr.arpa. IN NS ns.vipul.com. 0.0.127.in-addr.arpa. IN MX mail.vipul.com. 1.0.0.127.in-addr.arpa IN PTR localhost.
  • 23. Check for errors  named-checkconf  Command use to check /etc/named.conf for errors  named-checkzone  Command used to check zone database files
  • 24. Starting bind  All named related files should be accessible by named  chown root:named /var/named/vipul.com.db  chown root:named /var/named/192.168.0.db  chown root:named /var/named/127.0.0.db  Turn selinux off if not familiar: setenforce 0  To start named deamon  service named start , or  /etc/init.d/named start
  • 25. Resolver Configuration  /etc/nsswitch  hosts: dns files  /etc/resolv.conf  On Clients  search vipul.com  nameserver 192.168.0.254  On Server  nameserver 127.0.0.1
  • 26. Resolver Client  gethostip  Queries using stub resolver.  host and dig  Only query DNS (not /etc/hosts).  more flexible and powerful then gethostip.  host provides concise output by default.  Dig provide verbose output by default.  nslookup  Standard DNS query tool.  Interactive and non interactive mode.
  • 27. Conclusion • DNS serve the basis for name resolution process on internet. DNS consists of the domain namespace, name servers that store resource records, and DNS resolvers. • A domain is a branch of the DNS namespace beginning at its root node. All of the resource records in a domain are stored in zones on DNS servers. A zone is a contiguous portion of a DNS domain whose information is stored in a file on a DNS server. • On the Internet, DNS consists of the root domain, top-level domains, and second- level domains. IANA manages the names and DNS servers of the root domain and the top-level domains. Individual organizations are responsible for managing the names in their second-level domains. • DNS resolvers use either recursive or iterative queries • Forward lookups provide an IP address based on an FQDN. Reverse lookups provide an FQDN based on an IP address. • Zone transfers can transfer either the entire zone file (known as a full zone transfer) or just the records that have changed (known as an incremental zone transfer). DNS Notify is a standard mechanism by which a master name server notifies secondary name servers to check .
  • 28. Query? Reach me at vipul.vid@gmail.com