AWS Route Tables

  •  A route table contains a set of rules, called routes, that are used to determine where the data packets of the network traffic are directed. Each subnet in your VPC must be associated with a route table. The VPC has a main route table and any subnet by default is associated with it.
  •  Custom route tables can be defined and associated with one or more subnets. The entries of the main route table can also be modified.
  • Each route in a route table consists of a target and destination. For example – Traffic Destined for 10.0.0.24/28 is Targetted for Internet Gateway (IGW)
  • The destinations of route tables are either CIDR blocks or prefix lists (in case of VPC gateway endpoints)
  • The targets of route table could be Internet gateways (IGW), NAT gateways, egress-only gateways(EIGW), Elastic Network Interfaces (ENIs),  Virtual Private Gateways(VGW), VPC gateway endpoints and VPC peers.
  • You could set a custom route table as the main route table so that any new subnets are automatically associated with it.
  • Each route table has one or more local route entries, which ensures that all resources in the VPC have a route to one another.
  • The route table includes local, static and dynamic routes.
  • AWS uses a predefined route priority process to determine how to route the traffic.
  • There is a limit on the number of route tables you can create per VPC, and the number of routes you can add per route table. For more information, see Amazon VPC Limits

Route Priority

  • AWS uses the most specific route in your route table that matches the traffic to determine how to route the traffic (longest prefix match)
  • Routes to IPv4 and IPv6 addresses or CIDR blocks are independent of each other. AWS uses the most specific route that matches either IPv4 traffic or IPv6 traffic to determine how to route the traffic. For example, the following route table has a route for IPv4 Internet traffic (0.0.0.0/0) that points to an Internet gateway. Any traffic destined for a target within the VPC (10.0.0.0/16) is covered by the local route and therefore routed within the VPC. All other traffic from the subnet uses the Internet gateway.
    Destination Target
    10.0.0.0/16 Local
    0.0.0.0/0 igw-11aa22bb



Leave A Reply

Your email address will not be published. Required fields are marked *