[Dnsmasq-discuss] dhcp helper and unicast requests

Simon Kelley simon at thekelleys.org.uk
Tue Jun 22 17:38:09 BST 2010

Jon Nelson wrote:
> I have a network like this:
> 192.168.2.XX   <->  router  <->  192.168.1.XX
> There are a bunch of machines in the network, and
> (most) of them use DHCP. The router *currently* runs dhcrelay to relay
> dhcp requests to, which is where the DHCP server (dnsmasq)
> is.
> I tried using dhcp-helper but it appeared to work only with
> broadcasts. Once clients in the 192.168.2.x network got an address,
> they periodically issued DHCPREQUEST requests *unicasted* to
>  No matter what I did, dhcp-helper didn't see them
> (confirmed with strace). What should be going on here? Should
> dhcp-helper be fiddling with the packets to set the server address to
> the address it received the initial request on (, or
> should I be using firewall tricks, or what? I even see some
> dhcp/bootp-related bits in /proc, and I'm not sure what I should do
> (if anything!) with those.

A standard DHCP relay system works just like this: the relay captures
broadcasts and forwards them to the DHCP server, but once the client has
a lease, it unicasts straight to the DHCP server. Unless there's a good
reason to do it another way, that's how it should be done.

If you want all DHCP interactions to go via the relay, there are a
couple of ways to do it.

1) Configure the relay to add a DHCP server override suboption, (RFC
5107 refers). dnsmasq knows about and honours this option, but
dhcp-helper can't provide it. It may be that dhrelay is doing this, and
that's why it behaved differently.

2) Give the dhcp-proxy flag to dnsmasq (version 2.53 or better). That
has the same effect without needing relay support.



More information about the Dnsmasq-discuss mailing list