This topic describes how to associate multiple elastic IP addresses (EIPs) with a secondary elastic network interface (ENI) in multi-EIP-to-ENI mode. This mode allows you to use private and public IP addresses at the same time. You can view the status of the EIPs in the network interface controller (NIC) of the operating system.
- The multi-EIP-to-ENI mode is in public review. To set this mode, submit a ticket.
- A VPC-connected secondary ENI is created. The secondary ENI and the EIP to be associated with are deployed in the same region. For more information, see Create an ENI.
- The secondary ENI is not associated with any ECS instance.
If the secondary ENI is associated with an ECS instance, you must disassociate it from the ECS instance before you can associate an EIP with a secondary ENI in multi-EIP-to-ENI mode. For more information, see Detach an ENI from an instance.
- The secondary ENI supports both private and public IP addresses.
- EIPs are displayed on the NIC. After you configure a static IP address in the operating system, you can run the ifconfig or ipconfig command to query the public address of the ENI.
- EIPs that are associated with a secondary ENI in multi-EIP-to-ENI mode support all Internet protocols, such as H.323, SIP, DNS, RTSP, FTP, and TFTP.
- Each secondary ENI can be associated with a maximum of 10 EIPs.
- Log on to the EIP console.
- In the upper-left corner, select the region where the EIP is created.Note The multi-EIP-to-ENI mode is supported in the following regions: China (Shenzhen), China (Shanghai), China (Beijing), China (Zhangjiakou-Beijing Winter Olympics), China (Chengdu), Singapore, Germany (Frankfurt), India (Mumbai), US (Virginia), and UK (London).
- On the Elastic IP Addresses page, find the EIP that you want to associate, and then click Bind Resources in the Actions column.
- In the Bind Elastic IP Address to Resources dialog box, set the following parameters, and clickOK.
Parameter Description Instance Type Select Secondary ENI. Mode Select Multi-EIP to ENI Mode. Select an instance to bind Select the secondary ENI to be associated with the EIP.
- To associate more EIPs with the secondary ENI, repeat the preceding steps.
- Return to the Elastic IP Addresses page and click the ID of the associated ENI.
- On the Network Interfaces page, click Bind to Instance to associate the ENI with an ECS instance.Note
- In the multi-EIP-to-ENI mode, you can associate an EIP with the secondary ENI, and then associate the secondary ENI with an ECS instance. Supported ECS instance families are: ecs.c5-618, ecs.d1ne, ecs.db11-se1ne, ecs.ebma1, ecs.ebmc4, ecs.ebmg4, ecs.ebmg5, ecs.ebmg5ne, ecs.ebmgn5i, ecs.ebmgn5t, ecs.ebmhfg4, ecs.ebmhfg5, ecs.ebmi2, ecs.ebmi3, ecs.ebmr4, ecs.ebmr5, ecs.elmd1ne, ecs.elmdb, ecs.f1, ecs.f2, ecs.g5-618, ecs.gn3, ecs.gn5d, ecs.gn5i, ecs.gn5t, ecs.gn6p, ecs.gn6v, ecs.i2, ecs.r1, ecs.re4, ecs.re4e, ecs.sccg5, ecs.sccgn6, ecs.scch5, ecs.x1.i2, ecs.x1.i5, ecs.x1.i6, ecs.x1.i8, ecs.g5, ecs.c5, ecs.r5, ecs.t5, ecs.sn2ne, ecs.se1ne, and ecs.sn1ne. For more information, see Instance families.
- After you associate EIPs with the secondary ENI in the multi-EIP-to-ENI mode, you must enable DHCP for the ECS instance that is associated with the secondary ENI. Otherwise, the multi-EIP-to-ENI mode can not take effect.
- You can call the DescribeEipGatewayInfo operation to query the gateway and subnet mask information about the EIP. For more information, see DescribeEipGatewayInfo.
- Log on to the ECS instance and configure EIPs for the ECS instance. For more information,
see Assign a secondary private IP address for a Windows instance and Assign a secondary private IP address to a Linux instance.Notice When you configure EIPs for an ECS instance as described in the preceding topics, replace the secondary private IP address with an EIP, and replace the gateway and subnet mask of the secondary private IP address with those of the EIP.After you configure the EIP, you can run the ifconfig or ipconfig command to query the EIP.