Operating System - HP-UX
1833784 Members
2587 Online
110063 Solutions
New Discussion

Re: HP server DNS setting

 
SOLVED
Go to solution
Stephen Ng
Occasional Advisor

HP server DNS setting

I would like to config the server so that it can connect to our DNS server (101.1.0.99 , 101.1.0.168) for Domain name resolution.
6 REPLIES 6
Nico van Royen
Frequent Advisor

Re: HP server DNS setting

In your /etc/resolv.conf set it to something like:
domain somename.com
search somename.com someothername.net
nameserver 101.1.0.99
nameserver 101.1.0.168

Also makesure you have a good /etc/nsswitch.conf (for example: hosts: files [NOTFOUND=continue UNAVAIL=continue] dns

- NvR
If all else fails, try reading the manual...
Stephen Ng
Occasional Advisor

Re: HP server DNS setting

Hi,
I've found /etc/nsswitch.hp.defaults in the systems.
If I only want to use DNS server, should I just keep the dns setting only?

/etc/nsswitch.hp.default:
#
# /etc/nsswitch.hp_defaults:
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# uses NIS (YP) in conjunction with files.
#

passwd: compat
group: compat
hosts: dns [NOTFOUND=return] nis [NOTFOUND=return] files
networks: nis [NOTFOUND=return] files
protocols: nis [NOTFOUND=return] files
rpc: nis [NOTFOUND=return] files
publickey: nis [NOTFOUND=return] files
netgroup: nis [NOTFOUND=return] files
automount: files nis
aliases: files nis
services: nis [NOTFOUND=return] files

vi /etc/nsswitch.conf
hosts: dns [NOTFOUND=return]

Tks,
Stephe
Nico van Royen
Frequent Advisor
Solution

Re: HP server DNS setting

I recommend first using files (i.e. the /etc/hosts file) although its not required. With just dns it will also work (asuming the dns server has all hosts in it).
With just the entry: "hosts: dns" it will only search the dns server (specified in the /etc/resolv.conf).

- NvR
If all else fails, try reading the manual...
steven Burgess_2
Honored Contributor

Re: HP server DNS setting

Stephen

If you only resolve using dns you will at times have delays whilst logging on as the server will have to be contacted before giving you access

It's best to have local and frequently used hostnames in your /etc/hosts file

Then set /etc/nsswitch.conf to

hosts :files [NOTFOUND=continue] dns

There are copies of the above in /usr/newconfig/etc

HTH

Steve
take your time and think things through
Kellogg Unix Team
Trusted Contributor

Re: HP server DNS setting

Putting files first in nsswitch.conf will help you in case your dns servers are not available or are not responding. If you are booting your client and dns servers aren't available, it takes inordinate amount of time for the client to come up if order is 'dns first, hosts next'.
work is fun ! (my manager is standing behind me!!)
Stephen Ng
Occasional Advisor

Re: HP server DNS setting

Problem solved.
Tks to you all
Stephen