Welcome: - Basics of Dns

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 21

Welcome

• BASICS OF DNS
The Domain Name System
Overview

•Introduction
•DNS overview
•How DNS helps us?
•Summary
What is a Name Sever?

Server responsible for answering DNS queries


• Exists at all levels of hierarchy
• Authoritative name servers hold part of the DNS database
• One name server can serve more then one zone
• Many name servers “should” serve the same zone
• Some name servers are authoritative for certain zones
DNS Domains
Everyone in the world has a first name and a last, or family, name. The same
thing is true in the DNS world: A family of Web sites can be loosely described a
domain

The Domain Name System (DNS) is a standard technology for managing the
names of Web sites and other Internet domains. DNS technology allows you to
type names into your Web browser like www.ibm.com and your computer to
automatically find that address on the Internet

There are 13 root servers for IPv4 : Named A,B,C…. - M


Ten of these servers reside in the United States, one in Japan, one in
London and one in Sweden.

These are not just a single computer but rather a server cluster consisting of
many computers. This use of clustering increases the reliability of DNS

DNS is an application layer protocol. The application layer of the OSI model is the
layer closest to the user and provides network services to the applications of the
user
DNS Clients
A DNS client doesn't store DNS information; it must always refer to a DNS server
to get it. The only DNS configuration file for a DNS client is the /etc/resolv.conf
file, which defines the IP address of the DNS server it should use

BIND
BIND is an acronym for the Berkeley Internet Name Domain project, which is a
group that maintains the DNS-related software suite that runs under Linux. The
most well known program in BIND is named, the daemon that responds to DNS
queries from remote machines.

How DNS Servers Find Out Your Site Information


There are 13 root authoritative DNS servers (super duper authorities) that all
DNS servers query first. These root servers know all the authoritative DNS
servers for all the main domains - .com, .net, and the rest. This layer of servers
keep track of all the DNS servers that Web site systems administrators have
assigned for their sub domains.
For example, when you register your domain my-site.com, you are actually
inserting a record on the .com DNS servers that point to the authoritative DNS
servers you assigned for your domain
DNS Caching Name Server
The most frequently requested information is then stored (or cached) to reduce the
lookup overhead of subsequent queries. If you want to advertise your Web site
www.my-site.com to the rest of the world, then a regular DNS server is what you
require .

Popular domain registrars include VeriSign, Register Free, and Yahoo.


As you know, DNS resolution maps a fully qualified domain name (FQDN), such as
www.ibm.com, to an IP address. This is also known as a forward lookup. The
reverse is also true: By performing a reverse lookup, DNS can determining the fully
qualified domain name associated with an IP address.
Many different Web sites can map to a single IP address, but the reverse isn't true;
an IP address can map to only one FQDN. This means that forward and reverse
entries frequently don't match. The reverse DNS entries are usually the
responsibility of the ISP hosting your site
To perform a forward/reverse lookup use Host command in linux
Host www.yahoo.com
host 65.115.71.34
Use nslookup also
Package for Redhat bind-9.2.2.P3-9.i386.rpm.
chkconfig named on
service named start/stop/restart
Important File Locations
/etc/resolv.conf --- nameserver 192.168.1.100
/etc/named.conf Tells names/location of the zone files to be used for each of your
domain/etc/rndc.key,rndc.conf Files used in named authentication.
/var/named : zone files : Links all the IP addresses in your domain to their
corresponding server
/var/named/named.ca : A list of the 13 root authoritative DNS servers.
File: /etc/named.confoptions { listen-on port 53 { 127.0.0.1; };};

Forward Zone File References in named.conf


zone “my-web-site.org” {
type master;
notify no;
allow-query { any; };
file “my-site.zone”;
};

Reverse Zone File References in named.conf


zone “1.168.192.in-addr.arpa” {
type master;
notify no;
allow-query { any; };
file “192-168-1.zone”;
};
Field Description

Name The root name of the zone. The “@” sign is a shorthand reference to the current origin (zone) in the /etc/named.conf file
for that particular database file.

Class There are a number of different DNS classes. Home/SOHO will be limited to the IN or Internet class used when defining
IP address mapping information for BIND. Other classes exist for non Internet protocols and functions but are very
rarely used.

Type The type of DNS resource record. In the example, this is an SOA resource record. Other types of records exist, which I’ll
cover later.

Name-server Fully qualified name of your primary name server. Must be followed by a period.

Email- The e-mail address of the name server administrator. The regular @ in the e-mail address must be replaced with a period
address instead. The e-mail address must also be followed by a period.

Serial-no A serial number for the current configuration. You can use the date format YYYYMMDD with an incremented single
digit number tagged to the end. This will allow you to do multiple edits each day with a serial number that both
increments and reflects the date on which the change was made.

Refresh Tells the slave DNS server how often it should check the master DNS server. Slaves aren’t usually used in home / SOHO
environments.

Retry The slave’s retry interval to connect the master in the event of a connection failure. Slaves aren’t usually used in home /
SOHO environments.

Expiry Total amount of time a slave should retry to contact the master before expiring the data it contains. Future references will
be directed towards the root servers. Slaves aren’t usually used in home/SOHO environments.

Minimum- There are times when remote clients will make queries for subdomains that don’t exist. Your DNS server will respond
TTL with a no domain or NXDOMAIN response that the remote client caches. This value defines the caching duration your
DNS includes in this response.
The “A” Record
The “Address” record
One or more normally defines a host
www A 203.18.56.31

The “CNAME” Record


A CNAME defines an alias
search CNAME www.google.com

The “MX” Record


An MX record defines the mail servers for a particular domain
:
ausregistry.com.au MX 10 mail

The “NS” Record


An NS record defines the authoritative Name servers for the domain.

internal NS ns1.hosting.com.au
Accessing a web page
•You type http://www.google.com into your web
browser and hit enter.

•What happens now?


Step 1: Your PC sends a resolution
request to its configured DNS
Server, typically at your ISP.

Your PC
ISP “Recursive” DNS server

Tell me the Address of


“www.google.com”
Step 2: Your ISPs name server
starts by asking one of the root
servers predefined in its “hints” file.
Tell me the Address of
“www.google.com”

ISP “Recursive” DNS server


Root Servers

I don’t know the address but I


know who’s authoritative for the
”com” domain ask them
Step 3: Your ISPs name server
then asks one of the “com” name
servers as directed.
Tell me the Address of
“www.google.com”

ISP “Recursive” DNS server


“com” DNS servers

I don’t know the address but I


know who’s authoritative for the
”google.com” domain ask them
Step 4: Your ISPs recursive name
server then asks one of the
“google.com” name servers as
Tell me the Address of directed.
“www.google.com”

ISP “Recursive” DNS server google.com DNS server

The Address of www.google.com


is 216.239.53.99
Step 5: ISP DNS server then send
the answer back to your PC. The
DNS server will “remember” the
answer for a period of time.

Your PC
ISP “Recursive” DNS server

The Address of www.google.com


is 216.239.53.99
Step 6: Your PC can then make the
actual HTTP request to the web
server.
Send me the www.google.com.au
web page

Your PC
www.google.com web server

Here it is!
Summary
WEB (HTTP)
Request

“root” DNS servers

google.com.au
Web Server
2
6

1
3
5
Your PC
ISP “Recursive” DNS server “com” DNS servers

The actual
web request DNS requests

DNS

google.com DNS server


Summary

•DNS is integral part in most protocols used on the


internet
•Makes the internet human friendly for us all
•Is the world largest distributed database system
•Fits the international model perfectly
•In simple terms is a mapping between names and
IP addresses
Thank you

You might also like