I am stopping and starting google compute instances, I have 3 GCE instances M1, M2, M3. In initial stage all 3 have unique External IP like
M1 = IP1
M2 = IP2
M3 = IP3
When I stop and start M1
instance it gets new external IP as IP4
But when I stop and start M2
instance it gets old IP of M1
i.e. IP1
.
Ex. After restarting instances
M1 = IP4
M2 = IP1
M3 = IP2
Essentially on restart of an instances GCE assigning old external IP addresses to instance which are released by other instances.
Is there any way to get unique IP address on each stop/start of instance? I also tried deleting and re-creating instance in new region, How I can ensure that instance will get unique IP address on stop/start or create/delete of an instance?