CLB supports three IP versions: IPv4, IPv6, and IPv6 NAT64. IPv6 CLB supports the TCP, UDP, TCP SSL, HTTP, and HTTPS protocols and provides flexible forwarding capabilities based on domain names and URL paths. This document guides you through how to get started with IPv6 CLB.
IPv6 CLB is currently in beta test. If you want to use it, please submit a ticket for application.
- CLB only forwards traffic but cannot process requests; therefore, you need to create a CVM instance that processes user requests first and complete IPv6 configuration for it.
- This document takes HTTP forwarding as an example. The corresponding web server (such as Apache, Nginx, or IIS) must be deployed on the CVM instance, and the port used by the server needs to listen on IPv6.
- Currently, IPv6 CLB instances can be created in the Guangzhou, Shanghai, Nanjing, Beijing, Chengdu, Hong Kong (China), Singapore, and Virginia regions.
- IPv6 CLB does not support classic CLB.
- IPv6 CLB supports obtaining the client's IPv6 source address, which can be directly obtained by layer-4 IPv6 CLB or through the
X-Forwarded-For header of HTTP layer-7 IPv6 CLB.
- Currently, IPv6 CLB balances the load completely over the public network. Clients in the same VPC cannot access IPv6 CLB over the private network.
- IPv6 implementations are still at the preliminary stage across the internet. In case of access failure, please submit a ticket. SLA is not guaranteed during the beta test period.
Step 1. Create a CVM instance and configure IPv6
- Enter the CVM Console, log in to the CVM instance, and complete basic IPv6 configuration.
- On the CVM instance, run the following commands in sequence to deploy and restart the Nginx service.
yum install nginx
service nginx restart
- Check whether the Nginx service deployed on the CVM instance is listening on IPv6.
- Run the following command for check.
- Run the following command to open the Nginx configuration file for check.
Step 2. Create an IPv6 CLB instance
- Log in to the Tencent Cloud's official website and enter the CLB purchase page.
- Select options for the following parameters correctly:
- Billing Mode: only pay-as-you-go billing is supported.
- Region: select a region.
- IP Version: IPv6.
- ISP Type: BGP.
- Network: please select a VPC and subnet that have already obtained IPv6 CIDR.
- Select respective configuration items on the purchase page and click Buy Now.
- On the "CLB Instance List" page, select the corresponding region to view the instance just created.
Step 3. Create an IPv6 CLB listener
Configuring the HTTP listener protocol and port
- Log in to the CLB Console.
- In the "CLB Instance List", find the created CLB instance and click its ID to enter its details page.
- In the "Basic Information" module, you can click the modification icon next to the instance name to rename it.
- In HTTP/HTTPS Listeners in "Listener Management", click Create to create a CLB listener.
- In the pop-up box, configure the following:
- Set the name to "IPv6test", for example.
- Set the listener protocol and port to
- Click Submit to create the CLB listener.
Configuring the forwarding rule of the listener
- In "Listener Management", select the new listener IPv6test and click + to add a rule.
- In the pop-up box, configure the domain name, URL path, and balancing method, and click Next.
- Domain Name: the domain name used by your real server, which can contain a wildcard. In this example,
www.qcloudipv6test.com is used. For more information, please see Layer-7 Forwarding Domain Name and URL Rules.
- URL Path: access path of your real server.
/ is used in this example.
- Select "WRR" for the load balancing mode.
- Configure health check: enable health check, check the default forwarding domain name and path used by the domain name, and click Next.
- Configure session persistence: enable session persistence, configure the persistence period, and click Submit.
For more information on CLB listeners, please see CLB Listener Overview.
- A listener (i.e., listening protocol:port) can be configured with multiple domain names, and a domain name can be configured with multiple URL paths. Select a listener or domain name and click + to create a new rule.
- Session persistence: if session persistence is disabled and a round-robin method is used for scheduling, requests will be assigned to different real servers in sequence; if session persistence is enabled, or it is disabled but ip_hash scheduling is used, requests will always be assigned to the same real server.
Binding CVM instance
Before binding the listener to a CVM instance, please check whether the instance has obtained an IPv6 address.
- On the "Listener Management" page, select and expand the listener just created and select the domain name and URL path, and the IPv6 information of the CVM instance bound to the URL path will be displayed on the right. Click Bind.
- In the pop-up box, select the CVM instance, set the default Nginx service port to 80, set the weight (10 by default), and click OK.
- After the CVM instance is successfully bound, perform the following:
- Please check whether the port status is "healthy"; and if yes, please proceed to Step 4. Test IPv6 CLB.
- If the port status is "exceptional", please check whether the listener is bound to the correct Nginx service port of the CVM instance, and log in to the CVM instance to check whether the port is normally listening on IPv6. You can perform the check as instructed in substep 3 in step 1 to perform the check.
Step 4. Test IPv6 CLB
After configuring an IPv6 CLB instance, you can verify whether the architecture takes effect by checking whether different domain names and URLs under the CLB instance can access different real servers, i.e., checking whether the content-based routing feature is available.
Use a client with IPv6 public network access capabilities to access the domain name or IPv6 address of the CLB instance. If it can properly access the web service of the CVM instance, the IPv6 CLB instance is working normally.