Route Tables Basics
What You'll Learn
You'll understand what route tables are and how they direct network traffic between subnets and to the internet.
What Is a Route Table?
A route table is like a GPS navigation system for your cloud network. Just as GPS tells your car which roads to take to reach a destination, a route table tells network packets which path to follow to reach their destination IP address.
Every virtual network needs route tables to function. When data leaves a subnet, the route table attached to that subnet determines where that traffic should go next.
How Route Tables Work
Think of a route table as a set of rules (called routes) that answer the question: "If traffic is trying to reach IP address X, where should I send it?"
Each route has two main parts:
- Destination: The IP address range (in CIDR notation) the traffic is trying to reach
- Target: Where to send that traffic (another subnet, an internet gateway, etc.)
For example, a route might say: "Any traffic going to 10.0.2.0/24 should stay within the VPC, but traffic going to 0.0.0.0/0 (anywhere on the internet) should go through the internet gateway."
Default Behavior
When you create subnets in your virtual network, they automatically get a local route that allows traffic to flow between all subnets in the same VPC. This is why resources in different subnets can communicate by default—the route table already knows they're in the same network.
Key Takeaway: Route tables are the traffic directors of your cloud network, using destination-target rules to control whether packets stay within your VPC, go to other subnets, or reach external networks like the internet.