<div dir="ltr">Hello,<div><br></div><div>I am trying to set different ranges in my dnsmasq configuration, to be used based on tags. I have a series of dhcp-host entries, matching by mac-address, and setting host-name and tag in most cases, and static lease in others:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font face="monospace">dhcp-host=set:iot,a1:b1:c1:d1:e1:f1,hostname1<br>...<br>dhcp-host=set:mobile,a2:b2:c2:d2:e2:f2,hostname2<br>...<br>dhcp-host=set:entertainment,a3:b3:c3:d3:e3:f3,hostname3<br>...<br>dhcp-host=a4:b4:c4:d4:e4:f4,ip-add4,hostname4,lease-time</font></blockquote><div><div></div></div><div><div></div></div><div><br></div><div>I have 4 ranges, one for each 'tag', and one more for the unknown devices.</div><div><br></div><div><div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font face="monospace">dhcp-range=192.168.0.251,192.168.0.254,5m<br></font><font face="monospace">dhcp-range=tag:mobile,192.168.0.201,192.168.0.250,30m<br></font><font face="monospace">dhcp-range=tag:entertainment,192.168.0.30,192.168.0.49,24h<br></font><font face="monospace">dhcp-range=tag:iot,192.168.255.10,192.168.255.100,72h</font></blockquote></div></div><div></div></div><div><br></div><div>First, I tried to set tried to set the 'unknown' range as:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font face="monospace">dhcp-range=tag:unknown,192.168.0.251,192.168.0.254,5m</font></blockquote><div><br></div><div>But this didn't work for the static-lease hosts, because as they are known but don't match any of the other tags, there was no range available for them.</div><div><br></div><div>Then I tried to set it without any tag:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font face="monospace">dhcp-range=tag:unknown,192.168.0.251,192.168.0.254,5m</font></blockquote><div><br></div><div>But then the tagged devices (<i>iot</i>, <i>mobile</i> and <i>entertainment</i>) used it despite having a specific range defined for their tag.</div><div><br></div><div>So the only way I found to get this work was denying tags:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font face="monospace">dhcp-range=tag:!iot,tag:!mobile,tag:!entertainment,192.168.0.251,192.168.0.254,5m</font></blockquote><div><br></div><div>And this works fine, but it doesn't look as an elegant solution to me, and makes me to add a new denied tag every time I add/change a range.</div><div><br></div><div>So, I wonder if there is any way to set a last resort range only to be used if there is not any other match.</div><div><br></div><div>Thanks in advance</div></div>