host's fqdn not resolving
Stuart McGraw
smcg4191 at mtneva.com
Tue Aug 23 15:57:15 UTC 2022
On 8/22/22 02:21, Chris Green wrote:
> On Sun, Aug 21, 2022 at 11:37:50PM -0600, Stuart McGraw wrote:
>> On 8/21/22 03:10, Chris Green wrote:
>>> On Sat, Aug 20, 2022 at 05:41:12PM -0600, Stuart McGraw wrote:
>>> [snip description of problem]
>>>>
>>>> Surely with systemd-resolved, avahi, mdns, nsswitch,conf, /etc/hosts
>>>> and probably a half dozen other pieces involved, there must be some
>>>> magical configuration change that can achieve this?
>>>>
>>>> I have tried (really just stabs in the dark) setting:
>>>> /etc/systemd/resolved.conf: Domains=home
>>>> and:
>>>> /etc/avahi/avahi-daemon.conf: domain-name=home
>>>> but neither had the desired effect.
>>>>
>>> The default set-up using systemd, avahi and so on is a *mess*. It's
>>> possibly OK until you have a large[ish] LAN with a lot of systems on it.
>>>
>>> I simply disable systemd-resolved, remove avahi and run dnsmasq on one
>>> of my systems, everything then works as expected and you don't have to
>>> use (unnecessary) .local or .home suffixes on names. You can simply
>>> use the name of each system to refer to it, or the FQDN if you have
>>> a domain name for the LAN.
>>
>> That's pretty much what I do with the machines on my local network that
>> have a long lifetime. But for ephemeral VMs (and sometimes hardware)
>> that get an arbitrary ip address via dhcp, I don't want to have to update
>> the dns server machine's database or mess around with dynamic updates.
>
> You don't have to surely, dnsmasq gets the machine's name when it uses
> dnsmasq's DHCP server. That's what happens with (most of) my devices.
> There's a few badly behaved exceptions which don't supply dnsmasq with
> a name but they're mostly odds and ends like PVR boxes and such.
That would be a solution if I was using dnsmasq's dhcp server but I am
using the dhcp server in my router. (Don't really want to change that
as during the frequent power outages here my server machines are off but
the router is on a ups.)
>> I also have lots of admin scripts that I want to run on these ephemeral
>> machines that have names of the form "$HOST.home" in them that would be
>> a pain to change.
>>
>> So it seems to me the straightest way forward would be to configure an
>> ephemeral machine to treat it's own hostname "xxx" and "xxx.home" the
>> same, without any reliance on the network dns server. (Well, I guess
>> it would not be precisely the same as "xxx" would return 127.0.1.1 and
>> "xxx.home" would return the dhcp ip address; or maybe both one or the
>> other, not sure; but a dns lookup not finding "xxx.home" breaks things.)
>>
> That's the pain of letting Avahi etc. loose on your system and using
> the names it provides! :-)
It wasn't me! :-) Ubuntu is the one who installed and activated it
during the install (or maybe, it occurs to me now, as a result of
some other (Ubuntu) package that I installed.)
More information about the ubuntu-users
mailing list