This topic describes how to create an elastic network interface (ENI) in the ECS console. You can use an ENI to deploy a high-availability cluster, and perform low-cost failover and fine-grained network management.
- Attach an ENI when you create an instance. For more information, see Attach an ENI. You can attach a maximum of two ENIs. One is the primary ENI and the other is the secondary ENI. A secondary ENI created in this way will be released with the instance if it is not detached from the instance. For information about how to detach an ENI, see Detach an ENI from an instance.
- Create a separate ENI. The created ENI can be attached to an instance. For more information, see Attach an ENI. An ENI created in this way can only be used as a secondary ENI.
Before you create an ENI, note the following limits:
- Each ENI must be in a VSwitch of a VPC.
- Each ENI must belong to at least one security group.
- A VPC and a VSwitch are created in the VPC.
- A security group is created in the same VPC.
To create an ENI, follow these steps:
- Log on to the ECS console.
- In the left-side navigation pane, choose .
- Click Create ENI.
- In the displayed dialog box, complete the following configurations:
- Network Interface Name: Enter a name for the ENI.
- VPC: Select a VPC. When you attach an ENI to an instance, they must be in the same VPC.
Note After an ENI is created, you cannot change the VPC.
- VSwitch: Select a VSwitch. When you attach an ENI to an instance, they must be in the same
zone, but they do not have to be in the same VSwitch.
Note After an ENI is created, you cannot change the VSwitch.
- Primary Private IP: Specify an IPv4 address as the private IP address of the ENI. The IPv4 address must be available in the CIDR block of the specified VSwitch. If you do not specify one, a private IP address is automatically assigned to your ENI after the ENI is created.
- Security Group: Select a security group in the selected VPC.
- Description: Optional. Enter a description for the ENI.
- Click OK.
On the Network Interfaces page, refresh the table. When the new ENI is in the Available state, it is created.
What to do next
After you create an ENI, you can: