Discussion:
[Dnsmasq-discuss] How to troubleshoot NXDOMAIN for local devices?
Todd Andrews
2018-02-15 22:05:33 UTC
Permalink
Hi All,

I'm running dnsmasq 2.76 on a Raspberry Pi. 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. 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.

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


1. dnsmasq.log shows:

/var/log/dnsmasq.log:Feb 15 12:38:34 dnsmasq[738]: config 192.168.1.115 is
NXDOMAIN


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


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 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*

$ dig sagan

; <<>> DiG 9.8.5-P1 <<>> sagan
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: *NOERROR*, id: 21157
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;sagan. IN A

;; Query time: 1 msec
;; SERVER: 192.168.1.40#53(192.168.1.40)
;; WHEN: Thu Feb 15 13:22:25 PST 2018
;; MSG SIZE rcvd: 23

$ dig sagan.si.loc

; <<>> DiG 9.8.5-P1 <<>> sagan.si.loc
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: *NXDOMAIN*, id: 11132
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;sagan.si.loc. IN A

;; Query time: 1 msec
;; SERVER: 192.168.1.40#53(192.168.1.40)
;; WHEN: Thu Feb 15 13:22:26 PST 2018
;; MSG SIZE rcvd: 30

$ nslookup sagan

Server: 192.168.1.40
Address: 192.168.1.40#53

Non-authoritative answer:
*** *Can't find sagan: No answer*

$ nslookup sagan.si.loc

Server: 192.168.1.40
Address: 192.168.1.40#53

** *server can't find sagan.si.loc: NXDOMAIN*
Andy Ruddock
2018-02-15 22:46:27 UTC
Permalink
Post by Todd Andrews
Hi All,
I'm running dnsmasq 2.76 on a Raspberry Pi. 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. 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.
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
Post by Todd Andrews
/var/log/dnsmasq.log:Feb 15 12:38:34 dnsmasq[738]: config 192.168.1.115 is
NXDOMAIN
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
dhcp-host=f4:8e:38:xx:xx:xx,sagan
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 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*
$ dig sagan
; <<>> DiG 9.8.5-P1 <<>> sagan
;; global options: +cmd
;; ->>HEADER<<- opcode: QUERY, status: *NOERROR*, id: 21157
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;sagan. IN A
;; Query time: 1 msec
;; SERVER: 192.168.1.40#53(192.168.1.40)
;; WHEN: Thu Feb 15 13:22:25 PST 2018
;; MSG SIZE rcvd: 23
$ dig sagan.si.loc
; <<>> DiG 9.8.5-P1 <<>> sagan.si.loc
;; global options: +cmd
;; ->>HEADER<<- opcode: QUERY, status: *NXDOMAIN*, id: 11132
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;sagan.si.loc. IN A
;; Query time: 1 msec
;; SERVER: 192.168.1.40#53(192.168.1.40)
;; WHEN: Thu Feb 15 13:22:26 PST 2018
;; MSG SIZE rcvd: 30
$ nslookup sagan
Server: 192.168.1.40
Address: 192.168.1.40#53
*** *Can't find sagan: No answer*
$ nslookup sagan.si.loc
Server: 192.168.1.40
Address: 192.168.1.40#53
** *server can't find sagan.si.loc: NXDOMAIN*
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
--
Andy Ruddock
------------
***@rainydayz.org (OpenPGP Key ID 0xB0324245)
Geert Stappers
2018-02-16 07:45:35 UTC
Permalink
Post by Andy Ruddock
Post by Todd Andrews
Hi All,
I'm running dnsmasq 2.76 on a Raspberry Pi.
FWIW there are 2.79 release candidates.
Post by Andy Ruddock
Post by Todd Andrews
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 ??
Post by Andy Ruddock
Post by Todd Andrews
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??
Post by Andy Ruddock
Post by Todd Andrews
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
Post by Todd Andrews
/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.
Post by Andy Ruddock
Post by Todd Andrews
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
dhcp-host=f4:8e:38:xx:xx:xx,sagan
That is MAC-address and hostname.
Where is the "connection" / "link" with IP-address?


And about MAC-address:
* How many MAC addresses has the laptop?
* Are you using the right one?
* What was done to prevent typo errors?
Post by Andy Ruddock
Post by Todd Andrews
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?
Post by Andy Ruddock
Post by Todd Andrews
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?


