Route Table Concepts
- Main route table—The route table that automatically comes with your VPC. It controls the routing for all subnets that are not explicitly associated with any other route table.
- Custom route table—A route table that you create for your VPC.
- Destination—The range of IP addresses where you want traffic to go (destination CIDR). For example, an external corporate network with the CIDR
172.16.0.0/12
. - Target—The gateway, network interface, or connection through which to send the destination traffic; for example, an internet gateway.
- Route table association—The association between a route table and a subnet, internet gateway, or virtual private gateway.
- Subnet route table—A route table that’s associated with a subnet.
- Local route—A default route for communication within the VPC.
- Propagation—If you’ve attached a virtual private gateway to your VPC and enable route propagation, we automatically add routes for your VPN connection to your subnet route tables. This means that you don’t need to manually add or remove VPN routes. For more information, see Site-to-Site VPN routing options in the Site-to-Site VPN User Guide.
- Gateway route table—A route table that’s associated with an internet gateway or virtual private gateway.
- Edge association—A route table that you use to route inbound VPC traffic to an appliance. You associate a route table with the internet gateway or virtual private gateway, and specify the network interface of your appliance as the target for VPC traffic.
- Transit gateway route table—A route table that’s associated with a transit gateway. For more information, see Transit gateway route tables in Amazon VPC Transit Gateways.
Main Route Table of the VPC
The Main Route Table automatically created in VPC when you create your VPC. It Contains the routes to reach to all subnets created inside the VPC only . You can communicate within the VPC to other subnets inside the VPC using the Main Route Table.
Main Route Table
Destination | Target |
---|---|
10.0.0.0/16 | Local |
Subnet Route Table
Each subnet in your VPC must be associated with a route table, which controls the routing for the subnet (subnet route table).
For example, to enable your subnet to access the internet through an internet gateway, add the following route to your subnet route table. The destination for the route is 0.0.0.0/0
, which represents all IPv4 addresses. The target is the internet gateway that’s attached to your VPC.
Destination | Target |
---|---|
0.0.0.0/0 | igw-id |