In this hands-on lab, we will build a hub-and-spoke network topology with Transit Gateway and attach 2 VPCs. We will review the propagated routes on the Transit Gateway, create the appropriate routes in our VPCs, and validate the connectivity. We will also do some troubleshooting to see why our environment is not working as we thought it should.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Configure AWS Transit Gateway
- Click Create Transit Gateway.
- Add name: "labtransitgw".
- Copy and paste the name for the description.
- Add "65065" for the Amazon side ASN.
- Leave DNS support and ECMP enabled.
- Leave the default route table propagation.
- Click Create Transit Gateway.
- Attach Three VPCs to Transit Gateway and Create the Appropriate VPC Routes
- Click Create Transit Gateway Attachment.
- Select our Transit Gateway.
- Add "VPC1" as the attachment name.
- Select VPC1 for the VPC ID.
- Select the Public Subnet for Subnet ID.
- Click Create Attachment.
- Repeat the same steps for VPC2 and VPC3.
- Create the Appropriate Routes on the VPCs
- Under Route tables, select Public1-RT.
- Click Edit routes and add a route to VPC2: Add 10.2.0.0/16, and choose our transit gateway as the target.
- Add another route for VPC3: Add 10.3.0.0/16, and choose our transit gateway as the target.
- Click Save routes.
- Select Public2-RT, click the Routes tab, click Edit routes, and add route to VPC1: Add 10.1.0.0/16, and choose our transit gateway as the target.
- Add another route for VPC3: Add 10.3.0.0/16, choose our transit gateway as the target.
- Click Save routes.
- Select Public3-RT, click the Routes tab, click Edit routes, and add a route to VPC1: Add 10.1.0.0/16, and choose our transit gateway as the target.
- Add another route to VPC2: Add 10.2.0.0/16 and choose our transit gateway as the target.
- Click Save routes.
- Validate Connectivity from Terminal to all VPCs
Open Terminal.
Log in to EC2
INSTANCE1
using the credentials provided on the lab page:ssh cloud_user@<INSTANCE1_PUBLIC_IP>
Ping the public IP address of
INSTANCE2
.Ping the private IP address of
INSTANCE2
.Ping the private IP address of
INSTANCE3
.
Troubleshooting
- In the AWS console, check
INSTANCE3
‘s NACLs, SG, subnet association, and update NACLs. - Delete the VPC3 transit gateway attachment.
- Create a new VPC3 transit gateway attachment and select the private subnet ID.
- Add routes to VPC1 and VPC2 using the transit gateway to your Private3-RT.
- Add routes to Private3-RT to VPC1 and VPC2.
- Try to ping the private IP address of
INSTANCE3
again.