Pages

Saturday, March 24, 2018

Domain Name System | computer networks

Domain Name System

Domain Name System

For Example we know that People are Good at remembering host names rather than remembering ip numbers[i.e For Example if we want to browse in google search engine we obviously type www.google.com but this dns server converts that host names to ip addresses

Therfore Simply we can say that Dns Is a server which map host names to ipaddresses

The way how dns works is illustrated in the below image

DNS server is Used as Follows

->TO map a name onto an IP address,an application calls a library procedure called resolver

->The resolver sends a query containing the name to local dns server,which looks up the name and returns a response containing the ip address to the resolver which then returns to caller[who has requested].

->The query and response messages are sent as UDP packets

The Dns NameSpace

The names must be unique as the ipaddresses are unique.and namespace is designed in hierarchical manner,where each name has several parts

The First part defines the nature of the organisation [i.e the root node] The second part defines the name of the organisation similar to top domains,and third part defiens departments int he organisation.

The tree can have 128 levels[i.e 0 to 127] 0 is for root node

each node in a tree is a domain name,which is a string with a maximum of 63 characters.The root label is empty string as it is 0 level

In the above figure microsoft.com com is a label and microsoft which is a child of com is a label

Domain Name

each node has a domain name. a full domain anme is a sequence of labels seperated by dots(.).the domain names are always read from node up to the root.
let us consider a example that illustrates about label and domain name.

First thing is domain names are case insensitive so com|Com|COM are supported

Full path name must not exceed 255 characters

the internet is divided into 250 top level domains wher each domain covers many hosts,each domain is partitioned into subdomains and these are further partitioned

the top level domains has two types

->Generic domains in which it defines registered organisations example:->.com,.gov,.edu

->country domain section uses two character country abbreviations example us for united states ,and in for india

Domain Resource Records

Every domain whethter it is a single host or a top level domain can have a set of resources associated with it,When a resolver gives a domain name to dns what it gets back are resources records associated with that name.

A resource record is of five parts

The Domain name tells the domain to which this record applies

The time to live field gives an indication of how stable the record is.information with highly stable is assigned a larger value

the third field of every resource record is the class.for internet info it will be always set to 1.

The SOA record provides the name of the primary source information

the most important record type is the A(address).it holds 32 bit IPV4 address

Hierarchy of Name Servers

the information contained in the domain name space must be stored as it is unreliable to have just one computer to sore such huge amount of data.[as it is responding to requests all over the world places a heavy load on the system

the solution to this problems is distribute the information among many computers called dns servers

As we know about root servers [whose zone contain whole tree]

dns has two servers:primary and secondary servers

primary for creating,maintaining and updating the zone file

secondary servers loads informaton about a zone from primary memory

Name Resolution

The process of looking at a name and finding address is called name resolution

the name can be solved in 2 ways

1.Iterative query

2.recursive query

Iterative query

For example we have a root node and it is sub divided into .com,.gov,.edu.co.in etc.. and .com is subdivided into facebook and facebook is divided into messages and if .edu is divided into stanford university and it is subdivided into ms, if ms needs the ipaddress of messages which is in facebook the local dns server first asks ms it says it doesnt know about messages and again local server asks stanford even it states it doesnt have the address and again it asks .edu it says the same reason and it asks root node it says i do have the address with .com so it asks .com it states go to facebook it may have the address it asks facebook for messages address and finally it asks messages adddress,this is Iterative query as local server is requesting all sub domains and root node for its requested address but in case of reccursive query the local server asks ms about messages address and ms will ask for stanford and stanford will ask for.edu and .edu will ask for root node and root asks .com and .com asks facebook and facebook asks messages through this way local server is not required for every iteration.

Iterative query

Reccursive query

Your Name :

Your Email: (required)

Your Message: (required)


No comments:

Post a Comment