Help Center/ Elastic IP/ User Guide/ Elastic IP/ Binding an EIP to an Instance
Updated on 2024-12-11 GMT+08:00

Binding an EIP to an Instance

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.

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

Notes and Constraints

  • 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.

Procedure

Binding an EIP to an instance, such as an ECS, a BMS, or a virtual IP address

  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.
    • 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.

Binding an EIP to a NAT gateway

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..

Binding an EIP to a load balancer

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.

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.