You are on page 1of 2

Initialization You can liken this phase to someone walking into a room and shouting, hey, I need an IP address!!

At packet 180 (above) a DHCPDiscover message is broadcast by the client using UDP port 68. Since the client has yet to obtain an IP address, the source IP is 0.0.0.0 and the destination 255.255.255.255 . The DHCPDiscover message will contain the clients MAC address and computer name.

Selection Any DHCP server will respond with a DHCPOffer (packet 181) if it has available IP addresses to lease from the scope corresponding to the source subnet of the DHCPDiscover broadcast. As the name implies, the DHCPOffer will contain the IP address offered to the client, lease duration, IP of the offering DHCP server, client MAC address and client computer name. Note that even though the client has not yet accepted the IP address, the DHCP server has already assigned the offered address from the pool. This prevents the address from being offered to other clients.

Request Upon receiving the DHCPOffer, the client crafts a DHCPRequest (packet 182) containing the IP address of the DHCP server that originated the offer. This ensures the correct DHCP server replies to the request and allows any other DHCP servers that responded with a DHCPoffer to return the offered address to their pool. The IP address of the offering DHCP server is contained in the DHCP Server Identifier option field. Note that at this

point the client still does not have an IP address so the DHCPRequest is still sent as a broadcast.

Binding The lease process completes with the DHCP server sending a DHCPAck (packet 183). As with the other phases this is done via a broadcast. The client, upon receiving the DHCPAck, completes initialization of its TCP/IP stack and begins using the assigned address.

Conclusions The lease process is conducted entirely via UDP on ports 67 and 68 using broadcasts on the local subnet or to a remote subnet using a relay agent. (more on that later) An interesting behavior to note is that the DHCP server will remove the offered address from its scope before the client has acknowledged that it wishes to use the address. This behavior is what makes a DHCP scope exhaustion attack possible. Theres not much security inherent to DHCP, which is why have have to rely on DHCP snooping an other techniques to provide additional protection.

You might also like