Manage EIPs for ECS instances
Create, recover, associate, and disassociate elastic IP address (EIP) resources for ECS instances in a VPC.
Create an EIP
Console
In the EIP console, click Create EIP.
Configure the EIP parameters and complete the purchase.
Billing Method: The pay-as-you-go billing method is suitable for workloads with variable traffic. The subscription billing method is suitable for long-term, stable workloads. For more information, see Billing method.
If you select the pay-as-you-go billing method, select a metering method for data transfer:
When you set the Metering method to Pay-By-Data-Transfer: select Pay-by-CDT. CDT can help you reduce public data transfer costs. Retain the default bandwidth value, which can be adjusted at any time. The peak bandwidth of a pay-by-data-transfer EIP is a reference value and upper limit. It is not a guaranteed performance metric.
When you set the Metering method to Pay-By-Bandwidth: You are charged for bandwidth usage. Set the peak bandwidth based on your business requirements.
Region and zone: Select the same region as your cloud resources. An EIP is a region-level resource.
Line Type: This parameter is available only in some regions. For guidance, see Line type. The Local ISP line type is currently available only in the US (Virginia). When you select Local ISP, only pay-as-you-go is available. If resources are sold out or the quota is exceeded, you cannot place an order. In this case, contact your account manager.
Security protection: This parameter is available only for pay-as-you-go BGP (Multi-ISP) EIPs. For guidance, see Security protection.
IP address pool: If you have an IP address pool, you can allocate an EIP from the pool.
API
Call the AllocateEipAddress operation to create an EIP.
To create EIPs in multiple regions in batches, call the AllocateEipAddress operation in a loop and specify a different RegionId value for each call.
Recover a released public IP
You can request to recover an EIP, or a static public IP address of an ECS or SLB instance that was released from your account within the last seven days.
After a successful request, the system converts the public IP address to a pay-as-you-go EIP that uses the pay-by-data-transfer metering method. The default peak bandwidth is 5 Mbit/s. If your EIP service has been upgraded to CDT-based billing, the data transfer fees for the recovered public IP address are also billed through CDT.
Recovery is not guaranteed. The request may fail if the public IP address has been assigned to another account, locked for security reasons, or reclaimed by the system.
Console
In the EIP console, select the region of the EIP and click Apply for Specific EIP.
Set Request Type to Apply for Specific EIP. After you configure the parameters, click OK.
To request by IP address, enter the public IP address that you previously owned. To retrieve by EIP ID, you can find the historical ID in your historical orders.
If the historical 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 some regions.
You can select a specific IP address pool from the drop-down list to request a specific EIP only if you have enabled the IP address pool feature.
API
Call the AllocateEipAddressPro operation to request a specific EIP.
Request a contiguous EIP block
You can request a contiguous block of EIPs in the following ways:
IP address pool: This feature is not available by default. To use it, contact your business manager.
Contiguous EIP group: EIPs in a contiguous EIP group are similar to individual EIPs. They can also be associated with cloud resources for internet access and 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 the subscription billing method.
You cannot release an individual EIP from a contiguous EIP group. You must release all EIPs in the group at the same time.
Starting from 00:00:00 on August 6, 2024 (UTC+8), the contiguous EIP group feature will no longer be available to new users.
If you have used the contiguous EIP group feature before 00:00:00 on August 6, 2024 (UTC+8), you can continue to request and use it. However, we recommend that you migrate your contiguous EIP groups to IP address pools.
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
Go to ECS console - Instances.
In the upper-left corner of the page, select a region and resource group.
-
Find the ECS instance you want to associate an EIP with. In the All Operations column, choose .
-
In the Associate EIP dialog box, select the EIP that you want to associate.
If no EIPs are available:
-
Verify that you have created an EIP. If not, click Create EIP on the right side of the selection box to create an EIP.
-
Verify that the EIP is not associated with another cloud resource. If it is, disassociate the EIP from the other resource first.
-
-
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.
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.
Go to ECS console - Instances.
In the upper-left corner of the page, select a region and resource group.
-
Find the ECS instance from which you want to disassociate an EIP. In the All Operations column, choose .
-
In the Disassociate EIP dialog box, confirm the information.
-
Click OK.
NoteAfter the EIP is disassociated, it no longer appears in the IP Address column on the ECS instances page.
-
(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
-
(Optional) Create a new EIP.
-
Disassociate the EIP currently associated with the ECS instance.
Important-
A disassociated pay-as-you-go EIP still incurs a configuration fee. Release it if no longer needed.
-
See Pay-as-you-go for EIP configuration fees.
-
To release a pay-as-you-go EIP, see Release a pay-as-you-go EIP.
-
-
If you no longer need a subscription EIP after disassociating it, cancel its subscription. See Unsubscription rules.
-
-
Associate the new EIP with the ECS instance.
FAQ
-
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.
-
-
Can I associate an EIP with an ECS instance from another Alibaba Cloud account, or transfer an EIP to another account?
Yes.
-
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:
icon and select Migrate to IP Address Pool.