only able to add three dns-nameservers

Asked by danbuntu

I have a network config on a 12.04 server that looks like:

auto eth0
iface eth0 inet static
        address 10.0.100.30
        netmask 255.255.255.0
        network 10.0.100.0
        broadcast 10.0.100.255
        gateway 10.0.100.1
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 10.0.100.14 10.0.100.16 10.2.1.15 10.2.1.16
        dns-search mydomain.com

I have four internal dns servers entered here. When I reboot the server or restart the network the server updates it's /etc/resolv.conf to:

nameserver 10.0.100.14
nameserver 10.0.100.16
nameserver 10.2.1.15
search mydomain.com

so it's only picking up only three of the four nameservers entered above. Should this not be picking up all four?
With other servers we have fixed this by editing the /etc/resolvconf/resolv.conf.d/tail which then creates a resolv.conf file with 4 dns entries as expected. However this method is not documented in the main official ubuntu documentation.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

If you add them in /etc/resolvconf/resolv.conf.d/head they will be added but I believe you can only have 3 DNS addresses.

Revision history for this message
danbuntu (danattwood) said :
#2

In all the documentation we found on the web it says to put names servers into /etc/resolvconf/resolv.conf.d/base. However this didn't work for us and we instead added them into tail.
also /etc/resolvconf/resolv.conf.d/head has 'DO NOT EDIT THIS FILE BY HAND' at the top off it.

My concern though is that the main documentation doesn't mention this anywhere. It only lists the much easier solution of adding them into /etc/network/interfaces

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

It has that text because the file is used to make the /etc/resolv.conf file. You will notice that the text is identical between the two files. If you add text to the head file it will go in to resolv.conf. if these happen to also be nameserver lines then they will be processed as normal.

Revision history for this message
Thomas Krüger (thkrueger) said :
#4

3 DNS servers is the limit. More doesn't make much sense, because of the way how DNS resolving works.
It is a hard-coded value. See "man resolv.conf" for details!

Can you help with this problem?

Provide an answer of your own, or ask danbuntu for more information if necessary.

To post a message you must log in.