All Products
Search
Document Center

Elastic Compute Service:EIPs

Last Updated:Dec 04, 2024

An elastic IP address (EIP) is a type of public IP address that you can purchase and hold as an independent resource. An EIP is a NAT IP address provisioned on the Internet-facing gateway of Alibaba Cloud and is mapped to the associated cloud resource by using NAT. After you associate an EIP with a cloud resource, the cloud resource can use the EIP to communicate over the Internet. EIPs provide more flexibility than static public IP addresses (also called system-assigned public IP addresses or auto-assigned public IP addresses). This topic describes how to apply for an EIP, associate EIPs with an Elastic Compute Service (ECS) instance deployed in a virtual private cloud (VPC), and disassociate EIPs from an ECS instance deployed in a VPC.

Apply for an EIP

Apply for a new EIP

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

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

    Parameter

    Description

    Billing Method

    Select a billing method for the EIP.

    EIPs support the subscription and pay-as-you-go billing methods.

    • Subscription: You are charged a subscription fee based on the maximum bandwidth value specified for the EIP. For more information, see Subscription.

    • Pay-as-you-go: You are charged for the resources that you use. The pay-by-data-transfer and pay-by-bandwidth metering methods are supported. For more information, see Pay-as-you-go.

    Subscription

    Region

    Select the region where you want to create the EIP.

    Make sure that the EIP and the resource to be associated with the EIP are in the same region. EIPs can be associated with Elastic Compute Service (ECS) instances in virtual private clouds (VPCs), NAT gateways, Classic Load Balancer (CLB) instances, High-availability virtual IP addresses (HAVIPs), and secondary elastic network interfaces (ENIs).

    Line Type

    Select a line type for the EIP.

    • BGP (Multi-ISP): provides premium BGP lines across the world. BGP lines from different Internet service providers (ISPs) can be used. The optimal BGP line is automatically selected to ensure network stability. Supported ISPs are China Telecom, China Unicom, China Mobile, China Mobile Tietong, China Netcom, CERNET, NRTA, Dr. Peng Group, and Founder Broadband.

    • BGP (Multi-ISP) Pro: BGP (Multi-ISP) Pro is provided to improve the efficiency of data transmission from regions outside the Chinese mainland to the Chinese mainland. Compared with BGP (Multi-ISP), when BGP (Multi-ISP) Pro provides 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.

      Note

      EIP BGP (Multi-ISP) Pro is supported only in the China (Hong Kong) region.

    Network Type

    Select a network type for the EIP.

    You can select only Internet.

    Maximum Bandwidth

    Select a maximum bandwidth value for the EIP. Unit: Mbit/s.

    Name

    Enter a name for the EIP.

    Resource Group

    Select a resource group for the EIP.

    Quantity

    Select the number of EIPs that you want to purchase.

    Subscription Duration

    Select a subscription duration for the EIP based on your business requirements, and select whether you want to enable auto-renewal.

    Pay-as-you-go

    Region

    Select the region where you want to create the EIP.

    Make sure that the EIP and the resource to be associated with the EIP are in the same region. EIPs can be associated with ECS instances in VPCs, NAT gateways, Server Load Balancer (SLB) instances, HAVIPs, and secondary ENIs.

    Line Type

    Select a line type for the EIP.

    • BGP (Multi-ISP): provides premium BGP lines across the world. BGP lines from different Internet service providers (ISPs) can be used. The optimal BGP line is automatically selected to ensure network stability. Supported ISPs are China Telecom, China Unicom, China Mobile, China Mobile Tietong, China Netcom, CERNET, NRTA, Dr. Peng Group, and Founder Broadband.

    • BGP (Multi-ISP) Pro: BGP (Multi-ISP) Pro is provided to improve the efficiency of data transmission from regions outside the Chinese mainland to the Chinese mainland. Compared with BGP (Multi-ISP), when BGP (Multi-ISP) Pro provides 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.

      Note

      EIP BGP (Multi-ISP) Pro is supported in the following regions: China (Hong Kong), Japan (Tokyo), Singapore, Malaysia (Kuala Lumpur), Philippines (Manila), Indonesia (Jakarta), and Thailand (Bangkok).

    Network Type

    Select a network type for the EIP.

    You can select only Internet.

    Security Protection

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

    • Default: Anti-DDoS Origin Basic, which can mitigate DDoS attacks at 5 Gbit/s or lower. For more information, see What is Anti-DDoS Origin?

    • Anti-DDoS (Enhanced): specifies Anti-DDoS Pro/Premium, which can mitigate DDoS attacks at the Tbit/s level.

      Important

      If you use Anti-DDoS Pro/Premium to protect your EIP, take note of the following items:

      • The first time you use Anti-DDoS Pro/Premium for your EIP, click Anti-DDoS Origin (pay-as-you-go) to activate Anti-DDoS Pro/Premium on a pay-as-you-go basis.

      • If you use Anti-DDoS Pro/Premium to protect your EIP, you are charged a protection fee, which is managed by Anti-DDoS. For more information, see Anti-DDoS Origin 2.0 (Pay-as-you-go).

      • Anti-DDoS Pro/Premium is supported only in some regions. For more information about the supported regions, see Security protection types.

    IP Address Pool

    Select an IP address pool based on your business requirements.

    • Default is selected by default. Alibaba Cloud assigns an EIP from the public IP address pool.

    • You can also select an IP address pool from the drop-down list. Then, an EIP is allocated from the selected IP address pool.

    For more information, see Create and manage an IP address pool.

    To use the IP address pool feature, apply for the privilege in the Quota Center console. For more information, see Request a quota increase.

    Data Transfer

    Select a metering method for data transfer over the EIP.

    • Pay-By-Bandwidth: You are charged based on the specified maximum bandwidth on a daily basis, regardless of the actual usage.

    • Pay-By-Data-Transfer: You are charged based on the amount of data transfer over the Internet on an hourly basis.

    Maximum Bandwidth

    Enter a bandwidth value or adjust the slider to specify a bandwidth value based on your business requirements.

    Name

    Enter a name for the EIP.

    Resource Group

    Select a resource group for the EIP.

    Billing Cycle

    Select a billing cycle for the EIP.

    Pay-by-bandwidth EIPs support only the Day option. Pay-by-data-transfer EIPs support only the Hour option.

    Quantity

    Select the number of EIPs that you want to purchase.

