Search code examples
amazon-web-servicesdocker-swarmamazon-vpc

Does AWS assign private-ips in a subnet incrementally or randomly


Does AWS assign private-ips in a subnet incrementally or randomly?

Background

I'm trying to figure out if when an instance in a subnet is deleted and another is automatically created in its place, will it have the private ip of the old deleted node or will it have a new random one?

More Background

I need this to figure out if when a swarm node is deleted and another node comes up in its place with the same advertise-addr whether it will have the same node id as the previous node.


Solution

  • It will be assigning private IPs randomly from within the subnet range