- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- nslookup not picking up hosts file entry if ipaddr...
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
Discussions
Discussions
Forums
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
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
тАО06-09-2010 02:22 AM
тАО06-09-2010 02:22 AM
# more /etc/nsswitch.conf
passwd: files
group: files
hosts: files [NOTFOUND=continue] dns
networks: files
protocols: files
rpc: files
publickey: files
netgroup: files
automount: files
aliases: files
services: files
# more /etc/hosts
10.195.101.321 ieswthsrv102.axa-ie.intraxa ieswthsrv102
# nslookup ieswthsrv102
Using /etc/hosts on: iexiwqc
looking up FILES
Trying DNS
Name: ieswthsrv102.axa-ie.intraxa
Address: 10.195.99.68
HOWEVER If I change the ipaddress in the hosts file to one that is alive, although not the correct one, it resolves from the hosts file:
# more /etc/hosts
10.195.101.64 ieswthsrv102.axa-ie.intraxa ieswthsrv102
# nslookup ieswthsrv102
Using /etc/hosts on: iexiwqc
looking up FILES
Name: ieswthsrv102.axa-ie.intraxa
Address: 10.195.101.64
Aliases: ieswthsrv102
Any ideas why this is happening?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2010 02:35 AM
тАО06-09-2010 02:35 AM
Re: nslookup not picking up hosts file entry if ipaddress not alive
I updated nsswitch.conf to show:
hosts: files [NOTFOUND=continue UNAVAIL=continue FOUND=return] dns
and this will resolve in the way I want it.
Should this not be default?
I dont understand why you would want to resolve to dns if its in the hosts file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2010 06:33 AM
тАО06-09-2010 06:33 AM
Re: nslookup not picking up hosts file entry if ipaddress not alive
I rebooted and its still doing the wrong thing
hostfile:
10.195.101.321 ieswthsrv102.axa-ie.intraxa ieswthsrv102
# nslookup ieswthsrv102
Using /etc/hosts on: iexiwqc
looking up FILES
Trying DNS
Name: ieswthsrv102.axa-ie.intraxa
Address: 10.195.99.68
Any ideas whats wrong here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2010 06:53 AM
тАО06-09-2010 06:53 AM
SolutionCheck with a nonexistent host, nonexistent IP but valid IP number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2010 07:16 AM
тАО06-09-2010 07:16 AM
Re: nslookup not picking up hosts file entry if ipaddress not alive
Mystery solved