Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VPC Peering - Overlapping IP Ranges - Workarounds

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.

like image 611
Edcel Cabrera Vista Avatar asked Nov 06 '22 22:11

Edcel Cabrera Vista


1 Answers

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?

like image 79
David J Eddy Avatar answered Nov 16 '22 06:11

David J Eddy