CALL US

+91 8219776763

What is DHCP?

What is DHCP?

By Prempal Singh 0 Comment December 18, 2018

DHCP is a dynamic host configuration protocol.

As the name implies, DHCP isdesigned to configure a host through a remote server. DCHP is supported bydefault by most modern operating systems, and this protocol acts as anexcellent alternative to the routine manual configuration of network parametersfor a server or a connected device.

This protocol works on the basis of the client-server model. As a protocol, DHCP has its ownmessaging method between client and server.

Knowing the basics of DHCP helps in resolving various network problems. In the next part of the article we will touch on the principlesof the protocol.

How does DHCP work ?

Before studying the process by which the goal is achieved, it is necessary tounderstand the various principles of information exchange that are used in thisprocess.

DHCPDISCOVER

This message marks the beginning of a DHCP interaction between the client and the server. This message is sent by a client (computer or device) connected to the network. This message uses 255.255.255.255 as the delivery IP address, while the source address is 0.0.0.0

DHCPOFFER

This message is sent in response to a DHCPDISCOVER from a DHCP server for connected clients. This message contains the necessary network settings.

DHCPREQUEST

This message is a response to the DHCPOFFER, and indicates that the client has accepted the sent settings.

DHCPACK

This message is sent to the DHCP server in response to a DHCPREQUEST from the client. A message marks the end of a process started with a DHCPDISCOVER message. Those. DHCPACK is nothing more than confirmation from the server of the beginning of client authorization and acceptance of configuration parameters received at the very beginning from the server.

DHCPNAK

This message is the opposite of the DHCPACK described above. It is sent to theserver in case it is impossible to satisfy the client’s DHCPREQUEST parameters.

DHCPDECLINE

The message is sent by the client to the server in case the IP address assigned in DHCP is already in use.

DHCPINFORM

The message is sent to the server if a static IP address is assigned to the DHCPclient, and a dynamic address is required for the configuration settings.

DHCPRELEASE

The message is sent to customers if it completes the process of using a networkaddress.

Now that we’ve become familiar with the various messages in DHCP, you can explore the entire workflow to get a better idea. The steps below are described on the assumption that all settings are set by default.

Step 1.

When a client (computer or device) boots up or connects to the network, aDHCPDISCOVER message is sent to the server. If there is no additionalconfiguration data, the message is sent from 0.0.0.0 to 255.255.255.255. Ifthe DHCP server is on the local subnet, then it receives the message directly;if it is on a different subnet, then the relay agent is used to send therequest to the DCHP server. The UDP protocol used on port 67 is used. Theclient at this stage begins the authorization stage.

Step 2.

At the moment the server received a DHCPDISCOVER request, it sends a DHCPOFFER message in response. As mentioned earlier, this message contains all the necessary configuration parameters requested by the client. For example, the IP address required by the client, as well as the value of the subnet mask and information about the gateway. The server also immediately fills theMAC address values in the CHADDR field. The message is sent to the client from address 255.255.255.255 directly, and if the server is on a different subnet, then relay agents are used, which are responsible for ensuring that the message is delivered. In this case, UDP is used for transmission via port 68. Atthis stage, the client begins to select parameters.

Step 3.

The client generates a DHCPREQUEST message that responds to the DHCPOFFER from the server, indicating that it accepts the configuration parameters sent to it. If there were several DCHP servers, the client would also receive several DHCPOFFER messages, but the client responds to only one server, filling in the configuration parameters for configuration. Thus, it passes authorizationwith obtaining an IP address from one specific DHCP server. All messagesfrom other servers are blocked. The DHCPREQUEST message will still containthe source address 0.0.0.0 if the client still cannot use the IP addressesreceived in the DHCPOFFER message. During this stage, the client receivesanswers to their requests.

Step 4.

Once the server receives a DHCPREQUEST from the client, it sends a DHCPACK message that the client can now use the IP address assigned to it. The clientfinally connects to the network and with the configured parameters.

Rental concept

In addition to the rest of the necessary information about how DHCP works, youshould also know the IP address assigned to the client by the DHCP server. Afterthe lease expires, the DHCP server can freely assign this IP address to anothercomputer or device requesting the same. For example, saving a lease termof 8-10 hours is useful for computers that are usually turned off at the end ofthe day. Therefore, rent must be extended from time to time. Afterhalf of the lease term has expired, the DCHP client usually tries toautomatically extend this period. This is done by exchanging DHCPREQUESTand DHCPACK messages. Due to this, the data update stage for the clientbegins.

error: Content is protected by Cyberops !!