Dynamic Host Configuration Protocol (DHCP)

DHCP stands for Dynamic Host Configuration Protocol. Using DHCP, the DHCP server assigns the IP address automatically to the DHCP client.

The process of getting the IP address through DHCP is called DORA process. DORA stands for the words below

D-DHCP discover
O-DHCP offer
R-DHCP request
A-DHCP Acknowledge.



A device that needs the IP address sends the DHCPDISCOVER message to the DHCP server. As the device does not know the IP address of the DHCP server, the DHCPDISCOVER message would be a broadcast message with the destination IP address of 255.255.255.255. The broadcast message means all the machines on that network will receive the DHCPDICOVER message.

Once the DHCP server receives this DHCPDISCOVER message, it sends a DHCPOFFER message to the client machine. As the client machine does not have the IP address yet, it will send the DHCPOFFER message to the broadcast address 255.255.255.255. The DHCPOFFER message consists of the IP address, subnet mask, default gateway and DNS server address which the DHCP server wants to allot to the client machine.

After receiving the DHCPOFFER message, the client machine sends a DHCPREQUEST machine to the DHCP server accepting the IP address provided by the DHCP server. The DHCP request will also be a broadcast message.

After receiving the DHCPREQUEST message from the client, the server sends the DHCPACKNOWLEDGEMENT(DHCPACK) message to the client. This message will be a unicast message.