Tuesday 21 September 2021

AWS Networking - Part V: Create Subnet Using AWS Console

When we have created a new VPC, we can start adding subnets to it. We are going to create two subnets. Subnet 10.10.0.0/24 is a Public Subnet in Availability Zone eu-west2c, where we later add an Internet GW. Subnet 10.10.0.0/24 is a Private Subnet in Availability Zone eu-west2a that will use a NAT GW for uni-directional Internet access.


Figure 1-18: VPC Route Table: Routes.


Create Subnets

Navigate back to VPC Dashboard and click the Subnets hyperlink either from the left or right columns.


Figure 1-19: VPC Dashboard: Subnets.


Figure 1-20 shows current subnets. All three subnets belong to default VPC. Note that I have added a name to each subnet. For example, subnet 172.31.0.0/20 is in Availability Zone eu.west-2c (euw-az1), and that is why I have used the 2c suffix after the DFLT-SUBN prefix. The Default Subnet = Yes in the first column in Details windows verifies that the subnet 172.31.0.0/20 (subnet-039ed36a) is the default subnet. We can also see that the Route Table rtb-8edeeae6 | DFLT-RTBL and Network ACL acl-57cc963f | DFLT-NACL are associated with the subnet. We are going to create new subnets, which we then add to our VPC NVKT-VPC-01. Click the Create subnet button to proceed.


Figure 1-20: VPC Route Table: Routes.

 

We start the subnet creation process by selecting the VPC, where we are adding a new subnet. Open the VPC Id drop-down menu. There’s two VPCs, the default one (vpc-cfbac1a7 | DFLT-VPC) and the one we have created (vpc-04ef72cc79a73f82 | NVKT-VPC ). At this phase, we can see why naming is such an important thing to do for each AWS resource and its properties. If we have several VPCs without the name tag, it would be hard to select the right one based on just autogenerated identifier (number/letter). When we have selected the right VPC, more properties appear.


Figure 1-21: VPC Subnets: Select VPC.

 

After selecting the correct VPC, we need to specify the subnet. We are creating a subnet 10.10.0.0/24. We are going to add it to Availability Zone eu-west-2c. If there is no need for a specific AZ, select the No Preference option from the drop-down menu, and Amazon will randomly choose the AZ. Manual AZ selection gives you the control to decide subnet location policy based on application/business needs. In the worst-case scenario, all your critical EC2 instances might end up in the same Availability Zone (=Physical Datacenter). The subnet name I have given describes that this is a Public subnet in AZ eu-west-2c. Note that the name tag is a Key/Value pair, where the Key is the "Name”, and the value is the actual name NWKT-Pub-euw2c. I will show later how we can use these tags when retrieving information from AWS using an AWS CLI.


Figure 1-22: VPC Subnets: Select VPC.

 

Figure 1-23 shows that we have successfully created a new subnet. Note that there is a filter that shows only the subnet we just created. Subnet uses the main routing table (rtb-069ac98ac692271fe) of VPC NVKT-VPC-01 by default. Also, VPC’s default Network ACL (acl-0dfc4c4ef28ae6491) is used with the subnet. 


Figure 1-23: VPC Subnets: Select VPC.


I have created Private subnet 10.10.1.0/24 in the same way as Public subnet 10.10.0.0/24 but on the Availability Zone eu-west-2a. Figure 1-24 shows both Public subnet 10.10.0.0/24 and Private subnet 10.10.1.0/24.


Figure 1-24: VPC Subnets: Select VPC.

In the next post, I will show how to create a subnet and assign it to VPC using the AWS CloudFormation template.

1 comment:

  1. Hi, I read your whole blog. This is very nice. Good to know about the AWS and is very demanding in future. We are also providing various AWS Training & Certification Courses, anyone interested can AWS certification for making their career in this field.

    ReplyDelete

Note: only a member of this blog may post a comment.