Groeten
Geert Stappers
--
Leven en laten leven
Todd A
2018-02-16 17:03:02 UTC
Permalink
This post might be inappropriate. Click to display it.
Geert Stappers
2018-02-16 18:31:01 UTC
Permalink
Post by Todd A
Post by Todd Andrews
Hi All,
It's getting an IP address of 192.168.1.115. 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.
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
Hi Andy, thanks for getting back to me so quickly. (I originally
sent this reply yesterday but forgot there's a maximum size per post
to this list. Replaced screen capture with a link below.)
Are you sure the windows box hasn't been configured with a static IP
address?
I'm positive: click to view screen capture <https://www.dropbox.com/s/cwy72yu4sly62mp/sagan-configured-as-dhcp.PNG?dl=0>
Any information when you refresh the IP address from within a cmd window
in Windows?
        ipconfig /renew
I never would have thought to try this. It gave a strange error but
C:\Users\taa>ipconfig /renew
Windows IP Configuration
An error occurred while renewing interface Ethernet : The name
specified in the network control block (NCB) is in use on a remote
adapter.
The NCB is the data.
C:\Users\taa>
Having a specific error allowed me to Google it and find Bizarre
DHCP server error solved <https://web.archive.org/web/20161126203756/http://www.formortals.com/bizarre-dhcp-server-error-solved/>.
The poster at that link 1) was not getting an IP address at all, 2)
was running a Windows DHCP server, and 3) "found a second
reservation in DHCP which looked odd; it had the same IP address as
the first one that we deleted but it had an entirely different MAC
and name."
This made me remember that a couple of weeks ago I changed my
laptop's Computer Name in Windows.
Does this mean there is some other place where dnsmasq might have
cached the IP address or MAC or hostname? I'm trying to figure out
why dnsmasq.leases had no reference to the laptop's IP/MAC/hostname,
neither the previous hostname or the new one.
My guess would be
| dhcp-host=f4:8e:38:xx:xx:xx,sagan
as the original post mentioned. And assuming that dnsmasq is smart enough
to not log what is already documented in the (static) configuration.
Post by Todd A
Maybe this is one of those cases that is so bizarre
it defies explanation (and I can live with that). :D
I would culprit the host renaming.

Matching XKCD item at https://www.xkcd.com/910/ :-)


Groeten
Geert Stappers
--
Leven en laten leven
Todd Andrews
2018-02-16 17:32:45 UTC
Permalink
Hi Geert,
Post by Geert Stappers
Post by Todd Andrews
Post by Todd Andrews
Hi All,
I'm running dnsmasq 2.76 on a Raspberry Pi.
FWIW there are 2.79 release candidates.
Thanks for this info.
Post by Geert Stappers
Post by Todd Andrews
It's been working great for
Post by Todd Andrews
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
Post by Todd Andrews
Post by Todd Andrews
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.
Post by Geert Stappers
Post by Todd Andrews
Post by Todd Andrews
I first noticed the problem when I tried to establish a VNC connection
to it
Post by Todd Andrews
Post by Todd Andrews
because I can't connect via its hostname, "sagan", but I can connect
via
Post by Todd Andrews
Post by Todd Andrews
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.
Post by Geert Stappers
Post by Todd Andrews
Post by Todd Andrews
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
Post by Todd Andrews
Post by Todd Andrews
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
Post by Todd Andrews
/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.
Post by Todd Andrews
Post by Todd Andrews
2. I believe the following are the relevant dnsmasq config file
entries.
Post by Todd Andrews
Post by Todd Andrews
These have been working for quite some time. I'm obfuscating the full
MAC
Post by Todd Andrews
Post by Todd Andrews
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.
Post by Geert Stappers
* 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.
Post by Geert Stappers
Post by Todd Andrews
Post by Todd Andrews
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
Post by Todd Andrews
Post by Todd Andrews
using the Raspberry Pi as the DHCP server. There's no other DHCP
server on
Post by Todd Andrews
Post by Todd Andrews
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
Post by Geert Stappers
Post by Todd Andrews
Post by Todd Andrews
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
Post by Geert Stappers
Groeten
Geert Stappers
--
Leven en laten leven
Geert Stappers
2018-02-16 18:11:09 UTC
Permalink
Post by Todd Andrews
Post by Geert Stappers
Post by Todd Andrews
Hi All,
I'm running dnsmasq on a Raspberry Pi.
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.
Post by Geert Stappers
Post by Todd Andrews
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.
Acknowlegde.

More elsewhere in this thread.


Groeten
Geert Stappers
--
Leven en laten leven
Loading...