Steps To Create and Configure Route Table
Route tables are used for the creation of different routes between subnets and gateways. There are a number of examples like routing traffic between AWS resources and on-premises networks via VPN or Direct connect, route tables with internet access, custom route table for public/private subnets with NAT gateway. We’ll be discussing the step-by-step creation and configuration of route tables for different use cases :
1. Creation of a custom route table for Private Subnet with NAT Gateway
Step 1: After signing-in into your Management console, head towards your VPC dashboard.
Step 2: Under the Route tables section, click on “Create Route Table”. (You can enter a name or description for your route table)
Step 3: Once your route table is created, head towards the Routes tab and click on Edit routes.
Step 4: Add a route with destination 0.0.0.0/0 and set the target as NAT Gateway.
Step 5: After saving the routes, edit your subnet associations under Subnet Associations and associate private subnet with the route table.
Step 6: Click on Save and you’re all set.
2. Creation of Custom Route Table for Direct Connect or VPN to On-Premises Network
Step 1: After signing-in into your Management console, head towards your VPC dashboard.
Step 2: Under the Route tables section, click on “Create Route Table”. (You can enter a name or description for your route table)
Step 3: Once your route table is created, head towards the Routes tab and click on Edit routes.
Step 4: Add a route with the destination CIDR Block of your on-premises network and set the target as VGW (Virtual Private Gateway) associated with the VPN connection or Direct Connect.
Step 5: After saving the routes, edit your subnet associations under Subnet Associations and associate private subnet with the route table.
Step 6: Click on Save and you’re all set!
What Is AWS VPC Route Table?
An AWS VPC Route Table is a set of rules that determine where the network traffic from your subnet or gateway is directed. Each subnet (range of IP addresses in your VPC) is associated with a route table that controls the traffic flow between subnets. A route table has a destination address which determines where the network is directed. Route tables are essential when dealing with IPv4/IPv6 CIDR blocks, private or public subnets, network gateways, VPC endpoints, etc.