Skip to main content

IPv6 Configuration

Overview

Starting from TDengine version 3.3.7, full support for IPv6 network environments is officially provided. This feature allows users to deploy and connect to TDengine in modern network infrastructures, eliminating the dependency on IPv4 and meeting the growing demand for IPv6 networks. This document details how to enable and use IPv6 functionality on both the TDengine server and client sides.

Supported Scope

  • Supported versions: TDengine Server and Client >= 3.3.7.0
  • Supported components:
    • taosd: TDengine database server
    • taos: TDengine command-line client (CLI)
    • Various connectors: such as JDBC, Go, Python, C#, Rust, etc. (must use versions that support IPv6)
  • Network environments: Both pure IPv6 and dual-stack IPv4/IPv6 environments are supported.

Server-side (taosd) Configuration

To enable IPv6 support, you need to configure the TDengine server configuration file "taos.cfg".

  1. Locate the configuration file: The default path is usually "/etc/taos/taos.cfg".
  2. Modify configuration parameters: Find and modify the following key parameters:
  // Set the TDengine server to listen on the specified network interface's IPv6 address, or "::" to listen on all available IPv6 interfaces.
Example:
serverIPv6 ::
firstEp ipv6_address1:port
secondEp ipv_address2:port
fqdn ipv6_address1
enableIPv6 1
  1. Restart the service: After modifying the configuration, restart the TDengine service to apply the changes.
  sudo systemctl restart taosd

Important Note

  • It is strongly recommended to use FQDN for configuring "firstEP" and "secondEP" instead of direct IP addresses. This allows automatic selection of IPv6 addresses via DNS resolution, providing better flexibility and compatibility.
  • The default port 6030 is also applicable for IPv6 connections.

Client Connection Methods

Clients can connect to TDengine servers with IPv6 support in the following ways:

  1. Using FQDN (recommended): In the client's "taos.cfg" or connection string, use the server's domain name. As long as the domain's AAAA record points to the correct IPv6 address, the client will automatically connect via IPv6. Example:
    taos -h your_server_fqdn -P 6030
  2. Using IPv6 address directly: Specify the server's IPv6 address directly when connecting. Note that when using an IPv6 address in the command line or connection string, you must enclose it in square brackets.
    taos -h [2001:db8::1] -P 6030
  3. Verify the connection: After a successful connection, you can see in the TDengine logs that all connections are established via IPv6.

Notes and Troubleshooting

  • Network infrastructure: Ensure that your servers, clients, and all intermediate routers/firewalls are properly configured for IPv6 and allow communication on port "6030" (default).
  • DNS configuration: If using FQDN, make sure the DNS server has correctly configured AAAA records (pointing to IPv6 addresses) instead of A records (pointing to IPv4 addresses).
  • Dual-stack environment priority: On hosts supporting both IPv4 and IPv6, explicitly set the FQDN to resolve to IPv6.
  • Connector versions: Ensure all TDengine client connectors (such as JDBC, Go, Python, etc.) are version 3.3.7.0 or above for full IPv6 compatibility.