Monday, February 2, 2009

nsswitch.conf and host.conf differences

peter72

Have a network name resolution question.

What is the difference between the resolution name path in the /etc/host.conf and in the /etc/nsswitch.conf?

I know nsswitch.conf, from my solaris days, and have never even used the host.conf. How can you have 2 different files for where to look for name resolution?

emailssent

Here is solution for u,

The host.conf file is one of the configuration files used to set the order of precedence among the various name services. The host.conf file defines serveral options that control how the /etc/hosts file is processed and how it interacts with DNS.

The nsswitch.conf file handles much more than just the order of precedence b/w the host table and DNS. It defines the sources for several different system administration databases becz. it is an outgrowth of the NIS.

The nsswitch.conf file has superseded the host.conf file becz. it provides more control over more resources. Linux systems generally have both files configured , but the action takes place in the nsswitch.conf file

Now the difference,

host.conf file is an older file used for order of precendece among various name services. whereas nsswitch.conf file is newer one as compared to host.conf file.host.conf is an old configuration file that does some of what nsswitch.conf does a nd is still in use.So, question is why host.conf file is present in system when nsswithc does everthing becz as of old architecture follows host.conf file , today also some system first looks for host.conf.

For more info and clarity google for it.Source from where i am answering this is Craig Hunt book on DNS server. Above is all as far as i am remembering.

No comments:

Post a Comment