All Products
Search
Document Center

Global Accelerator:Accelerate access to IPv4 services for IPv6 clients

Last Updated:Jan 16, 2024

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

Limits

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

  • IPv6 clients can access GA in the following regions: China (Qingdao), China (Beijing), China (Hangzhou), China (Shanghai), China (Shenzhen), China (Heyuan), China (Guangzhou), China (Chengdu), China (Hong Kong), Singapore, US (Virginia), and Germany (Frankfurt). Make sure that the acceleration region that you add belongs to one of the preceding regions.

Scenario

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 GA 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 GA 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 that are caused by unstable Internet connections. 使用场景

You can use GA 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 GA 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 GA instance as an example to describe how to configure GA to accelerate access from IPv6 clients to IPv4 services. Before you create a pay-as-you-go standard GA instance, take note of the following information:

  • Pay-as-you-go Global Accelerator 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 Global Accelerator 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 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: Add an acceleration area

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

In the Configure Acceleration Area step, configure 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

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 GA.

In this example, IPv6 is selected.

ISP Line Type

Select an ISP line type for the GA instance.

In this example, BGP(Multi ISP) is selected.

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, HTTP is selected.

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 custom HTTP headers.

  • 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 the endpoint group and the endpoints, and then click Next.

    Parameter

    Description

    Region

    Select the region where you want to deploy the endpoint group.

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

    Endpoint Configuration

    Client requests are routed to endpoints. To add an endpoint, configure 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 configured 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. GA 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.

    In this example, the health check feature 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 GA. 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 GA.

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

  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 you can 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 that you want to manage 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

      Record 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 domain name that you want to accelerate.

      • If the domain name that you want to accelerate is www.aliyun.com, set the prefix to www.

      • If the domain name that you want to accelerate is aliyun.com, set the prefix to @.

      • If the domain name that you want to accelerate is *.aliyun.com, set the prefix to *.

      • If the domain name that you want to accelerate 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 GA.

      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

      Record 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 domain name that you want to accelerate.

      • If the domain name that you want to accelerate is www.aliyun.com, set the prefix to www.

      • If the domain name that you want to accelerate is aliyun.com, set the prefix to @.

      • If the domain name that you want to accelerate is *.aliyun.com, set the prefix to *.

      • If the domain name that you want to accelerate 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 GA.

      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: Verify the acceleration performance

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 GA 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