BGP (Multi-ISP) Pro lines optimize data transmission to the Chinese mainland and improve connection quality for international services. Compared with BGP (Multi-ISP) lines, 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. You can associate a BGP (Multi-ISP) Pro elastic IP address (EIP) with an Elastic Compute Service (ECS) instance. This way, users in the Chinese mainland can access web services deployed on the ECS instance in the China (Hong Kong) region with low network latency.

Scenarios

The following scenario is used as an example. A web service is deployed on an 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. Scenario

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. For more information, see Create an instance by using the wizard.

Procedure

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, click Buy Now, and then complete the payment.
    ParameterDescription
    Billing MethodSelect a billing method for the EIP.

    In this example, Pay-As-You-Go is selected.

    RegionSelect the region where you want to create the EIP.
    In this example, China (Hong Kong) is selected.
    Note BGP (Multi-ISP) Pro is available only in the China (Hong Kong), Singapore, Malaysia (Kuala Lumpur), Philippines (Manila), Indonesia (Jakarta), and Thailand (Bangkok) region.
    Line TypeSelect a line type for the EIP.

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

    Network TypeSelect a network type for the EIP.

    You can select only Internet.

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

    In the example, Default is selected.

    IP Address PoolSelect an IP address pool.

    In this example, Default is selected.

    Data TransferSelect a metering method for the EIP.

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

    Maximum BandwidthSpecify a maximum bandwidth value for the EIP.

    In this example, 1 Mbps is specified.

    NameEnter a name for the EIP.
    Billing CycleSelect a billing cycle for the EIP.

    You can select only Day for pay-by-bandwidth EIPs.

    QuantitySpecify 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 find the EIP that you created. The Connection Type of the EIP is BGP (Multi-ISP) Pro. BGP (Multi-ISP) Pro

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 virtual private cloud (VPC). After the ECS instance is associated with the EIP, 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 Bind Resource in the Actions column.
  2. In the Associate EIP with Resource dialog box, set the following parameters and click OK.
    ParameterDescription
    Network TypeSelect the type of the instance that you want to associate with the EIP.

    In this example, ECS Instance is selected.

    ModeSelect the mode in which you want to associate the EIP.
    You can select only NAT Mode. In NAT mode:
    • The private IP address and public IP address of the ECS instance that is associated with the EIP are available for use.
    • The EIP is not displayed in the operating system. To query the EIP of the ECS instance, call the DescribeInstances operation. For more information, see DescribeInstances.
    • Protocols such as H.323, Session Initiation Protocol (SIP), Domain Name System (DNS), Real-Time Streaming Protocol (RTSP), and Trivial File Transfer Protocol (TFTP) are not supported.
    Select an instance to associate.Select the ECS instance with which you want to associate 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.
  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.
    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
      Access the ECS instance
    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
      Network latency when the ECS instance is associated with the BGP (Multi-ISP) Pro EIP

    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:

  • You can associate an EIP with only an ECS instance that is deployed in a VPC. If the ECS instance is not deployed in a VPC, you cannot associate an EIP with the ECS instance.
  • The EIP and the ECS instance are deployed in different regions.
  • The ECS instance is in a state that does not allow you to associate an EIP with the ECS instance. You can associate an EIP with only an ECS instance that is in the Running or Stopped state.
  • The ECS instance is assigned a public IP address or another EIP is associated with the ECS instance.

Why am I unable to view an EIP in the operating system of an 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).