Discussion:
[Dnsmasq-discuss] local dns broke
Carl Karsten
2018-07-22 23:23:48 UTC
Permalink
I am not sure if this is a dnsmasq problem, but hopefully someone can
help me track down who's problem it is.

My dhcp server has:
host-record=pc8,192.168.1.8

which gets sent to the client (ubuntu bionic minimal), and saved, but
I guess not saved to the right place?

this works:
$ host goo.gl
goo.gl has address 172.217.8.206

local names don't resolve:
$ host pc8
Host pc8 not found: 2(SERVFAIL)

$ cat /etc/resolv.conf
nameserver 127.0.0.53

$ host pc8 192.168.1.8
Using domain server:
Name: 192.168.1.8
Address: 192.168.1.8#53
Aliases:
pc8 has address 192.168.1.8

$ systemd-resolve --status |cat
Global
DNSSEC NTA: 10.in-addr.arpa
16.172.in-addr.arpa
168.192.in-addr.arpa
17.172.in-addr.arpa
18.172.in-addr.arpa
19.172.in-addr.arpa
20.172.in-addr.arpa
21.172.in-addr.arpa
22.172.in-addr.arpa
23.172.in-addr.arpa
24.172.in-addr.arpa
25.172.in-addr.arpa
26.172.in-addr.arpa
27.172.in-addr.arpa
28.172.in-addr.arpa
29.172.in-addr.arpa
30.172.in-addr.arpa
31.172.in-addr.arpa
corp
d.f.ip6.arpa
home
internal
intranet
lan
local
private
test

Link 3 (wlo1)
Current Scopes: none
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no

Link 2 (enp0s25)
Current Scopes: DNS
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
DNS Servers: 192.168.1.8

(last line is my local dns set via dhcp)

If I change
/etc/resolv.conf
nameserver 192.168.1.8

then it works fine.

help....

--
Carl K
john doe
2018-07-23 19:22:13 UTC
Permalink
Post by Carl Karsten
I am not sure if this is a dnsmasq problem, but hopefully someone can
help me track down who's problem it is.
host-record=pc8,192.168.1.8
From the man page:

http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

host-record:
...
"in hosts-file also. Unlike hosts-files, names are not expanded, even
when expand-hosts is in effect. Short and long names may appear in the
same host-record, eg.
--host-record=laptop,laptop.thekelleys.org,192.168.0.1,1234::100
If the time-to-live is given, it overrides the default, which is zero or
the value of --local-ttl."

HTH
--
John Doe
Carl Karsten
2018-07-23 20:14:48 UTC
Permalink
the server is fine. I think. I'm fuzzy on why I need pc8 in that
line, but whatever: it seems to be sending 192.168.1.8 to the client.
other clients work just fine.

I just learned that ubuntu bionic uses a new networking management
thing called "netplan"
I suspect this is relevant.


***@dc10b:~$ cat /etc/netplan/01-netcfg.yaml
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp0s25:
dhcp4: yes
Post by john doe
Post by Carl Karsten
I am not sure if this is a dnsmasq problem, but hopefully someone can
help me track down who's problem it is.
host-record=pc8,192.168.1.8
http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
...
"in hosts-file also. Unlike hosts-files, names are not expanded, even when
expand-hosts is in effect. Short and long names may appear in the same
host-record, eg.
--host-record=laptop,laptop.thekelleys.org,192.168.0.1,1234::100
If the time-to-live is given, it overrides the default, which is zero or the
value of --local-ttl."
HTH
--
John Doe
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Geert Stappers
2018-07-23 21:16:55 UTC
Permalink
Post by Carl Karsten
the server is fine. I think. I'm fuzzy on why I need pc8 in that
line, but whatever: it seems to be sending 192.168.1.8 to the client.
other clients work just fine.
I just learned that ubuntu bionic uses a new networking management
thing called "netplan"
I suspect this is relevant.
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
version: 2
renderer: networkd
dhcp4: yes
What do the other client fine that the netplan client doesn't do?


