AGENDA
•Introduction to
VPCs
•Creating Two VPCs
•Setting Up VPC
Peering
•Configuration
Steps
3
INTRODUCTION
TO VPC
Definition: A Virtual Private Cloud (VPC)
is a private network in the AWS cloud.
Purpose: Isolate resources, control
traffic, and enhance security.
Components: Subnets, Route Tables,
Internet Gateways, NAT Gateways.
Creating
Two VPC’s
•In the VPC
dashboard, click on
Your VPCs in the
left sidebar.
•Click on the Create
VPC button.
Create First VPC
•Fill in the required
fields:
•Name tag: Give your VPC a
name.
•IPv4 CIDR block: Specify
a CIDR block (e.g.,
10.0.0.0/16).
•Tenancy: Choose default.
8
Create Subnets
•In the left sidebar,
click on Subnets.
•Click on Create subnet.
9
•Select your newly
created VPC.
•Fill in the
required fields:
Name tag: Name
your subnet.
Availability Zone:
Choose an AZ
(e.g., us-east-1a
IPv4 CIDR block:
Specify a CIDR for
the subnet (e.g.,
10.0.0.0/24).
•Click Create
subnet.
Create an Internet Gateway
In the left sidebar, click on Internet Gateways.
Click on Create Internet Gateway
11
•Name the Internet
Gateway (e.g.,
“vpc1-igw")
•Click Create
internet gateway.
12
•click on Actions,
then Attach to VPC.
•Select your VPC
•click Attach.
13
Create Route Table
•Click on Route Tables in the left pane.
•Select the route table associated with your VPC.
•Click on the Routes tab, then Edit routes.
14
•Click Add route:
•Destination: 0.0.0/0 (for internet access).
•Target: Select the Internet Gateway you created.
•Click Save routes.
15
Create Second
VPC use the
previous steps
which we used to
create the First
VPC
16
VPC
Peering
17
•In the VPC dashboard, click on
Peering Connections in the left
pane.
•Click the Create Peering
Connection button.
18
Fill in the details:
•Name tag: A name for your peering connection (e.g., "VPC-
Peering").
•VPC (Requester): Select the first VPC you created.
•VPC (Accepter): Select the second VPC you created.
•Click Create Peering Connection.
19
Accept the VPC
Peering
Connection
20
•In the Peering Connections section, find the newly
created connection (it will be in a "Pending Acceptance"
state).
•Select the connection, and click on Actions.
•Click Accept Request.
•Confirm the acceptance of the peering connection.
21
•For both VPCs, go to Route Tables in the
left pane.
•Select the route table associated with the
first VPC.
•Click on the Routes tab, then Edit routes.
•Click Add route:
•Destination: Enter the CIDR block of the
second VPC.
•Target: Select the VPC Peering Connection
you created.
•Click Save routes.
•Repeat this process for the second VPC,
adding a route to the first VPC's CIDR
block.
22
Test the VPC
Peering
Connection
23
•Open the VPC-1 instance Console
Type ping and public ipv4 address
of VPC-2
•Do same for VPC-2