Recover a released EIP

You can recover EIPs that are released within the last seven days by specifying the IP address or EIP ID.

If the EIP or ECS static IP address is already assigned to another Alibaba Cloud account, or is locked or recycled due to security reasons, the EIP cannot be recovered. You cannot recover the public IP addresses of ECS instances or CLB instances that are deployed in classic networks.

  1. Log on to the Elastic IP Address console .
  2. In the top navigation bar, select the region where the EIP is created.

  3. On the Elastic IP Addresses page, click Apply for Specific EIP.

  4. In the Apply for Specific EIP dialog box, set the following parameters and click OK.

    Parameter

    Description

    Request Type

    Select Apply for Specific EIP.

    You can specify the IP address or ID of the EIP. By default, a recovered EIP uses the pay-as-you-go billing method and the pay-by-data-transfer metering method. The maximum bandwidth of the EIP is 5 Mbit/s.

    Request Method

    Select a request method:

    • Request by IP Address: Specify the IP address of the EIP or the static public IP address of the ECS instance.

    • Request by EIP ID: Request an EIP by specifying the ID of the EIP.

    IP Address

    If you set Request Method to Request by IP Address, enter the IP address of the EIP that you want to apply for.

    EIP ID

    If you set Request By to Request by EIP ID, enter the ID of the EIP that you want to apply for.

    Note

    You can recover only EIPs that were used by you.

    IP Address Pool

    Select an IP address pool from the drop-down list based on your business requirements.

    For more information, see Create and manage an IP address pool.

    To use the IP address pool feature, apply for the privilege in the Quota Center console. For more information, see Request a quota increase.

Apply for a contiguous EIP group.

Important
  • Contiguous EIP groups are no longer available for new users from 00:00:00 (UTC+8), August 6, 2024. You can use IP address pools to use contiguous IP addresses. For more information about IP address pools, see Create and manage IP address pools.

  • If you already used contiguous EIP groups before 00:00:00 (UTC+8), August 6, 2024, you can continue to use contiguous EIP groups.

You can apply for multiple contiguous EIP groups at a time. Contiguous EIP groups facilitate network management. A contiguous EIP group consists of multiple contiguous EIPs. Contiguous EIP groups are similar to standard EIPs which are allocated from Alibaba Cloud IP address pools. You can associate contiguous EIP groups with cloud resources in VPCs, such as ECS instances, internal-facing CLB instances, internal-facing Application Load Balancer (ALB) instances, secondary ENIs, NAT gateways, and HAVIPs. After you associate a contiguous EIP group with a cloud resource, the cloud resource can use the EIPs in the contiguous EIP group for network communication.

Before you apply for a contiguous EIP group, take note of the following rules:

  • You cannot release only one EIP in a contiguous EIP group. If you want to release an EIP in a contiguous EIP group, you must release all EIPs in the contiguous EIP group.

  • The following table describes the differences between contiguous EIP groups and standard EIPs.

    Item

    Contiguous EIP group

    Standard EIP

    Billing methods

    Only the pay-as-you-go billing method is supported.

    The subscription and pay-as-you-go billing methods are supported.

    Switch between billing methods

    You cannot switch the billing method from pay-as-you-go to subscription.

    You can switch the billing method from pay-as-you-go to subscription.

    Billable items

    EIPs in contiguous EIP groups and standard EIPs support the same billable items. For more information, see Billable items.

  1. Log on to the Elastic IP Address console .
  2. In the top navigation bar, select the region where you want to apply for a contiguous EIP group.

  3. On the Elastic IP Addresses page, click Apply for Specific EIP.

  4. In the Apply for Specific EIP dialog box, set the following parameters for the contiguous EIP group and click OK.

    Parameter

    Description

    Request Type

    Select Request Contiguous EIP Group.

    Mask for Contiguous EIP Group

    Select a subnet mask length for the contiguous EIP group, and select I have read and understand that: N EIPs are allocated by default. One, three, or four EIPs may be reserved by the system.

    Valid values: 24 to 28. The number of contiguous EIPs varies based on the subnet mask length selected for the contiguous EIP group.

    • /28: allocates 16 contiguous EIPs by default.

    • /27: allocates 32 contiguous EIPs by default.

    • /26: allocates 64 contiguous EIPs by default.

    • /25: allocates 128 contiguous EIPs by default.

    • /24: allocates 256 contiguous EIPs by default.

    Note

    In some scenarios, the actual number of EIPs that are allocated may be less than the expected number because one, three, or four EIPs may be reserved.

    Network Type

    Select a network type for the contiguous EIP group.

    You can select only Internet.

    Metering Method

    Select a metering method for the contiguous EIP group.

    • Pay-By-Bandwidth: You are charged based on the specified maximum bandwidth on a daily basis, regardless of the actual usage.

    • Pay-By-Data-Transfer: You are charged based on the amount of data transfer over the Internet on an hourly basis.

    Bandwidth

    Specify a bandwidth value for the contiguous EIP group.

    Valid values: 1 to 200. Unit: Mbit/s.

Associate one or more EIPs with an instance

Prerequisites

To associate an EIP with an instance, make sure that the instance meets the following requirements:

  • The ECS instance is located in a VPC.

  • The ECS instance is located in the same region as the EIP.

  • The ECS instance is in the Running or Stopped state.

  • No public IP addresses are associated with the primary network interface controller (NIC) of the ECS instance.

Procedure

Associate an EIP with an ECS instance

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Instances & Images > Instances.

  3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  4. Find the ECS instance with which you want to associate an EIP and choose icon1 > Network and Security Group > Associate EIP in the Action column.

  5. In the Associate EIP dialog box, select an EIP from the EIP drop-down list.

    If no EIPs are available in the EIP drop-down list, perform one of the following operations:

    • Check whether EIPs exist. If no EIPs exist, click Create EIP to the right of the EIP field to create an EIP. For more information, see Apply for an EIP.

    • Check whether the EIP that you want to use is associated with another cloud resource. If the EIP that you want to use is associated with another cloud resource, disassociate the EIP from the resource. For more information, see Disassociate an EIP from a cloud resource.

  6. Click Confirm.

    After the EIP is associated with the ECS instance, the EIP is displayed in the IP Address column corresponding to the instance on the Instances page. Example: 192.168.XX.XX (EIP).

