DHCP bug when assigning multiple DNS servers?


(Adam) #1

When specifying multiple DNS servers in DHCP…

Only one DNS server is assigned:


(Artem Fedai) #2

I have made a test and it is real situation that assigned DNS for pushing to clients doesnot write in /etc/dnsmasq.conf file .
Moreover it write config to db :
db dhcp show

eth1=range
    DhcpDNS=8.8.8.8
    DhcpDomain=
    DhcpGatewayIP=
    DhcpLeaseTime=
    DhcpNTP=
    DhcpRangeEnd=10.1.1.254
    DhcpRangeStart=10.1.1.1
    DhcpTFTP=
    DhcpWINS=
    status=enabled

I have attached log file of DNSMASQ starts :

Sep 18 22:22:39 nethserver dnsmasq[6912]: started, version 2.48 cachesize 4000
Sep 18 22:22:39 nethserver dnsmasq[6912]: compile time options: IPv6 GNU-getopt DBus no-I18N DHCP TFTP "--bind-interfaces with SO_BINDTODEVICE"
Sep 18 22:22:39 nethserver dnsmasq-dhcp[6912]: DHCP, IP range 10.1.1.1 -- 10.1.1.254, lease time 15m
Sep 18 22:22:39 nethserver dnsmasq-tftp[6912]: TFTP root is /var/lib/tftpboot
Sep 18 22:22:39 nethserver dnsmasq[6912]: using nameserver 91.209.1.1#53
Sep 18 22:22:39 nethserver dnsmasq[6912]: read /etc/hosts - 6 addresses
Sep 18 22:22:39 nethserver dnsmasq-dhcp[6912]: read /etc/ethers - 2 addresses
Sep 18 22:22:39 nethserver dnsmasq[6912]: read /etc/dnsmasq-dhcp-hosts

(Alessio Fattorini) #3

@giacomo are multiple dns supported yet? On dhcp advanced panel.


(Bogdan Costin) #4

I think that for the DHCP clients there is only one DNS that can be specified. For the NS itself you can put more DNS resolvers.
This is by design i think…


(Adam) #5

Seems pretty clear that it’s a bug. It’s always a good idea to have the ability to specify multiple DNS servers. Not to mention the fact that the window says “DNS servers” not “DNS server”.


(Gabriel GHEORGHIU) #6

Hi guys,

What is the reason to have in LAN (in this case DHCP for GREEN) multiple DNS and moreover, external DNS?
If you set two external DNS in NS (Configuration -> DNS) it is not enough?
NS will forward DNS requests from GREEN (LAN) or BLUE (Wireless) to RED (WAN). Or not?


(Artem Fedai) #7

You see if this function exist it should work. Sometimes it is needed to specify client custom DNS server and push it by DHCP


(Bogdan Costin) #8

“By design”, Not yet implemented by the devs yet.
And having more DNS servers as GG_jr sayed (external servers) sometimes has undesired effects (like bypassing the proxy and allowing the user to reach banned sites etc) …

I’m not sure, but it is better to wait and see if the developers can fix this.

BR
Bogdan


(Artem Fedai) #9

Maybe it is not devel problem, it is that problem with QA that i have mentioned on Hangout. We should have open QA test cases.


(Giacomo Sanchietti) #10

I think is a bug in dnsmasq template, sadly the man is not clear enough.

@Adam can you try this template-custom and check if is it working?

Create the template-custom dir and create a file named 30dhcp with the content from here: http://paste.ubuntu.com/12512879/

For the template custom:
mkdir -p /etc/e-smith/templates-custom/etc/dnsmasq.conf
copy pastbin content in /etc/e-smith/templates-custom/etc/dnsmasq.conf/30dhcp

Reference: http://stackoverflow.com/questions/12713785/cant-get-dnsmasq-dhcp-to-configure-multiple-name-servers


(Adam) #11

Looks like that worked! :smile:


(Giacomo Sanchietti) #12

New bug created: http://dev.nethserver.org/issues/3262


(Alessio Fattorini) #14

Bug is on QA status @vcc, @mabeleira, @medworthy, @dz00te, @fasttech, @GG_jr, @Adam is your turn! :construction_worker: :construction_worker: :construction_worker: :construction_worker: :construction_worker:
http://dev.nethserver.org/issues/3262#change-16256


(Alessio Fattorini) #15

Verified by @dz00te
Thanks to all of you, great work :sunglasses:


(Alessio Fattorini) #16