Product Documentation

c-treeACE V11.0 Update Guide

Previous Topic

Next Topic

IPv6 Support

Internet Protocol (IP) IPv6 format is available for V11 and later c-treeACE servers.

World IPv6 Launch

IPv6 greatly expands the number of available IP addresses over the previous IPv4 standard, which used the familiar quad dotted format (four decimal numbers, from 0 through 255, separated by dots), allowing 4.3 billion addresses. IPv6 uses eight groups of four hex digits each, for 2128 addresses. Although proposed in 1998, only a small percentage of machines are currently using IPv6. However, IPv6 adoption is quickly expected as the number of IPv4 addresses is at, or very near, exhaustion, especially for external internet addressing. Although, IPv4 remains efficient for internal networks.

  • IPv6 support is not available for QNX and SCO.

Server Configuration Options

This support is affected by placing the following configuration option in ctsrvr.cfg:

  • COMM_PROTOCOL F_TCPIPV6 - Starts a new listener thread on an IPv6 socket.

To support both IPv4 and IPv6 in the same c-treeACE Server, list the following keywords:

  • COMM_PROTOCOL F_TCPIP
  • COMM_PROTOCOL F_TCPIPV6

Server keyword SQL_OPTION NO_IPV6 can be added to ctsrvr.cfg to accept only IPv4 connections. This is not generally recommended and is more likely to cause connection issues than to solve them.

Note: The COMM_PROTOCOL F_TCPIPV6 keyword is commented out in the default ctsrvr.cfg file. Be sure to remove the comment symbol (the semicolon - ;) before trying to use this new support.

An environment variable can be used for native clients to request only IPv4 address: CTSQL_IPV4_ONLY. Setting this variable to any value in the environment will effectively disable IPv6 connection attempts from the client. This may be needed on networks where both IPv4 and IPv6 are enabled, but the c-tree SQL server does not accept IPv6 connections.

Native SQL clients on Windows will attempt to connect to the first address (IPv4 or IPv6) resolved for the host.

Notes:

Server keyword SQL_OPTION NO_IPV6 can be added to ctsrvr.cfg to accept only IPv4 connections. This is not generally recommended and is more likely to cause connection issues than to solve them.

Native SQL clients on Windows will attempt to connect to the first address (IPv4 or IPv6) resolved for the host.

Java and ADO.NET SQL clients currently support only IPv4. Explicit IPv6 addresses in client connection strings are not currently supported.

Default Protocol Override

An application can override the default protocol by specifying the protocol in the connection string with the following syntax:

FAIRCOMS@myhost^TCPIP

or

FAIRCOMS@myhost^TCPIPV6

Building IPV6 Client Applications

By default, c-treeACE libraries and utilities are built with IPV4 support only. For IPV6 support, build your own c-treeACE libraries and utilities using mtmake.exe (mtmake on Linux) or mtpro.exe (the Windows-only GUI version) located in the “pro” directory (by default: \FairCom\V*\win32\pro). On the client side, when IPv6 is selected in mtmake, both V4 and V6 stacks are included.

Note: As IPv6 adoption grows, default mtclient libraries will likely be enabled with this support in the near future.

If a numeric address is used, or the protocol is specified with the ^ syntax, we use the desired protocol. Otherwise we first attempt an IPv6 name resolution and connection. If that fails we attempt an IPv4 name resolution and connection.

Note: On Windows, IPv6 requires winsock2.h and linking with ws2_32.lib. For applications, this will mean compilation errors if windows.h is included before ctreep.h or winsock2.h.

GetServerBroadcast Function

IPv6-enabled clients can use the new function:

NINT GetServerBroadcast(pTEXT buffer, NINT bufsiz, UCOUNT port, LONG sec, NINT protocol)

This function provides functionality equivalent to the IPv4-only function GetServerInfoXtd().

The protocol must be either of the constants lcyNTREE_TCP or lcyNTREE_TCPIPV6.

Note: With node-based licensing, if a single client machine (besides a local connection) connects to the server using both IPv4 and IPv6 addresses, it will count as 2 nodes.

TOCIndex