tencent cloud

Feedback

Getting Started with IPv6 CLB

Last updated: 2024-10-09 15:39:45
    Tencent Cloud 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.
    Note:
    The IPv6 CLB is in beta. To use it, submit a ticket.

    Prerequisites

    1. CLB only forwards traffic but cannot process requests; therefore, you need to create a CVM instance that processes user requests and configure its IPv6 settings first.
    2. 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.

    Notes

    Currently, IPv6 CLB is supported only in the following regions: Guangzhou, Shanghai, Nanjing, Beijing, Chengdu, Chongqing, Hong Kong (China), Singapore, Virginia, and São Paulo.
    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 a public network. Clients in the same VPC cannot access IPv6 CLB over a private network.
    IPv6 implementations are still at the preliminary stage across the internet. In case of access failure, you can submit a ticket. SLA is not guaranteed during the beta test period.

    Step 1. Create a CVM instance and configure IPv6

    1. Log in to a CVM instance in the CVM console to complete the basic configurations of IPv6.
    2. On the CVM instance, run the following commands in sequence to deploy and restart the Nginx service.
    yum install nginx
    service nginx restart
    3. Check whether the Nginx service deployed on the CVM instance is listening on IPv6.
    3.1 Run the following command for check.
    netstat -tupln
    
    3.2 Run the following command to open the Nginx configuration file for check.
    vim /etc/nginx/nginx.conf
    

    Step 2. Create an IPv6 CLB instance

    1. Log in to the Tencent Cloud console and go to the CLB purchase page.
    2. Set the following parameters:
    Billing Mode: supports pay-as-you-go billing only.
    Region: select the target region.
    IP Version: IPv6.
    ISP: BGP (multi-line).
    Network: select a VPC and subnet that have already obtained IPv6 CIDR.
    3. Select various configuration items on the purchase page and click Buy now.
    4. On the CLB instance list page, select the corresponding region to view the instance that you just created.
    

    Step 3. Create an IPv6 CLB listener

    Configuring the HTTP listening protocol and port

    1. Log in to the CLB console.
    2. In the CLB instance list, find the created CLB instance and click its ID to go to its details page.
    3. In the Basic information module, you can click the modification icon next to the instance name to rename it.
    4. On the Listener management tab, click Create in the HTTP/HTTPS listener section to create a CLB listener.
    
    5. In the pop-up window, configure the following:
    Set the name to IPv6test.
    Set the listening protocol port to HTTP:80.
    6. Click Submit.

    Configuring the listener's forwarding rule

    1. In Listener management, select the new listener IPv6test and click + to add a rule.
    2. In the pop-up window, configure the domain name, URL path, and balancing method, and click Next.
    Domain name: Domain name used by your real server, which can contain a wildcard. In this example, www.xxxxxxxxxxtest.com is used. For more information, see Layer-7 Domain Name Forwarding and URL Rules.
    URL: Access path of your real server. / is used in this example.
    Balancing method: Select Weighted round robin.
    
    3. Enable health check, retain the default values for Check domain and Path, and click Next.
    
    
    4. Enable session persistence, configure the persistence period, and click Submit.
    
    
    For more information about CLB listeners, see CLB Listener Overview.
    Note:
    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 to a CVM instance

    Note:
    Before binding the listener to a CVM instance, make sure that the CVM instance has obtained an IPv6 address.
    1. On the Listener management page, select and expand the listener that you just created and select the domain name and URL path. Then the IPv6 information of the CVM instance bound to the URL path will be displayed on the right. Click Bind.
    2. In the pop-up window, select the CVM instance, set the default Nginx service port to 80, set the weight (10 by default), and click OK.
    
    3. After the CVM instance is successfully bound, perform the following:
    Check whether the port status is Healthy. If yes, proceed to Step 4. Test IPv6 CLB.
    
    If the port status is Abnormal, check whether the listener is bound to the correct Nginx server 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.
    

    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 a 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.
    1. Go to the Tencent Cloud domain registration page to query and register a domain name. xxxxxxxxxxtest.com is used in this example.
    2. Log in to the DNSPod console, click the domain name you just purchased, and click Add Record on the Record Management page to add an AAAA record to the domain name. Enter and save the following content:
    Host Record: Domain name prefix. Set it to www in this example.
    Record Type: Select AAAA record.
    Split Zone: Select Default.
    Record Value: Enter the IPv6 address of the CLB instance.
    TTL: Leave it as the default value 600s.
    3. After adding the domain name resolution, ping the domain name to verify it.
    4. You can use a browser to access the domain name to verify it.
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support