I think you should be able to use dhcp-mac to assign tags, then use separate dhcp-range only for selected tags. If you are able to create patterns matching this way, no external script would be required.
dhcp-mac=set:special,AA:BB:CC:*:*:* dhcp-range=tag:special,192.168.2.2,192.168.2.255 dhcp-range=192.168.1.2,192.168.1.255 Cheers, Petr On 5/12/22 16:32, m...@foxt.dev wrote: > Hello, > Is it possible to script dnsmasq's IP generation. I'm aware it's > possible to run a script when dnsmasq generates a lease, but as far as > I'm aware it's not possible to send data from the script back into > dnsmasq. > > My ideal use case is the ability to use a different IP range for > different MAC address ranges (i.e. AA:BB:CC:00:00:00-AA:BB:CC:FF:FF:FF > use 192.168.2.1-255, where everything else uses 1.1-1.255) > > Thanks in advance. -- Petr Menšík Software Engineer Red Hat, http://www.redhat.com/ email: pemen...@redhat.com PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB _______________________________________________ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss