During the transition from IPv4 to IPv6, you may have two GBase 8a clusters running on different IP protocols. Since IPv4 and IPv6 cannot communicate directly, the GBase Gateway acts as a bridge. This guide walks through the complete configuration, from gateway setup to dblink usage, for accessing an IPv4 cluster from an IPv6 cluster in a gbase database environment.
Environment
-
Gateway: Version
GBase8a_MPP_Cluster_Gateway_8.5.1.2_build4.19, must be installed on the IPv6 cluster node (which also has an IPv4 address). -
IPv4 cluster: Legacy cluster, e.g.,
10.0.2.201. -
IPv6 cluster: Migrated cluster with IPv6 address
2001::203, also retaining10.0.2.203for gateway communication.
Gateway Configuration
1. Data Source (IPv4 Cluster)
Create a file under conf/dataSource/ — the filename is the identifier you'll use in CREATE DATABASE LINK. Example ipv4_201.properties:
[ipv6201]
dataSource_IP=10.0.2.201
dataSource_port=5258
dataSource_dbname=testdb
dataSource_dbtype=gcluster
dataSource_user=gbase
dataSource_pwd=XXXXXXXX
2. Target Cluster (IPv6)
Edit conf/gcluster/gbase8a_gcluster.properties. The user must match the logged‑in user, and you must configure entries for both the coordinator (port 5258) and every data node (port 5050).
[gc1]
gcluster_IP=2001::203
gcluster_port=5258
gcluster_user=root
gcluster_pwd=XXXXXX
gcluster_encode=utf-8
[gn1]
gcluster_IP=2001::222
gcluster_port=5050
gcluster_user=root
gcluster_pwd=XXXXXX
gcluster_encode=utf-8
3. Start the Gateway
cd /opt/GBase8a_MPP_Cluster_Gateway_8.5.1.2_build4.19/
sh gt.sh
Verify with ps -ef | grep ga. Logs are in the logs directory.
IPv6 Cluster Parameters
Add the following to gbase_8a_gcluster.cnf on every coordinator node and restart:
gcluster_dblink_direct_data_exchange=0
gbase_dblink_gateway_ip=10.0.2.203
gbase_dblink_gateway_port=9898
_t_gcluster_dblink_insert_select_optimization=0
-
gbase_dblink_gateway_ipis the IPv4 address of the gateway host. - Setting
gcluster_dblink_direct_data_exchange=0forces all data through the gateway, which is required when the two clusters cannot reach each other directly.
dblink Usage Examples
Create a dblink
CREATE DATABASE LINK ipv4201 CONNECT TO '' IDENTIFIED BY '' USING 'ipv4_201';
Query remote data
SELECT * FROM d@ipv4201;
Import data via INSERT SELECT
INSERT INTO d SELECT * FROM d@ipv4201;
Create a table from a remote query
CREATE TABLE d2 AS SELECT * FROM d@ipv4201;
JOINs between dblink tables
JOINs between two dblink tables are supported. JOINs between a dblink table and a local table are not allowed.
Send DDL/DML to the remote cluster
Use the PASSTHROUGH syntax to execute statements directly on the IPv4 cluster:
PASSTHROUGH LINK ipv4201 USING 'INSERT INTO d VALUES(now())';
Note: SELECT and CALL are not supported via PASSTHROUGH.
View and drop dblinks
SELECT * FROM gbase.db_links;
DROP DATABASE LINK ipv4201;
Critical Notes
- Install the gateway on an IPv6 cluster node — it must have both IPv4 and IPv6 addresses to bridge the two networks.
-
Use a consistent IPv6 address format —
2001::200and2001::0200are treated as different strings. Standardise the format across the cluster. - The target cluster user in the gateway config must match the logged‑in user — matching is done by IP + username.
-
Configure data node entries in the gateway — if using gateway relay mode, every data node needs a
gcluster_port=5050entry. - Direct
INSERT INTO table@dblinkis not yet supported in the tested version.
With this setup, you can safely access an IPv4 GBase 8a cluster from an IPv6 cluster during your network migration, keeping cross‑cluster queries operational in your gbase database environment.
Top comments (0)