Hi,
I have a need to assign a specific group of devices (Iot) IPs in a specific range that is outside the regular range that I've entered in Luci for the rest of the network.
This has been working fine for quite a while by adding to /etc/config/dhcp under config dnsmasq:
option confdir '/etc/dnsmasq.d'
and then adding to that file:
dhcp-range=tag:iot-no-internet,192.168.40.20,192.168.40.127,3h
dhcp-range=tag:iot-yes-internet,192.168.40.128,192.168.40.250,3h
I need this file in a place that doesn't get lost between reboots and startups so as to avoid writing it each time, and restarting dnsmasq etc.
Recently I had an issue with policy based routing (pbr) which stangri fixed quickly. The issue being that pbr assumed the location was the default. This made me think that there may well be other packages I may decide to use that may only consider the default location, and may not be as responsive as stangri.
With that said, my question is: How can I incorporate this into the default dhcp config file without using conf-dir?
I noticed that the openwrt wiki specifically mentions my use case by saying for tags:
List of tags that dnsmasq needs to match to use with
--dhcp-range
.
However, there is no mention of dhcp-range anywhere.
Before I experiment, wondering if anyone already has this setup... Would it be simply:
config dhcp 'lan'
...
list dhcp_range 'tag:iot-no-internet,192.168.40.20,192.168.40.127,3h'
list dhcp_range 'tag:iot-yes-internet,192.168.40.128,192.168.40.250,3h'
Thanks,