[Dnsmasq-discuss] What's the "right" way to specify upstream servers?
Geert Stappers
stappers at stappers.nl
Sun Sep 5 19:10:00 UTC 2021
On Sun, Sep 05, 2021 at 08:30:11PM +0200, Matus UHLAR - fantomas via Dnsmasq-discuss wrote:
> > > > > > On 03.09.21 17:13, Chris Green wrote:
> > > > > > > I know there probably isn't a "right" way to do this but, while I've
> > > > > > > been trying to sort out how to make my dns/dhcp more resilient, I have
> > > > > > > looked at my existing dnsmasq running on a Pi and it looks a bit odd
> > > > > > > to me.
> > > > > > >
> > > > > > > It's a pretty standard, off the shelf Raspberry Pi installation using
> > > > > > > the Lite version as it's headless. The dnsmasq.conf file has been
> > > > > > > changed quite a lot over the years though and I wonder if it's still
> > > > > > > optimal.
> > > > > > >
> > > > > > > The upstream servers *seem* to be specified in /etc/dhcpcd.conf as
> > > > > > > follows:-
> > > > > > >
> > > > > > > # Example static IP configuration:
> > > > > > > interface eth0
> > > > > > > static ip_address=192.168.1.2/24
> > > > > > > #static ip6_address=fd51:42f8:caae:d92e::ff/64
> > > > > > > static routers=192.168.1.1
> > > > > > > static domain_name_servers=192.168.1.2 1.1.1.1 212.159.13.49
>
> > > > > On Sat, Sep 04, 2021 at 04:33:10PM +0200, Matus UHLAR - fantomas via Dnsmasq-discuss wrote:
> > > > > > this is dhcp client configuration, not dhcp server.
> > > > > >
> > > > > > iiuc it tells dhcp client not to use IP address, default route nor servers
> > > > > > that DHCP server provided.
>
> > > > On 04.09.21 17:52, Chris Green wrote:
> > > > > This *is* the DHCP server for my LAN so these are the upstream DNS
> > > > > servers it gives to its clients.
>
> > > On Sun, Sep 05, 2021 at 01:51:22PM +0200, Matus UHLAR - fantomas via Dnsmasq-discuss wrote:
> > > > - why do you run a DHCP client on a DHCP server then?
> > > > - Especially when you configured it statically and not to use DHCP settings?
> > > >
> > > > note that this is dnsmasq list, not dhcpcd.
>
> > On 9/5/2021 16:41, Chris Green wrote:
> > > Because that's what you get if you install dnsmasq and very little
> > > else on an 'out of the box' Raspberry Pi.
?
> On 05.09.21 17:12, Treysis wrote:
> > And there's nothing wrong with it. Many home routers incl. OpenWrt run
> > dhcpd to get upstream information, and use dnsmasq to distribute
> > everything to every device behind the router.
>
> those routers usually get their IP address, default route and DNS servers from
> DHCP upstream servers.
>
> In this case, all those parameters were hardly overwritten (apparently by
> instalator), which is strange, but the OS _MAY_ contain scripts that use
> information from DHCP client to configure dnsmasq (e.g. dns server list)
>
> I can only guess now.
>
> since the dnsmasq.conf has been changed, it's hard to say if it's optimal.
>
> I use dnsmasq on my router, which takes dns servers dynamically, which I
> believe is safer than using static list.
>
We all have our believes for better / safer / faster / cheaper.
In https://datatracker.ietf.org/doc/html/rfc1925 is stated
(7) It is always something
(7a) (corollary). Good, Fast, Cheap: Pick any two (you can't
have all three).
The trouble starts
when people didn't pick the same two assume they did.
Meaning subject question:
What's the "right" way to specify upstream servers?
is hard to answer.
Groeten
Geert Stappers
--
Silence is hard to parse
More information about the Dnsmasq-discuss
mailing list