DNS and DHCP work in the client-server architecture But they are different terms. DNS assign the domain name to the IP address, while DHCP It is a protocol that assigns IP to the hosts in a network in an aesthetic or dynamic way. DHCP is also used when configuring the DNS server for the host.
|BASIC||It is an address resolution mechanism.||It is a protocol used to assign IP to the host in a local area network aesthetically or dynamically.|
|Features||It covers symbolic names in the IP address and vice versa.||Provide additional information, such as host IP addresses, router and name server, and computer subnet mask.|
|It is used to locate active directory domain servers.||Assign IP to the host for a particular lease time.|
|Port Number Used||53||67 and 68|
|Related protocols||UDP and TCP||UDP|
|Server||The DNS server translates the domain name to the IP and vice versa.||The DHCP server configures the hosts automatically.|
|Advantage||Eliminate the need to remember the IP address; instead, the domain name is used for the web address.||Reliable configuration of IP addresses and reduced network administration.|
DNS (Domain Name System) it is a mechanism that provides a directory search service that map the name of a host on the Internet and its unique numerical address (logical address).
Conventionally, the assignment was made using a host file, which has details such as name and address. These host files are stored on each host and are updated periodically from a master host file. Whenever a program or user needs to assign a name to an address, the host consults the host file and finds the assignment. But this mechanism will be extremely unreliable for today's scenario, where there are a large number of hosts connected through the Internet.
When a user wishes to use a file transfer client to access the file transfer server running on a remote host, the user only knows the name of the file transfer. To establish the connection, the TCP / IP suite must need the IP address of the file transfer server. The given figure illustrates the operation of the DNS step by step.
- The host name is passed to the file transfer client by the user.
- The file transfer client transits the host name to the DNS client.
- The DNS client sends the query to the DNS server that provides the name of the file transfer server using a known IP address of the DNS server.
- The DNS server sends the response with the IP address of the required file transfer server.
- The DNS client passes the IP address to the file transfer server.
- The file transfer client uses the received IP address to access the file transfer server.
DHCP (Dynamic Host Configuration Protocol) It has been designed to impart a static and dynamic address assignment to the hosts connected in the network. It includes information such as the IP address and subnet mask of the computer, the IP address of the router and the IP address of the name server.
The DHCP contains two components, that is, a protocol and a 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 between hosts. DHCP can quickly configure a host, all that is required to do so is a defined range of IP addresses on a DHCP server. When a host activates, it contacts the DHCP server and requests address information.
The DHCP server chooses an address and assigns it to the host. But these directions are lease For a particular period after the expiration of the concession, the host can contact the DHCP server and request the extension of the concession. This leasing mechanism is very useful for finding moved or shutdown hosts that do not work. In the given cases, the servers do not cling to the addresses and the addresses are returned to the address group by the DHCP server, which can be reassigned as necessary. Prevents the loss of intellectual property.
Key differences between DNS and DHCP
- DNS is used to recursively resolve and resolve the name or name address to the host address. On the other hand, DHCP is used to assign the addresses to the host in the network dynamically or aesthetically.
- DNS uses the port number 53, while DHCP can use 67 or 68 .
- DHCP only supports UDP, while DNS can support both TCP and UDP.
- The DNS and DHCP servers perform different operations in which the DNS server is responsible for accepting queries through the client and responding to the clients along with the results. In contrast, the DHCP server is responsible for assigning temporary addresses to client machines for a lease time and then extending the lease as required.
- DNS follows a certain hierarchy It does not allow the storage of all domain names in one place, but it divides it into subdomains and then the information in particular is stored on a particular server. Hence it is decentralized. In contrast, the DHCP server configures the client's IP addresses from a group of IP addresses and centrally handles all tasks, in case a DHCP server is not directly connected to the clients, then it uses a router to receive the DHCP transmissions and transmit them to the DHCP server.
DNS and DHCP, both technologies were designed for the convenience of users and administrators who use the network or Internet. The DNS eliminated the need to remember the complex IP addresses for occasional users, while DHCP reduced the process of manually configuring systems on a network, which today is automatic and fast.