Add Transit Gateway Routes to VPC Route Tables

Overview of Route Tables

ℹ️ Information: In this section, you will configure the Route Table for each VPC to route traffic through the Transit Gateway.

Naming Convention

Pro Tip: For easier tracking, we use the following naming convention:

  • First VPC Main Route Table = Route Table of VPC1
  • Second VPC Main Route Table = Route Table of VPC2
  • Third VPC Main Route Table = Route Table of VPC3
  • Fourth VPC Main Route Table = Route Table of VPC4

Route Tables

Configure Route Table for VPC1

  1. Select Route Table
    • Open VPC Management Console
    • Select Route Tables
    • Choose the Route Table of VPC1
    • Click Edit routes

Select Route Table VPC1

  1. Add route
    • Destination: 172.16.0.0/16
    • Target: Select the created Transit Gateway

Add route VPC1

  1. Verify route
    • Confirm the new route has been added
    • This route allows VPC1 to send traffic to the 172.16.x.x network via the Transit Gateway

Verify route VPC1

Configure Route Table for VPC3

  1. Add similar route
    • Select the Route Table of VPC3
    • Add a route with Destination 172.16.0.0/16
    • Target = Transit Gateway

Add route VPC3 Add route VPC3

  1. Verify route
    • Confirm the new route has been added
    • This route allows VPC3 to send traffic to the 172.16.x.x network via the Transit Gateway

Verify route VPC3

Configure Route Tables for VPC2 and VPC4

  1. Add route for VPC2
    • Select the Route Table of VPC2
    • Add a route with Destination 0.0.0.0/0
    • Target = Transit Gateway

Add route VPC2 Add route VPC2 Add route VPC2

  1. Add route for VPC4
    • Select the Route Table of VPC4
    • Add a route with Destination 0.0.0.0/0
    • Target = Transit Gateway

Add route VPC4 Add route VPC4 Add route VPC4

Connectivity Testing

  1. Test Internet connectivity
    • SSH into an EC2 instance in VPC1
    • Try pinging aws.amazon.com to verify Internet access

Test Internet

  1. Test inter-VPC connectivity
    • Ping the IP of an EC2 instance in VPC2 Test VPC connectivity
    • SSH between instances Test VPC connectivity Test VPC connectivity Test VPC connectivity
    • Test connectivity to VPC3 and VPC4 Test VPC connectivity Test VPC connectivity

⚠️ Warning: Make sure to perform all verification steps to confirm connectivity is working correctly.