Wondering how to setup DNS server which can be used for oracle RAC in your virtual box environment. Do not worry I will provide the steps on how to setup DNS.
In my case the setup was done on redhat linux
IP Address of DNS Server: 192.168.56.150
DNS Server name: dns1.localdomain
Domain Name: localdomain
Public Network for RAC: 192.168.56
Private Network for RAC: 192.168.1
Steps:
1. Install bind using yum
2. start named service
3. backup original confs if there are any
4. modify or create /etc/named.conf
5. Modify or create /var/named/56.168.192.in-addr.arpa
6. Modify or create zone /var/named/localdomain.zone
7. modify hosts file /etc/hosts
8. Restart named service
1. Install bind using yum
5. Modify or create /var/named/56.168.192.in-addr.arpa
In my case the setup was done on redhat linux
IP Address of DNS Server: 192.168.56.150
DNS Server name: dns1.localdomain
Domain Name: localdomain
Public Network for RAC: 192.168.56
Private Network for RAC: 192.168.1
Steps:
1. Install bind using yum
2. start named service
3. backup original confs if there are any
4. modify or create /etc/named.conf
5. Modify or create /var/named/56.168.192.in-addr.arpa
6. Modify or create zone /var/named/localdomain.zone
7. modify hosts file /etc/hosts
8. Restart named service
1. Install bind using yum
yum -y install bind-libs bind bind-utils2. start named service
service named start3. backup original confs if there are any
chkconfig named on
cp -p /etc/named.conf /etc/named.conf.original
cp -p /var/named/56.168.192.in-addr.arpa /var/named/56.168.192.in-addr.arpa.original
cp -p /var/named/localdomain.zone /var/named/localdomain.zone.original
4. modify or create /etc/named.conf
[root@dns1 ~]# cat /etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind 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.
//
options {
listen-on port 53 { 127.0.0.1;192.168.56.150; };
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";
allow-query { any; };
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localdomain." IN {
type master;
file "localdomain.zone";
allow-update { none; };
};
zone "56.168.192.in-addr.arpa." IN {
type master;
file "56.168.192.in-addr.arpa";
allow-update { none; };
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
[root@dns1 ~]#
[root@dns1 ~]# cat /var/named/56.168.192.in-addr.arpa6. Modify or create zone /var/named/localdomain.zone
$ORIGIN 56.168.192.in-addr.arpa.
$TTL 1H
@ IN SOA dns1.localdomain. root.dns1.localdomain. ( 2
3H
1H
1W
1H )
56.168.192.in-addr.arpa. IN NS dns1.localdomain.
101 IN PTR rac1.localdomain.
102 IN PTR rac2.localdomain.
103 IN PTR rac1-vip.localdomain.
104 IN PTR rac2-vip.localdomain.
105 IN PTR scan.localdomain.
106 IN PTR scan.localdomain.
107 IN PTR scan.localdomain.
120 IN PTR host01.localdomain.
135 IN PTR vhost1.localdomain.
100 IN PTR rcat1.localdomain.
111 IN PTR racdr1.localdomain.
113 IN PTR racdr1-vip.localdomain.
115 IN PTR scandr.localdomain.
116 IN PTR scandr.localdomain.
117 IN PTR scandr.localdomain.
[root@dns1 ~]#
[root@dns1 ~]# cat /var/named/localdomain.zone7. modify hosts file /etc/hosts
$TTL 86400
@ IN SOA localhost root.localhost (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS localhost
localhost IN A 127.0.0.1
rac1 IN A 192.168.56.101
rac2 IN A 192.168.56.102
rac1-priv IN A 192.168.1.101
rac2-priv IN A 192.168.1.102
rac1-vip IN A 192.168.56.103
rac2-vip IN A 192.168.56.104
scan IN A 192.168.56.105
scan IN A 192.168.56.106
scan IN A 192.168.56.107
host01 IN A 192.168.56.120
vhost1 IN A 192.168.56.135
rcat1 IN A 192.168.56.100
racdr1 IN A 192.168.56.111
racdr1-priv IN A 192.168.1.111
racdr1-vip IN A 192.168.56.113
scandr IN A 192.168.56.115
scandr IN A 192.168.56.116
scandr IN A 192.168.56.117
[root@dns1 ~]#
[root@dns1 ~]# cat /etc/hosts8. Restart named service
127.0.0.1 localhost.localdomain localhost
192.168.56.150 dns1.localdomain dns1
# Public
192.168.56.101 rac1.localdomain rac1
192.168.56.102 rac2.localdomain rac2
# Private
192.168.1.101 rac1-priv.localdomain rac1-priv
192.168.1.102 rac2-priv.localdomain rac2-priv
# Virtual
192.168.56.103 rac1-vip.localdomain rac1-vip
192.168.56.104 rac2-vip.localdomain rac2-vip
# SCAN
192.168.56.105 scan.localdomain scan
192.168.56.106 scan.localdomain scan
192.168.56.107 scan.localdomain scan
192.168.56.120 host01.localdomain host01
192.168.56.100 rcat1.localdomain rcat1
#DR
# Public
192.168.56.111 racdr1.localdomain racdr1
# Private
192.168.1.111 racdr1-priv.localdomain racdr1-priv
# Virtual
192.168.56.113 racdr1-vip.localdomain racdr1-vip
# SCAN
192.168.56.115 scandr.localdomain scandr
192.168.56.116 scandr.localdomain scandr
192.168.56.117 scandr.localdomain scandr
[root@dns1 ~]#
service named restartAnd you are done your dns is up and running now.
No comments:
Post a Comment