name resolution
Xen
list at xenhideout.nl
Thu Nov 23 14:30:12 UTC 2017
So I have two issues.
One is that nsswitch resolution of .local domain doesn't work
(explicitly):
ping john.local
<no response>
ping john
PING john.local (192.168.0.151) 56(84) bytes of data.
64 bytes from 192.168.0.151: icmp_seq=1 ttl=64 time=1.38 ms
64 bytes from 192.168.0.151: icmp_seq=2 ttl=64 time=1.53 ms
The other is that NetworkManager does not use the "domain" returned from
DHCP to set up a "split" domain with requests for domain ("local") going
to the DNS server acquired via DHCP.
In case you have another connection (e.g. mobile).
NetworkManager supports this:
[global-dns]
searches=local
[global-dns-domain-local]
servers=192.168.0.3
[global-dns-domain-*]
servers=8.8.8.8
Apparently it works (now) but "nmcli device show" does not list ANYTHING
about those entries.
However I am a bit quick to speak as the dnsmasq log shows that it's
working now:
Nov 23 15:15:32 kubuntu dnsmasq[31666]: setting upstream servers from
DBus
Nov 23 15:15:32 kubuntu dnsmasq[31666]: using nameserver 192.168.20.3#53
for domain local
Nov 23 15:15:32 kubuntu dnsmasq[31666]: using nameserver 8.8.8.8#53
Even though it is not reflected in "nmcli device show"
The "default" section is required, bit annoying, so I use google DNS.
So this part is covered now (yay!)
The downside is that this is a static configuration, not from DHCP.
But I still can't ping .local explicitly.
$ host john.local
john.local has address 192.168.0.151
Host queries the nameserver directly.
$ dig john.local @127.0.1.1
; <<>> DiG 9.10.3-P4-Ubuntu <<>> john.local @127.0.1.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27651
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;john.local. IN A
;; ANSWER SECTION:
john.local. 0 IN A 192.168.0.151
;; Query time: 1 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Thu Nov 23 15:26:04 CET 2017
;; MSG SIZE rcvd: 57
$ dig john.local @192.168.0.3
; <<>> DiG 9.10.3-P4-Ubuntu <<>> john.local @192.168.0.3
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35335
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;john.local. IN A
;; ANSWER SECTION:
john.local. 0 IN A 192.168.0.151
;; Query time: 1 msec
;; SERVER: 192.168.0.3#53(192.168.0.3)
;; WHEN: Thu Nov 23 15:27:36 CET 2017
;; MSG SIZE rcvd: 57
Anyone got any ideas?
More information about the ubuntu-users
mailing list