VPC and Subnet Route Tables - Routing in AWS - AWS Certification Cheat Sheet


Let’s get a quick overview of Routing and Route Tables in AWS.

You will learn

  • What is routing?
  • What is route table?
  • How does routing happen on internet?
  • How does routing happen in AWS?
  • What is VPC Route Table?
  • What is Subnet Route Table?

Routing on the internet

  • You have an IP address of a website you want to visit
  • There is no direct connection from your computer to the website
  • Internet is actually a set of routers routing traffic
  • Each router has a set of rules that help it decide the path to the destination IP address

Routing inside AWS

Destination Target
172.31.0.0/16 Local
0.0.0.0/0 igw-1234567
  • In AWS, route tables are used for routing
  • Route tables can be associated with VPCs and subnets
  • Each route table consists of a set of rules called routes
    • Each route or routing rule has a destination and target
    • What CIDR blocks (range of addresses) should be routed to which target resource?
  • Rule 1 - Route requests to VPC CIDR 172.31.0.0/16 (172.31.0.0 to 172.31.255.255) to local resources within the VPC
  • Rule 2 - Route all other IP addresses (0.0.0.0/0) to internet (internet gateway)

Execution of Route Table

Destination Target
172.31.0.0/16 Local
0.0.0.0/0 igw-1234567
  • What happens if I search for an address 172.31.0.10? - Two destinations match - 172.31.0.0/16 (172.31.0.0 to 172.31.255.255) and 0.0.0.0/0 - The most specific rule wins. 172.31.0.0/16 is more specific - Result : Routing to a local resource
  • What happens if I search for an address 69.209.0.10? - One destination match - 69.208.0.10 - Result : Routing to internet
  • The most specific matching route wins

VPC Main Route Table

Destination Target
172.31.0.0/16 Local
  • Each VPC has a main route table, by default
  • Main route table has a default route enabling communication between resources in all subnets in a VPC
  • Default route rule CANNOT be deleted/edited
  • HOWEVER you can add/edit/delete other routing rules to the main route table

Subnet Route Tables

  • Each subnet can have its own route table OR share its route table with the VPC
  • If a subnet does not have a route table associated with it, it implicitly uses the route table of its VPC
  • Multiple subnets can share a route table
  • HOWEVER at any point in time, a subnet can be associated with one route table ONLY

VPC Route Table and Routing - AWS Certification Exam Practice Questions

Coming Soon..

Certification - Recommended Reading

Cloud Certifications - AWS, Azure and Google Cloud - Top 8 FAQ For Me

Google Cloud For Beginners - How to choose a Database Service?

Teaching Cloud Certifications - Top 6 Learnings

Google Cloud For Beginners - How to choose a Compute Service?

Important Kubernetes Concepts Made Easy

Introduction to Google Cloud - For AWS Professionals

Getting Started with Docker - 5 Easy Steps

GCP PubSub - GCP Certification Cheat Sheet

GCP IAM - GCP Certification Cheat Sheet

GCP App Engine - GCP Certification Cheat Sheet

WHAT NEXT?

Congratulations on reading this article!

Wondering what to learn next?

MY RECOMMENDATIONS

Keep Learning Every Day

Check Out Our Amazing ROADMAPS