Course contentsShow
← Computer Science
Lesson 1468 of 2,87234. Internet Protocol SuiteFree lesson

Routing Table Fundamentals

Understanding routing table structure: destination networks, next-hop addresses, and interface mappings.

Routing Table Fundamentals

What you'll learn: How routers use routing tables to map destination networks to the correct outgoing path and next device.

The Router's Map

A routing table is like a GPS lookup table inside every router. When a packet arrives with a destination IP address, the router consults this table to decide: "Which interface should I send this out of?" and "Who should receive it next?"

Think of it as a directory with three critical columns for each route:

Core Structure

1. Destination Network

The target network written in CIDR notation (e.g., 192.168.10.0/24). This isn't a single host—it's an entire subnet. The router matches the incoming packet's destination IP against these networks using longest prefix matching.

2. Next-Hop Address

The IP address of the next router (or gateway) along the path to that destination. If the destination is directly connected, this might be listed as "directly connected" or 0.0.0.0. This is the "hand it to this neighbor" instruction.

3. Interface Mapping

Which physical or logical interface (port) the router should use to forward the packet—like eth0, eth1, or GigabitEthernet0/0. This tells the router where to send the frame at Layer 2.

How It Works Together

When a packet destined for 192.168.10.50 arrives, the router:

  1. Scans the destination network column for a match (192.168.10.0/24)
  2. Reads the next-hop address (e.g., 10.0.0.2)
  3. Sends the packet out the specified interface (e.g., eth1)

Default routes (0.0.0.0/0) catch everything not explicitly listed—your "send everything else here" fallback.

Key Takeaway: A routing table maps destination networks to next-hop addresses and outgoing interfaces, enabling routers to forward packets hop-by-hop toward their final destinations.