Create Subnet

Create Subnet

  1. In the VPC interface
  • Select Subnet

  • Select Create subnet

subnet

  1. In the interface ** Create subnet **
  • Select On-Premise VPC

subnet

  1. Perform subnet settings
  • Subnet name, enter ``` PublicSubnet-OnPremise**

  • Select AZ us-ease-1a

  • Ipv4 CIDR block , enter 10.12.1.0/24

  • Scroll down and click Create subnet*

subnet 4. Complete creating subnet

  1. Do the same to create additional subnets
  • PrivateSubnet1-Consumer belongs to Consumer VPC with CIDR of 10.11.1.0/24 located in Availability Zone us-east-1a

subnet

subnet

  • PrivateSubnet2-Consumer belongs to Consumer VPC with CIDR of 10.11.2.0/24 located in Availability Zone us-east-1b

subnet

subnet

  • PrivateSubnet1-Provider belongs to Provider VPC with CIDR of 10.10.1.0/24 located in Availability Zone us-east-1a

subnet

  • PrivateSubnet2-Provider belongs to Provider VPC with CIDR of 10.10.2.0/24 located in Availability Zone us-east-1b

subnet

  • PublicSubnet-Provider belongs to Provider VPC with CIDR of 10.10.3.0/24 located in Availability Zone us-east-1a

subnet

You can see there are 2 columns, Availability Zone and Availability Zone ID. To avoid EC2 resources being used unevenly, (we often tend to use AZ a to run primary and AZ b to stand by, for example), AWS will randomly assign Availability Zone to ** Availability Zone ID**. We can understand that Availability Zone is a form of alias, and Availability Zone ID is the identifier. For example, in the image above Availability Zone ap-southeast-1a is assigned Availability Zone ID as apse1-az2. In another AWS account, Availability Zone ap-southeast-1a might have an Availability Zone ID of apse1-az1.

Enable Enable auto-assign public IPv4 address for Public subnets

  • Select PublicSubnet-OnPremise , select Actions, select Edit subnet settings

subnet

  • Select Enable auto-assign public IPv4 address

  • Click Save

subnet

The same is done with PublicSubnet-Provider

  • Select PublicSubnet-OnPremise , select Actions, select Edit subnet settings

  • Select Enable auto-assign public IPv4 address

  • Click Save

subnet

Another notable point is that the subnets are basically the same. Through route table configuration and public IP address allocation, we can divide them into Public and Private Subnets.