Assigning Secondary Private IPs to an FNI

You can assign one or more secondary private IPs to a specified flexible network interface (FNI). This enables you to have multiple IPs for an instance in a Virtual Private Cloud (VPC).

When an FNI is attached to an instance, the maximum number of secondary private IPs is limited by the instance type. For more information, see Instance Types.

Assigning Secondary Private IPs to an FNI Using Cockpit

  1. Click Network/Security > Flexible Network Interfaces.

  2. Click the FNI to which you want to assign a secondary private IP.
    The FNI is selected.

  3. On the Private IPs tab, click Assign .
    The ASSIGN PRIVATE IP dialog box appears.

  4. In the Private IP box, type the secondary private IP you want to assign to the FNI.

  5. Click Assign.
    The secondary IP you specified is assigned to the FNI.

Assigning Secondary Private IPs to an FNI Using AWS CLI

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

Request sample
$ aws ec2 assign-private-ip-addresses \
  --profile YOUR_PROFILE \
  --network-interface-id eni-12345678 \
  --private-ip-addresses 10.0.0.4 \
  [--secondary-private-ip-address-count NOT_SPECIFIED] \
  --allow-reassignment \
  --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.

  • (optional) private-ip-addresses: One or more secondary private IPs to assign to the FNI within the IP range of the subnet.

  • (optional) secondary-private-ip-address-count: A number of secondary private IPs to assign to the FNI.

    You need to specify either the private-ip-addresses or the secondary-private-ip-address-count attributes.

  • (optional) allow-reassignment | no-allow-reassignment: If set to allow-reassignment, allows a private IP already assigned to another FNI in the same subnet to be reassigned to the specified FNI.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The secondary IPs are assigned to the FNI.

Related Pages

Corresponding API Method

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.