- Documentation
Virtual Private Cloud
User Guide
Network interface
Attaching/Detaching a secondary network interface
Network interface
Attaching/Detaching a secondary network interface
Attaching/Detaching a secondary network interface
Scenarios
This topic introduces how to mount/unmount a secondary network interface for an Elastic Compute Service (ECS) instance.
Attach secondary network interface
You can attach secondary network interfaces to your ECS instances to enable flexible and highly available network architecture.
Prerequisites
- The ECS instance and the secondary network interface must reside in the same VPC and the same Availability Zone.
- The ECS instance status is Running or Stopped.
- The number of assigned private IPv4 addresses and private IPv6 addresses on the secondary network interface must be within the per-network interface IP quota supported by the instance type.
Action description
- After a network interface is successfully attached, the number of private IPv4 addresses and private IPv6 addresses is limited by the ECS instance type. For details, see the instance type introduction.
Procedures
- In the left-side navigation pane, select Network Interface.
- In the top menu bar, select the target project and region.
- Click Attach on the right side of the target Network Interface.
- On the Select Instance page that pops up on the right, select the ECS instance that requires a secondary network interface to be mounted.
tip
On the Select Instance page, you can view the number of private IP addresses bound to the current network interface and the quota of private IP addresses for a single network interface in the specification of the target instance.
- Click Migrate to complete the action.
What to do next
After attaching a secondary network interface to an ECS instance, some images cannot automatically recognize the secondary network interface’s private IP address or add the corresponding route. You need to configure it manually. For details, refer to Configuring a secondary network interface in ECS. Detach secondary network interface
For secondary network interfaces that are no longer in use, you may detach them after fully evaluating the potential impact on your current services.
warning
The primary network interface cannot be detached. Its lifecycle is bound to the ECS instance.
Prerequisites
The ECS instance status is Running or Stopped.
Action description
Procedures
- In the left-side navigation pane, select Network Interface.
- In the top menu bar, select the target project and region.
- Click Detach on the right side of the target Network Interface.
- Click Detach to complete the actions.
What to do next
Related documents
Last updated: 2026.10.29 19:43:08