[Dnsmasq-discuss] I've lost my ability to resolve local machine names without a domain suffix
johndoe65534 at mail.com
Sun Oct 20 11:17:50 BST 2019
On 10/20/2019 10:15 AM, Chris Green wrote:
> On Sun, Oct 20, 2019 at 08:59:03AM +0200, Geert Stappers wrote:
>> On Sat, Oct 19, 2019 at 10:21:26PM +0100, Chris Green wrote:
>>> 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.
> Only my laptop gets *two* "search zbmc.eu" lines, all the other
> machines (well, all two of them that are actual accessible computers
> running Linux) have only one "search zbmc.eu" which seems more
>>> 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).
> OK, yes, I supposed that must be the way it happens. I guess for some
> reason my laptop is doing something odd/wrong. In fact I've just had
> a thought, it maybe connects using WiFi sometimes and using a wired
> connection at other times. It could well be that it sends out a DHCP
> broadcast request for both wired and WiFi connections.
>> 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.
> I don't add any command line options to dnsmasq, my changes to the
> defaults in /etc/dnsmasq.conf are as follows:-
> So I have a domain= like you.
>> What happens at _client_ side, actually happens at _client_ side.
> Yes, of course, and it seems to be all OK now after restarting
> everything (but no other changes) so *something* had got out of kilter
> so that unqualified names weren't working but was fixed by the reboots.
> It may well be that upgrades (that don't usually require restarts on
> Linux) had got some systemd bits in a tangle which a restart sorted out.
>>> ... 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?
>>> ... and why doesn't a local name work on the machine running dnsmasq?
>> say so. Yes, do put effort in asking a question.
> Asking for the address of an unqualified name on the machine running
> dnsmasq fails:-
> 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$
> Is there any way to fix this? It's not incredibly impoprtant because
> I only rarely do anything (as in log in and run programs) on that
> machine but it would be nice if it worked the same as the other
> machines on the LAN.
> It's presumably down to the order in which it runs its client DHCP
> requests versus when dnsmasq starts so that it can answer itself.
You are not using 'dhcp-fqdn' (1)?
More information about the Dnsmasq-discuss