What's new

Router DNS

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Rturnock

Regular Contributor
I have looked under a number of search terms but haven't seen an answer though it seems an obvious question so perhaps I am missing something.

When DHCP issues a reserved IP address to a device it says in the help on the page that the name is pushed to the device if it is legal, i.e. doesn't contain blanks etc. Now, I understand that the device may ignore getting sent a name but I'd have thought that the router would still maintain the association and use it to resolve DNS requests. E.g. if my camera is called "garage" and assigned IP 172.15.0.4 then an NSlookup or Ping both of which use the router (172.15.0.1) would be able to get the ip address for "garage" but it does not.

WHile I have you, what's the significant of the routers "domain" which is also on the DHCP page. I've tried making it "Lan" and tacking ".Lan" onto "garage" or trying "garage."

Thanks
 
It should work. Are you changing the name in the correct place? There are descriptive names under the Network Map, but you want to be changing the names that appear on LAN > DHCP Server > Manually Assigned...

If you don't specify a domain it's effectively the same as setting it to "". So in your example above the FQDN would be "garage." which is a bit weird. I suggest that for testing you set it to "home.lan" (not just "lan") and see how you get on. Remember to reboot all of your DHCP clients to pick up the change. You should now be able to do an nslookup on both "garage" and "garage.home.lan".

Host and domain names are not case sensitive, so
Code:
C:\Users\Colin>nslookup firetv
Server:  RT-AC68U.home.lan
Address:  192.168.1.1

Name:    firetv.home.lan
Address:  192.168.1.89


C:\Users\Colin>nslookup fireTV
Server:  RT-AC68U.home.lan
Address:  192.168.1.1

Name:    fireTV.home.lan
Address:  192.168.1.89


C:\Users\Colin>nslookup FiReTv.HoMe.LaN
Server:  RT-AC68U.home.lan
Address:  192.168.1.1

Name:    FiReTv.HoMe.LaN
Address:  192.168.1.89
 
Last edited:
Thanks for the quick reply,

Yes, I'm looking at the the DHCP page. There is a name I see on the static list by clicking the icon at the left of each line or looking beside the icon, those are almost always the same as the column of the same table header "hostname"

