Sunday, October 9, 2011

How to Configure DNS in HPUX

Create Primary DNS Server

1. Get your IP numbers for Primary and Secondary DNS first.

2. Create a list of host names and correspondence IP addresses in /etc/hosts file

3. #mkdir /etc/named.data

4. #cd /etc/named.data

5. Create a file named param that will be used by hosts_to_named to create DNS data files

Ex. -d boota.com
-n 192.168.3
-z 192.168.3.10
-b /etc/named.boot
-s
(-d = domain name, -n = network number, -z = configuration file for secondary server and IP no. of
primary server to download data files, -b for boot files used by named process, -s adds a name server
(NS) resource record in configuration file.

6. #hosts_to_named –f param

7. download the db.cache file from internet copy it to /etc/named.data directory

8. modify /etc/rc.config.d/namesvrs file (NAMED=1) to start named process automatically with m/c
boots

9. /sbin/init.d/named start
Create Secondary DNS Server

1. #mkdir /etc/named.data

2. copy boot.sec file as /etc/named.boot from the primary server if you don’t have much disk space.
or
copy boot.sec.save file as /etc/named.boot if you have much space to keep database file.

3. copy db.127.0.0 from the primary server to /etc/named.data directory

4. copy db.cache from the primary server to the /etc/named.data directory

5. if you want to create local database files download the remaining files from /etc/named.data from primary server to local /etc/named.data directory.

6. update the /etc/rc.config.d/namesvrs file to start named at boot time.

7. start named using /sbin/init.d/named start
Create Caching DNS Server

1. #mkdir /etc/named.data
2. copy named.cacheonly from primary sever as /etc/named.boot
3. copy db.127.0.0 from primary server to /etc/named.data directory
4. copy db.cache from primary server to /etc/named.data directory
5. update the /etc/rc.config.d/namesvrs file to start named at boot time
6. start named /sbin/init.d/named start command

Configuring DNS client

1. edit /etc/nssswitch.conf file & enter
hosts: dns files

2. edit /etc/resolve.conf and enter the name servers
Ex. search xyz.com
nameserver 192.168.3.10
nameserver 192.168.3.12

Updating Database files on Primary Server
1. edit and update /etc/hosts file on primary server
2. # cd /etc/named.data
3. run to regenerate database files
4. # hosts_to_named -f param
5. reload using “sig_named restart” command

No comments:

Post a Comment