For example, A company acquired other company that has existing AWS Cloud running production workloads and is configured with custom VPC (not the default) and the VPC IP ranges somehow overlaps with each other. The plan is to merge the two networks through VPC peering but we all know that VPC peering won't let us do that because it has overlapping ranges. Our question is that what will be the recommended workaround in order to get make to two VPC connected (if possible through VPC peering only) to each other and NOTE that both VPC running production workloads.
You are correct, peering two VPC's with overlapping CIDR ranges is not supported by AWS (nor IPv4 in general). https://docs.aws.amazon.com/vpc/latest/peering/invalid-peering-configurations.html#overlapping-cidr
A VPC gateway might do what you are looking for.
Another possible alternative for this is using a NAT gateway be acceptable? VPC1 <-> NAT <-> VPC2. Set the address of the NAT to an address that does not overlap with either VPC's and use it (the NAT) as a type of translating gateway between the two VPCs?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With