This topic describes how to convert the static public IP address of an Elastic Compute Service (ECS) instance in a virtual private cloud (VPC) to an elastic IP address (EIP). After the conversion, you can disassociate the EIP from the ECS instance. Then, you can associate the EIP with the ECS instance again or with another ECS instance. You can manage EIPs in a flexible manner.
Public IP address type
- Static public IP address
When you create an ECS instance in a VPC, you can specify Assign Public IPv4 Address for the ECS instance. After the ECS instance is created, the system automatically assigns a static public IP address to the ECS instance. You cannot disassociate this public IP address from the ECS instance.
An EIP is a public IP address that you can purchase and use as an independent resource. You can associate EIPs with ECS instances, internal-facing Classic Load Balancer (CLB) instances, elastic network interfaces (ENIs), Internet NAT gateways, and high-availability virtual IP addresses (HAVIPs). The ECS instances, internal-facing CLB instances, and ENIs must be deployed in VPCs. In addition, you can use EIP bandwidth plans and data transfer plans to reduce the cost of Internet data transfer.
Both static public IP addresses and EIPs use the multi-line BGP networks of Alibaba Cloud to provide high-quality Internet services. The main difference between a static public IP address and an EIP is whether the IP address can be disassociated from an ECS instance. You can disassociate an EIP from an ECS instance anytime. Then, you can associate the EIP with the ECS instance again based on your business requirements. However, you cannot disassociate a static public IP address from an ECS instance.
- When you convert the static public IP address of an ECS instance in a VPC to an EIP, connections to the ECS instance from the Internet are not interrupted.
- After the static public IP address is converted to an EIP, you cannot convert the EIP back to the static public IP address.
- After the conversion, the public IP address becomes the IP address of the EIP.
- After the conversion, the billing method of the Internet bandwidth that the ECS instance uses is not changed. You are charged on a pay-bay-data-transfer basis.
- After the conversion, the unit price of Internet data transfer is not changed. The EIP is automatically associated with the ECS instance. You are not charged a configuration fee for the EIP. The billing of the EIP and the billing of the ECS instance are independent of each other. The system generates separate bills for the EIP and the ECS instance. For more information about EIP billing, see Billing overview. To export the bills of the EIP, you can go to Billing Management, click Usage Records, and set the required parameters.
- If the ECS instance is billed on a pay-as-you-go basis, make sure that your account does not have overdue payments.
- If the ECS instance is billed on a subscription basis:
- You cannot convert the static public IP address within 24 hours before the ECS instance expires.
- The Internet bandwidth must be billed on a pay-by-data-transfer basis. If the Internet bandwidth is billed on a pay-by-bandwidth basis, you must change the billing method of the Internet bandwidth before you can convert the static public IP address. For more information, see Change the billing method for network usage.
- The ECS instance must be in the Stopped or Running state. ECS instances in other states do not support the operation.
- You cannot convert the static public IP address of an ECS instance to an EIP if the ECS instance has a pending upgrade or downgrade task.
An ECS instance is created and assigned a static public IP address. For more information, see Create an instance by using the wizard.
- Log on to the ECS console.
- In the left-side navigation pane, choose .
- In the top navigation bar, select a region.
- Find the ECS instance whose network type is VPC and whose IP address you want to convert, and then choose in the Actions column.
- In the dialog box that appears, confirm the information and click OK.
- Refresh the instance list. After the public IP address is converted to an EIP, the public IP address is marked with (Elastic).
ConvertNatPublicIpToEip: converts the static public IP address of an ECS instance in a VPC to an EIP.