I forgot to mention that if I SSH into the router and do an nslookup from there I get correct IPs for both devices in the static list and for some not in the list (I didn't check them all). So the route knows it's just not giving out its secrets.

My routers domain, set on the DHCP page, is Princess.

Asking the router from a computer command prompt:

Code:
D:\Users\r_tur>nslookup garage
Server:  UnKnown
Address:  172.17.0.1

*** UnKnown can't find garage: Non-existent domain

D:\Users\r_tur>nslookup garage.princess
Server:  UnKnown
Address:  172.17.0.1

*** UnKnown can't find garage.princess: Non-existent domain

Asking from SSH

Code:
Admin@Router:/tmp/home/root# nslookup garage
Server:    127.0.0.1
Address 1: 127.0.0.1 localhost.local domain

Name:      garage
Address 1: 172.17.0.53 Garage.Princess

Admin@Router:/tmp/home/root# nslookup garage.princess
Server:    127.0.0.1
Address 1: 127.0.0.1 localhost.local domain

Name:      garage.princess
Address 1: 172.17.0.53 Garage.Princess

I notice that unlike your example the nslookup server has an unknown name, its actual name is "router"

I can also say this has never worked and recently with the versioning and code base change I did a factory reset and reload of parameters.

I'll try changing the Domain to home.lan, I should have to reboot only the computer that makes the inquiry and one other about which I will inquire. That said, SSH seems quite happy with or without the Domain specified. Check in "garage." also doesn't work.

Thanks again

Richard
 
Do you have any other clients (preferably non-Windows) that you can try the lookup on?

Do you have IPv6 enabled on the client or router?

Can you post the complete output of "ipconfig /all" for the Windows client.

EDIT: I'm assuming that you have deliberately mangled the lines above that say "localhost.local domain" to include an extra space?

EDIT 2: Posting the output from the following on the router would also be useful, "cat /etc/dnsmasq.conf".
 
Last edited:
sndborums keeps blocking my reply, someething triggers their system so I'll have send it in bits but they ate it and it took a while, darn!

No, no mangling, that's what SSH gave me, the only thing I did was add a blank line to make it more readable.

Unbuntu 18.04 as a VM reports:

Code:
> nslookup garage
Server:        127.0.0.53
Address:    127.0.0.53#53

** server can't find nslookup: SERVFAIL
>
> nslookup garage.princess
Server:        127.0.0.53
Address:    127.0.0.53#53

** server can't find nslookup: SERVFAIL
> nslookup garage 172.17.0.1
Server:        127.0.0.53
Address:    127.0.0.53#53

** server can't find nslookup: SERVFAIL

Which gives the correct IP but also claims that the server is at the "garage" IP.
 
Do you have any other clients (preferably non-Windows) that you can try the lookup on?

Do you have IPv6 enabled on the client or router?

Can you post the complete output of "ipconfig /all" for the Windows client.

EDIT: I'm assuming that you have deliberately mangled the lines above that say "localhost.local domain" to include an extra space?

EDIT 2: Posting the output from the following on the router would also be useful, "cat /etc/dnsmasq.conf".
 
"cat /etc/dnsmasq.conf" reports:

Code:
Admin@Router:/tmp/home/root# cat /etc/dnsmasq.conf
pid-file=/var/run/dnsmasq.pid
user=nobody
bind-dynamic
interface=br0
interface=pptp*
no-dhcp-interface=pptp*
no-resolv
servers-file=/tmp/resolv.dnsmasq
no-poll
no-negcache
cache-size=1500
min-port=4096
domain=Princess
expand-hosts
bogus-priv
local=/Princess/
dhcp-range=lan,172.17.0.2,172.17.0.100,255.255.255.0,86400s
dhcp-option=lan,3,172.17.0.1
dhcp-option=lan,15,Princess
dhcp-option=lan,252,"\n"
dhcp-authoritative
....
 
sndborums keeps blocking my reply, someething triggers their system so I'll have send it in bits but they ate it and it took a while, darn!

No, no mangling, that's what SSH gave me, the only thing I did was add a blank line to make it more readable.

Unbuntu 18.04 as a VM reports:

Code:
> nslookup garage
Server:        127.0.0.53
Address:    127.0.0.53#53

** server can't find nslookup: SERVFAIL
>
> nslookup garage.princess
Server:        127.0.0.53
Address:    127.0.0.53#53

** server can't find nslookup: SERVFAIL
> nslookup garage 172.17.0.1
Server:        127.0.0.53
Address:    127.0.0.53#53

** server can't find nslookup: SERVFAIL

Which gives the correct IP but also claims that the server is at the "garage" IP.
 

ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . : Richard-PC
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : Princess

Ethernet adapter vEthernet (Virtual):

Connection-specific DNS Suffix . : Princess
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter
Physical Address. . . . . . . . . : 2C-4D-54-D8-80-4C
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::c822:fb46:6d0:47ee%3(Preferred)
IPv4 Address. . . . . . . . . . . : 172.17.0.4(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Thursday, October 4, 2018 5:20:46 PM
Lease Expires . . . . . . . . . . : Friday, October 5, 2018 8:45:52 PM
Default Gateway . . . . . . . . . : 172.17.0.1
DHCP Server . . . . . . . . . . . : 172.17.0.1
DHCPv6 IAID . . . . . . . . . . . : 405556564
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-86-A1-3A-2C-4D-54-D8-80-4C
DNS Servers . . . . . . . . . . . : 172.17.0.1
NetBIOS over Tcpip. . . . . . . . : Enabled

Wireless LAN adapter Local Area Connection* 1:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter
Physical Address. . . . . . . . . : 5A-00-E3-82-51-D5
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Local Area Connection* 11:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter #3
Physical Address. . . . . . . . . : 6A-00-E3-82-51-D5
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::f0a2:ac78:d6f4:5ab6%11(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.137.1(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 1014628579
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-86-A1-3A-2C-4D-54-D8-80-4C
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled

Wireless LAN adapter Wi-Fi:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : Princess
Description . . . . . . . . . . . : Qualcomm Atheros QCA61x4A Wireless Network Adapter
Physical Address. . . . . . . . . : 58-00-E3-82-51-D5
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes

Ethernet adapter Bluetooth Network Connection:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Bluetooth Device (Personal Area Network)
Physical Address. . . . . . . . . : 58-00-E3-82-51-D6
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes

Ethernet adapter vEthernet (Default Switch):

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #2
Physical Address. . . . . . . . . : 12-15-26-BF-3E-96
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::6dd9:c6d1:48bc:baae%23(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.130.113(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.240
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 318772573
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-86-A1-3A-2C-4D-54-D8-80-4C
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled
 

My iPad can't ping "garage", "garage." or "garage.princess

My WD MyCloud doesn't seem to have an nslookup command but ping gives the erros

Code:
Cloud:/sbin# ping garage
ping: unknown host garage
Cloud:/sbin# ping garage.princess
ping: unknown host garage.princess
Cloud:/sbin# ping garage.
ping: unknown host garage.
 

My iMac running High Sierra on VirtualBox (shh) reports:

Code:
Richard-iMac:~ richard$ nslookup garage

Server:        172.17.0.1
Address:    172.17.0.1#53

** server can't find garage: NXDOMAIN

Richard-iMac:~ richard$ nslookup garage.

Server:        172.17.0.1
Address:    172.17.0.1#53

** server can't find garage: NXDOMAIN

Richard-iMac:~ richard$ nslookup garage.princess

Server:        172.17.0.1
Address:    172.17.0.1#53

Thanks for taking an interest. Sorry I had to break it up.
 
Perhaps a silly question, but what do you have set for LAN DHCP DNS (if anything) , and/or have you set DNS Filtering?
 
Are you using DNS Filter or running an OpenVPN client with DNS mode Exclusive? Both of these can bypass dnsmasq as the DNS server.
 
I can also say this has never worked and recently with the versioning and code base change I did a factory reset and reload of parameters.
When you say "reload of parameters" did you reload your settings from a saved file or manually reenter them again? If you used a saved file that would have defeated the purpose of the factory reset and you will need to reset it again.

No, no mangling, that's what SSH gave me, the only thing I did was add a blank line to make it more readable.
Your router's hosts file might be messed up. Can you post the output from the following on the router:
Code:
# cd /etc
# cat hosts

Unbuntu 18.04 as a VM reports:

Code:
> nslookup garage
Server:        127.0.0.53
Address:    127.0.0.53#53

** server can't find nslookup: SERVFAIL
>
> nslookup garage.princess
Server:        127.0.0.53
Address:    127.0.0.53#53

** server can't find nslookup: SERVFAIL
> nslookup garage 172.17.0.1
Server:        127.0.0.53
Address:    127.0.0.53#53

** server can't find nslookup: SERVFAIL

Which gives the correct IP but also claims that the server is at the "garage" IP.
Sorry, but I can't see anything correct there. The commands have completely failed. 127.x.x.x are loopback addresses. Is your VM's IP address 127.0.0.53?

I think if I were you I'd reformat the router's /jffs partition and then do a factory reset and manual configuration.
 
Perhaps a silly question, but what do you have set for LAN DHCP DNS (if anything) , and/or have you set DNS Filtering?

Not a silly question, I'm sure something silly I am doing underlies this. LAN DHCP DNS server fields are both blank.

You got it, it was DNS Filtering

Thanks very much
 
Are you using DNS Filter or running an OpenVPN client with DNS mode Exclusive? Both of these can bypass dnsmasq as the DNS server.

It was the DNS Filtering, thanks for your help.

It's a pity there's no way to search all the pages for a term, like DNS.
 
When you say "reload of parameters" did you reload your settings from a saved file or manually reenter them again? If you used a saved file that would have defeated the purpose of the factory reset and you will need to reset it again.

Your router's hosts file might be messed up. Can you post the output from the following on the router:
Code:
# cd /etc
# cat hosts

Sorry, but I can't see anything correct there. The commands have completely failed. 127.x.x.x are loopback addresses. Is your VM's IP address 127.0.0.53?

I think if I were you I'd reformat the router's /jffs partition and then do a factory reset and manual configuration.

Thanks for your help, it was DNS Filtering turned on. Once you run VMs and remote display the physical and virutal adapters always look odd.
 
...If you don't specify a domain it's effectively the same as setting it to "". So in your example above the FQDN would be "garage." which is a bit weird. I suggest that for testing you set it to "home.lan" (not just "lan")...

Instead of .lan I adopted using the .local suffix (example. devicename.home.local). Is there any foreseeable problem with this?
 
Instead of .lan I adopted using the .local suffix (example. devicename.home.local). Is there any foreseeable problem with this?

.local is a reserved suffix, not a good idea to use that.
 
I suggest that for testing you set it to "home.lan" (not just "lan") and see how you get on.

Why, if I may ask, not just "lan"? I've been using this for years without any issues, so I'm curious why you advice against it?
 

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top