Skip to content

risk for Secondary private IP address to be assigned automatically to another instance

0

Hello

I have set a secondary private IP address to the network interface of one of my EC2 instances. I've choosed to allow the secondary private IP address to be reassigned, so I can assign it to another instance easily if I need to. My question is : if another instance from the same subnet and CIDR range is created, is there a risk to see the secondary IP address automatically assigned as a primary address to the new instance (with dhcp mecanism ?)

Thank you

1 Answer
0
Accepted Answer

Hello.

If you do not explicitly specify an IP address, an available IP address will be automatically selected from the VPC subnet, so there will be no duplication of IP addresses between EC2s.
Also, even if you explicitly specify an IP address when starting EC2, if you set an IP address that is already in use within the subnet, an error will occur and the EC2 will not start.
https://docs.aws.amazon.com/vpc/latest/userguide/vpc-ip-addressing.html#vpc-private-ipv4-addresses

EXPERT
answered a year ago
EXPERT
reviewed a year ago
EXPERT
reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.