Use nameserver name or IP?
Bill Larson
wllarso at swcp.com
Tue Jul 17 00:47:03 UTC 2007
On Jul 16, 2007, at 5:01 PM, Padraig Houlahan wrote:
> Greetings:
>
> Is there a generally accepted practice when it comes to
> specifying nameservers? Specifically, in /etc/resolv.conf
> files (for example) I normally use the IP form for the
> nameserver. But, this makes it tricky to bring up or replace
> the existing nameserver.
Use the IP address of your DNS servers in your /etc/resolv.conf file.
> Another example might be in the name-server entry of DHCP
> tables - use the IP or the FQDN?
>
> Many sites seem to use names like ns1.domain.com and
> ns2.domain.com which has the advantage that you can move
> your name services to a new host/IP and as long as the name
> is the same, all clients can use it.
>
> I guess there is a slight overhead in using the FQDN form,
> but is that a price worth paying for the management
> convenience?
Think about this a little and I'm sure that you will get your answer.
Imagine that you enter the FQDN names for your DNS servers in your /
etc/resolv.conf file. Now, your system needs to contact the DNS
servers to allow you to connect to some web server. So, what
happens, your system looks at what you have entered in your
resolv.conf file to know what DNS servers to contact. Now, your file
contains the names of these server and not their IP addresses, so it
would have to look up how to contact your DNS server(s), but all it
has is the name of your DNS servers, so it has to lookup your DNS
server(s) but all it has is the name, so it has to ....
This is a chicken or the egg situation. This is why you need to
specify the IP address of your DNS servers in your resolv.conf file.
Take a look at the man page for your resolver configuration. You
should find that your are supposed to specify the IP addresses of
your name servers in your /etc/resolv.conf file.
Now, if you really want to be able to specify what DNS servers that
your clients use, this information can be provided by your DHCP
servers. You only need to change the DNS server address(es) on your
DHCP server and wait for your clients to refresh their DHCP leases.
Once the DHCP lease is renewed, then the clients will be using the
new IP addresses. But this is now a whole different issue.
Bill Larson
More information about the bind-users
mailing list