DEV Community

Buddika Abeykoon
Buddika Abeykoon

Posted on

How DHCP Assigns an IP Address

DHCP (Dynamic Host Configuration Protocol) is a network protocol that automatically gives an IP address to a device when it connects to a network. It uses four simple steps called DORA,
* Discover
* Offer
* Request
* Acknowledgment (ACK)
First, the client sends a Discover message to find a DHCP server. Next, the DHCP server replies with an Offer that contains an available IP address. Then, the client sends a Request message to accept the offered IP address. Finally, the DHCP server sends an ACK message to confirm the IP address and other network settings. After this process is complete, the client can communicate on the network and access the internet.

Top comments (0)