简体   繁体   中英

VPC Peering if both side VPC CIDR range is same?

Is there is any workaround if we have the same vpc cidr (different aws account )at both ends and we want VPC peering? Or any other mechanism which can help me to connect between two same VPC CIDR but in different aws account??

The peering connection requires non-overlapping CIDRs.

Ensure that your VPCs do not have overlapping IPv4 CIDR blocks . If they do, the status of the VPC peering connection immediately goes to failed. This limitation applies even if the VPCs have unique IPv6 CIDR blocks.

A way to deal with such cases is to use secondary CIDR range . Such setup is exemplified in the AWS doc:

In the example, VPC A has overlapping CIDR range with VPC B and C. To establish peering connection, extra CIDR ranges are used.

There is a good article in AWS blog which provides several solutions depending on your needs:

  • Renumber IP.networks
  • Use AWS PrivateLink
  • Use multiple IP address ranges in VPCs
  • Hide su.nets using Private NAT Gateway

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM