Updated on 2025-02-21 GMT+08:00

Binding or Unbinding an EIP

Scenarios

After EIPs are assigned, you can bind them to resources such as ECSs, BMSs, virtual IP addresses, NAT gateways, and load balancers to allow them to access the Internet.

If your instance no longer requires an EIP, you can unbind the EIP from it. If you want to bind an EIP to your instance, unbind the EIP from the original instance first.

If you do not release the pay-per-use EIP after unbinding it, the EIP will be billed. For details, see Releasing or Unsubscribing From an EIP.

An EIP and its bound cloud resource can use different billing modes.

Notes and Constraints

Binding an EIP
  • An EIP can only be bound to an instance from its same region.
  • An EIP can only be bound to an instance from its same account.
  • An EIP cannot be bound to a frozen instance.
Unbinding an EIP
  • An EIP cannot be unbound if its server is suspected of violations and the EIP is frozen by the national supervision department.
  • Your account will be frozen if it is in arrears and you cannot perform any operations on pay-per-use resources in the retention period. After you top up your account, you will be billed for expenditures generated by the pay-per-use EIPs. You can view the expenditures on the Overview page of the Billing Center.

Binding an EIP to an Instance

Bind EIPs to resources such as ECSs, BMSs, virtual IP addresses, NAT gateways, and load balancers to allow them to access the Internet.

  1. In the EIP list, locate the row that contains the EIP, and click Bind.
  2. Select the instance.
  3. Click OK.

    To bind an instance to an EIP:

    • If the instance is an ECS:
      • The ECS must be in the running or stopped status.
      • The ECS must be in the same region as that of the EIP.
      • The ECS has no EIP bound to it.
    • If the instance is a virtual IP address:
      • The virtual IP address must be in the same region as that of the EIP.
      • The virtual IP address must be in the available or assigned status.
    • If the instance is a BMS:

      The BMS must be in the same region as that of the EIP.

If you want to bind a NAT gateway to an EIP, the NAT gateway must be in the same region as that of the EIP. After an EIP is bound to a NAT gateway, ECSs associated with this gateway can share the EIP to access the Internet or provide services accessible from the Internet.

You can bind an EIP to a NAT gateway by configuring SNAT and DNAT rules for the gateway. For details, see Configuring SNAT Rules to Enable Servers to Access the Internet and Configure DNAT Rules to Enable Servers to Provide Services Accessible from the Internet..

If you want to bind a load balancer to an EIP, the load balancer must be in the same region as that of the EIP. Then, the load balancer can receive requests over the Internet. For details, see Binding or Unbinding an EIP.

Unbinding an EIP from an Instance

If an EIP is no longer required, you can unbind it from your instance.

Unbinding a single EIP

  1. Go to the EIP list page.
  2. On the displayed page, locate the row that contains the target EIP, and click Unbind in the Operation column.

    A confirmation dialog box is displayed.

  3. Click Yes in the displayed dialog box.

    In the EIP list, the target EIP has no associated instance.

Unbinding multiple EIPs at a time

  1. Go to the EIP list page.
  2. On the displayed page, select the EIPs to be unbound.
  3. In the upper left corner of the EIP list, click Unbind.

    A confirmation dialog box is displayed.

  4. Click Yes in the displayed dialog box.

    In the EIP list, the target EIPs have no associated instances.

You can unbind an EIP from a NAT gateway by deleting the SNAT and DNAT rules. For details, see Deleting a DNAT Rule and Deleting an SNAT Rule.

You can unbind an EIP from a load balancer on the ELB console. For details, see Binding or Unbinding an EIP.

If a pay-per-use EIP is unbound from an instance, the EIP will be billed to keep it allocated to your account unless it is released.

If an EIP billed by bandwidth is unbound from an instance, the bandwidth will continue to be billed.

If you have any questions about the billing, see Why Am I Still Being Billed After My EIP Has Been Unbound or Released?

No Instance Available for EIP Binding

  • There are no instances available when you want to bind an instance to an EIP.
    You have instances, but an EIP cannot be bound to any of them.
    • An EIP cannot be bound to an instance from a different region.
    • An EIP cannot be bound to an instance from a different account.
    • The instance is frozen and cannot have an EIP bound.

    There are no instances.

    Buy an ECS, create a BMS, or assign a virtual IP address.