connect multiple VPC using transit gateways

Table of contents

1) create 3 VPC in mumbai region with name of my-vpc1-mumbai, my-vpc2-mumbai and my-vpc3-mumbai.

once create VPC you can find as below in VPC menu.

2) create internet gateway for all three VPC individuals as below.

3) create 3 subnet in individuals in 3 VPC one by one sub-vpc1-mumbai, sub-vpc2-mumbai and sub-vpc3-mumbai.

you can find three subnet as below.

4) then after we need to create 3 route tables for 3 VPC

5) create 3 EC2 t2.micro machine in 3 vpc individual

6) now we have to create transit gateway to connect 3 VPC

7) once creating the transit gateway we need to attach transitgatway to all 3 VPCs one by one as below.

7) attache VPC1 to transit gatway

8) attache VPC2 to transit gatway

9) attache VPC3 to transit gatway

10) add route of VPC2 and VPC3 in route table of VPC1

11) add route of VPC1 and VPC3 in route table of VPC2

12) add route of VPC1 and VPC2 in route table of VPC3

13) allow ALL ICMP ports in 3 ec2 machine security groups one by one.

14) as you can check the local IP address of all three ec2 machines.

15) now we have successfully ping all three EC2 machine together and ping all three machine.

Thank you for reading, for more you can follow my channel.

1
Subscribe to my newsletter

Read articles from Haresh Prajapati directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Haresh Prajapati
Haresh Prajapati