- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- default behavior config for host resolution
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2006 07:30 PM
04-11-2006 07:30 PM
Two files sets the default behavior for host resolution
i, /etc/nsswitch.conf
ii, /etc/host.conf
OK
If I want to config that first check with Dns server then local hosts file ... I have to configure both files ?
As,
in nsswitch.conf
hosts: dns file
and in host.conf
order bind,hosts
or which file have more precedenc/priority ?
that is if in case if there is a conflict e.g
in nsswitch.conf
hosts: files dns
and in host.conf
order bind,hosts
Plz Guide me
Regards
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2006 08:36 PM
04-11-2006 08:36 PM
SolutionI edit the /etc/nsswitch.conf file.
And in your case first the check is done against the DNS (thus you must edit the file /etc/resolv.conf and to make sure that the correct DNS server appears there. It looks like this: nameserver x.x.x.x).
Then the check is done against the /etc/hosts.file.
Best practice is to put "files" before the DNS, so if there's something particular that you need only your host to resolv and the same hostname appears in DNS -you can simply add it to /etc/hosts file and that's it.
Best regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2006 09:05 PM
04-11-2006 09:05 PM
Re: default behavior config for host resolution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2006 09:24 PM
04-11-2006 09:24 PM
Re: default behavior config for host resolution
The older glibc library configured host lookup ordering in the /etc/host.conf. This library is now obsolete and useless. Version 2 of the GNU standard library, glibc, uses /etc/nsswitch.conf.
Your system will probably provide host.conf for compatibility to enable older programs linked against the older library.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2006 10:22 PM
04-11-2006 10:22 PM
Re: default behavior config for host resolution
Thanks a Million for such a promtp help
Regards
Maaz