In DNSMasq, is there a way to assign a tag(s) to an entire IP range of host reservations?
I'm using DNSMasq and have my DHCP reservations set up such that different devices are split into different "categories" and assigned IPs based on that category.
Example:
Network Range: 10.0.0.0/20 (10.0.0.0-10.0.15.254)
10.0.0.1-10.0.0.254: Category A
10.0.1.1-10.0.1.254: Category B
10.0.2.1-10.0.2.254: Category C
10.0.3.1-10.0.3.254: Category D
...
Although the ranges are logically grouped into categories, there is no actual network separation. This is a single network with no VLANs (most of the hardware & devices wouldn't support VLANs anyway)
I'm trying to figure out a way to tag Category A with <Tag A> so that I can apply options using that tag (timeserver, dns server, etc) and everything that has a host reservation in that range will get those settings.
Looking at the DHCP ranges in OPNsense, there seem to be two modes:
The first one allows you to enter a start and stop address, as well as setting a tag.
This is almost what I want but that creates a range that the DHCP server will use to hand out dynamic leases. I don't want these ranges to be handed out as dynamic leases as they're reserved for static reservations.
The second one creates a static range which can also have a tag set. This does not hand out leases from the pool, but only accepts a start address and infers the netmask (and therefore end address) from the router.
This would mean that setting a static range spans the entire network and wouldn't allow for "smaller" ranges that apply to only one of the groups
Assuming that's correct it would be unable to assign separate ranges (and therefore tag) to 10.0.2.x different from 10.0.3.x
I also considered tagging each host entry individually with a tag for the category, however that is also not currently doable since the host entries only allow setting a single tag.
So if I set a tag that puts the host in a certain category, I'm then unable to tag it to set more specific options. Eg. If the category tag only sets the timeserver, but I need to set a specific DNS server for one or two devices
Hence why I was tryign to see if I could set a tag per range, since that would effectively allow setting two tags on each host instead of just one