Operating System - HP-UX
1829148 Members
2243 Online
109986 Solutions
New Discussion

Re: does not know by itself - ping unknown host

 
SOLVED
Go to solution
Tonatiuh
Super Advisor

does not know by itself - ping unknown host

HP-UX PA-RISC 11.11.

My /etc/hosts
127.0.0.1 localhost loopback
172.16.110.41 xyz.mydomain.org xyz

But there is a problem resolving the IP for the hostname of this same server (xyz.mydomain.org):

# /usr/sbin/ping xyz.mydomain.org
/usr/sbin/ping: unknown host xyz.mydomain.org
3 REPLIES 3
Devesh Pant_1
Esteemed Contributor
Solution

Re: does not know by itself - ping unknown host

Check your /etc/nsswitch.conf
It should show something like this
# /etc/nsswitch.conf: #
hosts: files [NOTFOUND=continue] dns [NOTFOUND=continue]


What does uname -a return?

thanks

DP
Fabio Ettore
Honored Contributor

Re: does not know by itself - ping unknown host

Hi,

the resolution IP/names happens by 3 three methods:

- DNS ---> check /etc/resolv.conf to point the good nameservers

- /etc/hosts

- NIS (it is not so used)

Check /etc/nsswitch.conf about the order of the policies.

Another way to check the order of the policies is by
nslookup -swtrace xyz.mydomain.org

What does last nslookup command report?

HTH.

Best regards,
Fabio
WISH? IMPROVEMENT!
Mahesh Kumar Malik
Honored Contributor

Re: does not know by itself - ping unknown host

Hi
Please check /etc/nsswitch.conf file. If not existing, copy /etc/nsswitch.hp_defaults as /etc/nsswitch.conf and edit to get following in order to see file for name resolution

hosts: files [NOTFOUND=continue] dns [NOTFOUND=continue

Regards
Mahesh