LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-22-2004, 11:01 AM   #1
peter72
Member
 
Registered: Oct 2002
Location: Charlottesville, VA
Distribution: Ubuntu (home), SLES (work)
Posts: 196
Blog Entries: 1

Rep: Reputation: 30
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?
 
Old 10-22-2004, 11:08 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
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
 
Old 10-22-2004, 11:44 AM   #3
peter72
Member
 
Registered: Oct 2002
Location: Charlottesville, VA
Distribution: Ubuntu (home), SLES (work)
Posts: 196

Original Poster
Blog Entries: 1

Rep: Reputation: 30
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?
 
Old 10-22-2004, 11:47 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
apologies i am a retard. i thought you meant /etc/hosts. now you've got me wondering too...
 
Old 10-23-2004, 02:02 AM   #5
emailssent
Member
 
Registered: Sep 2004
Posts: 312

Rep: Reputation: 30
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PAM and nsswitch.conf stand Linux - General 3 09-09-2011 11:25 AM
/etc/nsswitch.conf blackzone Linux - Networking 2 04-04-2006 06:32 PM
LDAP & NSSwitch.conf matarodi Debian 0 09-11-2005 04:10 AM
/etc/hosts, /etc/resolve.conf and /etc/host.conf config probs below_average Linux - Networking 1 12-08-2004 11:07 PM
nsswitch.conf dunkyb Linux - General 1 04-20-2003 12:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration