Why we need dns servers on the internet

In the absence of DNS or hostnames or domain names, we would have to refer to all internet connections by their IP addresses. By contrast, programs refer to hosts and mailboxes by ASCII strings, while the network itself understands only binary addresses; thus, a mapping mechanism is necessary. The ARPANET used a file called hosts.txt, which listed all the hosts and their IP addresses.

Hosts would copy hosts.txt every night. It worked when there were only a few hundred machines on the network. It needed updating as the number of machines increased. The hosts.txt file would become too large to distribute every day, and address conflicts would increase. A centralized list for an international network would be difficult. RFC 1034 and 1035 were used to create the DNS. The DNS maps hostnames (domains) to IP addresses.A library procedure called a resolver is used to access the DNS application, which accepts a domain name as an ASCII string. User Datagram Protocol (UDP) packets are sent to a local DNS server that looks up the name and returns the IP address. Once the IP address is retrieved, the program starts a TCP connection or sends more UDPs.



Avatar photo
Written by pramod