- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - HP-UX
- >
- System Administration
- >
- Re: /etc/nsswitch.conf
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
- 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
- Email to a Friend
- Report Inappropriate Content
09-24-2005 11:25 AM
09-24-2005 11:25 AM
I saw the below entry in /etc/nsswitch.conf:-
hosts: files [NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=continue TRYAGAIN=return]
Looks like this is configured wrongly .. i guess ideally resolution should first take place through dns only.
Appreciate your suggestions.
Thanks,
Shiv
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
09-24-2005 11:34 AM
09-24-2005 11:34 AM
SolutionLooking up in hosts first will take very little time, and if the name / IP address is not found then it will go to DNS.
If you have only DNS configured, what happens if your DNS server(s) are down? You would be out of luck with any name lookups.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
09-24-2005 11:41 AM
09-24-2005 11:41 AM
Re: /etc/nsswitch.conf
It configured correctly, and this is the normal sequence for host resolution ,
When DNS confugured and exists , it tries to resolve using DNS , and cheks local data file for hostname , if found it resolves --> Else , requests a root name server to provide server address that can resolve the host name.
Here is another sample file:
# cat /etc/nsswitch.conf
hosts: files [NOTFOUND=continue UNAVAIL=continue TRYAGAIN=continue] dns[NOTFOUND=return UNAVAIL=return TRYAGAIN=return]
protocols: files[NOTFOUND=return UNAVAIL=continue]
services: files[NOTFOUND=return UNAVAIL=continue]
...
Cheers,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
09-24-2005 12:21 PM
09-24-2005 12:21 PM
Re: /etc/nsswitch.conf
- If your DNS server is not up to date, you can fix it in your local hosts file. You don't need to put thousands of names/IPs in this file, only ones that you need immediately.
- The /etc/hosts file is always in memory and many commercial backup program insist on querying the nameserver for EVERY file (very questionable design). This can have a heavy impact on the DNS server, especially if many systems are all backing up at the same time. /etc/hosts with all the IP addresses used in the backup program will no go to the DNS server.
So, files then dns is preferred.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
09-24-2005 04:59 PM
09-24-2005 04:59 PM
Re: /etc/nsswitch.conf
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
09-25-2005 12:05 AM
09-25-2005 12:05 AM
Re: /etc/nsswitch.conf
1. It depends on name resolution policy in IT setup. If you have hosts entry in /etc/hosts file then above entry will look for this file first and then dns
2. If dns is used for name resolution then above entry is perfect. In such case you may modify the entry to look for dns only as per following:
hosts: * files [NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=continue TRYAGAIN=return]
Regards
Mahesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
09-25-2005 09:04 PM
09-25-2005 09:04 PM
Re: /etc/nsswitch.conf
hosts: files [..] dns [..]
It will try to start resolvation from /etc/hosts then /etc/resolv.conf's nameserver settings.
If you want to set correct setting then use nsquery command as,
# nsquery hosts
It will give result to you.
I feel you can simply use like,
hosts: dns files
hth.
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP