0% found this document useful (0 votes)
21 views8 pages

Configure DNS For RAC

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 8

Configure DNS on E1VSR109

Check the entries of /etc/resolv.conf file.

[root@e1vsr109 ~]# cat /etc/resolv.conf

search pathinfotech.com

nameserver 192.168.16.12

nameserver 192.168.16.11

[root@e1vsr109 ~]#

We can see that the dns is working at 192.168.16.12 so need to comment it.

Check for the dns rpms

yum install -y *bind* caching-nameserver

[root@e1vsr109 ~]# rpm -qa| grep bind*

ypbind-1.19-12.el5_6.1

kdebindings-3.5.4-6.el5

system-config-bind-4.0.3-5.0.1.el5

bind-utils-9.3.6-20.P1.el5

binutils-2.17.50.0.6-20.el5

binutils220-2.20.51.0.2-5.29.el5

bind-libs-9.3.6-20.P1.el5

bind-chroot-9.3.6-20.P1.el5

libini_config-0.6.1-10.el5

bind-9.3.6-20.P1.el5

[root@e1vsr109 ~]#

[root@e1vsr109 ~]# rpm -qa| grep caching-nameserver

[root@e1vsr109 ~]#

Page 1 of 8
YUM Configuration

[root@e1vsr109 ~]# cat /etc/yum.repos.d/yum.repo

[el5_latest]

name=Oracle Linux $releasever Latest ($basearch)

baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/latest/$basearch/

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

gpgcheck=1

enabled=1

[root@e1vsr109 ~]#

Page 2 of 8
STEPS TO CONFIGURE DNS

[root@E1vsr109 ~]# cd /var/named/chroot/etc/

[root@E1vsr109 etc]# cp named.caching-nameserver.conf named.conf

[root@E1vsr109 etc]# vi named.conf


Code:
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver
// (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
options {
listen-on port 53 { 192.168.16.109; }; ----make a change here
# listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";

// Those options should be used carefully because they disable port


// randomization
// query-source port 53;
// query-source-v6 port 53;

allow-query { any; }; ----make a change here


allow-query-cache { any; }; ----make a change here
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view localhost_resolver {
match-clients { any; };
match-destinations { 192.168.16.107; };
recursion yes;
include "/etc/named.rfc1912.zones";
};

Page 3 of 8
[root@E1vsr109 etc]# vi named.rfc1912.zones

Code:
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "." IN {
type hint;
file "named.ca";
};

zone "pathinfotech.com" IN { -------make a change here


type master;
file "forward.zone"; ---------need to create a file with this name
allow-update { none; };
};

zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};

zone "1.168.192.in-addr.arpa" IN {
type master;
file "reverse.zone"; ---------need to create a file with this name
allow-update { none; };
};

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "named.ip6.local";
allow-update { none; };
};

zone "255.in-addr.arpa" IN {
type master;
file "named.broadcast";
allow-update { none; };
};

zone "0.in-addr.arpa" IN {
type master;
Page 4 of 8
file "named.zero";
allow-update { none; };
};

[root@E1vsr109 etc]# chgrp named named.conf

[root@E1vsr109 etc]# cd /var/named/chroot/var/named/

[root@E1vsr109 named]# cp localdomain.zone forward.zone


[root@E1vsr109 named]# cp named.local reverse.zone

[root@E1vsr109 named]# vi forward.zone

Code:
$TTL 86400
@ IN SOA E1vsr107.pathinfotech.com. root.pathinfotech.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS E1vsr107.pathinfotech.com.
E1vsr107 IN A 192.168.16.107

[root@E1vsr109 named]# vi reverse.zone

Code:
$TTL 86400
@ IN SOA E1vsr107.pathinfotech.com. root.E1vsr107.pathinfotech.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS E1vsr107.pathinfotech.com.
100 IN PTR E1vsr107.pathinfotech.com.

[root@E1vsr109 named]# chgrp named forward.zone


