Thursday, June 12, 2014

DHCP : Dynamic Host Configuration Protocol

Well , DHCP is not a confusing topic to discuss on. But people sometimes get confused when asked whether DHCP OFFER or DHCP ACK  is a unicast or broadcast packet.

Lets understand the DHCP DORA process.

D : DHCP Discover
O : DHCP Offer
R : DHCP Request
A : DHCP Acknowledgement

DHCP Discover :  is broadcast packet
 DHCP Offer :  can be a broadcast or unicast packet (depends upon flag set in client  DHCP Discover                                  broadcast field)
DHCP Request :  is a broadcast packet
 DHCP Acknowledgement :  can be a broadcast or unicast packet

Reason why DHCP Offer and Ack can be either unicast or broadcast packet ?

A client that cannot receive unicast IP datagrams until its protocol software has been configured with an IP address SHOULD set the BROADCAST bit in the 'flags' field to 1 in any DHCPDISCOVER or DHCPREQUEST messages that client sends. The BROADCAST bit will provide a hint to the DHCP server and BOOTP relay agent to broadcast any messages to the client on the client's subnet. A client that can receive unicast IP datagrams before its protocol software has been configured SHOULD clear the BROADCAST bit to 0.






No comments:

Post a Comment