Cheers
Geert Stappers
--
Yes, discussion order is in chronological order
Carl Karsten
2018-07-23 23:02:02 UTC
Permalink
Post by Geert Stappers
Post by Carl Karsten
the server is fine. I think. I'm fuzzy on why I need pc8 in that
line, but whatever: it seems to be sending 192.168.1.8 to the client.
other clients work just fine.
I just learned that ubuntu bionic uses a new networking management
thing called "netplan"
I suspect this is relevant.
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
version: 2
renderer: networkd
dhcp4: yes
What do the other client fine that the netplan client doesn't do?
resolve local names.

xenial box:
***@twist:~$ host pc8
pc8 has address 192.168.1.8

***@twist:~$ host trist
trist has address 192.168.1.156

bionic netplan:
***@dc10b:~$ host pc8
Host pc8 not found: 2(SERVFAIL)
***@dc10b:~$ host trist
Host trist not found: 2(SERVFAIL)

***@dc10b:~$ host pc8 192.168.1.8
Using domain server:
Name: 192.168.1.8
Address: 192.168.1.8#53
Aliases:
pc8 has address 192.168.1.8

***@dc10b:~$ host trist 192.168.1.8
Using domain server:
Name: 192.168.1.8
Address: 192.168.1.8#53
Aliases:
trist has address 192.168.1.156


***@dc10b:~$ cat /run/systemd/resolve/resolv.conf
# [comments removed]
nameserver 192.168.1.8

***@dc10b:~$ cat /etc/resolv.conf
nameserver 127.0.0.53
Post by Geert Stappers
Cheers
Geert Stappers
--
Yes, discussion order is in chronological order
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Geert Stappers
2018-07-24 05:32:28 UTC
Permalink
Post by Carl Karsten
Post by Geert Stappers
What do the other client fine that the netplan client doesn't do?
resolve local names.
pc8 has address 192.168.1.8
trist has address 192.168.1.156
Host pc8 not found: 2(SERVFAIL)
Host trist not found: 2(SERVFAIL)
Name: 192.168.1.8
Address: 192.168.1.8#53
pc8 has address 192.168.1.8
Name: 192.168.1.8
Address: 192.168.1.8#53
trist has address 192.168.1.156
# [comments removed]
nameserver 192.168.1.8
nameserver 127.0.0.53
My guess is that a domain name is missing, dc10b correct and twist wrong.


Cheers
Geert Stappers
--
Yes, discussion order is in chronological order
Carl Karsten
2018-07-24 05:47:51 UTC
Permalink
Post by Geert Stappers
Post by Carl Karsten
Post by Geert Stappers
What do the other client fine that the netplan client doesn't do?
resolve local names.
pc8 has address 192.168.1.8
trist has address 192.168.1.156
Host pc8 not found: 2(SERVFAIL)
Host trist not found: 2(SERVFAIL)
Name: 192.168.1.8
Address: 192.168.1.8#53
pc8 has address 192.168.1.8
Name: 192.168.1.8
Address: 192.168.1.8#53
trist has address 192.168.1.156
# [comments removed]
nameserver 192.168.1.8
nameserver 127.0.0.53
My guess is that a domain name is missing, dc10b correct and twist wrong.
ah right, I don't have
domain=something.com

