Manage the IP addresses for your network interface
You can manage the following IP addresses for your network interfaces:
Elastic IP addresses (one per private IPv4 address)
To manage the Elastic IP addresses of a network interface using the console
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/
. -
In the navigation pane, choose Network Interfaces.
-
Select the checkbox for the network interface.
-
To associate an Elastic IP address, do the following:
-
Choose Actions, Associate address.
-
For Elastic IP address, select the Elastic IP address.
-
For Private IPv4 address, select the private IPv4 address to associate with the Elastic IP address.
-
(Optional) Choose Allow the Elastic IP address to be reassociated if the network interface is currently associated with another instance or network interface.
-
Choose Associate.
-
-
To disassociate an Elastic IP address, do the following:
-
Choose Actions, Disassociate address.
-
For Public IP address, select the Elastic IP address.
-
Choose Disassociate.
-
To manage the IPv4 and IPv6 addresses of a network interface using the console
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/
. -
In the navigation pane, choose Network Interfaces.
-
Select the network interface.
-
Choose Actions, Manage IP addresses.
-
Expand the network interface.
-
For IPv4 addresses, modify the IP addresses as needed. To assign an IPv4 address, choose Assign new IP address and then specify an IPv4 address from the subnet range or let AWS choose one for you. To unassign an IPv4 address, choose Unassign next to the address.
-
To assign or unassign a public IPv4 address to a network interface, choose Auto-assign public IP. This option can be enabled or disabled for any network interface but will only apply to the primary network interface (for example, eth0).
-
For IPv6 addresses, modify the IP addresses as needed. To assign an IPv6 address, choose Assign new IP address and then specify an IPv6 address from the subnet range or let AWS choose one for you. To unassign an IPv6 address, choose Unassign next to the address.
-
(Optional) If your modifying a network interface in a dual-stack or IPv6-only subnet, you have the option to Assign Primary IPv6 IP. Assigning a primary IPv6 address enables you to avoid disrupting traffic to instances or ENIs. Choose Enable if the instance that this ENI will be attached to relies on its IPv6 address not changing. AWS will automatically assign an IPv6 address associated with the ENI attached to your instance to be the primary IPv6 address. Once you enable an IPv6 GUA address to be a primary IPv6, you can't disable it. When you enable an IPv6 GUA address to be a primary IPv6, the first IPv6 GUA will be made the primary IPv6 address until the instance is terminated or the network interface is detached. If you have multiple IPv6 addresses associated with an ENI attached to your instance and you enable a primary IPv6 address, the first IPv6 GUA address associated with the ENI becomes the primary IPv6 address.
-
Choose Save.
To manage the IP addresses of a network interface using the AWS CLI
You can use one of the following commands. For more information about these command line interfaces, see Access Amazon EC2.
To manage the IP addresses of a network interface using the Tools for Windows PowerShell
You can use one of the following commands.