Comment 4 for bug 998712

On 17/05/12 10:19, Wolf Rogner wrote:
> I recreated the situation by restarting the network manager.
>
> resolv.conf contains link to 127.0.0.1
> /run/nm-dns-dnsmasq.conf contained my name server already.
>
> However, even dig does not resolv correctly. Here are the results (my
> network is 10.x.x.x actually)
>
> wolf@mbp:~$ ping s4
> ping: unknown host s4
> wolf@mbp:~$ dig s4
>
> ; <<>> DiG 9.8.1-P1 <<>> s4
> ;; global options: +cmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 27930
> ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
>
> ;; QUESTION SECTION:
> ;s4. IN A
>
> ;; Query time: 3 msec
> ;; SERVER: 127.0.0.1#53(127.0.0.1)
> ;; WHEN: Thu May 17 11:07:39 2012
> ;; MSG SIZE rcvd: 20
>
> wolf@mbp:~$ dig @10.1.0.4 s4
>
> ; <<>> DiG 9.8.1-P1 <<>> @10.1.0.4 s4
> ; (1 server found)
> ;; global options: +cmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 34081
> ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
>
> ;; QUESTION SECTION:
> ;s4. IN A
>
> ;; AUTHORITY SECTION:
> . 10800 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2012051700 1800 900 604800 86400
>
> ;; Query time: 21 msec
> ;; SERVER: 10.1.0.4#53(10.1.0.4)
> ;; WHEN: Thu May 17 11:07:50 2012
> ;; MSG SIZE rcvd: 95
>
> wolf@mbp:~$ dig @10.1.0.4 s4.rsb.intern
>
> ; <<>> DiG 9.8.1-P1 <<>> @10.1.0.4 s4.rsb.intern
> ; (1 server found)
> ;; global options: +cmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35717
> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
>
> ;; QUESTION SECTION:
> ;s4.rsb.intern. IN A
>
> ;; ANSWER SECTION:
> s4.rsb.intern. 34000 IN A 10.1.0.4
>
> ;; AUTHORITY SECTION:
> rsb.intern. 34000 IN NS s4.rsb.intern.
>
> ;; Query time: 3 msec
> ;; SERVER: 10.1.0.4#53(10.1.0.4)
> ;; WHEN: Thu May 17 11:08:03 2012
> ;; MSG SIZE rcvd: 61
>
> wolf@mbp:~$ less /run/nm-dns-dnsmasq.conf
> wolf@mbp:~$ dig s4
>
> ; <<>> DiG 9.8.1-P1 <<>> s4
> ;; global options: +cmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 18553
> ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
>
> ;; QUESTION SECTION:
> ;s4. IN A
>
> ;; AUTHORITY SECTION:
> . 10725 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2012051700 1800 900 604800 86400
>
> ;; Query time: 14 msec
> ;; SERVER: 127.0.0.1#53(127.0.0.1)
> ;; WHEN: Thu May 17 11:09:05 2012
> ;; MSG SIZE rcvd: 95
>
> wolf@mbp:~$ ping s4
> PING s4.rsb.intern (10.1.0.4) 56(84) bytes of data.
> ^X^C64 bytes from 10.1.0.4: icmp_req=1 ttl=64 time=0.792 ms
>
> --- s4.rsb.intern ping statistics ---
> 1 packets transmitted, 1 received, 0% packet loss, time 0ms
> rtt min/avg/max/mdev = 0.792/0.792/0.792/0.000 ms
> wolf@mbp:~$
>

The difference between the working and non-working examples is that the
non-working ones are looking up

s4.

and the working ones are looking up

s4.rsb.intern.

getting from "ssh s4" to a DNS lookup of the A record s4.rsb.intern, is
the responsibilty of the C library resolver, which is configured by
/etc/resolv.conf. There are a few parameters in there that can affect
things, look for domain, search and options ndots.

Are there differences in these parameters between the working and
non-working states?

Simon.