On Tue 08 Apr 2025 at 13:07:34 (-0400), Michael Stone wrote:
> On Mon, Apr 07, 2025 at 10:28:12PM -0500, David Wright wrote:
> > On Thu 03 Apr 2025 at 06:55:10 (-0400), Greg Wooledge wrote:
> > > I disagree with you here.  The 127.0.1.1 address is a placeholder put
> > > there by the installer for the more common case where a machine doesn't
> > > have a fixed LAN IP address.  Most home or workplace computers these
> > > days will get their addresses from DHCP without a reservation, so their
> > > internal addresses may vary.
> > 
> > And that means that two machines can't find each other unless the DHCP
> > server is also a DNS server. Or you set up and run your own.
> 
> Or you use mdns, which is the standard way of dealing with dynamic
> resources on an unmanaged network.

The resources stay fixed during their lifetime, and any changes that
occur are at a glacial pace. The network is managed, by me.

I also don't like the names that mDNS comes up with.

> (That doesn't mean you have to use
> mdns, it just means that if you instead decide to do something like
> copy hosts files around the network you're choosing to make up your
> own solution to the inherent problems that led to dns in the first
> place.)

I can hardly take credit for inventing /etc/hosts. It's simple to set
up, and it causes no problems here. I don't think DNS was invented for
resolving two dozen non-hierachical names on one site.

> > But one disadvantage of your preferred approach is that the hostname
> > and domain won't resolve unless the network is up.
> 
> Nope, the stuff in /etc/hosts will resolve regardless of the state of
> the network. You won't be able to connect to the address associated
> with the local hostname until that address is configured on the host.

Sloppy, sorry. Yes, /I/ can resolve my hostname with   getent hosts,
but, for example, ping can't resolve it unless I'm connected, even
when systemd shows the link as UP.

> For various reasons I'd much rather configure a static IP in this
> situation than set up a reservation on the dhcp server. Among other
> things, in a small network the bespoke dhcp configuration is likely
> going to cause pain that can't possibly outweigh the need to
> reconfigure a static IP if for some strange reason it needs to change.

I don't know how to configure static IPs without a DHCP server when
there are devices that can only configure themselves by DHCP (or
maybe mDNS, I haven't tried). But what are the pain and the strange
reason?

> And a static IP is always going to be there (eliminating the issue of
> the hostname resolving to an unreachable IP). If I were using any sort
> of dhcp, including with a static reservation, I'd probably use
> 127.0.1.1 for the local hostname rather than any non-local IP.

As I said, that's what I do. Ping likes that too.

> Mostly,
> to me, this falls into a weird place in wanting to use a complex
> solution (static dhcp reservations) without taking the relatively
> small additional step of just providing dns. Either go all the way
> and provide all the normal facilities (which these days are often
> baked into the router) instead of a mash-up, or go the easy route
> and use dynamic dhcp and mdns.

Apart from configuring DNS, I don't want to have to run a dedicated
server 24/7. And none of the 24/7 routers has had DNS capability.
OTOH they've all had very simple interfaces for setting up static
DHCP reservations.

Cheers,
David.

Reply via email to