Routing Table is a concept that is as simple as Routing itself. The earliest Routers are just like a regular computers of the era. They had two network interfaces, bridged two networks also had a routing table which updates manually. In fact all major operating systems today still have a routing table that they consult before transmitting data. Therefore it is possible to build one’s own Router If he has a computer with two network interfaces and manually updates Routing_table.
Routing Table can vary a ton depending on the make and class of the router. But they all share few things in common. The most basic routing table will have four columns. They are Destination Network, Network IDs and Net mask, Interface, and Metric. In many cases Network IDs and Net Mask could be in single CIDR column. Or these could also be in two separate columns.
This column contains a row for each network that a router knows about. This is just a definition of remote network.
Network ID | Net Mask | CIDR
Network ID and Net mask, this can also be different column or in a CIDR column. Either way it’s the same concept the router has a definition for a network. Therefore it knows what IP addresses might live on that network. When router receives incoming packets it examines the destination IP address and determines which network it belongs to. Routing_tables generally have catch-all entry, that matches any IP address that doesn’t have an explicit network listing for.
Gateway | Next Hop
Gateway is the IP address of the next router. It also refers to as Next Hop. The Next Hop will receive the data intended for the destination Network. This could also state the Network that directly connected and if there any additional hops necessary.
Total Hops | Metric
Any complex network like internet there will be different paths for going point A to point B. Routers try the shortest possible path to ensure timely delivery of data. But shortest possible path to a destination network always changes over time. Because intermediary router could go down, Links could become disconnected, new routers can be introduced. Also traffic congestion could cause route too slow to use. For each next hope and each destination network The Router will have keep track of how far away the destination currently is. Hence when router receive updated information from neighboring router it will know if it currently knows about the best path or better path available.
So total hops indicates the path router uses to send data. Total Hops also refers to as Metric which is the cost of using the indicated route.
A Router also has to know which of its interfaces it should forward traffic matching the destination network.
So in most cases routing tables are this so simple. Though the impressive part is that many core internet routers have millions of rows in routing_table. This rules must be consulted for every single packet that flow through a router on its way of destination. But the real magic of Routing is in the way of routing tables are always updated with new information about the quickest path to the destination network.
Next We will discuss about Routing Protocols in Networking Fundamentals section.