What's new

DNS for LAN clients

  • 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!

rampitec

Occasional Visitor
I'm a little confused. Router is configured:

WAN: DNS1 = 8.8.8.8, DNS2 = 64.6.64.6, Connect to DNS Server automatically = no
LAN/DHCP: Advertise router's IP in addition to user-specified DNS = yes, DNS1 = empty, DNS2 = empty

I would assume a DHCP client should only get router's address 192.168.1.1. There are no specific settings on the client. Client has:

DNS1 = 192.168.1.1, DNS2 = 64.6.64.6

Why DNS2 is set on the client? Even if set, why is it set to DNS2 of WAN?!
 
You are correct, that shouldn't be happening. It's either a bug or a misconfiguration somewhere.

Have you confirmed that it applies to all of your DHCP clients and not just one?

What firmware version are you running.
 
FW is 380.65_2 from Merlin.
It looks like it only happens on one client. The client is Panasonic SIP phone, so I cannot telnet to it and see in details... Maybe it remembered info from oldrr times, but then it shall survive phone reboots.
 
Weird. Panasonic indeed caches old DNS settings, I have just verified it. Not a router issue.
 
BTW, if it comes to DNS. A very nice feature would be to be able to specify what to send as a DNS for an individual client in the DHCP config.

That is because on modern Android there is no way of changing it.
 
You can use Parental control > DNS Filtering to force a specific client to go to a specific DNS server (but that client looses the ability resolve local hostnames).

Alternatively, you can always customise dnsmasq any way you want through the use of a custom config file.
 
Ugh... Android is extremely unfriendly OS. I managed to assign it what I want:

dhcp-range=mobile,192.168.1.16,192.168.1.31,255.255.255.0,86400s
dhcp-host=XX:XX:XX:XX:XX,android-device,net:mobile,192.168.1.16,infinite
dhcp-option=net:mobile,6,8.8.8.8,64.6.64.6
dhcp-option=net:mobile,23,[2001:4860:4860::8888],[2620:74:1b::1:1]

It gets desired DNS and after a second resets property net.dns1 to ipv6 of the router :(
 
Just a guess ('cos I'm not using IPv6), but perhaps dnsmasq is in conflict with another process that is doing IPv6 Router Advertisements.
 
Well, the advertisement cannot be disabled, ipv6 will not work then. I would just disable ipv6 altogether, but Android then invents its own ipv6 address and tries to work through a tunnel, which also does not work.
 
Now that works :) So the problem was that stateless ipv6 took the whole range and my client was served by that main range. So I changed IPV6 to stateful, which allows to assign address diapason.
Then this:

dhcp-range=mobile,192.168.1.16,static,255.255.255.0,86400s
dhcp-range=mobile,::500,::999,constructor:br0,ra-only
dhcp-host=XX:XX:XX:XX:XX:XX,android-device,net:mobile,192.168.1.16,infinite
dhcp-option=net:mobile,6,8.8.8.8,64.6.64.6
dhcp-option=net:mobile,option6:23,[2001:4860:4860::8888],[2620:74:1b::1:1]

In addition that allows to name an android host, which is usually impossible.
Thank you for the idea!
 

Similar threads

Sign Up For SNBForums Daily Digest

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