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ヶ月前291ビュー
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ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン