All Products
Search
Document Center

Global Accelerator:Accelerate access from IPv6 clients to IPv4 services

Last Updated:Jun 05, 2024

If you want to accelerate access from IPv6 clients to IPv4 services, you can set the protocol type of the accelerated IP addresses of your Global Accelerator (GA) instance to IPv6.

Limits

  • Only standard Global Accelerator instances allow you to accelerate access from IPv6 clients to IPv4 services.

  • IPv6 clients in the following regions can access Global Accelerator: China (Qingdao), China (Beijing), China (Hangzhou), China (Shanghai), China (Shenzhen), China (Heyuan), China (Guangzhou), China (Chengdu), China (Hong Kong), Singapore, US (Virginia), Germany (Frankfurt), and Thailand (Bangkok). IPv6 clients in the Thailand (Bangkok) region can access only pay-as-you-go Global Accelerator instances.

    Make sure that the acceleration region that you add belongs to one of the preceding regions.

Scenarios

An enterprise has deployed services in data centers that use IPv4 networks. The enterprise needs to provide services to IPv6 clients due to business development. However, it is complex and time-consuming for the enterprise to reconfigure the current service system to support IPv6 requests. In this scenario, the enterprise can use Global Accelerator to enable the service system to support IPv6 requests without the need to change the service system. After GA processes requests from IPv6 clients, the requests are converted to IPv4 requests and routed to backend IPv4 services. Enterprises that deploy their service systems in the cloud can also use Global Accelerator to support IPv6 clients.

The following scenario is used in this example. The headquarters of Company A is located in the US (Silicon Valley) region. The headquarters deploys an IPv4 web service on a self-managed server in the US (Silicon Valley) region. All employees in the China (Hong Kong) region use IPv6 clients. Due to business development, the employees in the China (Hong Kong) region want to use IPv6 clients to access the IPv4 web service in the US (Silicon Valley) region. In addition, they want to reduce network latency, network jitters, and packet loss due to unstable Internet connections. 使用场景

You can use Global Accelerator to meet this requirement. Clients that access the service in the US (Silicon Valley) region can connect to the nearest access point in the China (Hong Kong) region by sending requests to an accelerated IP address. Then, the requests are routed to the global transmission network of Alibaba Cloud, converted to IPv4 requests, and then routed to endpoints based on intelligent routing.

Note

In this example, clients and servers are located in different regions. You can also use Global Accelerator to convert IPv6 requests from clients that access services deployed in the same region.

Procedure

流程.png

Note

This topic uses a pay-as-you-go standard Global Accelerator instance as an example to describe how to configure Global Accelerator to accelerate access from IPv6 clients to IPv4 services. Before you create a pay-as-you-go standard Global Accelerator instance, take note of the following information:

  • GA instances use the pay-by-data-transfer metering method. You do not need to associate a basic bandwidth plan with pay-as-you-go GA instances. The billing of data transfer over the GA network is managed by Cloud Data Transfer (CDT). For more information, see Pay-by-data-transfer.

  • The first time you use a pay-as-you-go Global Accelerator instance, go to the pay-as-you-go GA activation page and activate Global Accelerator as prompted.

Step 1: Configure the basic information about an instance

  1. Log on to the GA console.

  2. On the Instances page, click Create GA Instance. Select Subscription Standard Instance or Pay-as-you-go Standard Instance based on your business requirements.

    In this example, Pay-as-you-go Standard Instance is selected.

  3. In the Basic Instance Configuration step, configure the following parameters and click Next.

    Parameter

    Description

    GA Instance Name

    Enter a name for the GA instance.

    Instance Billing Method

    Pay-As-You-Go is selected by default.

    You are charged instance fees, Capacity Unit (CU) fees, and data transfer fees for pay-as-you-go standard GA instances.

    Resource Group

    Select the resource group to which the standard GA instance belongs.

    The resource group must be a resource group created in Resource Management by the current Alibaba Cloud account. For more information, see Create a resource group.

Step 2: Configure an acceleration area

By adding an acceleration area, you can specify the regions of the Global Accelerator users and allocate bandwidth to the regions.

In the Configure Acceleration Area step, select an acceleration area and click Next.

Parameter

Description

Acceleration Area

Select one or more regions from the drop-down list and click Add.

In this example, the China (Hong Kong) region of Asia Pacific is selected.

Note

If the acceleration area contains regions in the Chinese mainland and the service traffic uses HTTP or HTTPS, you must apply for an Internet Content Provider (ICP) number for the service domain name. For more information, see Manage domain names.

Assign Bandwidth

Maximum Bandwidth

Specify the bandwidth for the acceleration region.

In this example, 2 Mbit/s is specified.

IP Protocol

Select the IP version that is used to connect to Global Accelerator.

In this example, IPv6 is selected.

ISP Line Type

Select an ISP line type for the Global Accelerator instance.

BGP (Multi-ISP) is selected in this example.

Step 3: Configure a listener

A listener listens for connection requests and distributes the requests to endpoints based on the port and protocol that you specify. Each listener is associated with an endpoint group. You can associate an endpoint group with a listener by specifying the region to which you want to distribute network traffic. After you associate an endpoint group with a listener, network traffic is distributed to the optimal endpoints in the endpoint group.

In the Configure listener step, configure the required parameters and click Next.

Parameter

Description

Listener Name

Enter a name for the listener.

Routing Type

Select the routing type. This parameter is displayed only when you have the permissions to use custom routing listeners.

In this topic, Intelligent Routing is selected.

Protocol

Select a protocol for the listener.

In this example, select HTTP.

Port

Specify a listener port. The port is used to receive and forward requests to endpoints. Valid values: 1 to 65499.

In this example, the value is set to 80.

Client Affinity

Specify whether to enable client affinity. If client affinity is enabled, requests from the same client are forwarded to the same endpoint when the client connects to a stateful application.

In this example, Source IP is selected.

Custom HTTP Headers

Select the HTTP headers that you want to add.

In this example, the default settings are used.

Show HTTP Header Details

  • Obtain the GA instance ID by using the GA-ID header

  • Obtain the information about the acceleration region by using the GA-AP header

  • Obtain the listening protocol of the GA instance by using the GA-X-Forward-Proto header

  • Obtain the listening port of the GA instance by using the GA-X-Forward-Port header

  • Obtain client IP addresses by using the X-Real-IP header

Step 4: Configure an endpoint group and endpoints

  1. In the Configure an endpoint group step, configure an endpoint group, add endpoints to the endpoint group, and then click Next.

    Parameter

    Description

    Region

    Select the region where the endpoint group is deployed.

    In this example, US (Silicon Valley) is selected.

    Endpoint Configuration

    Client requests are routed to endpoints. To add an endpoint, specify the following parameters:

    • Backend Service Type: In this example, Custom IP is selected.

    • Backend Service: Enter the public IP address of the IPv4 web service.

    • Weight: Enter the weight of the endpoint. Valid values: 0 to 255. GA distributes network traffic to endpoints based on the weights. In this example, the default value 255 is used.

    Warning

    If you set the weight of an endpoint to 0, Global Accelerator stops distributing network traffic to the endpoint. Proceed with caution.

    Preserve Client IP

    By default, client IP address preservation is enabled. This feature allows you to view client IP addresses on backend servers. HTTP listeners can retrieve client IP addresses from the X-Forwarded-For HTTP header. For more information, see Preserve client IP addresses.

    Backend Service Protocol

    Select the protocol that is used by backend servers.

    In this example, the default value HTTP is used.

    Port Mapping

    If the listener port and the port that is used by the endpoint to provide services are different, you must configure this parameter.

    • Listener Port: Enter the listener port.

    • Endpoint Port: Enter the port over which the endpoint provides services.

    If the listener port and the port that is used by the endpoint to provide services are the same, you do not need to add a port mapping. Global Accelerator automatically forwards client requests to the listener port of the endpoint.

    In this example, no port mapping is configured.

    Traffic Distribution Ratio

    Specify a traffic distribution ratio for the endpoint group.

    Valid values: 0 to 100.

    In this example, the default value 100 is used.

    Health Check

    Specify whether to enable the health check feature.

    After you enable this feature, you can use health checks to check the status of endpoints. For more information about the health check feature, see Enable and manage health checks.

    Health check is disabled by default. In this example, health check is disabled.

  2. In the Configuration Review step, check the configurations and click Submit.

    Note

    It takes 3 to 5 minutes to create a Global Accelerator instance.

