Two different resources in my VPC have the same private IP address
You may find that two or more resources in your VPC have the same private IP address. This causes issues with network communication, as IP address conflicts can lead to intermittent connectivity, data routing errors, and service disruptions.
Cause
This can happen if you have created two Private Networks with overlapping subnets in the same VPC.
DHCP assigns resources' private IP addresses from the CIDR block that was defined for the Private Network when you created it. If two different Private Networks have overlapping CIDR blocks, the DHCP service may allocate the same IP address to one resource on Private Network A, and another resource on Private Network B.
Solution
The CIDR block for a Private Network cannot be modified after creation of the Private Network.
The solution when two Private Networks have overlapping CIDR blocks is to:
-
Detach all resources from one of the Private Networks with a CIDR block that overlaps another in the VPC.
-
Create a new Private Network in the VPC, with a new, non-overlapping CIDR block.
-
Attach the required resources to the new Private Network, where they will automatically be assigned new private IP addresses on the network by DHCP.
Resources in the VPC should now all have unique private IP addresses. Traffic should be routed successfuly.