A default VPC with IPv4 CIDR other than 172.31.0.0/16

1

I want to setup VPC peering between regions. Both VPC shall have different CIDR. I want to delete a default VPC in the second region and make a default one with a different CIDR, 172.30.0.0/16 for example. New instances will automatically join the peering and have access to another region without a need to choose and setup their subnets IPs etc manually.

  • Have you been able to resolve your issue? If so, would you select an answer that matched your issue to close out the thread?

Cashier
질문됨 8달 전293회 조회
3개 답변
2

Technically you can have any CIDR range in a VpC even those outside of RFC1918.

However you should only use RFC1918 address space if you don’t want a headache.

You don’t need to bother with a default VPC. Best practice states not to use the default one anyhow.

Create a new VPC in a different region and peer with it.

profile picture
전문가
답변함 8달 전
0

Hi,

The valid networks to be used as CIDR blocks for private networks were initially defined by IETF in RCF1918:

Enter image description here

This table comes from following Wikipedia page: https://en.wikipedia.org/wiki/Private_network It is an interesting read when you design a new large network,

You have to stick to those if you want to avoid overlap (and then routing issues) with IP adresses officially assigned to IANA to companies or organizations.

Best,

Didier

profile pictureAWS
전문가
답변함 8달 전
profile picture
전문가
검토됨 8달 전
profile picture
전문가
검토됨 8달 전
0

I want to setup VPC peering between regions.

  • Good use case when only two VPC are involved, when you find the need to connect more and more VPCs together, consider using the Transit Gateway to simplify management.

Both VPC shall have different CIDR.

  • strongly recommended =)

I want to delete a default VPC in the second region and make a default one with a different CIDR, 172.30.0.0/16 for example.

  • You can delete the default VPC.
  • Create a new VPC with whatever range you want, so long as it's unique - you can use the console wizard to provision subnets and routing easily.
  • There's no reason to then designate it as the default VPC within that region. The "default VPC" designation doesn't come with any benefits.
  • The new VPC you create will have a VPC ID, reference it as needed in whatever is doing the provisioning.

New instances will automatically join the peering and have access to another region without a need to choose and setup their subnets IPs etc manually.

  • Well, you'll have to configure the subnet routing tables the first time on both ends. Once new instances are provisioned to either VPC thereafter, they'll be able to communicate together provided you take care of the security groups and NACLs correctly.
AWS
LondonX
답변함 8달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인