Use GNS with Bind9 and DHCP in Oracle GI 12c

  • 584 views
  • Read

These days I tried to install my first Oracle 12c RAC in my test environment, and wanted to experience some new features I have not used before.

I have been a Linux SA in several years ago, so at first I thought the configuration of Bind and DHCP should be not a difficult thing for me, but it turned out I was totally wrong, especially when I enabled the GNS option of Clusterware.

First, why did I want to try the GNS feature? It should reduce the workload of network management. From the guide of Oracle Clusterware, with GNS option, we could let Clusterware itself to set the VIP, the SCAN and even the virtual hostname, which is useful when the Cluster has lots of nodes.

I don't know what I should write in the local hosts file, this is to say, what information I should include in the local hosts? I did make some mistakes in this part, until I found below document:
5.11 Grid Naming Service Standard Cluster Configuration Example

So I know I should assign at least 4 fixed IP Addresses for 3-node Cluster on the DHCP server, one for GNS VIP, three for public IP Addresses for the nodes. As these information is defined on the DHCP server, so I need not to include them in the local /etc/hosts file. For private IP Addresses, as I just setup the DHCP service for the public network, so I have to write them in the /etc/hosts file.

[oracle@rac12-node1 dbs]$ cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.0.0.1        rac12-node1-priv
10.0.0.2        rac12-node2-priv
10.0.0.3        rac12-node3-priv

So, it is simple, right? Yes and No!

For the /etc/hosts, it is simple, while to configure Bind and DHCP services, I spent several days to deal with all the issues, and to get an error-free configuration.

We can find lots of posts on the internet about subdomain configuration of Bind, but I do not know why most of them do not work in my test environment, until I find this one:
http://dfworacle1.racscan.com/rac/Oracle_RAC_with_GNS.html

I list the most important things as below, and will write a detail guide in my Wiki pages after I pass the certificate.

In the zone file:

gns.lunixdb.com.        A       192.168.13.150
$ORIGIN rac.lunixdb.com.
@                       NS      gns.lunixdb.com.

Most of the posts say I should use gns.rac.lunixdb.com, but they do not work for me, so I have to use gns.lunixdb.com instead.

In the named.conf or named.rfc1912.zones, I'd better add below part:

zone "rac.lunixdb.com" IN {
        type forward;
        forwarders { 192.168.13.150; };
};

When dealing with Bind and DHCP issue, you'd better watch the /var/log/messages closely, as I found lots of clues from it and they were really helpful.

Other helpful documents:
How to Validate Network and Name Resolution Setup for the Clusterware and RAC (Doc ID 1054902.1)
DNS and DHCP Setup Example for Grid Infrastructure GNS (Doc ID 946452.1)

  • by Published on 30/01/2016 18:20:12
  • Repost please keep this link: https://www.dbcloudsvc.com/blogs/oracle/use-gns-with-bind9-and-dhcp-in-oracle-gi-12c/
匿名

Comment

Anonymous Write

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

Decide