Updated on 2024-07-04 GMT+08:00

What Is an ENI?

An elastic network interface (ENI) is a virtual network card. You can create and configure ENIs and attach them to your cloud server instances (ECSs and BMSs) to build flexible and highly available networks.

ENI Types

  • A primary network interface is created together with an ECS instance by default, which cannot be detached from its ECS.
  • An extension network interface can be created and attached to an ECS, and can be detached from the ECS. The number of extension network interfaces that you can attach to an ECS varies by ECS flavor.

Application Scenarios

  • Flexible migration

    You can detach an ENI from a cloud server instance and then attach it to another instance. The ENI retains its private IP address, EIP, and security group rules. In this way, service traffic on the faulty instance can be quickly migrated to the standby instance, implementing quick service recovery.

  • Independent traffic management

    You can attach multiple ENIs that belong to different subnets in a VPC to the same instance, and specify them to carry the private network traffic, public network traffic, and management network traffic of the instance, respectively. You can configure access control policies and routing policies for each subnet, and configure security group rules for each ENI to isolate networks and service traffic.

Restrictions

  • An instance and its extension network interfaces must be in the same AZ, VPC, and subnet. However, they can belong to different security groups.
  • A primary network interface cannot be detached from its ECS.
  • The number of extension network interfaces that you can attach to an ECS varies by ECS flavor.