Unassigning Secondary Private IPs from a NIC
You can unassign one or more secondary private IPs from a network interface card (NIC) at any time.
You cannot, however, unassign the primary private IP of the NIC.
Unlinking Secondary Private IPs from a NIC Using Cockpit v2
-
In the NICs dashboard, click the details icon of the NIC you want to link a secondary private IP from.
The NIC details panel appears. -
Check the box of the private IP you want to unlink the NIC from.
The private IP is selected. -
Click Unlink.
A confirmation dialog box appears. -
Click Unlink.
The secondary private IP is unlinked from the NIC.
Unlinking Secondary Private IPs from a NIC Using OSC CLI
The UnlinkPrivateIps command unassigns one or more secondary private IPs from a network interface card (NIC).
$ osc-cli api UnlinkPrivateIps --profile "default" \
--NicId "eni-12345678" \
--PrivateIps '["10.0.0.6", "10.0.0.7"]'
This command contains the following attributes that you need to specify:
-
DryRun
: (optional) If true, checks whether you have the required permissions to perform the action. -
NicId
: The ID of the NIC. -
PrivateIps
: One or more secondary private IPs you want to unassign from the NIC.
The UnlinkPrivateIps command returns the following elements:
-
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
}
}
Unlinking Secondary Private IPs from a NIC Using oapi-cli
The UnlinkPrivateIps command unassigns one or more secondary private IPs from a network interface card (NIC).
$ oapi-cli --profile "default" UnlinkPrivateIps \
--NicId "eni-12345678" \
--PrivateIps '["10.0.0.6", "10.0.0.7"]'
This command contains the following attributes that you need to specify:
-
DryRun
: (optional) If true, checks whether you have the required permissions to perform the action. -
NicId
: The ID of the NIC. -
PrivateIps
: One or more secondary private IPs you want to unassign from the NIC.
The UnlinkPrivateIps command returns the following elements:
-
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
}
}
Unassigning Secondary Private IPs from an FNI Using AWS CLI
Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI. |
To unassign one or more secondary private IPs from an FNI, use the unassign-private-ip-addresses command following this syntax:
$ aws ec2 unassign-private-ip-addresses \
--profile YOUR_PROFILE \
--network-interface-id eni-12345678 \
--private-ip-addresses 10.0.0.4 \
--endpoint https://fcu.eu-west-2.outscale.com
This command contains the following attributes that you need to specify:
-
(optional)
profile
: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI. -
network-interface-id
: The ID of the FNI. -
private-ip-addresses
: One or more secondary private IPs you want to unassign from the FNI. -
endpoint
: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.
The specified secondary IPs are unassigned from the FNI.
Related Pages
Corresponding API Methods
AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.