Re: [Dnsmasq-discuss] multiple dhcp-options with the same tag
Dnsmasq is working fine, this is not a question about how to get it working, it is about the syntax in dnsmasq.conf. My second post[1] provides a more complete example of the technique I'm using, appending multiple options into one dhcp-option, in dnsmasq.conf. And I'm just wondering if that technique is actually supported because I didn't see it documented. [1]:https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2023q3/017220.html On Sat, Sep 9, 2023 at 2:18 PM Warning XY Problem wrote: > > On Sat, Sep 09, 2023 at 10:08:11AM -0700, Wink Saville wrote: > > On Sat, Sep 9, 2023 at 6:58 AM Geert Stappers 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. > > } I can't tell. I didn't get what the options were, what the tag 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. > > > > > > > Let me just focus my question on using > > dhcp-host and dhcp-option in dnsmasq.conf > > Tell what the original problem is. > > > That in other words: > > dnsmasq works fine. > dnsmasq works even fine in most corner cases. > > > Right now is it not told what the corner case is. > > > Groeten > Geert Stappers > -- > Silence is hard to parse > > ___ > Dnsmasq-discuss mailing list > Dnsmasq-discuss@lists.thekelleys.org.uk > https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] multiple dhcp-options with the same tag
On Sat, Sep 09, 2023 at 10:08:11AM -0700, Wink Saville wrote: > On Sat, Sep 9, 2023 at 6:58 AM Geert Stappers 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. > } I can't tell. I didn't get what the options were, what the tag 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. > > > > Let me just focus my question on using > dhcp-host and dhcp-option in dnsmasq.conf Tell what the original problem is. That in other words: dnsmasq works fine. dnsmasq works even fine in most corner cases. Right now is it not told what the corner case is. Groeten Geert Stappers -- Silence is hard to parse ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] multiple dhcp-options with the same tag
> Op 9 sep. 2023 om 07:19 heeft Wink Saville het volgende > geschreven: > > I'm learning dnsmasq and I'm taking advice from ChatGPT-4, probably a > bad idea but so far it's given reasonable advice :) How are you able to judge if advice is reasonable if you’re needing to ask for advice? > > Anyway, in this instance I was asking a question[1] about how to > configure dnsmasq on OpenWRT. > > The first prompt was: > > "Using Luci on openwrt is there a way to set a dhcp-option and use it > on a dhcp-host record?" > > It answered correctly that using luci you can't do it but you can do > it in /etc/dnsmasq.conf and gave an example: > > ``` > dhcp-host=00:11:22:33:44:55,set:myOptions,192.168.1.100 > dhcp-option=tag:myOptions,option:dns-server,192.168.1.2 > dhcp-option=tag:myOptions,option:router,192.168.1.1 > ``` > > My second prompt ends with the question: > > "Anyway, your example shows that myOptions is composed of two separate > dhcp-option's. Are you sure that is legal, can you provide me with a > link or a quote from the dnsmasg.conf documentation?" > > Its response was, as is typical. a long winded yes and it also gave me > a quote from the documentation. Of course, I couldn't find that quote, > which is also typical, it lies! Anyway, to cut to the chase I'm > writing because the technique the bot showed does work, 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? > > -- Wink > > [1]:https://chat.openai.com/share/cadee80b-4e3e-41e1-b95e-5fd62e799a9a > > ___ > Dnsmasq-discuss mailing list > Dnsmasq-discuss@lists.thekelleys.org.uk > https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss > ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] multiple dhcp-options with the same tag documentation
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 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@lists.thekelleys.org.uk > https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] multiple dhcp-options with the same tag documentation
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@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss