- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Ping cannot use /etc/hosts for IP 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
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-30-2002 08:40 PM
тАО06-30-2002 08:40 PM
Ping cannot use /etc/hosts for IP resolution
The ping command in HP-UX 11i is not using /etc/hosts file for IP resolution.
ping hostname results in error saying that there is no such hostname. Even ping cannot ping the same hostname.
However, ping IP_ADDRESS is working as usual.
Do you have any idea behind this problem ?
thanks in advance
NAKHAN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2002 08:47 PM
тАО06-30-2002 08:47 PM
Re: Ping cannot use /etc/hosts for IP resolution
Have a look at your /etc/nsswitch.conf file
This should state what is to be used to resolve hostnames
An entry for hosts should look like
hosts: files [NOTFOUND=continue] dns
Stating that /etc/hosts will first be used. If the host is not found then dns will be used
Your dns server will be set up in your /etc/resolv.conf file
Test to see which function is being used
nslookup
HTH
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2002 08:57 PM
тАО06-30-2002 08:57 PM
Re: Ping cannot use /etc/hosts for IP resolution
hosts: files [NOTFOUND=continue UNAVAIL=return TRYAGAIN=return] dns [NOTFO
UND=return UNAVAIL=continue TRYAGAIN=return]
$ more /etc/resolv.conf
domain mydomain.com.au
nameserver 10.43.100.2
nameserver 10.33.100.3
Removing this file or moving it to .old should resolve locally anyway. See how this goes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2002 09:43 PM
тАО06-30-2002 09:43 PM
Re: Ping cannot use /etc/hosts for IP resolution
Do the following:
1. Rename your nsswitch.conf file.
# cd /etc
# mv nsswitch.conf nsswitch.conf.old
2. First check your hostname
# hostname
abcd
3. After that check your hosts file for the entry of your server name.
4. Now try pinging to your server.
# ping abcd
If this works, it indicates your hosts entry in the nsswitch.conf has to be changed as mentioned below.
hosts : files dns nis
-Sukant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2002 01:16 AM
тАО07-01-2002 01:16 AM
Re: Ping cannot use /etc/hosts for IP resolution
in standard the HP_UX OS has what we would call an priority setup in name resolution , 3 methodes of name resolution are actively present/possible on the system : DNS , NIS and files (/etc/hosts) , the priority is that first the system will always go to DNS , if no DNS can be found it will go to NIS if non is found we revert to hosts file... there is away to revert this behaviour being the use of the /etc/nsswitch.conf file ,in this file you alter the search order , in your case that would require and entry like this
hosts : files [NOTFOUND=continue] DNS [NOTFOUND=continue]
that should solve your issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2002 04:55 PM
тАО07-05-2002 04:55 PM
Re: Ping cannot use /etc/hosts for IP resolution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2002 07:56 PM
тАО07-05-2002 07:56 PM
Re: Ping cannot use /etc/hosts for IP resolution
the issue can be like this :
1. wrong or incoorect /etc/resolv.conf
2. incorrect or missing /etc/nssswitch.conf
3. wrong or no entry in DNS .
Do a nslookup local hostname and see how is resolves , it must be looking for nsswitch.conf to get the information of how it will resolv the hostname . If that inforamtion is correct thean check for the DNS server anme entry in /etc/resolv.conf .
The easiest way to solve is to mv /etc/resolv.conf to .old and then check doing a nslook up < local hostname > it should use /etc/hosts to resolve the name , once this is done than you can go to check for nsswitch / reslov.conf and then DNS entry in that order.
All the best and please do award points , if you find the solution give here are helpful
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2002 10:58 AM
тАО07-08-2002 10:58 AM
Re: Ping cannot use /etc/hosts for IP resolution
ipnodes : files [NOTFOUND=CONTINUE] dns
This is more than likely the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2002 11:59 AM
тАО07-08-2002 11:59 AM
Re: Ping cannot use /etc/hosts for IP resolution
Look at your /etc/nsswitch.conf file and see the entries against hosts. If the entry is set as
hosts : files
This will use your /etc/hosts for name resolution and should use your /etc/files file to do the ping if the hostname exists in the file. Try this link below on how to configure this /etc/nsswitch.conf file.
http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90147/B2355-90147_top.html&con=/hpux/onlinedocs/B2355-90147/00/00/9-con.html&toc=/hpux/onlinedocs/B2355-90147/00/00/9-toc.html&searchterms=nsswitch.conf&queryid=20020708-130834
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2015 03:07 AM
тАО03-05-2015 03:07 AM