1
I'm confused by what's happening here. nslookup myHost
resolves myHost. ping myHost
does not. ping myHost.
does. Why does adding a period work? How can I make ping myHost
work?
>nslookup myHost
Name: myHost
Address: xxx.xxx.xxx.xxx
>ping myHost
Ping request could not find myHost. Please check the name and try again.
>ping myHost.
Pinging myHost [xxx.xxx.xxx.xxx] with 32 bytes of data:
Reply from xxx.xxx.xxx.xxx: bytes=32 time=1ms TTL=64
For reference, the nameserver is dnsmasq on Raspbian Jessie. Here is /etc/dnsmasq.conf, minus security settings. listen-address and server are the same ip:
interface=wlan0
listen-address=xxx.xxx.xxx.xxx
bind-interfaces
server=xxx.xxx.xxx.xxx
bogus-priv
dhcp-range=xxx.xxx.xxx.xxx,xxx.xxx.xxx.xxx,12h
In my hosts file:
xxx.xxx.xxx.xxx myHost
domain names that don't end with the (often-optional) period are often prone to have a suffix added to them. (You do know that TLD's, like .com, end with an often-optional period, right? e.g., ping google.com.) – TOOGAM – 2016-09-08T03:36:11.783
I do know that; (it's been a while, but . indicates the top level right?) So ... if I set the domain as . in dnsmas.conf, perhaps that would fix it? – Daniel B. – 2016-09-08T03:45:21.673