You can use elastic network interfaces (ENIs) to deploy high-availability clusters and perform low-cost failover and fine-grained network management. This topic describes how to separately create an ENI in the Elastic Compute Service (ECS) console.
- Create an ENI when you create an instance.
When you create an instance, you can bind only one primary and one secondary ENIs to the instance. If the secondary ENI is not unbound from the instance, the secondary ENI is released together with the instance. For more information, see Bind an ENI when you create an instance.
- Separately create an ENI.
ENIs that are separately created are secondary ENIs and can be bound to instances.
After ENIs are created, deleted, bound to instances, or unbound from instances, ENI operation events are triggered. You can use CloudMonitor to set notifications of ENI operation events to obtain the ENI operation results such as whether ENIs are created. For more information, see ENI operation event notifications.
- Log on to the ECS console.
- In the left-side navigation pane, choose .
- In the top navigation bar, select a region.
- Click Create ENI.
- In the Create ENI dialog box, configure the parameters described in the following table.
Parameter Description ENI Name Enter a name in the ENI Name field. VPC Select the VPC where the instance is deployed. After an ENI is created, its VPC cannot be changed.Note An ENI can be bound to only an instance that is in the same VPC as the ENI. VSwitch Select a vSwitch that is in the same zone as the instance. After an ENI is created, you cannot change its vSwitch.Note An ENI can be bound to only an instance that is in the same zone as the ENI. The instance and the ENI can connect to different vSwitches. Primary Private IP (Optional) Enter the primary private IPv4 address of the ENI. The IPv4 address must be an idle IP address within the CIDR block of the vSwitch. If you do not specify an IPv4 address, an idle private IPv4 address is automatically assigned to your ENI after the ENI is created. Secondary Private IP Addresses (Optional) Set the secondary private IP addresses of the ENI.
- Not set: No secondary private IP addresses are assigned to the ENI.
- Auto: You can enter an integer from 1 to 9 as the number of secondary private IP addresses that you want to assign to the ENI. The system automatically assigns the corresponding number of idle IP addresses in the vSwitch to the ENI.
- Manual: You can manually add secondary private IP addresses to the ENI. You can specify up to nine secondary private IP addresses.
Security Group Select security groups in the specified VPC. You can specify one to five security groups.Note Basic security groups and advanced security groups cannot be selected at the same time. Description (Optional) Enter the description of the ENI for future management. Resource Group (Optional) Select a resource group to which to add the ENI. For more information about resource groups, see Resource groups. Tag (Optional) Select one or more tags to be added to the ENI. For more information about tags, see Overview.
- Click OK.
What to do next
After you separately create an ENI, you can bind it to an instance. For more information, see Bind an ENI.