Reply
Accepted Solution

Why does the DHCP relay agent use a Layer2 broadcast in the DORA process?

Guru
Posts: 185
1188     0

Hi;

 

I understand why the DHCP client uses a broadcase for the DHCP Discover and the DHCP Request, but why would the relay agent use it for the DHCP Offer and DHCP Ack. Why does not it use a Layer2 unicast for transmitting the offer and acknowledgment instead.

 

I know you can set up the relay agent to use a L2 unicast for the offer and acknowledgment messages, but why is the L2 broadcast the default?

 

 

Kindly

Wasfi

Re: Why does the DHCP relay agent use a Layer2 broadcast in the DORA process?

Authority
Posts: 18
1189     0

Hi Wasfi,

 

In an ideal scenario (by default), if the “Broadcast Flag” field of the DHCP Offer message sent by a DHCP server is 0 (zero), the DHCP relay agent replaces the value in the Destination MAC address field with the PC MAC address (Client MAC), and unicasts the message. However, if the “Broadcast Flag” value is 1 (one), the relay agent replaces it with the broadcast MAC address (FF:FF:FF:FF:FF:FF), and broadcasts the message.

 

Regarding how the Broadcast Flag is set on the DHCP message from the DHCP server, I have included below an excerpt from the DHCP RFC 2131 that explains this best:

 

If the 'giaddr' field in a DHCP message from a client is non-zero,
   the server sends any return messages to the 'DHCP server' port on the
   BOOTP relay agent whose address appears in 'giaddr'. If the 'giaddr'
   field is zero and the 'ciaddr' field is nonzero, then the server
   unicasts DHCPOFFER and DHCPACK messages to the address in 'ciaddr'.
   If 'giaddr' is zero and 'ciaddr' is zero, and the broadcast bit is
   set, then the server broadcasts DHCPOFFER and DHCPACK messages to
   0xffffffff. If the broadcast bit is not set and 'giaddr' is zero and
   'ciaddr' is zero, then the server unicasts DHCPOFFER and DHCPACK
   messages to the client's hardware address and 'yiaddr' address.  In
   all cases, when 'giaddr' is zero, the server broadcasts any DHCPNAK
   messages to 0xffffffff.

 

Hope this helps.

 

Regards,

Nithin

Showing results for 
Search instead for 
Do you mean 

Recommended for You

This widget could not be displayed.

Demo: Infoblox IPAM plug-in integration with OpenStack Newton

" class="expert-of-month-image"/>