An Elastic IP Address (EIP) is a public IPv4 address that you can purchase and manage independently. EIPs provide public network access for cloud resources, such as Elastic Compute Service (ECS) instances in a virtual private cloud (VPC), Internet NAT gateways, and Server Load Balancer (SLB) instances. You can dynamically attach EIPs to and detach them from cloud resources to flexibly manage your public IP addresses.
EIP selection guide
Billing methods
EIPs support the subscription and pay-as-you-go billing methods, which support different metering methods for Internet data transfers. Each metering method is ideal for specific scenarios. You can select a metering method based on your business requirements.
Billing method | Metering method | Scenario |
pay-by-data-transfer |
If you cannot estimate the traffic usage, we recommend that you select the pay-by-data-transfer metering method. | |
Pay-by-bandwidth |
| |
Pay-by-bandwidth |
|
Line types
You can select a line type only when you create an EIP. After an EIP is created, you cannot change its line type. Choose the line type carefully.
Line type | BGP (Multi-ISP) | BGP (Multi-ISP) Pro |
Description | Delivers a fast and stable user experience by connecting to multiple carrier lines and automatically selecting the optimal path. This line type is supported in all Alibaba Cloud regions. | An optimized public network line for traffic from outside the Chinese mainland to the Chinese mainland. It is designed for end users in the Chinese mainland, excluding data centers in the Chinese mainland. This line type reduces latency and improves the quality of international services through direct connections over dedicated carrier lines. |
Scenarios | A general-purpose choice suitable for most services that are accessible over the Internet. It ensures network stability and broad coverage. | An optimized line for traffic from outside the Chinese mainland to the Chinese mainland. It significantly reduces cross-border network latency. |
Limitations |
|
|
Cost | Low | Medium |
Security protection
You can select EIP with Anti-DDoS (Enhanced) only when you create an EIP. After an EIP is created, you cannot switch between the default and enhanced types. Choose the security protection type carefully.
Security protection type | Default | EIP with Anti-DDoS (Enhanced) |
Scenarios | Suitable for services with no special security requirements. By default, a single EIP provides up to 5 Gbps of basic DDoS mitigation capabilities, which meets fundamental security needs. | Suitable for services that require terabit-level mitigation capabilities or for services where the default security capabilities are insufficient. |
Configuration | This basic protection is enabled by default for all EIPs. | You must select this type when you create an EIP. |
Limitations | Supported for EIPs in all regions. |
|
Billing changes | The default security protection is free of charge. | This type incurs security protection fees that are charged by the Anti-DDoS service. For more information about the billing rules, see Anti-DDoS Origin 2.0 (Pay-as-you-go). |
Create a new EIP
Console
In the EIP console, click Create Elastic IP Address.
Configure the EIP parameters and complete the purchase.
Billing Method: Pay-as-you-go is suitable for scenarios with unpredictable workloads, while subscription is suitable for long-term, stable services. For more information, see EIP billing method selection guide.
For the pay-as-you-go billing method, you can select a public bandwidth metering method:
If you set the Traffic field to Pay-by-Data-Transfer, set Billing Method to Pay-by-CDT. Cloud Data Transfer (CDT) can help reduce your public bandwidth costs. You can keep the default bandwidth value and adjust it at any time. The peak bandwidth of a pay-by-data-transfer EIP is an upper limit for reference only. It is not a guaranteed performance metric.
If you set the Traffic field to Pay-by-Bandwidth, you are charged for bandwidth. You must also set a peak bandwidth value based on your requirements.
Region: Select the same region as your cloud resource. EIPs are regional resources.
Line Type: This parameter is available only in specific regions. For more information, see EIP line type selection guide.
Security Protection: This parameter is available only for pay-as-you-go BGP (Multi-ISP) EIPs. For more information, see EIP security protection selection guide.
Address Pool: You can allocate an EIP from an IP address pool.
API
You can call the AllocateEipAddress operation to create an EIP.
Recover a released public IP address
You can recover an EIP, a static public IP address of an ECS instance, or a static public IP address of an SLB instance that was released within the last seven days.
After a successful recovery, the public IP address becomes a pay-as-you-go EIP that is billed by data transfer. The default peak bandwidth is 5 Mbps. If your EIP service has been upgraded to pay-by-CDT, the data transfer fees for the recovered public IP address are also billed through CDT.
Alibaba Cloud attempts to recover the public IP address. However, the recovery fails if the public IP address has been allocated to another account, locked for risk control, or reclaimed.
Console
In the EIP console, select a region and click Apply For Specific EIP.
Set Request Type to Apply for Specific EIP. Configure the parameters and click OK.
To request an EIP by IP address, enter the public IP address that you previously held. If you want to recover an EIP by its ID, you can find the historical ID in historical orders.
If the EIP is a BGP (Multi-ISP) Pro EIP, set Line Type to BGP (Multi-ISP)_Pro. Note that BGP (Multi-ISP) Pro EIPs are available only in specific regions.
You can specify an IP address pool from the drop-down list to request a specific EIP only if you have enabled IP address pools.
API
You can call the AllocateEipAddressPro operation to request a specific EIP.
Request a contiguous EIP block
You can request a contiguous EIP block in the following ways:
IP address pool: This feature is disabled 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 be attached to cloud resources to provide public network access and have the same billable items. However, they have the following differences:
EIPs in a contiguous EIP group are pay-as-you-go and cannot be converted to subscription.
You cannot release an individual EIP from a contiguous EIP group. You must release all EIPs in the group.
Starting from 00:00:00 on August 6, 2024 (UTC+8), the contiguous EIP group feature is no longer 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.
Add an EIP to or remove an EIP from an Internet Shared Bandwidth instance
Internet Shared Bandwidth provides region-level bandwidth sharing and reuse. After you add EIPs to an Internet Shared Bandwidth instance, all EIPs can share the purchased bandwidth. This helps reduce overall public bandwidth costs.
Only pay-as-you-go EIPs can be added to an Internet Shared Bandwidth instance. After an EIP is added, its peak bandwidth setting becomes invalid and the bandwidth is controlled by the Internet Shared Bandwidth instance. The EIP no longer incurs public network fees, such as data transfer fees and bandwidth fees, but the EIP configuration fee (public IP retention fee) is not affected.
The EIP and the Internet Shared Bandwidth instance must be in the same region and have the same line type.
You can add up to 100 EIPs to a single Internet Shared Bandwidth instance. To add more EIPs, request a quota increase.
Console
Add an EIP to an Internet Shared Bandwidth instance
In the EIP console, select the region of the EIP.
Find the target EIP. In the Actions column, choose
.Select the Internet Shared Bandwidth instance to add the EIP to and click OK.
Remove an EIP from an Internet Shared Bandwidth instance
After an EIP is removed from an Internet Shared Bandwidth instance, its peak bandwidth and billing method are restored to their previous settings. We recommend that you perform this operation during off-peak hours to prevent issues such as packet loss caused by bandwidth changes.
In the EIP console, select the region of the EIP.
Find the target EIP. In the Actions column, choose
, and then confirm.
API
You can call the AddCommonBandwidthPackageIp operation to add an EIP to an Internet Shared Bandwidth instance.
You can call the RemoveCommonBandwidthPackageIp operation to remove an EIP from an Internet Shared Bandwidth instance.
Release an EIP
A pay-as-you-go EIP that is not attached to any cloud resource still incurs an EIP configuration fee (public IP retention fee). If you no longer need the EIP, release it immediately to avoid unnecessary charges.
Only pay-as-you-go EIPs can be released. Subscription EIPs cannot be released.
EIPs that are locked for security reasons cannot be released.
After you release an EIP, billing for the EIP stops. However, you may still receive a final bill for the EIP.
This is because:
Pay-by-data-transfer EIPs are billed hourly.
For example, if you release an EIP at 10:30:00, you will receive a bill for the data transfer fees incurred from 10:00:00 to 11:00:00 after 11:00:00.
Pay-by-bandwidth EIPs are billed daily.
For example, if you release an EIP on January 1, 2025, you will receive a bill for the bandwidth fees of January 1, 2025, after 00:00 on January 2, 2025.
Console
Standard release
Before you release an EIP, you must remove all its dependencies. For example, you must remove the EIP from the Internet Shared Bandwidth instance, detach the EIP from the cloud resource, and remove the SNAT or DNAT entry that is associated with the EIP.
In the EIP console, select the region of the EIP.
Find the target EIP. In the Actions column, choose
and confirm the release.You cannot release an individual EIP from a contiguous EIP group. You must release all EIPs in the group.
Forced release
When you force the release of an EIP, the system first detaches the EIP from the attached cloud resource, removes the EIP from the Internet Shared Bandwidth instance, and then releases the EIP.
If the EIP is used in an SNAT or DNAT entry of a NAT Gateway, you must first remove the associated entry.
You cannot force the release of an EIP that is part of a contiguous EIP group.
In the EIP console, select the region of the EIP.
Find the target EIP. In the Actions column, choose
. Then, confirm the operation.
API
You can call the ReleaseEipAddress operation to release a specific EIP.
You can call the ReleaseEipSegmentAddress operation to release all EIPs in a contiguous EIP group.
Deletion protection
You can enable deletion protection for a pay-as-you-go EIP to prevent accidental release. We recommend that you enable deletion protection for EIPs that are used for services in a production environment.
Console
In the EIP console, select the region of the EIP. Click the ID of the target EIP.
On the EIP details page, enable or disable deletion protection.
API
You can call the DeletionProtection operation. Set the Type
field to EIP
and adjust the ProtectionEnable
field to enable or disable deletion protection.
Use in production environments
Best practices:
Cost optimization:
For pay-by-data-transfer EIPs, we recommend that you use the pay-by-CDT metering method. CDT provides benefits such as free data transfer quotas, consolidated billing for IPv4 and IPv6 traffic across multiple cloud products, and tiered pricing. This can help reduce your public bandwidth costs.
For pay-by-bandwidth EIPs, we recommend that you set the peak bandwidth to a value slightly higher than your service requirements. If you use multiple pay-by-bandwidth EIPs, use Internet Shared Bandwidth to reduce overall costs through bandwidth multiplexing.
Configuration selection: If your service traffic is stable or high, select pay-by-bandwidth for better cost-effectiveness. If your traffic fluctuates significantly or usage is low, select pay-by-data-transfer for more flexibility.
IP management: For scenarios that require contiguous IP addresses or specific IP ranges, use the IP address pool feature for unified planning and allocation.
Risk prevention:
Cost risks: After a pay-as-you-go EIP is created, it incurs an EIP configuration fee (public IP retention fee) even if it is not attached to any resource. To avoid this fee, attach the EIP to a resource or release it if you no longer need it.
Operational risks: Enable deletion protection for EIPs that are used for critical services in a production environment. This prevents the EIPs from being released due to accidental operations and disrupting service access.
Quotas
By default, each Alibaba Cloud account can hold up to 20 EIPs. You can request a quota increase.
FAQ
When does the EIP configuration fee (public IP retention fee) start to be charged after I request an EIP?
Billing rules for pay-as-you-go EIPs:
After your application for an EIP is approved, you are immediately charged an EIP configuration fee (public IP retention fee). You are not charged an EIP configuration fee (public IP retention fee) if the EIP is allocated from a specific IP address pool.
When the EIP is associated with a resource, you are not charged an EIP configuration fee (public IP retention fee) only of the EIP is directly associated with an Elastic Compute Service (ECS) instance in a virtual private cloud (VPC) or an elastic container instance and the number of EIPs that your Alibaba Cloud account can own does not exceed 2,000.
NoteTo prevent unnecessary fees, we recommend that you apply for EIPs only when you need to use them.
If you use a subscription EIP, you are not charged an EIP configuration fee (public IP retention fee).