Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-22-2004, 10:01 AM
|
#1
|
Member
Registered: Oct 2002
Location: Charlottesville, VA
Distribution: Ubuntu (home), SLES (work)
Posts: 196
Rep:
|
nsswitch.conf and host.conf differences
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?
|
|
|
10-22-2004, 10:08 AM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
nsswitch controls what methods are used to resolve the names. hosts contains the actual entries that will be read if nsswitch is set to resolve via hosts (i.e. "files" in nsswitch), as opposed to dns, nis
|
|
|
10-22-2004, 10:44 AM
|
#3
|
Member
Registered: Oct 2002
Location: Charlottesville, VA
Distribution: Ubuntu (home), SLES (work)
Posts: 196
Original Poster
Rep:
|
I think I see, but can you confirm this.
If I set my nsswitch.conf to
hosts: files dns
Then it looks to host.conf which reads
order hosts,bind
So could I take out dns in the nsswitch.conf since it is referenced in the host.conf?
|
|
|
10-22-2004, 10:47 AM
|
#4
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
apologies i am a retard. i thought you meant /etc/hosts. now you've got me wondering too...
|
|
|
10-23-2004, 01:02 AM
|
#5
|
Member
Registered: Sep 2004
Posts: 312
Rep:
|
Did u googled for it. Google has almost every thing for u.
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 wi
th DNS.
The nsswitch.conf file handles much more than just the order of prec
edence b/w the host table and DNS. It defines the sources for several different s
ystem administration databases becz. it is an outgrowth of the NIS.
The nsswitch.conf file has superseded the host.conf file becz. it provides more co
ntrol over more resources. Linux systems generally have both files configured , bu
t 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.
-jack
|
|
|
All times are GMT -5. The time now is 03:26 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|