An elastic IP address (EIP) is a public IP address that you can purchase and use as an independent resource. If you want to retain a public IP address after its associated Elastic Compute Service (ECS) instance is released for use with other instances, use an EIP.
EIPs are NAT IP addresses that are located in the public gateway of Alibaba Cloud. By means of NAT, EIPs are mapped to the network interface controllers (NICs) in internal networks of the ECS instances that are associated with the EIPs. You can associate EIPs with ECS instances that reside within virtual private clouds (VPCs) to enable the instances to communicate over the Internet. However, you cannot view the EIPs on the NICs of the ECS instances.
Public IP addresses are automatically assigned to ECS instances when you configure public bandwidth for the instances. Compared with these public IP addresses, EIPs provide greater flexibility for purchase and management. The following table compares public IP addresses assigned to ECS instances and EIPs.
|Item||Public IP address assigned to an ECS instance||EIP|
|Can the IP address be independently purchased and used?||No||Yes|
|Can the IP address be associated with or disassociated from an ECS instance as needed?||No||Yes|
|Can the bandwidth value for the IP address be adjusted in real time?||Yes||Yes|
EIPs can be billed on a pay-as-you-go or subscription basis. For more information, see Billing overview.
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 resides within a VPC.
- The ECS instance resides within 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 IP address of the primary NIC of the ECS instance.
Create an EIP
You can create an EIP and associate it with an ECS instance that resides within a VPC and that is not assigned public IP addresses. For more information, see Apply for an EIP.
You can associate an ECS instance that resides within a VPC with multiple public IP addresses, including the public IP addresses assigned by ECS and EIPs. For more information, see Associate EIPs with secondary ENIs in multi-EIP to ENI mode (new applications are not accepted).
Release an EIP
If you no longer need an EIP, you can disassociate it from the ECS instance and then log on to the EIP console to release it. For more information, see Disassociate an EIP from a cloud resource.