What is a route table? Find the next hop and verify the real path
A route table is a set of rules that chooses where a network packet goes next based on its destination address. Each route usually contains a destination IP range and a next hop. A route table decides forwarding; it does not grant permission like a firewall does.
A route table is a set of rules that chooses where a network packet goes next based on its destination address. Each route usually contains a destination IP range and a next hop. A route table decides forwarding; it does not grant permission like a firewall does.
What does one route contain?
Destinations use CIDR notation. For example, 10.20.0.0/16 covers an IPv4 range beginning with 10.20, while 0.0.0.0/0 is the default route for every IPv4 destination. The next hop is the gateway or connection that receives the packet: a local network, internet gateway, NAT gateway, VPN, peering connection or virtual firewall appliance.
Cloud routing is distributed rather than a list fixed to one physical router. The routes that apply can depend on the resource and provider. The important question is therefore which effective routes apply to this source and destination, not just what routes appear somewhere in the network.
How does a destination select a route?
Hypothetical example: a VM at 10.0.1.8 has these applicable routes:
| Destination | Next hop |
|---|---|
10.0.0.0/16 | Inside the same VPC |
10.20.0.0/16 | VPN gateway |
0.0.0.0/0 | Internet gateway |
The destination 10.20.1.5 matches both the VPN range and the default route. Under the ordinary longest-prefix rule used by AWS and Azure, the more specific 10.20.0.0/16 route wins, so the packet goes to the VPN gateway. Other public IPv4 destinations use the default route unless another, more specific route applies. These addresses are illustrative, not a tested deployment.
Longest prefix is not the whole selection model. Providers also consider route type, where a route applies, and precedence between routes with the same destination. Google Cloud evaluates special and subnet routes before custom routes; among applicable custom routes, destination specificity and then numeric priority matter. AWS and Azure also distinguish static, propagated, user-defined and system routes.
How does route-table scope differ across clouds?
| Cloud | Where routes apply | Selection details |
|---|---|---|
| AWS VPC | Each subnet is associated with one route table. Without an explicit association, it uses the VPC’s main route table. Multiple subnets can share a table. | The most specific matching destination wins. For identical destinations, static routes can take precedence over propagated routes. Verify the table actually associated with the subnet. |
| Google Cloud VPC | The routing table is defined at VPC level, but each VM receives applicable routes based on route type and scope, such as tags or region. | Special, subnet and custom routes are evaluated in a defined order. Custom-route selection also depends on route category and numeric priority, not prefix length alone. |
| Azure VNet | Azure provides system routes for each subnet; optional user-defined route tables (UDRs) can be associated with subnets. BGP routes may also be effective. | Longest matching prefix generally wins. With the same prefix, user-defined routes precede BGP routes, which precede system routes, subject to documented exceptions for some VNet and service-endpoint routes. |
This comparison summarizes the main model, not every route type. For example, some Azure service-endpoint routes cannot be overridden by a UDR, and Google Cloud’s applicable route set is specific to the VM. Check current provider documentation for a production path.
Does a route mean the connection is allowed?
No. A route describes forwarding, not authorization. Security groups, firewalls, network ACLs, operating-system firewalls or service policies can still reject a packet after it reaches the next hop. Conversely, a permissive firewall cannot make a packet arrive if no matching route exists or the next hop is unavailable.
Check the return path too. A request can pass through a firewall appliance while its reply takes another path, which can break connections on stateful devices. For flows through NAT or VPN, verify that routes, address translation and state tracking agree in both directions.
How do you inspect the path for a specific connection?
Define the flow: source VM or interface, destination IP, address family, protocol and port. For a domain name, check the IP returned by DNS.
Find the routes that actually apply. In AWS, check the subnet’s explicit or main-table association. In Google Cloud, inspect routes applicable to that VM. In Azure, effective NIC routes combine system, UDR and BGP routes.
Compare matching destination prefixes. Start with the most specific match, then apply that provider’s route-type and priority rules for ties or special routes.
Confirm the next hop is usable: VPN or peering is active, the appliance IP is correct, and the appliance has forwarding and return paths. A visible route can still point to an unusable next hop.
Check security rules and service policies separately, then use flow logs or a connectivity analysis tool to locate where the packet stops. Analyze the reverse direction when possible.
Before changing routes, identify every affected subnet or VM. Prefer a narrow test subnet/table over editing a shared main or default route immediately. If traffic is interrupted or goes to an unexpected destination, roll back and inspect the effective route and next hop again.