Step 5: Configure DNS settings

You must configure DNS settings to route requests destined for the IPv4 service to Global Accelerator. Select one of the following methods to configure DNS settings:

  • Add an AAAA record that maps the accelerated domain name to the IPv6 address allocated by Global Accelerator.

  • Add a CNAME record that maps the accelerated domain name to the CNAME allocated by Global Accelerator.

  1. Log on to the Alibaba Cloud DNS console.

  2. If your domain name is not registered by using Alibaba Cloud Domains, you must add your domain name to Alibaba Cloud DNS.

    Note

    If your domain name is not registered by using Alibaba Cloud Domains, you must add your domain name to Alibaba Cloud DNS before to configure a DNS record. For more information, see the "Add a domain name" section of the Manage domain names topic. If your domain name is registered by using Alibaba Cloud Domains, skip this step.

  3. On the Domain Name Resolution page, find the domain name and click DNS Settings in the Actions column.

  4. Click Add DNS Record, add a DNS record, and then click OK.

    • Add an AAAA record

      Parameter

      Description

      Type

      Select AAAA.

      The AAAA record is used to map the domain name to the IPv6 address allocated by GA.

      Hostname

      Enter the prefix of the accelerated domain name.

      • If the accelerated domain name is www.aliyun.com, set the prefix to www.

      • If the accelerated domain name is aliyun.com, set the prefix to @.

      • If the accelerated domain name is *.aliyun.com, set the prefix to *.

      • If the domain name is mail.aliyun.com, set the prefix to mail.

      DNS Request Source

      Select Default from the drop-down list.

      Record Value

      Enter the accelerated IPv6 address that is allocated by Global Accelerator.

      TTL

      Specify the period of time for which a record is cached by a DNS server. A smaller TTL value specifies that the resolver retains the information in the cache for a shorter period of time.

      In this example, the default value 10 Minutes is used.

    • Add a CNAME record

      Parameter

      Description

      Type

      In this example, CNAME is selected.

      A CNAME record is used to map a domain name to another domain name.

      Hostname

      Enter the prefix of the accelerated domain name.

      • If the accelerated domain name is www.aliyun.com, set the prefix to www.

      • If the accelerated domain name is aliyun.com, set the prefix to @.

      • If the accelerated domain name is *.aliyun.com, set the prefix to *.

      • If the domain name is mail.aliyun.com, set the prefix to mail.

      DNS Request Source

      Select Default from the drop-down list.

      Record Value

      Enter the CNAME assigned by Global Accelerator.

      You can find the CNAME on the Instances page in the GA console.

      TTL

      Specify the period of time for which a record is cached by a DNS server. A smaller TTL value specifies that the resolver retains the information in the cache for a shorter period of time.

      In this example, the default value 10 Minutes is used.

Step 6: Test network connectivity

In this example, a CNAME record is configured and the Alibaba Cloud Linux 3 operating system is used for testing. The command that is used to run the test may vary based on the operating system. For more information, refer to the user guide of the operating system.

  1. Open the CLI of an IPv6 client in the acceleration region. In this example, the acceleration region is China (Hong Kong).

  2. Run the following command to check whether the CNAME record takes effect:

    ping -6 <The accelerated domain name>

    If the result is the same as the accelerated IPv6 address assigned by Global Accelerator instance, the CNAME record is in effect.生效测试.png

  3. Run the following command to check whether the IPv6 client can access the IPv4 service as expected:

    curl -6 -g http://[<The accelerated IP address allocated by GA>]

    The test result shows that the IPv6 client can access the IPv4 service in the US (Silicon Valley) region as normal.访问测试.png