[root@E1vsr109 named]# chgrp named reverse.zone

Insert into all the nodes.

[root@E1vsr109 named]# cat /etc/resolv.conf

Code:
search pathinfotech.com
nameserver 192.168.16.107

Page 5 of 8
[root@E1vsr109 named]# service named restart
Code:
Stopping named: [ OK ]
Starting named: [ OK ]

Execute from both Nodes

[root@E1vsr109 named]# dig E1vsr107.pathinfotech.com

Code:
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5 <<>> E1vsr107.pathinfotech.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2650
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;E1vsr107.pathinfotech.com. IN A

;; ANSWER SECTION:
E1vsr107.pathinfotech.com. 86400 IN A 192.168.16.107

;; AUTHORITY SECTION:
pathinfotech.com. 86400 IN NS E1vsr107.pathinfotech.com.

;; Query time: 4 msec


;; SERVER: 192.168.16.107#53(192.168.16.107)
;; WHEN: Tue Aug 28 22:56:32 2012
;; MSG SIZE rcvd: 64

[root@E1vsr108 ~]# dig -x 192.168.16.107


Code:
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5 <<>> -x 192.168.16.107
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64577
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;100.1.168.192.in-addr.arpa. IN PTR

;; ANSWER SECTION:
100.1.168.192.in-addr.arpa. 86400 IN PTR E1vsr107.pathinfotech.com.

;; AUTHORITY SECTION:
1.168.192.in-addr.arpa. 86400 IN NS E1vsr107.pathinfotech.com.

Page 6 of 8
;; ADDITIONAL SECTION:
E1vsr107.pathinfotech.com. 86400 IN A 192.168.16.107

;; Query time: 3 msec


;; SERVER: 192.168.16.107#53(192.168.16.107)
;; WHEN: Tue Aug 28 23:04:13 2012
;; MSG SIZE rcvd: 104

[root@E1vsr108 ~]# nslookup E1vsr107.pathinfotech.com


Code:
Server: 192.168.16.107
Address: 192.168.16.107#53

Name: E1vsr107.pathinfotech.com
Address: 192.168.16.107
[root@E1vsr108 ~]# nslookup 192.168.16.107
Code:
Server: 192.168.16.107
Address: 192.168.16.107#53

100.1.168.192.in-addr.arpa name = E1vsr107.pathinfotech.com.

Once your basic dns server is working do the following

append the following in /var/named/chroot/var/named/forward.zone

Code:
; Oracle RAC Nodes
E1vsr107 IN A 192.168.15.107
E1vsr108 IN A 192.168.15.108
E1vsr107-priv IN A 192.168.16.107
E1vsr108-priv IN A 192.168.16.108
E1vsr107-vip IN A 192.168.15.207
E1vsr108-vip IN A 192.168.15.208

; Single Client Access Name (SCAN) virtual IP


rac-cluster-scan IN A 192.168.15.203
rac-cluster-scan IN A 192.168.15.204
rac-cluster-scan IN A 192.168.15.205

Append the following in /var/named/chroot/var/named/reverse.zone

Code:
; Oracle RAC Nodes
107 IN PTR E1vsr107.pathinfotech.com.
108 IN PTR E1vsr108.pathinfotech.com.
207 IN PTR E1vsr107-vip.pathinfotech.com.
208 IN PTR E1vsr108-vip.pathinfotech.com.

Page 7 of 8
; Single Client Access Name (SCAN) virtual IP
203 IN PTR rac-cluster-scan.pathinfotech.com.
204 IN PTR rac-cluster-scan.pathinfotech.com.
205 IN PTR rac-cluster-scan.pathinfotech.com.

[root@E1vsr109 named]# service named restart


Code:
Stopping named: [ OK ]
Starting named: [ OK ]

[root@E1vsr109 named]# chkconfig named on


[root@E1vsr109 named]# chkconfig named --list
Code:
named 0:off 1:off 2:on 3:on 4:on 5:on 6:off

Page 8 of 8

You might also like