I'm not sure I have gotten a straight answer about if/what domain name
I should plug in.
I have no interest of these names resolving outside of my lan, so what
name should I use?
Post by Geert Stappers
Cheers
Geert Stappers
--
Yes, discussion order is in chronological order
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
john doe
2018-07-24 08:03:42 UTC
Permalink
Post by Carl Karsten
Post by Geert Stappers
Post by Carl Karsten
Post by Geert Stappers
What do the other client fine that the netplan client doesn't do?
resolve local names.
pc8 has address 192.168.1.8
trist has address 192.168.1.156
Host pc8 not found: 2(SERVFAIL)
Host trist not found: 2(SERVFAIL)
Name: 192.168.1.8
Address: 192.168.1.8#53
pc8 has address 192.168.1.8
Name: 192.168.1.8
Address: 192.168.1.8#53
trist has address 192.168.1.156
# [comments removed]
nameserver 192.168.1.8
nameserver 127.0.0.53
My guess is that a domain name is missing, dc10b correct and twist wrong.
ah right, I don't have
domain=something.com
I'm not sure I have gotten a straight answer about if/what domain name
I should plug in.
I have no interest of these names resolving outside of my lan, so what
name should I use?
One of those TLDS (.home' seems reasonable)'
home
internal
intranet
lan
local
private
test

Also have a look online for private TLDS, there is more to this.
--
John Doe
Carl Karsten
2018-07-24 15:15:23 UTC
Permalink
adding domain=home helped sort of. I can now resolve other names on
my lan, but still not pc8.

pc8 is dnsmasq dhcp/dns for my lan, static ip 192.168.1.8
twist is ubunut xenial, seems to work ok
dc10b is ubuntu bionic that won't resolve pc8 unless I tell it server
192.168.1.8

before setting domain=home

***@twist:~$ host dc10b
dc10b has address 192.168.1.185
***@twist:~$ host pc8
pc8 has address 192.168.1.8

***@dc10b:~$ host twist
Host twist not found: 2(SERVFAIL)
***@dc10b:~$ host pc8
Host pc8 not found: 2(SERVFAIL)

after /etc/dnsmasq.d/local.conf
domain=home

***@twist:~$ host dc10b
dc10b.home has address 192.168.1.185
***@twist:~$ host pc8
pc8 has address 192.168.1.8
***@twist:~$ host pc8.home
Host pc8.home not found: 3(NXDOMAIN)

***@dc10b:~$ host twist
twist.home has address 192.168.1.199
***@dc10b:~$ host twist.home
twist.home has address 192.168.1.199
***@dc10b:~$ host pc8
Host pc8 not found: 2(SERVFAIL)
***@dc10b:~$ host pc8.home
Host pc8.home not found: 3(NXDOMAIN)


***@dc10b:~$ host pc8 192.168.1.8
Using domain server:
Name: 192.168.1.8
Address: 192.168.1.8#53
pc8 has address 192.168.1.8

***@dc10b:~$ host pc8.home 192.168.1.8
Using domain server:
Name: 192.168.1.8
Address: 192.168.1.8#53
Host pc8.home not found: 3(NXDOMAIN)
Post by john doe
Post by Carl Karsten
Post by Geert Stappers
Post by Carl Karsten
Post by Geert Stappers
What do the other client fine that the netplan client doesn't do?
resolve local names.
pc8 has address 192.168.1.8
trist has address 192.168.1.156
Host pc8 not found: 2(SERVFAIL)
Host trist not found: 2(SERVFAIL)
Name: 192.168.1.8
Address: 192.168.1.8#53
pc8 has address 192.168.1.8
Name: 192.168.1.8
Address: 192.168.1.8#53
trist has address 192.168.1.156
# [comments removed]
nameserver 192.168.1.8
nameserver 127.0.0.53
My guess is that a domain name is missing, dc10b correct and twist wrong.
ah right, I don't have
domain=something.com
I'm not sure I have gotten a straight answer about if/what domain name
I should plug in.
I have no interest of these names resolving outside of my lan, so what
name should I use?
One of those TLDS (.home' seems reasonable)'
home
internal
intranet
lan
local
private
test
Also have a look online for private TLDS, there is more to this.
--
John Doe
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Post by Carl Karsten
Post by Geert Stappers
Post by Carl Karsten
Post by Geert Stappers
What do the other client fine that the netplan client doesn't do?
resolve local names.
pc8 has address 192.168.1.8
trist has address 192.168.1.156
Host pc8 not found: 2(SERVFAIL)
Host trist not found: 2(SERVFAIL)
Name: 192.168.1.8
Address: 192.168.1.8#53
pc8 has address 192.168.1.8
Name: 192.168.1.8
Address: 192.168.1.8#53
trist has address 192.168.1.156
# [comments removed]
nameserver 192.168.1.8
nameserver 127.0.0.53
My guess is that a domain name is missing, dc10b correct and twist wrong.
ah right, I don't have
domain=something.com
I'm not sure I have gotten a straight answer about if/what domain name
I should plug in.
I have no interest of these names resolving outside of my lan, so what
name should I use?
One of those TLDS (.home' seems reasonable)'
home
internal
intranet
lan
local
private
test
Also have a look online for private TLDS, there is more to this.
--
John Doe
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
--
Carl K
Continue reading on narkive:
Loading...