- Documentation
Elastic Compute Service
Elastic Compute Service
User Guide
Network
Network interface and IP address
IP Address
IPv4 address
Assigning/Reclaiming IPv4 addresses
IPv4 address
Assigning/Reclaiming IPv4 addresses
Assigning/Reclaiming IPv4 addresses
This topic describes how to assign private IPv4 addresses to or reclaim private IPv4 addresses of network interfaces associated with ECS instances.
- For the maximum number of secondary private IPv4 addresses that can be assigned to the primary network interface or a secondary network interface associated with an ECS instance, check the private IP quota per network interface for each ECS instance type.
- In the left-side navigation pane, select "Instances & Images > Instances".
- In the top menu bar, select the project and region of the target ECS instance.
- On the Instances page, click the name of the target ECS instance.
- On the "Network Interface" tab, click the name of the target network interface.
- On the "IP address management" tab, click the "Add Secondary Private IP" button.
- For the "Secondary Private IPv4 Address" parameter, use the dropdown to select automatic assignment or manual assignment.
- Auto-assign: The system automatically assigns an unused IPv4 address from the IPv4 CIDR block of the subnet to which the network interface belongs.
- Custom-assign: You need to manually enter an unused IPv4 address from the IPv4 CIDR block of the subnet to which the network interface belongs.
- Click "Add" to complete the operation.
- If the ECS image cannot identify the newly assigned IPv4 address of the network interface, log in to the ECS instance to configure this address. After this, you can use the newly assigned IPv4 address for instance communication.
- You can associate EIPs with the newly assigned secondary private IPv4 addresses of a network interface. This allows the interface to have multiple associated EIPs to effectively avoid service disruption caused by EIP blocking. For detailed operations, refer to Binding or unbinding an EIP.
- In the left-side navigation pane, select "Instances & Images > Images".
- In the top menu bar, select the project and region of the target ECS instance.
- On the Instances page, click the name of the target ECS instance.
- On the "Network Interface" tab, click the name of the target network interface.
- On the "IP address management" tab, click the "Release" button to the right of the target IP address.
- Click "Release" to complete the operation.
- AssignPrivateIpAddresses: Assigns secondary private IPv4 addresses to one specified network interface (primary network interface or secondary network interface).
Last updated: 2026.06.18 17:49:50