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 bind an ENI when you create an instance or separately create an ENI and bind it to an existing instance.

Prerequisites

  • If you want to bind an ENI when you create an instance, the preparations for instance creation must be complete. For more information, see Create an instance by using the provided wizard.
  • If you want to separately create an ENI and bind the ENI to an existing instance, take note of the following items:
    • A secondary ENI is created and is in the Available state. For more information, see Create an ENI.
    • The instance to which the ENI is to be bound is of an I/O optimized instance type and is in the Stopped or Running state. The network type of the instance is VPC.
    • The instance and the ENI are in the same VPC.
    • The VSwitch of the ENI are in the same zone as the instance.
    • The maximum number of ENIs that can be bound to the instance is not reached.
      Note An ENI can be bound to only one ECS instance at a time. However, an ECS instance can have multiple ENIs. For information about the maximum numbers of ENIs that can be bound to instances of different instance types, see Instance families.
    • If the last start time of the instance is earlier than April 1, 2018 and the instance remains in the Running state, you must restart the instance. Otherwise, you cannot bind ENIs to the instance. Applicable scenarios include starting new instances, and restarting and reactivating instances.
      Notice To restart an ECS instance, you must use the ECS console or call the RebootInstance operation. You cannot restart an instance from within the operating system.

Background information

You can use one of the following methods to bind an ENI to an instance:

Bind an ENI when you create an instance

For information about how to create an instance, see Create an instance by using the provided wizard. When you bind an ENI during instance creation, take note of the following items:
  • Basic configurations:
    • Region: ENIs are available in all regions.
    • Instance Type: Select an I/O optimized instance type that supports ENIs. For more information, see Instance families.
    • Image: The following images can automatically identify ENIs without the need to configure the ENIs.
      • CentOS 7.3 64-bit
      • CentOS 6.8 64-bit
      • Windows Server 2008 R2 and later

      If you select an image that is not in the preceding list, you must configure the ENIs so that they can be identified after the instance is created. For more information, see Configure an ENI.

  • Networking:
    • Network Type: You must select VPC. Select a VPC and a VSwitch for the instance.
    • Elastic Network Interface: Click Add ENI to create an ENI. The ENI and the instance must be in the same zone but can belong to different VSwitches.

Bind an ENI to an existing instance on the Instances page

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Instances.
  3. In the top navigation bar, select a region.
  4. Find the instance to which you want to bind an ENI, and choose More > Network and Security Group > Bind Secondary ENI in the Actions column.
  5. In the Bind Secondary ENI dialog box, select a secondary ENI and click OK.

Bind an ENI to an existing instance on the Network Interfaces page

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Network & Security > ENIs.
  3. In the top navigation bar, select a region.
  4. Find the available secondary ENI and click Bind to Instance in the Actions column.
  5. In the Bind to Instance dialog box, select an instance and click OK.
    Refresh the list. If the status of the ENI is Bound, the ENI is bound to the instance.

What to do next

For some images used by ECS instances, you may need to manually configure the ENIs so that they can be identified by the instances. For more information, see Configure an ENI.