Operating System - HP-UX
1847165 Members
6315 Online
110263 Solutions
New Discussion

Basic DNS resolution problem

 
SOLVED
Go to solution
Peter Kovacs 1.0rc
Frequent Advisor

Basic DNS resolution problem

Hi,

I am completely new to HPUX.

The system has an /etc/hosts file with the following entries:

10.0.0.104 apollo apollo
127.0.0.1 localhost loopback

(10.0.0.104 is the system's own IP address.)

Still, there seems to be DNS resolution problem:

# ping apollo
ping: unknown host apollo

Should I, perhaps, change the content of the /etc/resolv.conf file? This file currently contains the following entries:

# cat /etc/resolv.conf
domain localdomain
nameserver 10.0.0.100
nameserver 10.0.0.1

(The nameservers listed don't now about apollo.)

Any help appreciated.

Thanks
Peter
5 REPLIES 5
Peter Godron
Honored Contributor

Re: Basic DNS resolution problem

Peter,
and welcome to the forums !

Have you checked your nsswitch.conf to check in what order you will try to resolve your hostname target.

You can modify via SAM or editor.

See "man nsswitch.conf"

We normally use the order:
files (/etc/hosts)
DNS

Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions.


Jaime Bolanos Rojas.
Honored Contributor
Solution

Re: Basic DNS resolution problem

Peter,

Agreed with the above answer, your /etc/nsswitch.conf your be looking like this:

# cat /etc/nsswitch.conf
#
# /etc/nsswitch.files:
#
# @(#)B11.23_LR
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any name services.
#
passwd: files
group: files
hosts: files [NOTFOUND=continue] dns
ipnodes: files
services: files

Regards,

Jaime.
Work hard when the need comes out.
Ivan Krastev
Honored Contributor

Re: Basic DNS resolution problem

Also remove one appollo from hosts:

10.0.0.104 apollo apollo


regards,
ivan
Peter Kovacs 1.0rc
Frequent Advisor

Re: Basic DNS resolution problem

Thank you very much for all of your help.

Peter
Peter Kovacs 1.0rc
Frequent Advisor

Re: Basic DNS resolution problem

Answered.