Welcome To My Blog

#What_is_DHCP (Dynamic Host Configuration Protocol)?

What is DHCP?

In a network, when we connect several computers, they must have a different IP address registered within a certain network segment or range. This is so that these teams can communicate and share information with each other. In the past, this communication was established manually, but over time it was evident that it was not feasible to dedicate the resources and time of a systems administrator to manually configure each new computer that connected to the network. It is at this point that the term DHCP Server appears, to make centralized and automatic administration of network parameters.

The DHCP protocol, in English, Dynamic Host Configuration Protocol, is an extension of the Bootstrap Protocol (BOOTP) developed in 1985 to connect devices such as terminals and workstations without a hard disk with a Boot server, from which they receive their operating system. Its function was to offer a solution to large networks and the incipient presence of mobile workstations such as laptops or think-clients, assigning network addresses automatically so that they were reusable.
DHCP has been with us for almost 40 years and like any protocol, it has gone through different revisions that have been adapting it to this day, although perhaps the most important was in 1997 with RFC 2131 and its final specification.
DHCP


How the DHCP protocol works

This network protocol is based on a client-server model. In this scenario, a device (a laptop, mobile, etc.) requests IP configuration to a DHCP server when connecting to a network through UDP ports 67 and 68 (for IPv6, ports 546 and 547), which for its part consults in a database the assignable addresses and network parameters before giving a response. Once the query is made, the server sends the following parameters to the client through the network:
• Unique IP address
• Subnet mask
• Standard gateway
• DNS servers
• Proxy configuration by WPAD (Web Proxy Auto-Discovery Protocol)



But how is this allocation accomplished? the process is automatic but it is also the result of successfully completing four consecutive steps:




1. Broadcast or Broadcast: The DHCP client sends a DHCPDISCOVER packet to address 255.255.255.255 from address 0.0.0.0. In this way, an attempt is made to establish communication with all members of the network, the basic idea is to locate the available DHCP servers and thus continue with the request.




2. Offer: The DHCP servers present on the network are listening for requests through port 67. As soon as they detect a client's request, they send a DHCPOFFER packet, which contains a free IP address, the client's MAC address, and the subnet mask, as well as the IP address and ID of the server.




3. Request: The DHCP client that receives the package contacts the corresponding server with DHCPREQUEST. In this way, the other servers become aware of the assignment at the same time that the client confirms to the server that it accepts the previously assigned parameters.




4. Confirmation: Finally, the server confirms the TCP / IP parameters and sends them back to the client, this time with the DHCPACK packet (DHCP acknowledged). The assigned address is saved in the server database along with the client's MAC address.

What is DHCP for?

Thanks to DHCP we can connect different electronic devices to our network without having to worry about anything. At the moment we connect, our server or router is responsible for centralized management of IP addresses, thus avoiding conflicts with IP addresses already used by others or also allowing the distribution of network parameters to all computers.
In a home network this may not seem to be of great importance, but in a larger network being able to modify a change of address, DNS servers, static routes, and more, from a single server for all members of the network is something of Great utility by saving huge amounts of time.

No comments

Powered by Blogger.