1834935 Members
2383 Online
110071 Solutions
New Discussion

Re: Configure DNS

 
SOLVED
Go to solution
David Peacock
Frequent Advisor

Configure DNS

When I use nslookup I can only query the contents of my /etc/hosts file.

I want to be able to query other things on my network and the internet. My network colleague has given me an address of a DNS server on the internet and an address of a DNS server in our local network.

How do I configure our HP 9000 to query the DNS server. I do not want the HP to look to DNS for it's own name. I want it to go to DNS
after it has looked in /etc/hosts.

How can this be done?

Thank you
veni, vidi, vmstat
5 REPLIES 5
Christopher Caldwell
Honored Contributor

Re: Configure DNS

Make a file in /etc called
resolv.conf

Add a line that says
nameserver A.B.C.D

where A.B.C.D is the IP address (not name) of the name server.

Watch out for the /etc/nsswitch.conf configuration. I suspect you'd rather query the name server then the host file, so
/etc/nsswitch.conf should either
NOT exist
or have a line like
hosts: dns files
James R. Ferguson
Acclaimed Contributor

Re: Configure DNS

Hi David:

Chapter-3 ["Configuring and Administering the BIND Name Service"] of "Installing and Administering Internet Services" offers a good overview of this task:

http://docs.hp.com/hpux/onlinedocs/B2355-90685/B2355-90685.html

...JRF...
federico_3
Honored Contributor

Re: Configure DNS


In /etc/resolv.conf ( if it does not exist, create it )add the following lines:
domain xxx.yyyy
nameserver xx.ccc.vvv.mmm

where xx.ccc.vvv.mmm is the IP address (not name) of the name server.

Watch out for the /etc/nsswitch.conf configuration. It should be like this:
hosts: files[NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=continue TRYAGAIN=return]

federico


Pedro Sousa
Honored Contributor
Solution

Re: Configure DNS

Hi!

create the file /etc/resolv.conf with the following:
domain
nameserver

if you have more than 1 dns:
domain
nameserver
nameserver
retry
retrans

create another file /etc/nsswitch.conf with:
hosts: files [NOTFOUND=continue UNAVAIL=continue] dns

then, don't forget to change the access permissions.

good luck.