An elastic IP address (EIP) is a public IP address that you can purchase and use as an independent resource. EIPs can be retained independently and associated with or disassociated from Elastic Compute Service (ECS) instances in virtual private clouds (VPCs).
Overview
EIPs are NAT IP addresses that are located in the public gateway of Alibaba Cloud. By means of NAT, EIPs are mapped to the primary elastic network interfaces (ENIs) of the ECS instances that are associated with the EIPs. You can associate EIPs with ECS instances that are located in VPCs to enable the instances to communicate over the Internet. Similarly to system-assigned public IP addresses (PublicIP addresses), EIPs remain invisible inside the operating systems of ECS instances.
Advantages
ECS instances located in VPCs support both PublicIP addresses and EIPs. For information about the use scenarios of and differences between these public IP addresses, see IP addresses of ECS instances within VPCs.
The following table describes the advantages of EIPs over PublicIP addresses.
Item | PublicIP address | EIP |
---|---|---|
Can the public IP address be independently purchased and used? | No | Yes |
Can the public IP address be associated with or disassociated from an ECS instance as needed? | No | Yes |
Is the public IP address retained when the associated ECS instance is released? | No | Yes |
Maximum number of public IP addresses per ECS instance | 1 | In multi-EIP-to-ENI mode, multiple EIPs can be associated with a single ECS instance. For more information, see Associate EIPs with secondary ENIs in multi-EIP-to-ENI mode (new applications are not accepted). |
Billing methods
EIPs support the subscription and pay-as-you-go billing methods. For more information, see Billing overview.
Limits
EIPs can be associated with ECS instances or ENIs. An EIP can be associated only with an ECS instance that meets the following requirements:
- The ECS instance is located in a VPC.
- The ECS instance is located in the same region as the EIP.
- The ECS instance is in the Running or Stopped state.
- No public IP addresses are associated with the primary ENI of the ECS instance.
Operations
- Create an EIP
You can go to the Elastic IP Addresses page in the VPC console to create an EIP and associate the EIP with an ECS instance that is located in a VPC and is not assigned public IP addresses. For more information, see Apply for an EIP.Note In multi-EIP-to-ENI mode, multiple EIPs can be associated with a single ECS instance. For more information, see Associate EIPs with secondary ENIs in multi-EIP-to-ENI mode (new applications are not accepted).
- Associate an EIP with an ECS instance
- You can log on to the ECS console and associate an EIP with an ECS instance that is located in a VPC and is not assigned public IP addresses. For more information, see Associate an EIP with an instance.
- You can also go to the Elastic IP Addresses page in the VPC console and associate an EIP with an ECS instance that is located in a VPC and is not assigned public IP addresses. For more information, see Associate an EIP with an ECS instance.
- Associate an EIP with a secondary ENI
You can go to the Elastic IP Addresses page in the VPC console and associate an EIP with a secondary ENI. Each ENI is automatically assigned a private IP address. After you associate an EIP with an ENI, the ENI has both a private IP address and a public IP address. For more information, see Overview.
- Disassociate an EIP from an ECS instance
- If your ECS instance no longer needs an EIP, you can disassociate the EIP from the instance in the ECS console. For more information, see Disassociate an EIP from an instance.
- You can also disassociate the EIP from the ECS instance on the Elastic IP Addresses page in the VPC console. For more information, see Disassociate an EIP from a cloud resource.
- Release an EIP
Billing of an EIP continues after it is disassociated. If you no longer need the EIP, go to the Elastic IP Addresses page in the VPC console to release the EIP. For more information, see Release a pay-as-you-go EIP.
For more information, see EIP overview.