INFRASTRUCTURE LEARNINGINFRASTRUCTURE LEARNING
インフラ大全インフラ大全IT INFRASTRUCTURE / LEARNING
Infrastructure learning guide
Find a lesson or lab/

Esc to close · Search terms stay on your device

LEARNING日本語

Topic lessonTopic: VPC: routing and traffic controls

How to read a VPC route table: associations, destination CIDRs and targets

A VPC route table maps destination address ranges to forwarding targets. First identify the table that applies to the source subnet; then read the destination CIDR and target. A matching route is separate from traffic permission or application success.

What you will learn

Read the source association, destination prefix, route priority and selected target in order, and identify the impact of a proposed change.

Prerequisite

Know VPCs, subnets and CIDR notation. Examples are for reading; this lesson adds no real routes.

First establish which subnet uses the table

A subnet has one subnet route table association. Without an explicit association, it uses the VPC’s main route table. Several subnets can share the same table. Opening a similarly named table does not establish the source subnet’s routing.

From source subnet to its effective route table and target
From source subnet to its effective route table and target1: Source subnet — Identify the table this source subnet actually uses. — Effective route table. 2: Effective route table — Apply destination matching and priority before choosing the forwarding target. — Matching target12Source subnetEffective routetableMatching targetFrom source subnet to its effective route table and target1: Source subnet — Identify the table this source subnet actually uses. — Effective route table. 2: Effective route table — Apply destination matching and priority before choosing the forwarding target. — Matching target12Source subnetEffective routetableMatching target
  1. Source subnet → Effective route tableIdentify the table this source subnet actually uses.
  2. Effective route table → Matching targetApply destination matching and priority before choosing the forwarding target.
Source subnet
The subnet containing the resource initiating the request.
Effective route table
Check explicit association or implicit use of the main table.
Matching target
Select the matching route for the destination IP, then inspect its target.

Destination CIDR and target are separate columns

Reading example: a VPC with CIDR 10.0.0.0/16
DestinationTargetInterpretation
10.0.0.0/16localA route covering the VPC’s address range
0.0.0.0/0Internet gateway (illustrative)A broader route matching every IPv4 address

With only these two routes, destination 10.0.2.5 matches the more specific 10.0.0.0/16 route. It also lies within 0.0.0.0/0, but that does not mean the default route is selected. If the real table has a more specific route, include it in the evaluation.

Read the most specific matching route

Longest prefix match chooses the matching destination range with the longest prefix. It does not simply take the first visible row. Additional rules govern equal/overlapping ranges and static, propagated or other route sources; consult the official priority rules where prefix length alone does not settle the choice.

Choose an option to see the result and explanation.

Only the two example routes exist. Which route matches destination 10.0.2.5 with higher priority?
Read the answer and reason

Answer: 10.0.0.0/16 → local · Both ranges contain the destination, but /16 is more specific than /0. This explains selection within this example table; it does not verify a successful connection.

A route leaves other connectivity requirements unverified

Inspect the selected target and route state, then check SGs, NACLs, request/response paths and host listeners separately. An outbound route alone does not establish inbound reachability or an application response.

Review the impact before a route-table change
CheckReason
Associated subnetsOther resources using the same table may be affected
Explicit and implicit associationsDo not overlook resources affected by a main-table change
Request and response pathsAvoid checking only one direction
Purpose and reversalEstablish whether the change addresses the actual problem and how to undo it

A practical route-table reading sequence

  1. Identify the source resource’s VPC and subnet.
  2. Verify its effective route-table association.
  3. Match the destination IP to CIDRs, apply priority and inspect the selected target.
  4. Check the response path and other connectivity conditions.
  5. If a real change is needed, review affected resources and the reversal procedure.

Check, then explain in your own words

  1. Verify the source subnet’s route-table association.
  2. Read destination CIDRs, targets and priority separately.
  3. Explain which traffic-control and application checks remain.
Check your understanding: Does reading the destination subnet’s table also verify the source subnet’s route?

No. Check the association that applies to the source too.

Different source subnets can use different tables. Fix the sending context before interpreting a route.

Sources and conditions checked

The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.