Domain Name System (DNS) – It is well known that the IP addresses are used to identify the devices in the internet such as Routers, Servers etc. In the absence of a domain name for an Email server, we would have ended with a representation such as XYZ@144,16.70.2, firstname.lastname@example.org etc. It can been seen that such a representation is very difficult to remember that too impossible if there are hundreds of such email ids. If the email server is loaded to a different machine with a different IP address, they above scheme does not work.
If this is the case with Email, then how about the thousands of websites? For example, http//188.8.131.52/~index.html, is a URL. We need to remember the entire number to access the page. Thus it is clear that the IP addresses are difficult to remember and DNS is a perfect solution to this problem.
- We come across many applications which primarily depend upon the IP address. There is a need to map IP address to common Generic Name.
- So ASCII characters were introduced to replace IP address Example email@example.com. were Cs.sjce.ac.in is mapped to the IP address.
- However, such a mapping should not result in conflict.
- Obviously a centralized system cannot work because of large number of host names all over the world. DNS was introduced to alleviate the above problem.
Some points on DNS are
- It is a hierarchical scheme
- It employs domain based naming.
- It uses a distributed database.
- Primarily maps host names and E-mail server to IP addresses.
- Found in RFC 1034, 1035
Working of DNS
An application program calls a library procedure called ‘Resolver’ with its name as parameter. The Resolver sends an UDP packet to the local DNS server. The DNS server searches its table and returns the IP address which matches the Domain name. Armed with that, the program can establish a TCP connection or send UPD packets.
DNS Name Space
Attaching random names to IP address and managing them is too nontrivial. So, a structured approach is needed.
- Best way is to employ the postal addressing system.
- Internet is divided into 200 Domains at top level
- Each top level domain is further divided into sub domain.
- Each sub domain is further divided into one or more levels of sub domains.
- Top level domain can be split into two major classes.