Routing Tables

๐Ÿ’ก Introduction

During our earlier video on the basics of routing, you might have noticed references to something known as a routing table. Routing itself is a pretty simple concept, and you'll find that routing tables aren't that much more complicated.

๐Ÿ’ป The Early Days of Routing

The earliest routers were just regular computers of the era. They had two network interfaces, bridged two networks, and had a routing table that was manually updated. In fact, all major operating systems today still have a routing table that they consult before transmitting data. You can still build your own router today if you had a computer with two network interfaces and a manually updated routing table.

๐Ÿ“‘ Understanding Routing Tables

Routing tables can vary a ton depending on the make and class of the router, but they all share a few things in common. The most basic routing table will have four columns:

  • Destination Network: This column contains a row for each network that the router knows about. This includes the network ID and the net mask.

  • Next Hop: This is the IP address of the next router that should receive data intended for the destination network. If the network is directly connected, this might simply state that there aren't any additional hops needed.

  • Total Hops: This is the crucial part to understand how routing tables work. On any complex network like the Internet, there will be lots of different paths to get from point A to point B. Routers try to pick the shortest possible path at all times to ensure timely delivery of data. However, the shortest possible path to a destination network can change over time due to various factors like router failures, link disconnections, and traffic congestion. We'll get to know how routers determine the shortest path in an upcoming video. For now, it's important to know that for each next hop and each destination network, the router keeps track of how far away that destination currently is. This way, when it receives updated information from neighboring routers, it knows if it currently knows about the best path or if a better path is available.

  • Interface: The router also needs to know which of its interfaces it should forward traffic matching the destination network out of.

๐Ÿคฏ The Complexity of Routing Tables

In most cases, routing tables are pretty simple. However, many core Internet routers have millions of rows in their routing tables. These must be consulted for every single packet that flows through a router on its way to its final destination.

๐ŸŒ Conclusion

Routing tables are an essential part of how the internet works. They allow routers to efficiently route data packets to their intended destinations, ensuring that information can flow freely across the global network.

Last updated