Home >Operation and Maintenance >Linux Operation and Maintenance >How to assign one or more secondary private IP addresses to an elastic network card
The content of this article is about how to allocate one or more auxiliary private IP addresses to an elastic network card. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
AssignPrivateIpAddresses
Assign one or more secondary private IP addresses to an elastic network card. At the same time, you can specify the CIDR private IP address of the virtual switch (VSwitch) for the network card, or automatically create a private IP address by specifying the number of private network addresses.
Description
Only supports elastic network cards in the Available (Available) or Bind (InUse) state.
When operating the main network card, the instance attached to the network card must be in the Running or Stopped state.
When the network card is in the Available state, up to 10 auxiliary private IP addresses can be allocated. Once mounted to an instance, the number of secondary private IP addresses that can be allocated by the network card will be limited by the instance specifications. For more details, see Instance Type Family.
Request parameters
##Return parameters
are all public return parameters. See Public Return Parameters.Example
Request example
https://ecs.aliyuncs.com/?Action=AssignPrivateIpAddresses &NetworkInterfaceId=eni-m5e709m1ytxc4wx7wXXX &PrivateIpAddress.1=192.168.0.1 &PrivateIpAddress.2=192.168.10.1 &<公共请求参数>
Return example
XML format
<AssignPrivateIpAddressesResponse> <RequestId>04F0F334-1335-436C-A1D7-6C044FE70008</RequestId> </AssignPrivateIpAddressesResponse>
JSON format
{ "RequestId": "04F0F334-1335-436C-A1D7-6C044FE70008" }
Error code
The following are error codes unique to this interface. For more error codes, please visit the API Error Center.The above is the detailed content of How to assign one or more secondary private IP addresses to an elastic network card. For more information, please follow other related articles on the PHP Chinese website!