You can create an ENI in the ECS console, and then attach it to an instance.. Note that you must have created an elastic network card individually first.
This topic describes how to create an ENI in the ECS console.
Before you create an ENI, note the following limits:
- Each ENI must be in a VSwitch of a VPC.
- Each ENI must be in one security group.
Before you create an ENI, you need to first:
- Create a VPC and then create a VSwitch in the VPC.
- Create a security group in the same VPC.
To create an ENI, follow these steps:
- Log on to the ECS console.
- In the left-side navigation pane, select .
- Select the target region.
- Click Create ENI.
- In the Create ENI dialog box, complete the following configurations:
- Network Interface Name: Specify 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.
After, in the Network Interfaces page, refresh the table. When the new ENI is in the Available status, it is created successfully.
What to do next
After you create an ENI, you can: