All Products
Search
Document Center

Elastic Compute Service:Manage EIPs for ECS instances

Last Updated:May 15, 2026

Create, recover, associate, and disassociate elastic IP address (EIP) resources for ECS instances in a VPC.

Create an EIP

Console

  1. In the EIP console, click Create EIP.

  2. Configure the following:

    • Billing Method: Pay-as-you-go for fluctuating workloads, Subscription for long-term stable use.

    • Region: Must match the region of the cloud resource you plan to associate the EIP with.

    • Line Type: Choose between BGP (Multi-ISP) and BGP (Multi-ISP) Pro. Can't be changed after creation.

    • Security Protection: Select Anti-DDoS (Enhanced) if you need terabit-level DDoS protection. Only available for pay-as-you-go BGP (Multi-ISP) EIPs. Can't be changed after creation.

    • IP Address Pool: Optionally allocate from an existing pool.

    • Bandwidth: Set the peak bandwidth in Mbps.

  3. Complete the payment.

After creation, associate the EIP with a cloud resource to start using it.

If you're using the pay-by-data-transfer metering method, select Pay-by-CDT as the billing method. CDT offers tiered pricing and a free tier that can reduce your data transfer costs.

API

Call AllocateEipAddress.

Recover a released EIP

You can recover an EIP or static public IP address (from an ECS or CLB instance) that was released within the past 7 days. The recovered address becomes a pay-as-you-go, pay-by-data-transfer EIP with 5 Mbps default bandwidth. If your EIP service has been upgraded to pay-by-CDT, the data transfer fees for the recovered public IP address will be billed through CDT.

Recovery fails if the address has been reassigned to another account, locked for security, or reclaimed by the system.

Console

  1. In the EIP console, select the region and click Apply for Specific EIP.

  2. Set Request Type to Apply for Specific EIP. Configure the parameters and click OK.

    1. To Request by IP Address, enter the public IP address you previously owned. To Request by EIP ID, find the ID in your historical orders and enter the ID.

    2. If the released EIP was a BGP (Multi-ISP) Pro EIP, set Line Type to BGP (Multi-ISP) Pro. Note that BGP (Multi-ISP) Pro EIPs are supported only in specific regions.

      BGP (Multi-ISP) Pro supported regions

      • Pay-as-you-go: China (Hong Kong), Japan (Tokyo), Singapore, Malaysia (Kuala Lumpur), Philippines (Manila), Indonesia (Jakarta), Thailand (Bangkok)

      • Subscription: China (Hong Kong)

    3. If you have enabled IP address pools, you can specify an IP address pool and request a specific EIP from it.

API

Call AllocateEipAddressPro.

Request a contiguous EIP block

You can request a contiguous block of EIPs in the following ways:

  • Use IP address pools: This feature is disabled by default. To use it, contact your business manager.

  • Contiguous EIP group: Contiguous EIP groups work like individual EIPs — you can associate them with cloud resources for internet access, and they incur the same charges. However, there are some differences:

    • EIPs in a contiguous EIP group are pay-as-you-go and cannot be converted to subscription.

    • You cannot release individual EIPs from a contiguous EIP group. You can only release all EIPs in the group at a time.

Important

As of August 6, 2024, this feature is available only to accounts that have used it previously. If you have not used this feature before, use IP address pools instead. Migrate to IP address pools for more flexibility and better management.

How to request a contiguous EIP group

Console

  1. In the EIP console, select the target region and click Apply for Specific EIP.

  2. Set Request Type to Request Contiguous EIP Group. Configure the parameters and click OK.

    1. Mask for Contiguous EIP Group: This determines the number of allocatable EIPs. Due to system-reserved addresses, a requested contiguous EIP group may have one, three, or four fewer allocatable IPs.

    2. Metering Method: Choose between pay-by-bandwidth and pay-by-data-transfer. If your EIP service has been upgraded to pay-by-CDT, data transfer fees for EIPs in the requested contiguous EIP group will be billed through CDT.

API

Call AllocateEipSegmentAddress to request a contiguous EIP group.

How to migrate a contiguous EIP group to an IP address pool

Migrate the entire CIDR block of the contiguous EIP group into an IP address pool. Before you begin:

Console

  1. In the EIP console, select the target region in the top navigation bar. Find any EIP in the target contiguous EIP group. In the Actions column, choose More > Migrate to IP Address Pool.

  2. Review the information in the message, then click OK.

  3. After the migration is successful, the IP Address Pool ID column for the EIPs will display the ID of the new IP address pool.

    Migration confirmation

API

Call TransformEipSegmentToPublicIpAddressPool to migrate a contiguous EIP group to an IP address pool.

Associate an EIP

Prerequisites

The ECS instance must meet the following requirements:

  • The instance is in a VPC.

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

  • The instance is in the Running or Stopped state.

  • The instance's primary network interface has no associated public IP address.

Procedure

Associate a single EIP

  1. Go to ECS console - Instances.

  2. In the upper-left corner of the page, select a region and resource group.地域

  3. Find the ECS instance you want to associate an EIP with. In the All Operations column, choose Network and Security Group > Associate with EIP.

  4. In the Associate EIP dialog box, select the EIP that you want to associate.

    If no EIPs are available:

  5. Click OK.

    After the association succeeds, view the instance's EIP on the ECS instances page.

Associate multiple EIPs

To host multiple applications on an ECS instance, each with a separate public IP address, associate multiple EIPs with a secondary elastic network interface.

Disassociate an EIP

Disassociate an EIP when you no longer need internet access on the instance or want to change the EIP, to avoid unnecessary costs.

Important

Disassociating an EIP removes internet access. Before you proceed, verify that public access is no longer needed or that an alternative connection is in place.

  1. Go to ECS console - Instances.

  2. In the upper-left corner of the page, select a region and resource group.地域

  3. Find the ECS instance from which you want to disassociate an EIP. In the All Operations column, choose Network and Security Group > Disassociate EIP.

  4. In the Disassociate EIP dialog box, confirm the information.

  5. Click OK.

    Note

    After the EIP is disassociated, it no longer appears in the IP Address column on the ECS instances page.

  6. (Optional) A disassociated EIP still incurs charges. If you no longer need it, release the pay-as-you-go EIP.

Change an EIP

To change an instance's EIP, disassociate the current EIP, then associate a new one.

Prerequisites

  • The ECS instance is in a VPC.

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

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

  • The ECS instance has no fixed public IP or other associated EIPs.

Procedure

  1. (Optional) Create a new EIP.

  2. Disassociate the EIP currently associated with the ECS instance.

    Important
  3. Associate the new EIP with the ECS instance.

FAQ

  1. Can I resolve high latency when accessing an ECS instance in a region outside the Chinese mainland from within the Chinese mainland by changing the public IP address?

    No.

    When you access an ECS instance outside the Chinese mainland from within it, traffic passes through international carrier routing nodes. International link congestion and carrier egress routing restrictions can cause unstable links, packet loss, or inaccessibility.

    • If your users are primarily in the Chinese mainland, use server sites within the Chinese mainland to avoid public network routing restrictions.

    • To allow users in the Chinese mainland to access ECS instances in other regions, use Global Accelerator.

  2. Can I associate an EIP with an ECS instance from another Alibaba Cloud account, or transfer an EIP to another account?

    Yes.

  3. Can I specify a particular IP address when purchasing an EIP?

    No.

    The system randomly assigns an IP address when you purchase an EIP.

References

Learn about EIP billing, bandwidth, and traffic consumption:

After disassociation, the instance loses its public IP address. Update related configurations as needed: