What is a routing table?

A simple explanation of routing tables.

What is a routing table?
Photo by Dennis Kummer / Unsplash

In keeping with this week's spontaneous theme of WAN connectivity, I thought it might be helpful to revisit a core concept: routing tables.

I'll try to keep this as vendor-neutral as possible...

  • Routers maintain a set of information known as a "routing table".
  • A routing table is basically just a big structured dataset that keeps a list of paths and determines the best way to send (forward) network traffic going through the router.
  • Depending on the routing protocol, the specific data in the routing table can vary. Generally speaking it'll have info like:
    • Destination Network - the network that the data is ultimately trying to get to.
    • Next Hop - the address of the next device the packet should be forwarded to
    • Interface - the local interface/port on the router that will be used to send the data to the next hop.
    • Metric - A number or value that indicates the preference of the route.
  • Routing tables come if different forms but there's generally two broad types:
    • Static Routing Tables - These are typically datasets that are manually updated/maintained by administrators. This is handy if you just need to make a small set of one-off changes.
    • Dynamic Routing Tables - These are datasets that are automatically updated by routing protocols (e.g. RIP, OSPF, BGP, etc). This is more complex but often provides better scalability and resiliency/adaptability.

Cool. So you might be wondering: what if there are multiple/duplicate routes in the same table? How does a router decide which path to take? That's where route attributes (like the "metric" unit above) can help. A router will use various attributes as a tie-breaker to decide the right path.

This is another one of those topics that has been simplified for the purpose of this introduction/article. For more info, check out these resources:

Routing table - Wikipedia
Routing Databases Overview | Junos OS | Juniper Networks
Routing is the transmission of packets from a source to a destination address. A routing protocol determines the path by which the packets are forwarded, shares information with immediate neighbor devices and other devices in the network, and adjusts to changing network conditions.
Configure route tables - Amazon Virtual Private Cloud
Configure route tables to control where network traffic is directed.