Networking
cancel
Showing results for 
Search instead for 
Did you mean: 

Ping is not resolving by host name on HP-UX 11.31

Timothy P. Jackson
Valued Contributor

Ping is not resolving by host name on HP-UX 11.31

I have a new install of HP-UX 11.31 on an rx2800.

 

When try to do a ping to another host or printer like "STANDARD"  it comes back and says..

 

PING vux.netsolhost.com

 

and just sits there... if I break out of it, all the packets are lost.

 

STANDARD is in the host file and I can ping the STANDARD by its IP address. The /etc/nsswitch.conf file is also setup correctly.

 

Now here is the weird thing... If I remove the domain from the /etc/resolv.conf file, it will ping will resolve just fine.

 

Any help would be greatly appreciated!

 

Thanks,

Tim 

 

 

P.S. This thread has been moved from HP-UX > System Administration to HP-UX > networking - HP Forums Moderator

2 REPLIES
Bill Hassell
Honored Contributor

Re: Ping is not resolving by host name on HP-UX 11.31

ping is not the issue. It is simply translating (resolving) the name into an IP address.

The rules for resolving are in nsswitch.conf and the worst choice you can have in nsswitch.conf is DNS first. As long as you use DNS, your machine is at the mercy of the DNS server(s).

 

So you need to see what your current setting is doing. nslookup is one way but nsquery is more verbose. Run these commands:

 

nsquery hosts vux.netsolhost.com

nsquery hosts 12.34.56.78

 

In a properly working system, the IP address and the fully qualified domain name (FQDN) will be the same in both commands. If not, your name resolution is defective. Start by putting the IP address and FQDN in /etc/hosts. Then run the nsquery commands with the additional parameter: "files dns" like this:

 

nsquery hosts vux.netsolhost.com "files dns"

nsquery hosts 12.34.56.78 "files dns"

 

This should work correctly as /etc/hosts has the correct information.

And if that is the case, add all the important server names (IPaddr hostnames FQDN) to /etc/hosts, then change nsswitch.conf to replace any existing hosts: line with:

 

hosts:        files [NOTFOUND=continue UNAVAIL=continue] dns
ipnodes:      files [NOTFOUND=return UNAVAIL=return TRYAGAIN=return]

 

You may also want to verify that /etc/resolv.conf has valid IP addresses for the DNS servers.

 



Bill Hassell, sysadmin
Laurent Menase
Honored Contributor

Re: Ping is not resolving by host name on HP-UX 11.31

typical nsswich.conf problem

it is not readable for all, or doesn't containe the rule like for hosts and ipnodes

 

When not using a nsswich.conf default is dns first file second

hosts:        files [NOTFOUND=continue UNAVAIL=continue] dns
ipnodes:      files [NOTFOUND=continue UNAVAIL=continue TRYAGAIN=contine] dns