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

  1. In the NICs dashboard, click the ID of the NIC you want to link a secondary private IP from.
    The NIC details panel appears.

  2. On the Private IPs tab, click inside the dashboard to make checkboxes appear.

  3. Check the box of the private IP you want to unlink the NIC from.
    The private IP is selected and an action menu appears.

  4. Click IconUnlink Unlink.
    A confirmation dialog box appears.

  5. 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).

Request sample
$ 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.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Unassigning Secondary Private IPs from an FNI Using AWS CLI

To unassign one or more secondary private IPs from an FNI, use the unassign-private-ip-addresses command following this syntax:

Request sample
$ 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.

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.