DNS Configuration for SCAN IP
Set the Domainname:
# domainname
rac1.com
# domainname
>/etc/defaultdomain
Write the zone information in /etc/named.conf
# vi
/etc/named.conf
options {
directory
"/var/named";
};
zone
"rac1.com"{
type
master;
file
"rac1domain.for";
};
zone
"1.168.192.in-addr.arpa"{
type
master;
file
"rac1domain.rev";
};
Copy the file to /var/named/chroot/etc
# cp /etc/named.conf
/var/named/chroot/etc
Configure forward and reverse lookup files
#cd /var/named
# vi rac1domain.for
@ IN SOA rhel51.rac1.com root.rac1.com(
2010110101
36400
86000
108000
36000)
@ IN
NS rhel51.rac1.com
rhel51 IN
A 192.168.1.121
rhel51-vip IN
A 192.168.1.122
rhel52 IN
A 192.168.1.124
rhel52-vip IN
A 192.168.1.125
cluster1-scan IN
A 192.168.1.127
cluster1-scan IN
A 192.168.1.128
cluster1-scan IN
A 192.168.1.129
# vi rac1domain.rev
@ IN SOA rhel51.rac1.com. root.rac1.com. (
2010110101;
36400;
86000;
108000;
36000);
@ IN NS
rhel51.rac1.com.
121 IN PTR rhel51.rac1.com.
122 IN PTR rhel51-vip.rac1.com.
124 IN PTR rhel52.rac1.com.
125 IN PTR rhel52-vip.rac1.com.
127 IN PTR cluster1-scan.rac1.com.
128 IN PTR cluster1-scan.rac1.com.
129 IN PTR cluster1-scan.rac1.com.
Copy these Two file to /var/named/chroot/var/named
#cp /var/named/rac1domain. * /var/named/chroot/var/named
Start the Named Service (Note if it showing error, change
the hostname of second node and reboot it)
#services named restart
Make the named service to autostart whenever server boots
next time,
#chkconfig named on
- How to change
hostname
Change hostname in below file and reboot the server
/etc/sysconfig/network
/etc/hosts
- Add below lines on
both the nodes
[root@rhel51 named]# cat /etc/resolv.conf
; generated by /sbin/dhclient-script
nameserver 192.168.1.121
domain rac1.com
[root@rhel51 named]#
Chage the below entry in /etc/nsswitch.conf
hosts: dns files
-- hosts: files dns
Verify the setup:
nslookup rhel51
nslookup rhel52
nslookup rhel52-vip
nslookup rhel51-vip
nslookup 192.168.1.121
nslookup 192.168.1.124
nslookup cluster1-scan
nslookup cluster1-scan
nslookup cluster1-scan
Comments
Post a Comment