All Products
Search
Document Center

Elastic IP Address:Use BGP (Multi-ISP) Pro EIPs to access web services with low network latency

Last Updated:Dec 11, 2023

Due to ISP regulations and international connection congestion, users in the Chinese mainland may not be able to access services in China (Hong Kong) or other regions outside the Chinese mainland. The connections are usually slow even if the services can be accessed. BGP (Multi-ISP) Pro elastic IP addresses (EIPs) optimize data transmission to the Chinese mainland and improve connection quality for services in China (Hong Kong) or international services.

Background information

BGP (Multi-ISP) Pro lines optimize data transmission to the Chinese mainland and improve connection quality for international services. Compared with BGP (Multi-ISP), when BGP (Multi-ISP) Pro lines provide services to users in the Chinese mainland (excluding data centers), cross-border connections are established by using Chinese mainland ISP services. This reduces network latency.

The following regions support BGP (Multi-ISP) Pro EIPs: China (Hong Kong), Japan (Tokyo), Singapore, Malaysia (Kuala Lumpur), Philippines (Manila), Indonesia (Jakarta), and Thailand (Bangkok).

Note

BGP (Multi-ISP) Pro lines support only the pay-as-you-go billing method in the following regions: Japan (Tokyo), Singapore, Malaysia (Kuala Lumpur), Philippines (Manila), Indonesia (Jakarta), and Thailand (Bangkok).

Sample scenario

The following scenario is used as an example. A web service is deployed on an Elastic Compute Service (ECS) instance in the China (Hong Kong) region. The ECS instance is associated with a BGP (Multi-ISP) EIP. Network latency is high when users in the Chinese mainland access the web service deployed in the China (Hong Kong) region. BGP多线精品使用场景

You can associate a BGP (Multi-ISP) Pro EIP with the ECS instance. Then, users in the Chinese mainland can access the web service deployed in the China (Hong Kong) region without using international ISP services. This reduces network latency.

Prerequisites

A web service is deployed on an ECS instance in the China (Hong Kong) region. The ECS instance is deployed in a VPC. For more information, see Create an instance by using the wizard.

Procedure

配置步骤

Step 1: Purchase a BGP (Multi-ISP) Pro EIP

The following example describes how to purchase a BGP (Multi-ISP) Pro EIP that is billed on a pay-as-you-go basis.

  1. Log on to the Elastic IP Address console .
  2. On the Elastic IP Addresses page, click Create EIP.

  3. On the EIP page, set the following parameters for the EIP, click Buy Now, and then complete the payment.

    Parameter

    Description

    Billing Method

    Select a billing method for the EIP.

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

    Region

    Select the region where you want to create the EIP.

    In this example, China (Hong Kong) is selected.

    Line Type

    Select a line type for the EIP.

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

    Network Type

    Select a network type for the EIP.

    Only Internet is supported.

    Security Protection

    Select an edition of Anti-DDoS based on your business requirements.

    In this example, Default is selected.

    IP Address Pool

    Select an IP address pool.

    In this example, Default is selected.

    Data Transfer

    Select a metering method for data transfer over the EIP.

    In the example, Pay-By-Bandwidth is selected.

    Maximum Bandwidth

    Specify a maximum bandwidth value for the EIP.

    In this example, 1 Mbps is specified.

    Name

    Enter a name for the EIP.

    Resource Group

    Select the resource group to which the EIP belongs.

    Billing Cycle

    Select a billing cycle for the EIP.

    You can select only Day for a pay-by-bandwidth EIP.

    Quantity

    Select the number of EIPs that you want to purchase.

    In this example, 1 is specified.

  4. Click Console and return to the Elastic IP Addresses page.

After you return to the Elastic IP Addresses page, you can view the BGP (Multi-ISP) Pro EIP.精品EIP

Step 2: Associate the EIP with an ECS instance

After you create an EIP, you can associate the EIP with an ECS instance in a VPC. After the EIP is associated with an ECS instance, the ECS instance can communicate with the Internet.

  1. On the Elastic IP Addresses page, find the EIP that you created in Step 1: Purchase a BGP (Multi-ISP) Pro EIP and click Associate with Resource in the Actions column.

  2. In the Associate EIP with Resource dialog box, set the following parameters and click OK to associate the EIP with the ECS instance.

    Parameter

    Description

    Instance Type

    Select the type of the instance with which you want to associate the EIP.

    In this example, ECS Instance is selected.

    Mode

    Select the mode in which you want to associate the EIP with the ECS instance.

    You can select only NAT Mode. In NAT mode:

    • Both the private IP address and public IP address of the ECS instance are available for use.

    • You cannot view the EIP on the operation system. You can call DescribeInstances to query the public IP address assigned to the ECS instance. For more information, see DescribeInstances.

    • EIPs do not support protocols that are managed by NAT application layer gateways (ALGs), such as H.323, Session Initiation Protocol (SIP), Domain Network System (DNS), and Real Time Streaming Protocol (RTSP).

    Select an instance to associate.

    Select the ECS instance to be associated with the EIP.

Step 3: Test the network latency

After you associate the EIP with the ECS instance, you can test the network latency between a client in the Chinese mainland and the ECS instance that is deployed in the China (Hong Kong) region.

Note
  • A client that runs Linux is used in this example. The command that is used to verify the connectivity varies based on the operating system that you use. For more information, see the user guide of your operating system.

  • The test result in this example is for reference only. The actual network latency varies based on the network quality of the ISP for the BGP (Multi-ISP) Pro EIP.

  1. Open the CLI on an on-premises machine that is deployed in the Chinese mainland.

  2. Run the ping command to test the network latency between the client and the ECS instance associated with the EIP.

    1. Run the following command to test the network latency between the client and the ECS instance when the ECS instance is associated with the BGP (Multi-ISP) EIP.

      ping <IP address of the BGP (Multi-ISP) EIP>

      Figure 1. Network latency when the ECS instance is associated with the BGP (Multi-ISP) EIP访问

    2. Run the following command to test the network latency between the client and the ECS instance when the ECS instance is associated with the BGP (Multi-ISP) Pro EIP.

      ping <IP address of the BGP (Multi-ISP) Pro EIP>

      Figure 2. Network latency when the ECS instance is associated with the BGP (Multi-ISP) Pro EIP访问绑定了BGP(多线)精品线路EIP的ECS实例的网络时延

    The test result shows that the network latency between the client in the Chinese mainland and the ECS instance is reduced when the ECS instance is associated with the BGP (Multi-ISP) Pro EIP.

FAQ

Why am I unable to associate an EIP with an ECS instance?

Possible causes:

  • The EIP and the ECS instance are deployed in different regions.
  • The ECS instance is assigned a public IP address or is associated with another EIP.
  • The ECS instance runs in the classic network instance. EIPs can be associated only with ECS instances that are deployed inside VPCs. If your ECS instance is not deployed in a VPC, you cannot associate an EIP with the ECS instance.
  • The ECS instance is in a state that does not allow you to associate an EIP. You can associate an EIP with an ECS instance that is only in the Running or Stopped state.
To troubleshoot the issue, perform the following operations:
  1. Check the regions in which the EIP and the ECS instance are deployed. Make sure that they are deployed in the same region. For example, both services are deployed in the China (Hangzhou) region.
  2. Log on to the ECS console and check the status of the ECS instance. Make sure that the following requirements are met:Check the region of the ECS instance
    NoDescription
    The ECS instance is assigned only a private IP address.

    As shown in the following figure, if your ECS instance is assigned a public IP address or is associated with another EIP, you cannot associate the EIP with your ECS instance.

    The IP addresses of the ECS instance For more information, see:
    The network type of the ECS instance is VPC.

    If the network type of the ECS instance is classic network, you can change it to VPC. For more information, see Migrate ECS instances from the classic network to a VPC.

    The ECS instance is in the Running or Stopped state.

    For more information about how to manage the status of your ECS instance, see Instance lifecycle.

Why am I unable to view the EIP in the operating system of the ECS instance after I associate the EIP with the ECS instance?

EIPs are deployed on the Internet gateway of Alibaba Cloud and are mapped to the private ENIs of the associated ECS instances through NAT. Therefore, you cannot view the EIP on the private ENI of the ECS instance.

When you associate an EIP with a secondary ENI, you can select the cut-through mode. In cut-through mode, the EIP replaces the private IP address of the secondary ENI. The secondary ENI serves as a public network interface controller (NIC) and the private network feature is no longer available. To query the EIP in the operating system, run the ifconfig or ipconfig command. For more information, see Associate a secondary ENI in cut-through mode (not recommended).

References