AWS

VPC – Subnet – IGW – Route table in AWS

VPC – Subnet – IGW – Route table

In this blog, I will show you how to create a virtual private cloud (VPC), Subnet, Internet Gateway, and route tables in the AWS Management console.

VPC – Subnet – IGW – Route table

How to Create VPC

1- Login to your AWS account and go to the AWS Services tab and then select VPC under Networking & Content Delivery.

aws management console services

2- Select Your VPCs under virtual private cloud

aws launch vpc wizard

3- Click on Create VPC.

aws create vpc

4- Create VPC wizard,
Name tag – My-VPC.
IPv4 CIDR block – 192.168.0.0/16.
Tenancy – default
Click Create

aws create vpc

5- Click close

the following vpc was created

6- Now you can see two VPC created.

your vpcs

How to Create Subnet in AWS

1- Select Subnets and then click on Create Subnet.

subnets aws

2- Name tag – My-Subnet.
VPC – Select the VPC that you created earlier (My-VPC)
Availability Zone – Select an Availability zone.
IPv4 CIDR block – Enter valid CIDR block. For example (192.168.0.0/24)
Click Create.

create subnet aws

3- Click close

following subnets successfully created

4- Subnet successfully created

subnet amazon management console

Create Internet Gateway in VPC

1- Select Internet Gateways new and then click Create Internet Gateway

aws create internet gateway

2- Enter a name in the Name tag text box and then click create internet gateway.

aws create internet gateway name

3- The internet gateway just created and it is detached state. Now we need to attach it to your VPC.

Click Attach to a VPC, or in the action menu select Attach to VPC.

aws internet gateway detached

4- Choose your VPC from the drop-down list and then click Attach internet gateway.

attach internet gateway

5- The internet gateway changes to attached state.

internet gateway status attached

Create Route Table

1- Select Route Tables, and then click on create route table.

create route table

2- Name tag – Type a name (My-Route table).
VPC – Select you’re (My-VPC) and then select Create.

create route table name

3- Click Close

route table was created

4- Route Table successfully created.

create route table

Routing of public subnets

Now you need to configure the routing for our public subnets. Traffic Enable from your public subnets to Internet by using the IGW attached to the VPC.

1- Select My-Route table and then select Subnet Associations

create route table aws

2- Click on Edit Subnet associations.

edit subnet associations

3- Select subnet ID (My-Subnet) and then click Save.

edit subnet associations save

4- Select Routes and then Click edit route

edit routes aws

5- Traffic from instances in the public subnets destined to the Internet will be redirected to the IGW.

Then you are redirected to the Route Table in the Virtual Private Cloud.
Click Add rules for destinations enter 0.0.0.0/0 and then select Internet Gateway.

edit routes target aws

6- Select (My-IGW) and then click save routes.

edit routes target aws save

7- Click close

route successfully edited

Create EC2 Instance

1- Select service tab, click on EC2 under compute.

aws management console

2- Click on Launch Instance button.

aws launch instance

3- Select Microsoft Windows Server 2019.

aws instance choose ami

4- Select – General purpose t2.micro
Click Next : Configure Instance details

aws choose instance type

5- Network – select VPC (My-VPC).
Subnets – select My-Subnet.
Auto Assign Public IP – select Enable.
Click on Next : Add Storage.

aws configure instance details

6- Click Next : Add Tags.

aws add storage

7- Here we have tagged the instance (vpc server)
Click on Next : Configure Security Groups

aws add tags

8- Create a new Security Group.
Security group name – VPC-Security Group
Select Protocols RDP, HTTP, HTTPS, Select Source Anywhere
Click on Review and Launch

aws configure security group

9- Review instance details and parameters and then click launch.

aws review instance launch

10- I am using existing pair key

aws key pair name

11- Click view instances.

aws launch status

12- Now Instance created

aws instance connect

For more details how to create EC2 Instance

Jamil Parvez

Jamil Pervez works as a Network Administrator, based in Kuwait with a Primary focus on Microsoft technologies. Microsoft Certified MCSE, MCTP, MCITP, CCNP, CCIP, CCVP with 20 years of experience in administering Windows Servers, Exchange, VMWare, Veeam B&R, Veritas BackupExec.

Related Articles

Leave a Reply

Back to top button