<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div dir="ltr">
<div></div>
<div>
<div>
<div dir="ltr"><span id="ms-outlook-ios-cursor"></span>Sorry. Misread and thought they were being assigned to the first range. </div>
</div>
<div id="ms-outlook-mobile-signature" dir="ltr">
<div></div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Craig Wright <member852000@yahoo.com><br>
<b>Sent:</b> Monday, January 23, 2023 9:15:39 AM<br>
<b>To:</b> Donald Muller <donmuller22@outlook.com><br>
<b>Subject:</b> Re: [Dnsmasq-discuss] DHCP range for hostnames containing string</font>
<div> </div>
</div>
<div>
<div class="x_ydp6fee487ayahoo-style-wrap" style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif; font-size:13px">
<div></div>
<div dir="ltr" data-setdir="false">Can you explain how this would help? The mbdevices are being assigned to the !known range, not the top range -
<br>
</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false"><span>dhcp-range=tag:!known,192.168.0.11,192.168.0.20,255.255.255.0,12h</span></div>
<div dir="ltr" data-setdir="false"><span><br>
</span></div>
<div dir="ltr" data-setdir="false"><span>Thanks<br>
</span></div>
<div dir="ltr" data-setdir="false"><span><br>
</span></div>
<div dir="ltr" data-setdir="false"><span><br>
</span></div>
<div><br>
</div>
</div>
<div id="x_ydp8526a5dfyahoo_quoted_4574081931" class="x_ydp8526a5dfyahoo_quoted">
<div style="font-family:'Helvetica Neue',Helvetica,Arial,sans-serif; font-size:13px; color:#26282a">
<div>On Monday, 23 January 2023 at 14:11:06 GMT, Donald Muller <donmuller22@outlook.com> wrote:
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div id="x_ydp8526a5dfyiv5618999249">
<div>
<div>
<div>
<div dir="ltr">
<div dir="ltr">For your other IP range try this. </div>
<div dir="ltr"><br clear="none">
</div>
<div dir="ltr"><span style="color:rgb(33,33,33); font-family:Helvetica,Arial,sans-serif; font-size:13px; display:inline!important">dhcp-range=tag:!mbdevices,192.168.0.2,192.168.0.10,255.255.255.0,12h</span><br clear="none">
</div>
<div dir="ltr"><span style="color:rgb(33,33,33); font-family:Helvetica,Arial,sans-serif; font-size:13px; display:inline!important"><br clear="none">
</span></div>
</div>
</div>
<div id="x_ydp8526a5dfyiv5618999249ms-outlook-mobile-signature">
<div></div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_ydp8526a5dfyiv5618999249yqt04611" class="x_ydp8526a5dfyiv5618999249yqt4474726155">
<div dir="ltr" id="x_ydp8526a5dfyiv5618999249divRplyFwdMsg"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Dnsmasq-discuss <dnsmasq-discuss-bounces@lists.thekelleys.org.uk> on behalf of Craig Wright via Dnsmasq-discuss
<dnsmasq-discuss@lists.thekelleys.org.uk><br clear="none">
<b>Sent:</b> Monday, January 23, 2023 4:28:50 AM<br clear="none">
<b>To:</b> dnsmasq-discuss@lists.thekelleys.org.uk <dnsmasq-discuss@lists.thekelleys.org.uk><br clear="none">
<b>Subject:</b> Re: [Dnsmasq-discuss] DHCP range for hostnames containing string</font>
<div> </div>
</div>
<div>
<div class="x_ydp8526a5dfyiv5618999249x_ydp2bca181eyahoo-style-wrap" style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif; font-size:13px">
<div></div>
<div dir="ltr">
<div>Update on this issue, but still not fully resolved....<br clear="none">
<br clear="none">
<div>I received the following advice from Simon:</div>
<div><br clear="none">
</div>
"> To set the mbdevices tag, you need to use dhcp-match to look for MB in<br clear="none">
> the hostname option (which has number 12).<br clear="none">
>> dhcp-match=set:mbdevices,12,MB<br clear="none">
>> Almost works, but it will match MB anywhere in the host name.<br clear="none">
> To match just the start, you need to get out your ASCII table and<br clear="none">
> specify the first two bytes of the hostname<br clear="none">
>> dhcp-match=set:mbdevices,12,4d:42<br clear="none">
>> (4d = M, 42 = B)<br clear="none">
> Not tested this, but it (or something like it) should work.<br clear="none">
> Or dhcp-match=set:mbdevices,option:hostname,4d:42"<br clear="none">
<br clear="none">
<br clear="none">
I have currently:<br clear="none">
<br clear="none">
dhcp-range=192.168.0.2,192.168.0.10,255.255.255.0,12h<br clear="none">
dhcp-range=tag:mbdevices,192.168.0.50,192.168.0.60,255.255.255.0,12h<br clear="none">
dhcp-range=tag:!known,192.168.0.11,192.168.0.20,255.255.255.0,12h<br clear="none">
<br clear="none">
and have tried each of the lines:<br clear="none">
<br clear="none">
dhcp-match=set:mbdevices,option:hostname,MB<br clear="none">
dhcp-match=set:mbdevices,option:hostname,4d:42<br clear="none">
dhcp-match=set:mbdevices,12,MB<br clear="none">
dhcp-match=set:mbdevices,12,4d:42<br clear="none">
dhcp-name-match=set:mbdevices,MB*<br clear="none">
<br clear="none">
and the devices with hostnames starting with MB are all being allocated to the !known range.<br clear="none">
The log doesn't appear to show any errors, just that the devices were allocated an IP in the wrong range.<br clear="none">
<br clear="none">
Log extract:<br clear="none">
<br clear="none">
<<br clear="none">
Jan 20 15:06:01 dnsmasq-dhcp[54742]: 209364703 vendor class: MSFT 5.0<br clear="none">
Jan 20 15:06:01 dnsmasq-dhcp[54742]: 209364703 client provides name: MBA-4d5e7qJ<br clear="none">
Jan 20 15:06:01 dnsmasq-dhcp[54742]: 209364703 DHCPINFORM(epair0b) 192.168.0.12 3c:21:9c:10:9d:48<br clear="none">
Jan 20 15:06:01 dnsmasq-dhcp[54742]: 209364703 tags: mbdevices, epair0b<br clear="none">
Jan 20 15:06:01 dnsmasq-dhcp[54742]: 209364703 DHCPACK(epair0b) 192.168.0.12 3c:21:9c:10:9d:48 MBA-4d5e7qJ<br clear="none">
Jan 20 15:06:01 dnsmasq-dhcp[54742]: 209364703 requested options: 1:netmask, 3:router, 6:dns-server, 15:domain-name,<br clear="none">
Jan 20 15:06:01 dnsmasq-dhcp[54742]: 209364703 requested options: 31:router-discovery, 33:static-route, 43:vendor-encap,<br clear="none">
Jan 20 15:06:01 dnsmasq-dhcp[54742]: 209364703 requested options: 44:netbios-ns, 46:netbios-nodetype, 47:netbios-scope,<br clear="none">
Jan 20 15:06:01 dnsmasq-dhcp[54742]: 209364703 requested options: 119:domain-search, 121:classless-static-route,<br clear="none">
Jan 20 15:06:01 dnsmasq-dhcp[54742]: 209364703 requested options: 249, 252, 234<br clear="none">
Jan 20 15:06:01 dnsmasq-dhcp[54742]: 209364703 next server: 192.168.5.252<br clear="none">
Jan 20 15:06:01 dnsmasq-dhcp[54742]: 209364703 sent size: 1 option: 53 message-type 5<br clear="none">
Jan 20 15:06:01 dnsmasq-dhcp[54742]: 209364703 sent size: 4 option: 54 server-identifier 192.168.5.252<br clear="none">
Jan 20 15:06:01 dnsmasq-dhcp[54742]: 209364703 sent size: 4 option: 1 netmask 255.255.255.0<br clear="none">
Jan 20 15:06:01 dnsmasq-dhcp[54742]: 209364703 sent size: 4 option: 28 broadcast 192.168.5.255<br clear="none">
Jan 20 15:06:01 dnsmasq-dhcp[54742]: 209364703 sent size: 4 option: 6 dns-server 192.168.5.251<br clear="none">
Jan 20 15:06:01 dnsmasq-dhcp[54742]: 209364703 sent size: 4 option: 3 router 192.168.5.1<br clear="none">
Jan 20 15:11:09 dnsmasq-dhcp[54742]: 2797271231 available DHCP range: 192.168.0.2 -- 192.168.0.10<br clear="none">
Jan 20 15:11:09 dnsmasq-dhcp[54742]: 2797271231 available DHCP range: 192.168.0.50 -- 192.168.0.60<br clear="none">
Jan 20 15:11:09 dnsmasq-dhcp[54742]: 2797271231 available DHCP range: 192.168.0.11 -- 192.168.0.20<br clear="none">
><br clear="none">
<br clear="none">
dhcp-match=set:mbdevices,12,MB seems to work in that it applies the tag some of the devices but not others, but it puts them in the in the !known range<br clear="none">
<br clear="none">
dhcp-match=set:mbdevices,12,4d:42 does not appear to work<br clear="none">
<br clear="none">
dhcp-name-match=set:mbdevices,MB* appears to tag more consistently but still the devices do not get allocated to the mbdevices range.<br clear="none">
<br clear="none">
Any help would be really appreciated.<br clear="none">
Thanks<br clear="none">
<br clear="none">
<br clear="none">
</div>
<div><br clear="none">
</div>
</div>
<div><br clear="none">
</div>
</div>
<div id="x_ydp8526a5dfyiv5618999249x_ydp6dd347cbyahoo_quoted_5237518785" class="x_ydp8526a5dfyiv5618999249x_ydp6dd347cbyahoo_quoted">
<div style="font-family:'Helvetica Neue',Helvetica,Arial,sans-serif; font-size:13px; color:#26282a">
<div>On Thursday, 19 January 2023 at 14:03:18 GMT, Craig Wright wrote: </div>
<div><br clear="none">
</div>
<div><br clear="none">
</div>
<div>
<div id="x_ydp8526a5dfyiv5618999249x_ydp6dd347cbyiv0503634038">
<div>
<div class="x_ydp8526a5dfyiv5618999249x_ydp6dd347cbyiv0503634038yahoo-style-wrap" style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif; font-size:13px">
<div dir="ltr">Hi,</div>
<div dir="ltr">I am trying to allocate all hosts that join my network with a hostname beginning 'MB' to a specific DHCP range.</div>
<div dir="ltr">After much internet research I can't find if there is a solution.</div>
<div dir="ltr">So far I have got:</div>
<div dir="ltr"><br clear="none">
</div>
<div dir="ltr">dhcp-range=tag:mbdevices,192.168.0.50,192.168.0.60,255.255.255.0,12h</div>
<div dir="ltr"><br clear="none">
</div>
<div dir="ltr">and have tried</div>
<div dir="ltr">dhcp-host=MB*,set:mbdevices</div>
<div dir="ltr">thinking I could try using a wildcard to add them to the tag which would them allocate them an IP in the range above.</div>
<div dir="ltr"><br clear="none">
</div>
<div dir="ltr">But this doesn't work.</div>
<div dir="ltr"><br clear="none">
</div>
<div dir="ltr">Can you advise if what I am trying to achieve is possible please?</div>
<div dir="ltr">Many thanks<br clear="none">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>