All Products
Search
Document Center

Elastic Compute Service:Unbind a secondary ENI

Last Updated:Sep 02, 2024

If an Elastic Compute Service (ECS) instance no longer requires a secondary elastic network interface (ENI), you can unbind the secondary ENI from the instance. This topic describes how to unbind a secondary ENI from an ECS instance.

Note

You cannot unbind the primary ENI from an ECS instance.

Prerequisites

  • The ECS instance from which you want to unbind a secondary ENI is in the Stopped or Running state.

    Instance types for which instances must be in the Stopped state

    The following table describes the instance types. For more information, see Overview of instance families.

    Instance family

    Instance type

    s6, shared standard instance family

    ecs.s6-c1m1.small, ecs.s6-c1m2.large, ecs.s6-c1m2.small, ecs.s6-c1m4.large, and ecs.s6-c1m4.small

    e, economy instance family

    ecs.e-c1m1.large, ecs.e-c1m2.large, and ecs.e-c1m4.large

    t6, burstable instance family

    ecs.t6-c1m1.large, ecs.t6-c1m2.large, ecs.t6-c1m4.large, ecs.t6-c2m1.large, and ecs.t6-c4m1.large

    t5, burstable instance family

    ecs.t5-c1m1.large, ecs.t5-c1m2.large, ecs.t5-c1m4.large, ecs.t5-lc1m1.small, ecs.t5-lc1m2.large, ecs.t5-lc1m2.small, ecs.t5-lc1m4.large, and ecs.t5-lc2m1.nano

    Previous-generation shared instance families xn4, n4, mn4, and e4

    • ecs.xn4.small

    • ecs.n4.small and ecs.n4.large

    • ecs.mn4.small and ecs.mn4.large

    • ecs.e4.small and ecs.e4.large

  • If elastic Remote Direct Memory Access (eRDMA) is enabled for the secondary ENI that you want to unbind, you must check whether applications are using eRDMA. If applications are using eRDMA, you must stop the applications. The eRDMA kernel module cannot unbind the eRDMA-enabled secondary ENI if you do not stop user-mode applications that are using eRDMA. An eRDMA-enabled secondary ENI is also referred to as a secondary elastic RDMA interface (ERI).

    View and stop applications that are using eRDMA

    1. Connect to a Linux ECS instance.

      For more information, see Connect to a Linux instance by using a password or key.

    2. Run the following command to view the reference count of the eRDMA kernel module:

      lsmod | grep erdma
      • If 0 is returned, no action is required.

        image

      • If a non-zero value is returned, eRDMA is being used by applications. You must stop the applications that are using eRDMA.

        image

    3. Query and stop the applications that are using eRDMA until the reference count of the eRDMA kernel module reaches 0.

      Sample command:

      image

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. Find a secondary ENI that is in the InUse state and click Unbind from Instance in the Operation column.

  5. In the Unbind from Instance message, confirm the information and click Confirm.

    If the status of the ENI changes to Available after you refresh the ENI list, the ENI is unbound from the instance.

References