[Dnsmasq-discuss] I've lost my ability to resolve local machine names without a domain suffix
Geert Stappers
stappers at stappers.nl
Sun Oct 20 07:59:03 BST 2019
On Sat, Oct 19, 2019 at 10:21:26PM +0100, Chris Green wrote:
> On Sat, Oct 19, 2019 at 10:21:21PM +0200, Geert Stappers wrote:
> > On Sat, Oct 19, 2019 at 09:02:19PM +0100, Chris Green wrote:
> > > > >
> > > > > I've suddenly lost the ability to resolve local machine names without
> > > > > a domain suffix, e.g.:-
> > > > >
> > > > > chris$ host t470
> > > > > Host t470 not found: 2(SERVFAIL)
> > > > > chris$ host t470.zbmc.eu
> > > > > t470.zbmc.eu has address 192.168.1.92
> > > > > chris$
> > > > >
> > > >
> > > >
> > > Strangely I seem to be able to resolve local names without a suffix
> > > now. I have rebooted a few machines, maybe something simply got
> > > full/misconfigured and a reboot has cleared it up.
> >
> > OK
> >
> I'm still a bit worried by all this as everything seemed to be working
> well for many months and years and now it's all a bit hit and miss.
>
> On the Raspberry Pi I can't resolve names without a domain:-
>
> chris at newdns$ grep -e search -e domain /etc/resolv.conf
> chris at newdns$ host esprimo
> Host esprimo not found: 3(NXDOMAIN)
> chris at newdns$ host esprimo.zbmc.eu
> esprimo.zbmc.eu has address 192.168.1.3
> chris at newdns$
>
>
> On my laptop, running xubuntu 19.04 I see:-
>
> chris$ grep -e search -e domain /etc/resolv.conf
> search zbmc.eu
> search zbmc.eu
> chris$ more /etc/resolv.conf
> # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
> # 127.0.0.53 is the systemd-resolved stub resolver.
> # run "systemd-resolve --status" to see details about the actual nameservers.
>
> search zbmc.eu
> nameserver 127.0.0.53
> search zbmc.eu
> chris$ host esprimo
> esprimo.zbmc.eu has address 192.168.1.3
>
>
> On my desktop machine (also running xubuntu 19.04) :-
>
> chris at esprimo$ grep -e search -e domain /etc/resolv.conf
> search zbmc.eu
> chris at esprimo$ more /etc/resolv.conf
> # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
> # 127.0.0.53 is the systemd-resolved stub resolver.
> # run "systemd-resolve --status" to see details about the actual nameservers.
>
> nameserver 127.0.0.53
> search zbmc.eu
> chris at esprimo$
>
> Other machines (running xubuntu 18.04) look similar to the desktop
> machine.
>
>
> So why does my laptop have *two* "search zbmc.eu" lines in
> /etc/resolv.conf whereas other machines only have one?
Yes, your laptop and your other machines in your network.
> Also, how does this line get added to /etc/resolv.conf?
Welcome to the wonderful world of the server-client-concept.
The DHCP client does a "DHCP request", DHCP server (Dnsmasq) answers.
In the reply are https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol#Client_configuration_parameters
such as code 15 (domain) and code 119 (domain search).
Client uses the recieved configuration parameters (where it seems fit).
Check in the manual page of Dnsmasq the section "--domain". It starts
with: "Specifies DNS domains for the DHCP server." and contains
| In addition, when a suffix is set then hostnames without a domain part
| have the suffix added as an optional domain part. Eg on my network I
| can set --domain=thekelleys.org.uk and have a machine whose DHCP
| hostname is "laptop". The IP address for that machine is available
| from dnsmasq both as "laptop" and "laptop.thekelleys.org.uk".
That gives some information about _server_ side.
What happens at _client_ side, actually happens at _client_ side.
> ... and why doesn't a local name only work on the machine running dnsmasq?
Sorry, can't parse that question. If the question was
} ... and why does a local name only work on the machine running dnsmasq?
or
> ... and why doesn't a local name work on the machine running dnsmasq?
say so. Yes, do put effort in asking a question.[1]
Groeten
Geert Stappers
Footnote
[1] Read http://www.catb.org/~esr/faqs/smart-questions.html to prevent
silence as an answer.
--
Leven en laten leven
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20191020/cdbe09be/attachment-0001.sig>
More information about the Dnsmasq-discuss
mailing list