<div dir="ltr"><div>Hello Geert. <br></div><div><br></div><div>I'd like to confirm that the solutions posted by you and Petr worked perfectly.</div><div><br></div><div>Sorry for my late reply, I didn't receive the email from the mailing list (I assume I changed my settings wrongly), and Geert's email got caught up in the Gmail spam filter.</div><div><br></div><div>Thanks to you both, foxtdev<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 16 May 2022 at 06:39, Geert Stappers <<a href="mailto:stappers@stappers.nl">stappers@stappers.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello you,<br>
(Cc to dnsmasq mailinglist)<br>
<br>
<br>
On Fri, May 13, 2022 at 03:58:30PM +0200, Petr Menšík wrote:<br>
> On 5/12/22 16:32, <a href="mailto:me@foxt.dev" target="_blank">me@foxt.dev</a> wrote:<br>
> > Hello,<br>
> >    Is it possible to script dnsmasq's IP generation. I'm aware it's<br>
> > possible to run a script when dnsmasq generates a lease, but as far as<br>
> > I'm aware it's not possible to send data from the script back into<br>
> > dnsmasq.<br>
> ><br>
> >    My ideal use case is the ability to use a different IP range for<br>
> > different MAC address ranges (i.e. AA:BB:CC:00:00:00-AA:BB:CC:FF:FF:FF<br>
> > use 192.168.2.1-255, where everything else uses 1.1-1.255)<br>
> <br>
> I think you should be able to use dhcp-mac to assign tags, then use<br>
> separate dhcp-range only for selected tags. If you are able to create<br>
> patterns matching this way, no external script would be required.<br>
> <br>
> dhcp-mac=set:special,AA:BB:CC:*:*:*<br>
> <br>
> dhcp-range=tag:special,192.168.2.2,192.168.2.255<br>
> dhcp-range=192.168.1.2,192.168.1.255<br>
> <br>
> <br>
> ><br>
> > Thanks in advance.<br>
<br>
Please come with a sincere thanks<br>
that expresses how usefull a response is.<br>
<br>
<br>
In case you are busy with connecting the AA:BB:CC:*:*:* devices,<br>
I recomment<br>
<br>
  dhcp-range=tag:special,192.168.1.192,192.168.1.254<br>
  dhcp-range=192.168.1.2,192.168.1.191<br>
<br>
So all devices in <a href="http://192.168.1.0/24" rel="noreferrer" target="_blank">192.168.1.0/24</a>  and the AA:BB:CCs at 192-254.<br>
<br>
I'm trying to say that I miss the why for <a href="http://192.168.1.0/24" rel="noreferrer" target="_blank">192.168.1.0/24</a> and also a<br>
<a href="http://192.168.2.0/24" rel="noreferrer" target="_blank">192.168.2.0/24</a>. That I expect that you are struggling with two networks.<br>
<br>
<br>
In case the good advice Petr didn't solve your original problem,<br>
try to describe your problem better (or just in other words).<br>
<br>
<br>
Groeten<br>
Geert Stappers<br>
-- <br>
Silence is hard to parse<br>
</blockquote></div></div>