1837141 Members
2356 Online
110112 Solutions
New Discussion

Re: configuring DNS

 
Shankar_6
Regular Advisor

configuring DNS

hi all,

I need a clearcut procedure for configuring DNS in HPUX 11.x.Assume the names of server in ur own..

regards
shankar
5 REPLIES 5
Robert-Jan Goossens
Honored Contributor

Re: configuring DNS

Hi Shankar,

Check this doc.

Document description: How to configure a DNS primary server,secondary server and client
Document id: HONCIKKBRC00000042

US
http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062972401

Europe
http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062972401

Regards,
Robert-Jan
Rajasekhar Raman
Frequent Advisor

Re: configuring DNS

There are two files to be modified

1. /etc/nsswitch.conf
2. /etc/resolv.conf

1. /etc/nsswitch.conf - make sure you add the following entry for "hosts"

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

2. /etc/resolv.conf should look like the following:

domain yourdomain.com
nameserver nameserver1 (IP address of Primary DNS server)
nameserver nameserver2 (IP address of Secondary DNS server)

That should be about all. Make sure you can ping the DNS servers so that you can query them. To test it type "nslookup hostname", if the entry is not in your /etc/hosts file, it should get resolved by the DNS server and give you an answer.

-Shekar
R. Sri Ram Kishore_1
Respected Contributor

Re: configuring DNS

Hi Shankar,

Take a look at this doc:
http://docs.hp.com/en/B2355-90775/ch02.html

HTH.
Regards,
Sri Ram
"What goes up must come down. Ask any system administrator."
Ravi_8
Honored Contributor
Ranjith_5
Honored Contributor

Re: configuring DNS

Hi Shankar,

I hope the following could be useful to you.

Configuring DNS
====================

I.Configure your Master DNS:-
============================

1 Delete all entries from /etc/hosts except local host entry and hosts in your domain.
Put FQDN for all hosts.See the example for a server called syam

#vi /etc/hosts
127.0.0.1 localhost
128.1.1.1 syam.india.mum.com syam
128.1.1.2 syam2.india.mum.com syam1
128.1.1.3 test.india.mum.com test


2 Create a directory for the DNS database file and cd to it

#mkdir /etc/named.data
#chmod 755 /etc/named.data
#cd /etc/named.data

3. Create a param file for your domain

#vi param

-d syam.india.mum.com # Use your domain name(s) here
-n 128.1.1 # Use your subnet address(es) here
-z 128.1.1.1 # Use your master server's IP here
-b /etc/named.conf

4. Run hosts_to_named

#hosts_to_named -f param

5. Download db.cache to the current dir.

6. Enable NAMED in the /etc/rc.config.d/namesvrs

#vi /etc/rc.config.d/namesvrs

NAMED=1
NAMED_AGRS=""

7. Start the named daemon

#/sbin/init.d/named start




II. Configuring Slave DNS:-
===============================

1. Create a directory for the DNS database file and cd to it

#mkdir /etc/named.data
#chmod 755 /etc/named.data
#cd /etc/named.data

2. FTP copies the db.* files from the master DNS.

#ftp 128.1.1.1 # Use your master DNS Server's IP Here
>mget /etc/named.data/db.*
>bye

3. FTP a copy of conf.sec.save from the master DNS server and move it into place on the slave server as /etc/named.conf

#ftp 128.1.1.1 # Use your Master DNS IP here.
>get /etc/named.data/conf.sec.save
>bye

#mv /etc/named.data/conf.sec.save /etc/named.conf


4. Enable NAMED in the /etc/rc.config.d/namesvrs

#vi /etc/rc.config.d/namesvrs
NAMED=1
NAMED_ARGS=""


5. Start the named daemon

#/sbin/init.d/named start




III. Configure the DNS clients;-
==================================

1. Modify the resolver file. Include the DNS IPs in the search list.Include both Master and mSlave server in the namesservers list.

#vi /etc/resolve.conf

search xyz.india.mum.com # replace this with your domain name
nameservers 128.1.1.1 # Replace 128.1.1.1 with your Master DNS IP
nameservers 128.1.1.2 # Replace 128.1.1.2 with your Slave DNS IP



2. If your /etc/nsswitch.conf exists, delete it. You can experiment with the default behaviour for now.

#mv /etc/nsswitch.conf /etc/nsswitch.conf.orig
3. Slave DNS and Clients need to modify /etc/hosts at this time.

#vi /etc/hosts

127.0.0.1 localhost
128.1.1.3 test.india.mum.com test


Regards,
Syam