Associate multiple EIPs with an ECS instance

If multiple applications are hosted on the same ECS instance and you want each application to have an independent public IP address, you can associate multiple EIPs with a secondary elastic network interface (ENI) of the instance in NAT mode. For more information, see Associate multiple EIPs with an ECS instance in NAT mode.

Disassociate an EIP from an ECS instance

If you no longer need to access an ECS instance over the Internet or you need to change an EIP of the instance, we recommend that you disassociate the EIP from the instance to avoid resource waste.

Important

You are not able to access the ECS instance over the Internet after you disassociate an EIP from the instance. Before you disassociate an EIP, make sure that Internet access is no longer required or you can access the instance over alternative network connections.

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Instances & Images > Instances.

  3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  4. Find the ECS instance from which you want to disassociate an EIP and choose icon1 > Network and Security Group > Disassociate EIP in the Action column.

  5. In the Disassociate EIP message, confirm the message and select "I am aware of the costs and risks".

  6. Click Confirm.

    Note

    After the EIP is disassociated from the instance, the EIP is not displayed in the IP Address column corresponding to the instance on the Instances page.

  7. (Optional) After an EIP is disassociated from an ECS instance, you are still charged for the EIP. If you no longer use the EIP, you can release the EIP. For more information, see Release a pay-as-you-go EIP.

Change an EIP

To change the EIP that is associated with an ECS instance, you can disassociate the EIP from the instance and associate a different EIP with the instance.

Prerequisites

  • The ECS instance is deployed in a VPC.

  • The ECS instance is in the Running or Stopped state.

  • The ECS instance and the EIP that you want to associate with the instance are in the same region.

  • The ECS instance is not associated with a static public IP address or EIPs other than the current EIP.

Procedure

  1. (Optional) Apply for a new EIP. For more information, see Apply for an EIP.

  2. Disassociate the current EIP from the ECS instance. For more information, see the Disassociate an EIP from an ECS instance section of this topic.

    Important
    • After you disassociate a pay-as-you-go EIP from a cloud resource, you are still charged an EIP configuration fee. To prevent unnecessary charges, release the EIP.

    • If you no longer require a subscription EIP after you disassociate the EIP from a cloud resource, you can unsubscribe from the EIP. For more information, see Rules for unsubscribing from resources.

  3. Associate the new EIP with the ECS instance. For more information, see the Associate one or more EIPs with an instance section of this topic.

FAQ

  1. Can I change the public IP address of an ECS instance in a region outside the Chinese mainland to resolve the high latency issue that occurs when I access the instance from the Chinese mainland?

    No, you cannot change the public IP address of the ECS instance to resolve the high latency issue.

    Cross-border communication between regions inside and outside the Chinese mainland may be affected by connection congestion and the regulations of Internet service providers (ISPs), which may lead to network link instability and cause packet loss or other exceptions. As a result, ECS instances in specific regions outside the Chinese mainland are inaccessible to users from specific regions inside the Chinese mainland.

    • If you provide services for users in the Chinese mainland, we recommend that you deploy ECS instances in a region inside the Chinese mainland to bypass the limitations of cross-border communication.

    • If you want to allow users in regions inside the Chinese mainland to access ECS instances in regions outside the Chinese mainland, we recommend that you use Global Accelerator (GA). For more information, see What is GA?

  2. Can I specify a specific public IP address when I purchase an EIP?

    No, you cannot specify a specific public IP address when you purchase an EIP.

    When you purchase an EIP, the system randomly assigns a public IP address. You cannot manually specify a public IP address.

References

After you associate an EIP with an ECS instance, you can view the following topics for more information about the billing method, bandwidth usage, and traffic consumption of EIPs.

After you disassociate an EIP from an ECS instance, the public IP address that is associated with the EIP is no longer available. You can perform the following operations to ensure that your applications or services can run normally.