Discussion:
[Dnsmasq-discuss] Tag from interface name?
Brian Rak
2017-07-03 14:53:03 UTC
Permalink
I'd like to be able to classify DHCP requests based on the interface
they come in on. I'd like to have a tag based on the interface name
(so, if the request came in over br0, I'd have a br0 tag to match on).

Is there any way of accomplishing this with dnsmasq currently? My
interfaces don't actually have an IP address assigned, so I can't match
by IP.
Chris Novakovic
2017-07-04 08:06:30 UTC
Permalink
Post by Brian Rak
I'd like to be able to classify DHCP requests based on the interface
they come in on. I'd like to have a tag based on the interface name
(so, if the request came in over br0, I'd have a br0 tag to match on).
Is there any way of accomplishing this with dnsmasq currently? My
interfaces don't actually have an IP address assigned, so I can't match
by IP.
Dnsmasq provides this for you already --- it's just not mentioned in the
man page for some reason.
Simon Kelley
2017-07-08 19:46:52 UTC
Permalink
Post by Chris Novakovic
Post by Brian Rak
I'd like to be able to classify DHCP requests based on the interface
they come in on. I'd like to have a tag based on the interface name
(so, if the request came in over br0, I'd have a br0 tag to match on).
Is there any way of accomplishing this with dnsmasq currently? My
interfaces don't actually have an IP address assigned, so I can't match
by IP.
Dnsmasq provides this for you already --- it's just not mentioned in the
man page for some reason.
You just have to look harder :)

"The tag system works as follows: For each DHCP request, dnsmasq col‐
lects a set of valid tags from active configuration lines which include
set:<tag>, including one from the dhcp-range used to allocate the
address, one from any matching dhcp-host (and "known" if a dhcp-host
matches) The tag "bootp" is set for BOOTP requests, and a tag whose
name is the name of the interface on which the request arrived is also
set."


Cheers,

Simon.
Post by Chris Novakovic
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Chris Novakovic
2017-07-09 09:10:22 UTC
Permalink
Post by Simon Kelley
Post by Chris Novakovic
Post by Brian Rak
I'd like to be able to classify DHCP requests based on the interface
they come in on. I'd like to have a tag based on the interface name
(so, if the request came in over br0, I'd have a br0 tag to match on).
Is there any way of accomplishing this with dnsmasq currently? My
interfaces don't actually have an IP address assigned, so I can't match
by IP.
Dnsmasq provides this for you already --- it's just not mentioned in the
man page for some reason.
You just have to look harder :)
"The tag system works as follows: For each DHCP request, dnsmasq col‐
lects a set of valid tags from active configuration lines which include
set:<tag>, including one from the dhcp-range used to allocate the
address, one from any matching dhcp-host (and "known" if a dhcp-host
matches) The tag "bootp" is set for BOOTP requests, and a tag whose
name is the name of the interface on which the request arrived is also
set."
Consider me sufficiently schooled :)

Loading...