Skip to main content

Oracle Database 12c Release 1 fully supports IPv6. Here is how to add IPv6 support to VIPs and SCANs in a 12c RAC cluster. The VIPs, SCANs and their listeners will support both IPv4 and IPv6 and addresses from both families will relocate between RAC nodes as normal. It is only assumed that the servers already have a host IPv6 address assigned via auto-configuration.

In broad terms, the steps to achieve this will be to modify Oracle's view of the network, update the SCAN addresses, enable IPv6, and update the VIP addresses. A certain process has to be followed to make this work and survive across CRS restarts.

In a nutshell, after DNS is updated, run the following commands as the root user. Substitute your own values for the CRS home, IPv6 network and netmask, public network interface name, host and VIP names, and SCAN name.

/u01/app/12.1.0/grid/bin/oifcfg setif -global eth0/2001:123:4:5:::public
/u01/app/12.1.0/grid/bin/srvctl modify network -subnet 2001:123:4:5::/64/eth0
/u01/app/12.1.0/grid/bin/srvctl modify scan -scanname o12-cl1
/u01/app/12.1.0/grid/bin/srvctl modify network -iptype both
/u01/app/12.1.0/grid/bin/srvctl modify vip -node h1-o12-cl1 -address h1-o12-cl1-vip/64 -netnum 1 -skip
/u01/app/12.1.0/grid/bin/srvctl modify vip -node h2-o12-cl1 -address h2-o12-cl1-vip/64 -netnum 1 -skip
[...]

Now we'll go through the above steps in a bit more detail. It is vital that all VIPs have only one IPv4 address and only one IPv6 address. The SCAN DNS must resolve to the same number of different IPv6 addresses as it does for IPv4 addresses.

Firstly review the currently defined cluster interconnects.

[root@h1-o12-cl1 ~]# /u01/app/12.1.0/grid/bin/oifcfg getif
eth0  10.1.2.0  global  public
eth1  192.168.0.0  global  cluster_interconnect

Add the IPv6 subnet.

[root@h1-o12-cl1 ~]# /u01/app/12.1.0/grid/bin/oifcfg setif -global eth0/2001:123:4:5:::public
[root@h1-o12-cl1 ~]# /u01/app/12.1.0/grid/bin/oifcfg getif
eth0  10.1.2.0  global  public
eth1  192.168.0.0  global  cluster_interconnect
eth0  2001:123:4:5::  global  public

Next, the network should be adapted for the new IPv6 subnet.

[root@h1-o12-cl1 ~]# /u01/app/12.1.0/grid/bin/srvctl config network
Network 1 exists
Subnet IPv4: 10.1.2.0/255.255.255.0/eth0, static
Subnet IPv6: 
[root@h1-o12-cl1 ~]# /u01/app/12.1.0/grid/bin/srvctl modify network -subnet 2001:123:4:5::/64/eth0
[root@h1-o12-cl1 ~]# /u01/app/12.1.0/grid/bin/srvctl config network
Network 1 exists
Subnet IPv4: 10.1.2.0/255.255.255.0/eth0, static
Subnet IPv6: 2001:123:4:5::/64/eth0, static (inactive)

The new IPv6 network is currently inactive. If we try to activate it now we will receive the following error.

PRCN-3038 : SCAN name "o12-cl1" resolves to different addresses than those of the existing SCAN VIPs

Because of this, we must notify the SCANs of the new addresses.

[root@h1-o12-cl1 ~]# /u01/app/12.1.0/grid/bin/srvctl modify scan -scanname o12-cl1
[root@h1-o12-cl1 ~]# /u01/app/12.1.0/grid/bin/srvctl config scan
SCAN name: o12-cl1, Network: 1
Subnet IPv4: 10.1.2.0/255.255.255.0/eth0
Subnet IPv6: 2001:123:4:5::/64/eth0
SCAN 0 IPv4 VIP: 10.1.2.94
SCAN 0 IPv6 VIP: 2001:123:4:5:0:0:3:60
SCAN name: o12-cl1, Network: 1
Subnet IPv4: 10.1.2.0/255.255.255.0/eth0
Subnet IPv6: 2001:123:4:5::/64/eth0
SCAN 1 IPv4 VIP: 10.1.2.95
SCAN 1 IPv6 VIP: 2001:123:4:5:0:0:3:5e
SCAN name: o12-cl1, Network: 1
Subnet IPv4: 10.1.2.0/255.255.255.0/eth0
Subnet IPv6: 2001:123:4:5::/64/eth0
SCAN 2 IPv4 VIP: 10.1.2.96
SCAN 2 IPv6 VIP: 2001:123:4:5:0:0:3:5f
[root@h1-o12-cl1 ~]# /u01/app/12.1.0/grid/bin/srvctl modify network -iptype both
[root@h1-o12-cl1 ~]# /u01/app/12.1.0/grid/bin/srvctl config network
Network 1 exists
Subnet IPv4: 10.1.2.0/255.255.255.0/eth0, static
Subnet IPv6: 2001:123:4:5::/64/eth0, static

The VIPs should already be configured to use IPv6 but in reality they are not working. Although the IPv6 address is assigned to the network interface, the host listener is not using the VIP address and, if CRS is restarted, the VIP will fail to restart altogether. The solution is to reconfigure the IPv6 address on the VIPs. To avoid the following error

PRCC-1108 : Invalid VIP address 2001:123:4:5:0:0:3:5c because the specified IP address is reachable

We need to specify -skip. This is because the earlier modify network command assigned the IPv6 VIP to the interface. Also note that the fully qualified domain name (FQDN) should not be specified. The command would succeed, but, again, the VIP will not restart when CRS is restarted on that node. The respective node must be up for this change to succeed.

[root@h1-o12-cl1 ~]# /u01/app/12.1.0/grid/bin/srvctl config vip -node h1-o12-cl1
VIP exists: network number 1, hosting node h1-o12-cl1
VIP Name: h1-o12-cl1-vip.example.com
VIP IPv4 Address: 10.1.2.92
VIP IPv6 Address: 2001:123:4:5:0:0:3:5c
[root@h1-o12-cl1 ~]# /u01/app/12.1.0/grid/bin/srvctl modify vip -node h1-o12-cl1 -address h1-o12-cl1-vip/64 -netnum 1 -skip
[root@h1-o12-cl1 ~]# /u01/app/12.1.0/grid/bin/srvctl config vip -node h1-o12-cl1
VIP exists: network number 1, hosting node h1-o12-cl1
VIP Name: h1-o12-cl1-vip
VIP IPv4 Address: 10.1.2.92
VIP IPv6 Address: 2001:123:4:5:0:0:3:5c

Perform the same change for all the other cluster node(s). As before the respective node(s) must be up for this change to succeed.

/u01/app/12.1.0/grid/bin/srvctl modify vip -node h2-o12-cl1 -address h2-o12-cl1-vip/64 -netnum 1 -skip

That's it. To demonstrate this we can reveal the IPv6 addresses assigned to the network interface on h1-o12-cl1 and show the IP addresses that the listeners are using.

[root@h1-o12-cl1 ~]# /u01/app/12.1.0/grid/bin/srvctl config vip -node h1-o12-cl1
VIP exists: network number 1, hosting node h1-o12-cl1
VIP Name: h1-o12-cl1-vip
VIP IPv4 Address: 10.1.2.92
VIP IPv6 Address: 2001:123:4:5:0:0:3:5c

[root@h1-o12-cl1 ~]# /u01/app/12.1.0/grid/bin/srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node h1-o12-cl1
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node h2-o12-cl1
SCAN VIP scan3 is enabled
SCAN VIP scan3 is running on node h2-o12-cl1

[root@h1-o12-cl1 ~]# /u01/app/12.1.0/grid/bin/srvctl config scan
SCAN name: o12-cl1, Network: 1
Subnet IPv4: 10.1.2.0/255.255.255.0/eth0
Subnet IPv6: 2001:123:4:5::/64/eth0
SCAN 0 IPv4 VIP: 10.1.2.94
SCAN 0 IPv6 VIP: 2001:123:4:5:0:0:3:60
SCAN name: o12-cl1, Network: 1
Subnet IPv4: 10.1.2.0/255.255.255.0/eth0
Subnet IPv6: 2001:123:4:5::/64/eth0
SCAN 1 IPv4 VIP: 10.1.2.95
SCAN 1 IPv6 VIP: 2001:123:4:5:0:0:3:5e
SCAN name: o12-cl1, Network: 1
Subnet IPv4: 10.1.2.0/255.255.255.0/eth0
Subnet IPv6: 2001:123:4:5::/64/eth0
SCAN 2 IPv4 VIP: 10.1.2.96
SCAN 2 IPv6 VIP: 2001:123:4:5:0:0:3:5f

[root@h1-o12-cl1 ~]# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:01:02:03:04:05  
          inet addr:10.1.2.88  Bcast:10.1.2.255  Mask:255.255.255.0
          inet6 addr: 2001:123:4:5::3:5c/64 Scope:Global
          inet6 addr: 2001:123:4:5::3:60/64 Scope:Global
          inet6 addr: 2001:123:4:5:201:2ff:fe03:405/64 Scope:Global
          inet6 addr: fe80::201:2ff:fe03:405/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:237015 errors:0 dropped:0 overruns:0 frame:0
          TX packets:203580 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:256910681 (245.0 MiB)  TX bytes:84008821 (80.1 MiB)

[root@h01-c07-test ~]# ss -ntl | grep 1521
LISTEN     0      128             10.1.2.92:1521                     *:*     
LISTEN     0      128    2001:123:4:5::3:5c:1521                    :::*     
LISTEN     0      128             10.1.2.88:1521                     *:*     
LISTEN     0      128       2001:123:4:5:201:2ff:fe03:405:1521                    :::*     
LISTEN     0      128             10.1.2.94:1521                     *:*     
LISTEN     0      128    2001:123:4:5::3:60:1521                    :::*  
Classifications