DNSMASQ as DHCP server for relay requests

  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.


Occasional Visitor
I am trying to get DNSMASQ to act as DHCP server for relay requests from an upstream device. This device is on a different subnet but is routable.

I see the request come in via tcpdump and via dnsmasq logs, but dnsmasq only assigns the local lan range in response. I found that if I added secondary addresses to br0:X it will reply to the relay requests but then the primary lan starts getting assigned the secondary ip's. I moved the primary LAN to being dhcp relay as well from the upstream device but that made no difference. I have no clue why it replies properly to the secondary addresses via dhcp relay but this breaks the primary ip dhcp requests...

So is there a way to match specifically a dhcp-relay packet so I can remove the secondary addresses and just allow them to route instead? I can't find anything in the request to identify the dhcp-relay server even though in the tcpdump it has the relay server ip. I read something about using option 82 (remote-id/circuit-id) but I can't seem to get the relay to change/add that field to try and match it in the range request.

Here is the dhcp relay config on the upstream router:


Here is the dhcp config on the primary router:


I am trying to avoid running new cables to create separate br0 br1 br2 etc... Vlans would fix this for sure but the support for vlans seems to be device specific from what I read so trying to avoid that as well.

I saw in windows DHCP there is a setting to match on relay server, so I am hoping there is a way to do something similar with DNSMASQ. Any advice is appreciated. Thanks!

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!