You can convert an automatically assigned public IP address to an Elastic IP Address (EIP) for a VPC network-connected ECS instance. After the conversion, you can associate or disassociate the EIP with the ECS instance at any time. This will improve the flexibility of managing public IP addresses.

Prerequisites

You have created an ECS instance and assigned a public IP address to the instance. For more information, see Create an instance by using the provided wizard.

Overview of public IP addresses

If an ECS instance needs to communicate with the Internet, you must configure a public IP address and Internet bandwidth for the ECS instance. Alibaba Cloud provides the following two types of public IP addresses:
  • Automatically assigned public IP address

    When you create a VPC network-connected ECS instance, you can choose to use the public IP address automatically assigned by the system. You cannot disassociate this public IP address from the ECS instance, and therefore it is called the public IP address of an ECS instance.

  • EIP

    An EIP is a public IP address resource that can be purchased and owned independently. Currently, you can associate an EIP with an ECS instance of a VPC network, a private Server Load Balancing (SLB) instance of a VPC network, a secondary Elastic Network Interface (ENI) of a VPC network, a Network Address Translation (NAT) gateway, or a High-Availability Virtual IP Address (HAVip). You can also use EIPs with Internet Shared Bandwidth or Data Transfer Plan to reduce Internet data transfer costs.

Both public IP addresses and EIPs use the high-quality multi-line BGP network of Alibaba to provide quality services over the Internet. The biggest difference between these two types of IP addresses is whether you can disassociated the IP address from an ECS instance. You can disassociate an EIP from an ECS instance at any time and re-associate it when required. However, you cannot disassociate a public IP address from an ECS instance.

Limits

The limits on converting an automatically assigned public IP address of an ECS instance are as follows:
  • If the billing method of the ECS instance is pay-as-you-go, your account must not have overdue payments.
  • If the billing method of the ECS instance is subscription, you cannot convert the public IP address within 24 hours before the expiration date of the subscription.
  • If the billing method of the ECS instance is subscription, the billing method of the Internet bandwidth must be pay-by-traffic. If the billing method of the Internet bandwidth is pay-by-bandwidth, you can log on to the console and choose Upgrade/Downgrade to change the billing method to pay-by-traffic, and then convert the public IP address to an EIP. For more information, see Overview of instance upgrade and downgrade.
  • Only the VPC network-connected ECS instances that are in the Stopped or Running state are supported. The VPC network-connected ECS instances in other states are not supported.
  • Currently, ECS only allows you to convert automatically assigned public IP addresses to EIPs.
  • You cannot convert the public IP address of an ECS instance to an EIP if the instance has a pending upgrade or downgrade task in the queue.

Notes

Before you convert an automatically assigned public IP address to an EIP, read the following notes:
  • For a VPC network-connected ECS instance, the conversion process does not affect its access to the public network. The conversion process will not cause transient network disconnections.
  • During the conversion process, the public IP address can be retained for the ECS instance.
  • The conversion does not change the billing method of the Internet bandwidth.
  • After the public IP address is converted to an EIP for a VPC network-connected ECS instance, the EIP cannot be converted back to the public IP address.
  • After the conversion, the EIP will be billed separately, and a separate bill statement will be generated. For more information about EIP billing, seeBilling overview. In User Center, select Usage Record, and select to export the bill statement of the Elastic IP.

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 the region of the target ECS instance.
  4. On the Instances page, find the target ECS instance, choose More > Network and Security Group > Convert to EIP in the Actions column.
    Convert an automatically assigned public IP address to an EIP
  5. In the displayed dialog box, click OK.
  6. Refresh the instance list.
    After the conversion, the original public IP address is labeled as EIP.The automatically assigned public IP address is successfully converted to an EIP.