This topic describes how to associate multiple elastic IP addresses (EIPs) with a secondary elastic network interface (ENI) in NAT mode, and then associate the ENI with an Elastic Compute Service (ECS) instance.
Background information
- You can assign multiple secondary private IP addresses to a secondary ENI. If a secondary ENI is in the Available state, you can assign up to 10 secondary private IP addresses to the secondary ENI.
- Each secondary private IP address can be associated with an EIP in NAT mode. For more information about the NAT mode, see Association modes.
- ECS instances can communicate with the Internet only if they have public IP addresses. If you do not use a secondary ENI, each ECS instance can be assigned only one static public IP address or associated with only one EIP. To assign multiple public IP addresses to an ECS instance, you can associate EIPs with a secondary ENI, and then associate the secondary ENI with the ECS instance. If the ECS instance hosts multiple applications, each application uses an independent public IP address to communicate with the Internet. This way, you can improve the utilization of the ECS instance.
Scenarios
The following scenario is used as an example. A company created an ECS instance on Alibaba Cloud and associated an EIP with the ECS instance. To meet business requirements, the company needs to associate three EIPs with the ECS instance.

Prerequisites
- An ECS instance is created. For more information, see Create an instance by using the wizard.
- A secondary ENI is created and meets the following requirements:
- The secondary ENI and the ECS instance to be associated with the secondary ENI are deployed in the same virtual private cloud (VPC).
- The vSwitch of the secondary ENI and the vSwitch of the ECS instance to be associated with the secondary ENI are deployed in the same zone.
For more information, see Create an ENI.
- Three EIPs are created in the same region as the secondary ENI. For more information, see Apply for an EIP.
Procedure

Step 1: Assign multiple secondary private IP addresses to a secondary ENI
You can assign multiple secondary private IP addresses to a secondary ENI and associate the secondary ENI with an ECS instance. This ensures high utilization and service availability of the ECS instance.
Step 2: Associate EIPs with the secondary private IP addresses
Step 3: Associate the secondary ENI with the ECS instance
- Log on to the ECS console.
- In the left-side navigation pane, choose .
- In the top navigation bar, select the region where the ECS instance is deployed.
- On the Instances page, find the ECS instance, and choose in the Actions column.
- In the Bind Secondary ENI dialog box, select the secondary ENI to be associated and click OK.
Step 4: Configure the secondary private IP addresses
After you associate the secondary ENI with the ECS instance, you must configure the secondary private IP addresses for the ECS instance.
An ECS instance that runs CentOS 7 is used in the following example to describe how to configure secondary private IP addresses for an ECS instance. For more information see Configure secondary private IPv4 addresses in a Windows instance and Configure secondary private IPv4 addresses for an ECS instance that runs Linux.
ip address
command to view the configured secondary private IP addresses. 
Step 5: Test network connectivity
An ECS instance that runs CentOS 7 is used in the following example to describe how to test the connectivity between the ECS instance and the destination network.