DOMAIN NAME
-
Upload
javed-ahmed -
Category
Documents
-
view
72 -
download
0
Transcript of DOMAIN NAME
MADE BY: JAVED AHMED
KRISHAN CHOPRA
DNS-Definition Name Space Flat Name Space Hierarchial Name Space Domain Name Space FULLY QUALIFIED DOMAIN NAME PARTIALLY QUALIFIED DOMAIN NAME Distribution of Name Space Hierarchy of Name servers Zones and Domains DNS in Internet Resolution DNS Messages
To identify an entity, TCP/IP uses IP address which uniquely identifies connection of host to internet.
We prefer to use names instead of numeric address.
So we need a system that can map a name to a numeric address and vice versa.This is called DOMAIN NAME SYSTEM.
When internet was small, mapping was done using HOST FILE which was stored on every host.
Host file had only two columns:name and address.
But now a days whole information is divided into smaller parts and each part is stored in different computer.This is called DNS.
The process of mapping a unique name with a unique IP address.
FLAT NAME SPACE-
A name is assigned to an address and name is a sequence of characters without structure.
It cannot be used in large system such as Internet.
HIERACHICAL NAME SPACE- • Each name is made of several parts. • The first part can define the nature of
organization. • Second part can define the name and third
can define the departments in organization.
• For example o Smart.pu.edu o Smart.unix.com
To have a hierarchical name space,a DOMAIN NAME SPACE was designed.
In this design the names are defined in an inverted tree structure with the root at top.
The tree can have only 128 levels i.e. level 0(root) to level 127.
Tree consists of nodes and each node has a LABEL.
Each node in the tree has a domain name.
Full domain name is sequence of labels separated by dots(.)
Domain name is read from node up to root.
Always ends in a null label i.e. last character is a dot.
FULLY QUALIFIED DOMAIN NAME(FQDN) It contains the full name of host. A label is terminated by a null string. Ex-cs.hmme.com.
PARTIALLY QUALIFIED DOMAIN NAME It starts from a node but doesn’t reaches
root. A label is not terminated by null string. Ex-cs.hmme
Domain is a sub tree
of domain name space.
Each domain can be divided into sub domains.
Region over which server has the responsibility and authority.
Zone is a part of entire tree.
Server can divide domain into smaller domains.
ROOT SERVER-IT is a server whose zone consist of whole tree.These servers are distributed all around the world.
PRIMARY SERVER-A primary server loads all information from the local disk file.
SECONDARY SERVER-It transfers the complete information from the primary server and it is called Zone transfer.
Mapping a name to an address or an address to a name is called-address resolution.
RESOLVER-It access the closest DNS server with a mapping request.If the server has the information, it satisfies the resolver ; otherwise refers the resolver to other servers to provide the information.
MAPPING NAMES TO ADDRESSES-Resolver gives domain name to the server and ask for address.
MAPPING ADDRESS TO NAMES
Resolver sends IP address to the server to be mapped to domain name.
This is called PTR or Inverse query.
Server uses inverse domain.
IP address-121.45.34.132
Domain name-132.34.45.121.in-addr.arpa.
CACHING
When a server asks for mapping from another server and receive the response, it stores the information an its cache memory before sending it to the clients.
If the same or other client asks for the same mapping,it can check its cache and resolve the problem.
In DNS, when there is a change,such as adding a new host,removing a host or changing an IP address, change must be made to the DNS master file.
Manual updating is not possible due to size of Internet.
It is used to update DNS master file automatically.
DNS can use either UDP or TCP.
PORT NO.53 is used by servers.
If size of response message is more than 512 bytes,TCP connection is used,otherwise UDP is used.
sudo apt-get install bind9 bind9utils bind9-doc
sudo gedit /etc/bind/named.conf.options
Uncomment and edit the forwarders block.
write google’s dns server
8.8.8.8;
8.8.4.4;
Restart bind9 service.
sudo service bind9 restart.
Test using dig –x 127.0.0.1
DNS configuration files are stored in /etc/bind directory. Primary configuration file is/etc/bind/named.conf.
Edit ‘/etc/bind/named.conf’ file.
sudo gedit /etc/bind/named.conf
Make sure it contains the following lines.
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
sudo gedit /etc/bind/named.conf.local
Add the lines
zone "javed.local" {
type master;
file "/etc/bind/forward.javed";
allow-transfer { 192.168.1.102; };
also-notify { 192.168.1.102; };
};
zone "1.168.192.in-addr.arpa" { type master; file "/etc/bind/reverse.javed"; allow-transfer { 192.168.1.102; }; also-notify { 192.168.1.102; }; }; Here, forward.javed – Forward zone file reverse.javed– Reverse zone file 192.168.1.102 – Slave DNS server
Create forward zone sudo gedit /etc/bind/forward.javed Add the following lines: $TTL 86400 @ IN SOA masterdns.javed.local. root.javed.local.( 2011071001 ;Serial 3600 ;Refresh 1800 ;Retry 604800 ;Expire 86400 ;Minimum TTL )
@ IN NS masterdns.javed.local. @ IN NS secondarydns.javed.local. @ IN A 192.168.1.101 @ IN A 192.168.1.102 @ IN A 192.168.1.103 masterdns IN A 192.168.1.101 secondarydns IN A 192.168.1.102 client IN A 192.168.1.103
sudo gedit /etc/bind/reverse.javed Add follwing lines: $TTL 86400 @ IN SOA masterdns.javed.local. root.javed.local. ( 2011071002 ;Serial 3600 ;Refresh 1800 ;Retry 604800 ;Expire 86400 ;Minimum TTL ) @ IN NS masterdns.javed.local. @ IN NS secondarydns.javed.local. @ IN PTR javed.local. masterdns IN A 192.168.1.101 secondarydns IN A 192.168.1.102 client IN A 192.168.1.103 101 IN PTR masterdns.javed.local. 102 IN PTR secondarydns.javed.local. 103 IN PTR client.javed.local.
Run the following commands one by one:
sudo chmod -R 755 /etc/bind
sudo chown -R bind:bind /etc/bind
Check DNS default configuration file:
sudo named-checkconf /etc/bind/named.conf
sudo named-checkconf /etc/bind/named.conf.local
If it returns nothing, your configuration is valid.
sudo named-checkzone javed.local /etc/bind/forward.javed
Sample output:
zone javed.local/IN: loaded serial 2011071001
OK
sudo named-checkzone javed.local /etc/bind/reverse.javed Sample Output:
zone javed.local/IN: loaded serial 2011071002
OK
Resatart bind9 service
sudo service bind9 restart
sudo gedit /etc/network/interfaces Add the nameserver IP address: auto eth0 iface eth0 inet static address 192.168.1.101 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1 dns-nameservers 192.168.1.101 dns-search javed.local Reboot your system.
Method 1:
dig masterdns.javed.local
Method 2:
nslookup javed.local
Method 3:
nslookup 192.168.1.102