Convert a static public IP address to an EIP

Updated at:

Convert a static public IP address to an Elastic IP Address (EIP) to freely reassign it across cloud resources, such as ECS instances, SLB instances, and NAT gateways.

Static public IP address vs. EIP

Both provide Internet access but differ in assignment and flexibility.

Feature

Static public IP address

EIP

Assignment

Assigned when you create a VPC-type ECS instance, or later by modifying the bandwidth configuration. See Static public IP addresses.

Purchased and managed independently. See Elastic IP addresses.

Flexibility

Bound to a single ECS instance. Cannot be reassigned.

Can be reassigned to another resource at any time.

Billing impact

The public bandwidth billing method stays the same, but the EIP is billed separately with different billing items. Configuration and association fees may apply. See EIP billing.

Important

Changing the EIP billing method from pay-as-you-go to subscription after conversion may cause a price difference. See Why is there a price difference after converting a public IP address to an EIP?

Limitations

Warning

This conversion is irreversible. To obtain a new static public IP address, disassociate the EIP and modify the instance's public bandwidth. See Modify the bandwidth configurations of subscription instances or Modify the bandwidth configurations of pay-as-you-go instances. You can also call ModifyInstanceNetworkSpec to assign a new static public IP address.

  • The IP address remains the same after conversion.

  • The static public IP address cannot be on a BGP (Multi-ISP) Pro line in the China (Hong Kong) region.

  • If you plan to enable economical mode for a pay-as-you-go instance, we recommend that you first convert the static public IP address to an EIP to prevent the static public IP address from being reclaimed after economical mode is enabled. After economical mode is enabled, computing resources (vCPUs and memory) and the static public IP address are released. The EIP is not affected by economical mode and remains retained as an independent resource. For more information, see Economical mode for pay-as-you-go instances (including spot instances).

Prerequisites

Make sure that:

  • The ECS instance is in a VPC and has a static public IP address

  • The ECS instance is in the Running or Stopped state

  • For subscription instances, public bandwidth uses pay-by-traffic. If billed by pay-by-bandwidth, switch to pay-by-traffic first. See Change from pay-by-bandwidth to pay-by-traffic

  • For subscription instances, the instance is not within 24 hours of expiration

  • For pay-as-you-go instances, your account has no overdue payment

  • Any recent instance type change has taken effect

Convert a static public IP address to an EIP

Note

You can also call ConvertNatPublicIpToEip to perform this conversion. Use SDK version 4.3.0 or later. See Install and use ECS SDKs.

  1. Go to the Instances page of the ECS console.

  2. In the top navigation bar, select the region and resource group.

  3. Find the target instance (network type: VPC). Click All Actions > Network and Security Group > Convert to EIP.

  4. In the dialog box, click Confirm.

  5. Refresh the instance details page.

Verify the result

After conversion, the Public IP Address field is empty and the converted IP address appears in the EIP field.

Click the IP address to open the Elastic IP Addresses console to manage the EIP.

Next steps

After the conversion, you can: