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.
Click Network/Security > Flexible Network Interfaces.
Click the FNI to which you want to assign a secondary private IP.
The FNI is selected.
On the Private IPs tab, click Assign .
The ASSIGN PRIVATE IP dialog box appears.
In the Private IP box, type the secondary private IP you want to assign to the FNI.
The secondary IP you specified is assigned to the FNI.
To assign one or more secondary private IPs to an FNI, use the assign-private-ip-addresses command following this syntax:
$ 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:
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 to assign to the FNI within the IP range of the subnet.
secondary-private-ip-address-count: A number of secondary private IPs to assign to the FNI.
You need to specify either the
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.
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.