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.

Background information

Public IP address type

If an ECS instance requires access to the Internet, you must allocate a public IP address and Internet bandwidth for the ECS instance. Alibaba Cloud provides the following types of public IP addresses:
  • 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.

  • EIP

    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.

Description

Before you convert the static public IP address of an ECS instance to an EIP, take note of the following items:
  • 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.

Limits

If you want to convert the static public IP address of an ECS instance in a VPC to an EIP, the ECS instance must meet the following requirements:
  • 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.

Prerequisites

An ECS instance is created and assigned a static public IP address. For more information, see Create an instance by using the wizard.

Procedure

  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 a region.
  4. Find the ECS instance whose network type is VPC and whose IP address you want to convert, and then choose More icon > Network and Security Group > Convert to EIP in the Actions column.
  5. In the dialog box that appears, confirm the information and click OK.
  6. Refresh the instance list.
    After the public IP address is converted to an EIP, the public IP address is marked with (Elastic).

References

ConvertNatPublicIpToEip: converts the static public IP address of an ECS instance in a VPC to an EIP.