All Products
Search
Document Center

Elastic Compute Service:Create an ENI

Last Updated:Mar 14, 2024

You can use elastic network interfaces (ENIs) to deploy high-availability clusters and perform cost-effective failover and fine-grained network management. This topic describes how to separately create an ENI.

Prerequisites

Background information

You can use one of the following methods to create an ENI. This topic describes how to separately create an ENI.

  • Create an ENI when you create an instance.

    When you create an instance, a primary ENI is automatically bound to the instance and you can bind only a secondary ENI to the instance. If the secondary ENI is not unbound from the instance before you release the instance, the secondary ENI is released together with the instance.

  • Separately create an ENI.

    To better manage and extend network capabilities of instances, such as adding more private IP addresses, building high-available network environments, and creating dedicated network traffic, you can separately create an ENI. Separately created ENIs are secondary ENIs that can be bound to instances.

Procedure

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Network & Security > Elastic Network Interfaces.

  3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  4. Click Create ENI.

  5. In the Create ENI dialog box, configure the parameters that are described in the following table.

    Parameter

    Description

    ENI Name

    Enter a name for the ENI.

    VPC

    Select a VPC. If you want to bind the created ENI to an instance, select the VPC in which the instance resides. After you create an ENI, you cannot change the VPC to which the ENI belongs.

    Note

    An ENI can be bound to only an instance that is in the same VPC as the ENI.

    VSwitch

    Select a vSwitch. If you want to bind the created ENI to an instance, select a vSwitch that is in the same zone as the instance. After you create an ENI, you cannot change the vSwitch to which the ENI is connected.

    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 be connected to different vSwitches.

    Security Group

    Select security groups in the selected VPC. You can specify up to five security groups.

    Note

    Basic security groups and advanced security groups cannot be selected at the same time.

    Primary Private IP

    Optional. Enter an IPv4 address as the primary private IP address of the ENI. The IPv4 address must be an idle IP address within the CIDR block of the selected vSwitch. If you do not specify an IPv4 address, an idle private IPv4 address is automatically assigned to the ENI after the ENI is created.

    Secondary Private IP Addresses

    Optional. Specify secondary private IP addresses for the ENI.

    • Not set: No secondary private IP addresses are assigned to the ENI.

    • Auto: Enter an integer in the range of 1 to 9 as the number of secondary private IP addresses that you want to assign to the ENI. The system automatically assigns the specified number of idle IP addresses from within the CIDR block of the selected vSwitch to the ENI.

    • Manual: Manually assign secondary private IP addresses to the ENI. You can specify up to nine secondary private IP addresses.

    Description

    Optional. Enter a description that can help you manage the ENI.

    Resource Group

    Optional. Select a resource group. Resources that are owned by multiple accounts and assigned to multiple projects can be added to resource groups for easy management. For more information about resource groups, see Resource groups.

    Tag

    Optional. Select one or more tags to add to the ENI for easy search and management. For more information about tags, see Overview.

  6. Click OK.

    If Available is displayed in the Status column of the ENI on the Network Interfaces page, the ENI is created.

What to do next

After you create an ENI, you can bind the ENI to an instance. For more information, see Bind an ENI.

References

CreateNetworkInterface