Hi
Can anyone please tell me how many nameserver can be added to /etc/resolve.conf.
We actually have four so can four nameservers IP's added. ( I read somewhere only 3 can be added).
Another question is do i need to restart the network service after updating the nameservers.
Please let me know . Thank you
How many nameserver can be added to /etc/resolve.con
Re: How many nameserver can be added to /etc/resolve.con
man resolv.conf
Worth reading the rest of the info in there as it tells you a whole bunch of stuff that isn't immediately obvious or sometimes even expected.nameserver Name server IP address
Internet address of a name server that the resolver should query, either an IPv4 address (in dot notation),
or an IPv6 address in colon (and possibly dot) notation as per RFC 2373. Up to MAXNS (currently 3, see
<resolv.h>) name servers may be listed, one per keyword. If there are multiple servers, the resolver li‐
brary queries them in the order listed.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: How many nameserver can be added to /etc/resolve.con
There is more. The glibc is not the only possible resolver. Particularly, if you do use NetworkManager.service (which is the default) rather than network.service.
man NetworkManager.conf describes option dns.
What I did was to install dnsmasq (sudo yum install dnsmasq) and create file:
Now, when NetworkManager.service starts, it does start an instance of 'dnsmasq' and updates file:
That means that programs on this host query the local dnsmasq for names. Where does it ask from? NetworkManager did give it (via DBus) names servers that the connections have (in local config or from DHCP). The dnsmasq will cache results (i.e. make less repeating queries), has different limit on name servers than glibc (more than 3), and overall makes queries differently. The other options, systemd-resolved and unbound, are probably as good as dnsmasq.
The default is that "NetworkManager will update /etc/resolv.conf to reflect the nameservers provided by currently active connections."
In other words, if you do use NM and did edit /etc/resolv.conf, NM will erase your changes.
If you do use network.service, then it too updates the /etc/resolv.conf with the DNS entries in config and/or the name servers dhclient gets from DHCP.
With four nameservers I would use dnsmasq even with network.service (but then it has to run as a separate service).
man NetworkManager.conf describes option dns.
What I did was to install dnsmasq (sudo yum install dnsmasq) and create file:
Code: Select all
$ cat /etc/NetworkManager/conf.d/00-dns.conf
[main]
dns=dnsmasq
Code: Select all
$ cat /etc/resolv.conf
# Generated by NetworkManager
search example.com
nameserver 127.0.0.1
The default is that "NetworkManager will update /etc/resolv.conf to reflect the nameservers provided by currently active connections."
In other words, if you do use NM and did edit /etc/resolv.conf, NM will erase your changes.
If you do use network.service, then it too updates the /etc/resolv.conf with the DNS entries in config and/or the name servers dhclient gets from DHCP.
With four nameservers I would use dnsmasq even with network.service (but then it has to run as a separate service).