Assign ENIs to different network cards on supported instance types to maximize bandwidth utilization.
Check whether an instance type supports network card indexes
Call the DescribeInstanceTypes operation and check the following parameters in the response:
-
NetworkCardQuantity: the maximum number of network cards supported. Empty if the instance type does not support network card indexes.
-
NetworkCards: details of each network card. Returned when the instance type supports multiple network cards.
-
NetworkCardInfo: details of a single network card.
-
NetworkCardIndex: the index of a network card.
-
-
Specify a network card index when you attach an ENI
Call the AttachNetworkInterface operation with NetworkInterfaceId set to the ENI ID, InstanceId set to the ECS instance ID, and NetworkCardIndex set to the target network card index. For supported indexes, see Check whether an instance type supports network card indexes.
View the network card index of an attached ENI
Call the DescribeNetworkInterfaceAttribute operation. The NetworkCardIndex parameter in the response indicates the network card index assigned to the ENI.
-
Empty if the ENI is in the Available state or no network card index was specified during attachment.
-
Returns the specified network card index if the ENI is in the InUse state and a network card index was specified during attachment.