[Dnsmasq-discuss] Issue with circuit-id matching on dhcp requests
Simon Kelley
simon at thekelleys.org.uk
Sun May 10 21:08:31 UTC 2026
On 10.05.2026 13:31, Max Boon wrote:
> I post a message on the discussion list and... now it's working as it
> should. I think possibly the issue was cached mac/IP bindings in
> dnsmasq.leases. Some of the switches earlier managed to get IPs in the
> dynamic range (due to misconfiguration on my part), so they've been
> requesting the wrong IP vs the one they've been assigned in the dhcp-
> host declaration. Now I see those leases are eventually expiring and
> going through the full discover/offer/request/acknowledge process and
> getting the correct static IP.
>
Under those circumstances, they should have got a DHCPDECLINE reply from
dnsmasq and been forced into the four-phase process. Not all DHCP
clients get this right, however.
Glad it's fixed.
Simon.
> Yay!
>
> ------------------------------------------------------------------------
> *Från:* Dnsmasq-discuss <dnsmasq-discuss-
> bounces at lists.thekelleys.org.uk> för Max Boon <Max.Boon at bjurholm.se>
> *Skickat:* Söndag, 10 maj 2026 11:25
> *Till:* dnsmasq-discuss at lists.thekelleys.org.uk <dnsmasq-
> discuss at lists.thekelleys.org.uk>
> *Ämne:* [Dnsmasq-discuss] Issue with circuit-id matching on dhcp requests
>
> Hello,
>
> I have a bunch of switches that have previously been supplied with IP
> addresses using isc-dhcpd that I am now replacing with dnsmasq. There is
> an address range for automatically assigned IP's and the rest with
> static host assignments, all in the same /24 subnet.
>
> The static assignments are assigned using option 82 circuit-id to set a
> tag which is then matched in the dhcp-host declaration. For the most
> part I have managed to get it working, but I have noticed something in
> my logs which I am not sure is a bug or just my general lack of
> understanding...
>
> Basically, if a DHCP inform packet comes in, the circuit-id gets
> matched, and a corresponding ack gets sent by the server. However, if a
> DHCP request comes in, the server doesn't seem to be able to match the
> circuit ID at all and responds with "/dnsmasq-dhcp[5631]: no address
> range available for DHCP request via eth0/*"*
>
> I have confirmed using tshark that the incoming DHCP request packet
> contains a circuit-id that matches an assigned dhcp-host entry.
>
> My dnsmasq.conf has only the following range:
>
> dhcp-range=172.16.127.16,172.16.127.49,255.255.255.0,12h
>
> I have a seperate .conf containing the static entries, repeated like so:
>
> dhcp-circuitid=set:lag_103_1309_91,lag-103:1309.91
> dhcp-host=net:lag_103_1309_91,172.16.127.141,Switch1
> dhcp-option=net:lag_103_1309_91,12,Switch1
>
> dhcp-circuitid=set:lag_104_1408_93,lag-104:1408.93
> dhcp-host=net:lag_104_1408_93,172.16.127.139,Switch2
> dhcp-option=net:lag_104_1408_93,12,Switch1
>
> Best Regards,
>
> Max
>
> ⚠️
>
> *Externt meddelande*
> Var försiktig med länkar och bilagor. Bekräfta avsändaren om du är osäker.
> *Tips:* Hovra över länkar för att se den riktiga adressen.
>
>
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
More information about the Dnsmasq-discuss
mailing list