AWS Transit Gateway

Learn via video courses

Overview

An AWS Transit Gateway is a central network transit hub that assists in connecting various networks, such as AWS Virtual Private Cloud (VPC) with other VPCs or on-premises networks. Maintaining interconnectivity with cross-regional and cross-account VPCs and with on-premises networks becomes challenging as the number of VPCs in a global network infrastructure rises. AWS Transit Gateway was introduced to reduce this overhead and offer simple maintenance, effective routing, and scalability.

Introduction to AWS Transit Gateway

Utilizing a network transit hub to which multiple attachments can be attached, AWS Transit Gateway enables simple and scalable interconnectivity with AWS cross-regional and cross-account VPCs as well as with on-premises networks. An AWS Transit Gateway serves as a central router by using a hub-spoke topology rather than the mesh networking topology that would otherwise be used for network connectivity.

Mesh Topology:

In a mesh topology, a dedicated point-to-point link connects each device to every other device on the network.

mesh-topology

Hub-Spoke Topology:

In a hub-spoke topology, a central device (the hub) is interconnected with numerous other devices (the spokes).

Hub-Spoke Topology

Let's look at the example below to better understand the issue that the AWS Transit Gateway addresses:

Our goal is to connect the various AWS VPCs, Customer Gateway on our on-premises network, and AWS Direct Connect Gateway that make up our global network infrastructure. We can use VPN connections and AWS peering connections to connect all of these networks. The architecture that results will resemble what is depicted in the image below. As interconnections increase, routing and network management become difficult.

With Transit Gateway

The AWS Transit Gateway, which employs a hub-and-spoke networking topology and reduces the number of interconnections made through transit connections, could be used as an alternative to the above solution.

Without Transit Gateway

Transit Gateway Use Cases

  • Connectivity to AWS multi-region VPCs: By connecting to multi-region VPCs in AWS, AWS Transit Gateway can offer secure and highly available interconnectivity within the AWS network. aws multi region connectivity
  • Multiple VPN connections: AWS Transit Gateway can be used to establish Site-to-Site VPN connections with an on-premises network. Using a transit gateway device resolves the issue of managing multiple network connections. multiple vpn connections
  • Connections from SD-WAN to AWS: SD-WAN is a software-defined method of managing WAN. On-premises networks managed by SD-WAN can also connect to AWS using the Transit Gateway, simplifying network monitoring. connections from sd wan to aws
  • Device Interconnectivity: Using the AWS Transit Gateway, it is simple to connect AWS-managed resources, such as EC2, to on-premise hardware or devices. device interconnectivity

Create the Transit Gateway

To create a Transit Gateway follow the below-mentioned steps:

  1. Log in to the Amazon VPC console.
  2. Select Transit Gateways from the navigation pane.
  3. Choose to Create a transit gateway.
  4. Enter the Name and Description.
  5. For Autonomous System Number (ASN), choose the default ASN.
  6. Click on Create transit gateway.

Attach your VPCs to Your Transit Gateway

To attach VPCs to the Transit Gateway follow the below-mentioned steps:

  1. Click Transit Gateway Attachments in the VPC navigation pane.
  2. Choose to Create a transit gateway attachment.
  3. Enter a name for the attachment.
  4. Select the transit gateway ID for the attachment.
  5. Select VPC as the attachment type.
  6. Select the VPC to which you want to connect the transit gateway for the VPC ID.
  7. Select one subnet for each Availability Zone that the transit gateway will use to route traffic.
  8. Select the Create transit gateway attachment option.

Add Routes Between the Transit Gateway and Your VPCs

To add routes between the transit gateway and your VPCs follow the below-mentioned steps:

  1. Select Route Tables from the VPC navigation pane.
  2. Select the route table that corresponds to your VPC.
  3. Select the Routes tab, then Edit Routes. Select the "Add" route.
  4. Enter the destination IP address range in the Destination column.
  5. Select Transit Gateway as the Target, and then enter the transit gateway ID.
  6. Select Save changes.

Test the Transit Gateway

  1. Launch a Linux-based EC2 instance in both VPCs.
  2. Connect to the EC2 instances using SSH.
  3. Use the ping command to verify the interconnectivity between both instances.

Delete the Transit Gateway

  1. Select Transit Gateways from the VPC navigation pane.
  2. Choose Actions, and Delete the transit gateway after selecting the transit gateway.
  3. Enter delete and press the Delete button.

Releases for Transit Gateways

Recent releases of transit gateways include:

  • Support for Transit Gateway Flow Logs to monitor the network traffic.
  • Inclusion of policy tables to set up dynamic routing.
  • AWS Direct Connect is available for the attachments in the Transit Gateway attachments.
  • AWS Transit Gateway now supports multicast traffic.
  • Network Manager is enabled to visualize and monitor global networks from a single place.

Conclusion

  1. An AWS Transit Gateway is a hub that assists in connecting various networks, such as AWS Virtual Private Cloud (VPCs) with other VPCs or on-premises networks. It was introduced to reduce this overhead and offer simple maintenance, effective routing, and scalability.
  2. The Amazon Web Services (AWS) Transit Gateway is a hub-spoke router that connects VPCs and on-premises networks. It enables simple and scalable interconnectivity with AWS cross-regional and cross-account VPCs.
  3. AWS Transit Gateway can offer secure and highly available interconnectivity for multiple use cases such as connectivity to AWS multi-region VPCs, multiple VPN connections, connections from SD-WAN to AWS, and device interconnectivity
  4. AWS Transit Gateway now supports multicast traffic. Network Manager is enabled to visualize and monitor global networks from a single place. The inclusion of policy tables to set up dynamic routing has made it easier for customers to manage their transit networks in real time.