DNS and DHCP both work on the client-server architecture but are dissimilar terms. DNS maps the domain name to IP address whereas DHCP is a protocol which assigns IP to the hosts in a network be it statically or dynamically. DHCP is also used while setting up the DNS server to the host.
Content: DNS Vs DHCP
Comparison Chart
Basis for comparison | DNS | DHCP |
---|---|---|
Basic | It is an address resolving mechanism. | It is a protocol used for assigning IP's to the host in a local area network statically or dynamically. |
Features | Coverts symbolic names into IP address and vice-versa. | Provide additional information such as IP addresses of the host, router and name server and Subnet mask of the computer. |
Used for locating active directory domain servers. | Assigns IP to host for a particular lease time. | |
Port number used | 53 | 67 and 68 |
Related protocols | UDP and TCP | UDP |
Server | DNS server translates the Domain name to the IP and vice-versa. | DHCP server configures the hosts automatically. |
Working methodology | Decentralized | Centralized |
Advantage | Eliminate the need to remember the IP address; instead, the domain name is used for the web address. | Reliable IP address configuration and reduced network administration. |
Definition of DNS
DNS (Domain Name System) is a mechanism which provides directory lookup service which maps the name of a host on the Internet and its unique numerical address (logical address).
Conventionally, mapping was done using a host file, which has details such as name and address. Those host files are stored on each host and updated periodically from a master host file. Whenever a program or a user needed to map a name to address, the host consult the host file and find the mapping. But this mechanism would be extremely unreliable for today’s scenario where there is an extensive number of hosts are connected through the internet.
Working of DNS
When a user wants to use a file transfer client to access the file transfer server running on a remote host while the user is only aware of file transfer name. To establish the connection the TCP/IP suite must need IP address of the file transfer server. The given figure illustrates the working of the DNS step by step.
Definition of DHCP
DHCP (Dynamic Host Configuration Protocol) has been concocted to impart static and dynamic address allocation to the hosts connected in the network. It includes information such as IP address and subnet mask of the computer, IP address of the router and IP address of the name server.
The DHCP contains two components i.e., a protocol and mechanism. The protocol is used to transport host-specific configuration parameters from a DHCP server to the host and a mechanism is used to assign network addresses among the hosts. DHCP can quickly configure a host, everything that required for doing so is a defined range of IP addresses on a DHCP server. When a host gets active, it contacts to the DHCP server and request address information.The DHCP server chooses an address and allocates it to the host. But these addresses are leased for a particular period after the expiration of lease the host can contacts to the DHCP server and requests to extend the lease. This lease mechanism is very useful for finding non-working moved or switched off hosts. In the given cases hosts do not hold on to the addresses and addresses are returned to the address pool by the DHCP server which can be reallocated as necessary. It prevents the IP loss.
Key Differences Between DNS and DHCP
Conclusion
DNS and DHCP both of the technologies were devised for the convenience of the users and administrators using the network or internet. DNS eliminated the need of remembering the complex IP addresses for the casual users while DHCP reduced the time-consuming process of configuring the systems in a network manually, nowadays it is all automatic and fast.
ncG1vNJzZmislZi1pbXFn5yrnZ6YsrR6wqikaJyZm7OmvsSnmp5lkprBuLHEp2SdpqNirq%2BwjJ2fnKhencGuuA%3D%3D