DOMAIN NAME

41
MADE BY: JAVED AHMED KRISHAN CHOPRA

Transcript of DOMAIN NAME

Page 1: DOMAIN NAME

MADE BY: JAVED AHMED

KRISHAN CHOPRA

Page 2: DOMAIN NAME

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

Page 3: DOMAIN NAME

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.

Page 4: DOMAIN NAME

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.

Page 5: DOMAIN NAME

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.

Page 6: DOMAIN NAME

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

Page 7: DOMAIN NAME

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.

Page 8: DOMAIN NAME
Page 9: DOMAIN NAME

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.

Page 10: DOMAIN NAME
Page 11: DOMAIN NAME

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

Page 12: DOMAIN NAME

Domain is a sub tree

of domain name space.

Each domain can be divided into sub domains.

Page 13: DOMAIN NAME
Page 14: DOMAIN NAME

Region over which server has the responsibility and authority.

Zone is a part of entire tree.

Server can divide domain into smaller domains.

Page 15: DOMAIN NAME

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.

Page 16: DOMAIN NAME
Page 17: DOMAIN NAME
Page 18: DOMAIN NAME

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.

Page 19: DOMAIN NAME

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.

Page 20: DOMAIN NAME
Page 21: DOMAIN NAME
Page 22: DOMAIN NAME

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.

Page 23: DOMAIN NAME
Page 24: DOMAIN NAME
Page 25: DOMAIN NAME

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.

Page 26: DOMAIN NAME

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.

Page 27: DOMAIN NAME
Page 28: DOMAIN NAME

sudo apt-get install bind9 bind9utils bind9-doc

Page 29: DOMAIN NAME

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

Page 30: DOMAIN NAME

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";

Page 31: DOMAIN NAME

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; };

};

Page 32: DOMAIN NAME

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

Page 33: DOMAIN NAME

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

Page 34: DOMAIN NAME

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.

Page 35: DOMAIN NAME

Run the following commands one by one:

sudo chmod -R 755 /etc/bind

sudo chown -R bind:bind /etc/bind

Page 36: DOMAIN NAME

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.

Page 37: DOMAIN NAME

sudo named-checkzone javed.local /etc/bind/forward.javed

Sample output:

zone javed.local/IN: loaded serial 2011071001

OK

Page 38: DOMAIN NAME

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

Page 39: DOMAIN NAME

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.

Page 40: DOMAIN NAME

Method 1:

dig masterdns.javed.local

Method 2:

nslookup javed.local

Method 3:

nslookup 192.168.1.102

Page 41: DOMAIN NAME