[Dnsmasq-discuss] How to troubleshoot NXDOMAIN for local devices?

Todd Andrews taa at pobox.com
Fri Feb 16 17:32:45 GMT 2018


Hi Geert,

On Thu, Feb 15, 2018 at 11:45 PM, Geert Stappers <stappers at stappers.nl>
wrote:

> On Thu, Feb 15, 2018 at 10:46:27PM +0000, Andy Ruddock wrote:
> > Todd Andrews wrote:
> > > Hi All,
> > >
> > > I'm running dnsmasq 2.76 on a Raspberry Pi.
>
> FWIW there are 2.79 release candidates.
>

Thanks for this info.

> > It's been working great for
> > > months but today I started seeing an odd behavior for a specific local
> > > device and I don't know how to troubleshoot it.
> > >
> > > The device is a Dell Inspiron 5577 Windows 10 Home edition laptop with
> the
> > > latest Windows updates. It's getting an IP address of 192.168.1.115.
>
> What did choose the  .115  ??
>

In the absence of another DHCP server on my network, my guess is that it
could only have been assigned by dnsmasq.


> > > I first noticed the problem when I tried to establish a VNC connection
> to it
> > > because I can't connect via its hostname, "sagan", but I can connect
> via
> > > its IP address.
>


> Is hostname "sagan" really configured inside the Windows 10 Home edition
> laptop??
>

Yes. It's configured as the Computer Name under Windows.


>
> > > Neither the IP assignment nor the laptop's MAC address appear in
> > > dnsmasq.leases. The only reason I know it is assigned .115 is by
> physically
> > > going to the laptop and running the Windows 'ipconfig' program at the
> > > command prompt.
> > >
> > > I've rebooted the Raspberry Pi and the Windows 10 laptop, but it hasn't
> > > made a difference.
> > >
> > > More info below. Does anyone have any ideas?
> > >
> > > Regards,
> > > Todd
> >
> >
> > Are you sure the windows box hasn't been configured with a static IP
> > address?
> >
> > Any information when you refresh the IP address from within a cmd window
> > in Windows?
> >       ipconfig /renew
> >
> > >
> > >
> > > 1. dnsmasq.log shows:
> > > /var/log/dnsmasq.log:Feb 15 12:38:34 dnsmasq[738]: config
> 192.168.1.115 is NXDOMAIN
>
> Yes, that is problem original poster has.
>
> > > 2. I believe the following are the relevant dnsmasq config file
> entries.
> > > These have been working for quite some time. I'm obfuscating the full
> MAC
> > > address:
> > >
> > > dhcp-host=f4:8e:38:xx:xx:xx,sagan
>
> That is MAC-address and hostname.
> Where is the "connection" / "link"  with  IP-address?
>

I don't know. Nothing showed in dnsmasq.leases. I don't know where else to
look.

And about MAC-address:
>  * How many MAC addresses has the laptop?
>  * Are you using the right one?
>  * What was done to prevent typo errors?
>

Laptop has two. One wired (192.168.1.115) and one wifi (wifi is disabled).
I'm using the correct one. I double- and triple-checked what I typed before
posting to this list.


> > > domain=si.loc
> > > local=/si.loc/
> > > expand-hosts
> > >
> > >
> > > 3.  $ dnsmasq --test
> > > dnsmasq: syntax check OK.
> > >
> > >
> > > 4. Using the program WinIPConfig2012 a.k.a. WinIPConfig 4.0
> > > <http://www.pkostov.com/wordpress/?p=19>, I've verified that the
> laptop is
> > > using the Raspberry Pi as the DHCP server. There's no other DHCP
> server on
> > > my network that I know of.
> > >
> > > 5. On a third computer, a Macintosh, I get these results.
>
> The third computer, what is the hostname?
>

"Stormwind" at 192.168.1.6


>
> > > The Raspberry Pi is at 192.168.1.40.
> > >
> > > $ ping sagan
> > >       *ping: cannot resolve sagan: Unknown host*
> > > $ ping sagan.si.loc
> > >       *ping: cannot resolve sagan.si.loc: Unknown host*
> > >
> Does it work for the hostname of the third computer?
>
>
I think you're asking if I can ping/dig/nslookup the third computer via
hostname. The answer is YES. The following were typed on the Raspberry Pi
running dnsmasq:

quark:~ pi$ ping stormwind

PING stormwind (192.168.1.6) 56(84) bytes of data.
64 bytes from stormwind.si.loc (192.168.1.6): icmp_seq=1 ttl=64 time=0.675
ms
64 bytes from stormwind.si.loc (192.168.1.6): icmp_seq=2 ttl=64 time=0.574
ms
^C
--- stormwind ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 0.574/0.624/0.675/0.056 ms

quark:~ pi$ ping stormwind.si.loc

PING stormwind.si.loc (192.168.1.6) 56(84) bytes of data.
64 bytes from stormwind.si.loc (192.168.1.6): icmp_seq=1 ttl=64 time=0.632
ms
64 bytes from stormwind.si.loc (192.168.1.6): icmp_seq=2 ttl=64 time=0.575
ms
^C
--- stormwind.si.loc ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.575/0.603/0.632/0.037 ms

quark:~ pi$ dig stormwind

; <<>> DiG 9.9.5-9+deb8u15-Raspbian <<>> stormwind
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53380
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;stormwind.                     IN      A

;; ANSWER SECTION:
stormwind.              0       IN      A       192.168.1.6

;; Query time: 4 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Feb 16 09:16:41 PST 2018
;; MSG SIZE  rcvd: 54


quark:~ pi$ dig stormwind.si.loc


; <<>> DiG 9.9.5-9+deb8u15-Raspbian <<>> stormwind.si.loc
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 324
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;stormwind.si.loc.              IN      A

;; ANSWER SECTION:
stormwind.si.loc.       0       IN      A       192.168.1.6

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Feb 16 09:16:45 PST 2018
;; MSG SIZE  rcvd: 61


quark:~ pi$ nslookup stormwind

Server:         127.0.0.1
Address:        127.0.0.1#53

Name:   stormwind
Address: 192.168.1.6


quark:~ pi$ nslookup stormwind.si.loc

Server:         127.0.0.1
Address:        127.0.0.1#53

Name:   stormwind.si.loc
Address: 192.168.1.6




>
> Groeten
> Geert Stappers
> --
> Leven en laten leven
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20180216/cbda60e9/attachment-0001.html>


More information about the Dnsmasq-discuss mailing list