<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
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.</div>
<div><br>
</div>
<div class="elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Yay!</div>
<div class="elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr style="display: inline-block; width: 98%;">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<b>Från:</b> Dnsmasq-discuss <dnsmasq-discuss-bounces@lists.thekelleys.org.uk> för Max Boon <Max.Boon@bjurholm.se><br>
<b>Skickat:</b> Söndag, 10 maj 2026 11:25<br>
<b>Till:</b> dnsmasq-discuss@lists.thekelleys.org.uk <dnsmasq-discuss@lists.thekelleys.org.uk><br>
<b>Ämne:</b> [Dnsmasq-discuss] Issue with circuit-id matching on dhcp requests </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Hello,</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
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.</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
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...</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
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 "<i>dnsmasq-dhcp[5631]:
 no address range available for DHCP request via eth0</i><b>"</b></div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
I have confirmed using tshark that the incoming DHCP request packet contains a circuit-id that matches an assigned dhcp-host entry.</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
My dnsmasq.conf has only the following range:</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
dhcp-range=172.16.127.16,172.16.127.49,255.255.255.0,12h</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
I have a seperate .conf containing the static entries, repeated like so:</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
dhcp-circuitid=set:lag_103_1309_91,lag-103:1309.91</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
dhcp-host=net:lag_103_1309_91,172.16.127.141,Switch1</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
dhcp-option=net:lag_103_1309_91,12,Switch1</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
dhcp-circuitid=set:lag_104_1408_93,lag-104:1408.93</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
dhcp-host=net:lag_104_1408_93,172.16.127.139,Switch2</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
dhcp-option=net:lag_104_1408_93,12,Switch1</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Best Regards,</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Max</div>
<div style="direction: ltr;"><br>
</div>
<table cellspacing="0" cellpadding="0" border="0" style="direction: ltr; margin: 0px 0px 6px; width: 100%; box-sizing: border-box; border-collapse: collapse; border-spacing: 0px;">
<tbody>
<tr>
<td style="direction: ltr; line-height: 0; border-top: 4px solid rgb(208, 208, 208); height: 0px;">
<div style="direction: ltr; line-height: 0; font-size: 0px;"> </div>
</td>
</tr>
</tbody>
</table>
<table cellspacing="0" cellpadding="0" border="0" style="direction: ltr; margin: 0px 0px 6px; width: 100%; box-sizing: border-box; border-collapse: collapse; border-spacing: 0px;">
<tbody>
<tr>
<td style="direction: ltr; border-width: 1px; border-style: solid; border-color: rgb(255, 230, 156); background-color: rgb(255, 243, 205); padding: 10px; color: rgb(83, 63, 3);">
<table cellspacing="0" cellpadding="0" border="0" style="direction: ltr; width: 100%; box-sizing: border-box; border-collapse: collapse; border-spacing: 0px;">
<tbody>
<tr>
<td style="direction: ltr; padding-right: 8px; vertical-align: top; width: 24px;">
<div style="direction: ltr; font-family: "Segoe UI", Arial, sans-serif; font-size: 16px;">
⚠️</div>
</td>
<td style="direction: ltr; vertical-align: top;">
<div style="direction: ltr; font-family: "Segoe UI", Arial, sans-serif;"><span style="font-size: 14px;"><b>Externt meddelande</b></span><span style="font-size: 13px;"><br>
Var försiktig med länkar och bilagor. Bekräfta avsändaren om du är osäker.<br>
</span><span style="font-size: 13px; color: rgb(122, 95, 0);"><b>Tips:</b> Hovra över länkar för att se den riktiga adressen.</span></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table cellspacing="0" cellpadding="0" border="0" style="direction: ltr; margin: 6px 0px 10px; width: 100%; box-sizing: border-box; border-collapse: collapse; border-spacing: 0px;">
<tbody>
<tr>
<td style="direction: ltr; line-height: 0; border-bottom: 4px solid rgb(208, 208, 208); height: 0px;">
<div style="direction: ltr; line-height: 0; font-size: 0px;"> </div>
</td>
</tr>
</tbody>
</table>
<div style="direction: ltr;"><br>
</div>
</body>
</html>