[Dnsmasq-discuss] multiple dhcp-options with the same tag documentation
Wink Saville
wink at saville.com
Sat Sep 9 17:08:11 UTC 2023
OpenWRT is weird and has its own technique for the initial
configuration of dnsmasq[1]. Let me just focus my question on using
dhcp-host and dhcp-option in dnsmasq.conf
My understanding is a "typical" way to use dhcp-option is to define
two separate options and "set" them twice in a dhcp-host
# Define dhcp-option with tag:router1 and option:router
dhcp-option=tag:router1,option:router,192.168.2.1
# Define another dhcp-option with tag:dns_server1 and option:dns-server
dhcp-option=tag:dns_server1,option:dns-server,1.1.1.1
# Now specify multiple dhcp-option using their tag names in dhcp-host
dhcp-host=00:05:1b:b0:6f:f0,set:dns_server1,set:router1
The bot suggested multiple options could be appended to a
a single dhcp-option using one tag name:
# Define dhcp-option with tag:my_options with option:router
dhcp-option=tag:my_options,option:router,192.168.2.2
# Now "append" option:dns-server to dhcp-option with tag:my_options
dhcp-option=tag:my_options,option:dns-server,1.1.1.1
# Append more options to option with tag:my_options ...
# Now use my_options to give a dhcp-host multiple options
dhcp-host=00:05:1b:b0:6f:f0,set:my_options
Using the "append" technique means I don't have to repeat myself and
I can use one "my_options" to supply multiple options to any number
of different dhcp-host's. I've determined this works, but is it "legal"? I
ask because I could not find documentation for the "append" technique.
[1]:https://openwrt.org/docs/guide-user/base-system/dhcp
On Sat, Sep 9, 2023 at 6:58 AM Geert Stappers <stappers at stappers.nl> wrote:
>
> On Fri, Sep 08, 2023 at 09:37:27PM -0700, Wink Saville wrote:
> > ... "options" "tag" ... at least it seems to work for me on
> > OpenWRT with dnsmasq v2.86. But, as I said I don't see in the
> > documentation. Did I just miss it or should I not use it
> > or maybe it should be documented?
>
> I can't tell. I didn't get what the options were, what the tags was.
> Neither what did define the tag.
>
> Please describe the original problem.
>
> Also share the default Luci configuration file
> and the modified Luci configuration file with the assumed solution.
>
>
>
> Groeten
> Geert Stappers
>
> P.S. The monthly posting has
> | See also https://xyproblem.info/ which starts with:
> | The XY problem is asking about your attempted solution rather than
> | your actual problem. This leads to enormous amounts of wasted time
> | and energy, both on the part of people asking for help, and on the
> | part of those providing help.
>
> --
> Silence is hard to parse
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
More information about the Dnsmasq-discuss
mailing list