[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] dhcpd and always-broadcast



On Wed, Oct 10, 2012 at 9:26 PM, Panayiotis Karabassis <panayk@gmail.com> wrote:
> Hey,
>
> I have an OT question about the always-broadcast option of the dhcpd server.
>
> Based on the Wikipedia article, all DHCP messages to the client are sent
> to the broadcast address. This makes sense, since the UDP protocol used
> by DHCP runs on top of the IP protocol, and the client does not have an
> IP address until the DHCP negotiation is completed.
>
> So, what is the use of this option? Under what circumstances should the
> server not broadcast its messages?
>

In a DHCP request, a client can choose to say that it does not need
responses to be broadcast.  There is a "broadcast bit" in the DHCP
request that the client can turn off.  The always-broadcast option for
the DHCP server says that the server should ignore the unset broadcast
bit and always broadcast the response.

How does the client receive a unicast response, you ask?  The response
will still have the client's hardware address (MAC address).  So the
response will reach the client's interface.

It seems, though, that this functionality is not often used.  Clients
always seem to set the broadcast bit, even if they will be able to
receive a unicast response.  I had a problem recently, where some
random malfunctioning device on a network was seeing random DHCP
responses intended for someone else and assigning the offered address
to itself.  I had to patch dhcpd to ignore the broadcast bit and
always send a unicast response (a "never-broadcast" option).  It
worked surprisingly well.

-- 
regards,
kushal


Reply to: