[Dnsmasq-discuss] priority of local= and ipset=
Justin
cattyhouse at gmail.com
Fri Jan 7 11:54:39 UTC 2022
Thank you Simon. Hope `ipset=' gets the same treatment someday.
On Fri, Jan 7, 2022 at 7:34 PM Simon Kelley <simon at thekelleys.org.uk> wrote:
>
>
>
> On 07/01/2022 06:08, Justin wrote:
> > thanks Simon
> >
> > another related question
> >
> > 1)
> >
> > if i have 6000 domains, do i write 6000 lines of local=/domain/8.8.8.8
> > <http://8.8.8.8>, or do i write
> >
> > local=/domain1/2/3/.../8.8.8.8 <http://8.8.8.8>
> >
> > which one is faster for dnsmasq to locate and assign the nameserver?
>
> They're both the same.
>
> >
> > 2)
> >
> > btw, how much time does it take for dnsmasq ( 2.86 here) to locate one
> > domain from 100,000 domains in conf-file in the form of local= or ipset=?
>
> How long is a piece of string? It depends on the speed of the machine.
>
> What's more important is that the time taken grows in proportion to log
> n. In older dnsmasq releases, it was linear with n, or possibly a bit
> slower.
>
> Unless you're running on very weedy hardware or with massive load,
> 100,000 domains should be no trouble at all.
>
>
> Ahh. I just noted that you asked about ipset. The 2.86 rewrite _didn't_
> include ipset, so those lookups are still O(n). Be cautious with large
> numbers, and please report back if you get interesting results.
>
> Simon.
>
>
>
> >
> > 3)
> >
> > the search speed for local= and ipset= are the same? i mean do they use
> > the same algo?
> >
> >
> >
> > On Fri, Jan 7, 2022 at 07:46 Simon Kelley <simon at thekelleys.org.uk
> > <mailto:simon at thekelleys.org.uk>> wrote:
> >
> > repeating a domain in --server (or --local) is sensible and dnsmasq will
> > use some or all of the servers for an individual query, depending on
> > unknowable stuff.
> >
> > You would imagine that
> >
> > ipset=/google.com/one <http://google.com/one>
> > ipset=/google.com/two <http://google.com/two>
> >
> > would be equivalent to the documented
> >
> > ipset=/google.com/one,two <http://google.com/one,two>
> >
> > but clearly it isn't. The advice is to stick to the documented way of
> > expressing those semantics, I guess.
> >
> >
> > Cheers,
> > Simon.
> >
> >
> >
> > On 04/01/2022 07:55, Justin wrote:
> > > I just did some test. looks like the 'google.com
> > <http://google.com>' will be send to both
> > > 1.1.1.1 and 8.8.8.8. but the all the resolved ip address will only be
> > > added to ipset 'one'
> > >
> > > On Tue, Jan 4, 2022 at 2:20 PM Justin <cattyhouse at gmail.com
> > <mailto:cattyhouse at gmail.com>> wrote:
> > >>
> > >> Hello
> > >> i have settings in the order like this in dnsmasq.conf
> > >>
> > >> local=/google.com/1.1.1.1 <http://google.com/1.1.1.1>
> > >> local=/google.com/8.8.8.8 <http://google.com/8.8.8.8>
> > >> ipset=/google.com/one <http://google.com/one>
> > >> ipset=/google.com/two <http://google.com/two>
> > >>
> > >> what is the behavior of dnsmasq? which nameserver will be uses to
> > >> resolve google.com <http://google.com> and which set name will
> > the resolved ip of
> > >> google.com <http://google.com> be added to?
> > >>
> > >> thanks.
> > >
> > > _______________________________________________
> > > Dnsmasq-discuss mailing list
> > > Dnsmasq-discuss at lists.thekelleys.org.uk
> > <mailto:Dnsmasq-discuss at lists.thekelleys.org.uk>
> > >
> > https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
> > <https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss>
> > >
> >
> >
> > _______________________________________________
> > Dnsmasq-discuss mailing list
> > Dnsmasq-discuss at lists.thekelleys.org.uk
> > <mailto:Dnsmasq-discuss at lists.thekelleys.org.uk>
> > https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
> > <https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss>
> >
> > --
> >
> > Regards
> > Justin He
More information about the Dnsmasq-discuss
mailing list