[Dnsmasq-discuss] !known per vlan/scope/subnet?
Brian Cook
bcook at poughkeepsieschools.org
Thu May 18 19:21:44 UTC 2023
Trying to get different scope/ranges/vlans to work differently with !known
My problem seems to be that dhcp-ignore=tag:!known seems to enforce
across all defined dhcp-rages..
(for this project I am currently using openwrt fwiw.. dnsmasq-full
package on 22.03.5)
I have a vlan42, vlan172, vlan512
dhcp-range=set:vlan42,192.168.48.100,192.168.48.199,255.255.255.0,2h
dhcp-option=vlan42,3,192.168.48.1
dhcp-option=vlan42,6,10.20.0.6
dhcp-option=vlan42,15,test.v42
dhcp-range=set:vlan172,172.16.48.100,172.16.48.199,255.255.255.0,2h
dhcp-option=vlan172,3,172.16.48.1
dhcp-option=vlan172,6,172.16.48.1
dhcp-option=vlan172,15,test.v172
dhcp-range=set:vlan512,10.120.56.10,10.120.58.254,255.255.252.0,2h
dhcp-option=vlan512,option:router,10.120.59.1
dhcp-option=vlan512,option:dns-server,10.120.59.1
dhcp-option=vlan512,option:domain-name,test.v512
/etc/ethers works for statically assigning IPs
and if I defined entries with dhcp-host=11:22:33:*:*:* this will work
for devices that match..
but if I want vlan42 to accept unknown mac addresses..
when dhcp-ignore=tag:!known is enabled.. I cannot do get an address if
the mac is unknown..
Is there a way for a range (vlan42 for example) to either be
excluded.. or can I somehow define what scopes/ranges are subject to
being !known?
I have tried a myriad of things.. and could not predictively get this to work..
dhcp-host=*:*:*:*:*:*,set:vlan42 (this caused problems on other scopes)
or
dhcp-host=*:*:*:*:*:*,tag:vlan42 (this did not seem to do anything)
dhcp-host=aa:bb:cc:11:22:33,set,test
The optional set:<tag> sets an alphanumeric label which marks this
network so that DHCP options may be specified on a per-network basis.
When it is prefixed with 'tag:' instead, then its meaning changes from
setting a tag to matching it. Only one tag may be set, but more than
one tag may be matched.
when I put a valid mac in there and renew with that host, I can see
the label that I set, but I cannot see the label when I use tag..
I thought I was onto something with that.. but could not get it to work..
>From the documentation it seemed that a
dhcp-host=*:*:*:*:*:*,tag:vlan42,set:known
would give me what I am looking for (when !known is defined)
Is this possible?
Or am I doing something wrong?
Thank you in advance.
More information about the Dnsmasq-discuss
mailing list