Routing table

From Citizendium
Revision as of 15:20, 30 March 2024 by John Leach (talk | contribs) (Text replacement - "[[" to "")
Jump to navigation Jump to search
This article may be deleted soon.
To oppose or discuss a nomination, please go to CZ:Proposed for deletion and follow the instructions.

For the monthly nomination lists, see
Category:Articles for deletion.


This article is developing and not approved.
Main Article
Discussion
Related Articles  [?]
Bibliography  [?]
External Links  [?]
Citable Version  [?]
 
This editable Main Article is under development and subject to a disclaimer.

In networking a routing table, or Routing Information Base (RIB), is an electronic table (file) or database type object that is stored in a router]] or a networked computer]]. The routing table stores the routes (and in some cases, metrics associated with those routes) to particular network destinations. This information contains the topology of the network immediately around it. The construction of routing tables is the primary goal of routing protocol]]s and static route| static routes]].

Routing tables are generally not used directly for packet forwarding in modern router architectures; instead, they are used to generate the information for a smaller forwarding cache which contains only the routes which are chosen by the routing algorithm as preferred routes for packet forwarding, often in a compressed or pre-compiled format that is optimized for hardware storage and lookup. The remainder of this article will ignore this implementation detail, and refer to the entire routing/forwarding information subsystem as the "routing table".

Basics

A routing table utilizes the same idea as using a map in package delivery. Whenever a node (i.e., a host or router) needs to send data to another node on a network, it needs to know where to send it. Whenever a device cannot directly connect to the destination node, it needs to find another way to send the package. Whenever a node does not know how to send the package it sends an Internet Protocol version 4]] or Internet Protocol version 6]] packet to a router in the local subnet. Since this is a complicated task to route the package to the correct destination, a gateway needs to keep track of the way to deliver this. A Routing Table is the way in which this data is stored, like a map. It is a database which keeps track of paths like a map and provides this information to the node requesting the data. Current router architecture separates the control plane]] function of the routing table from the forwarding plane]] function of the forwarding information base]] [1]

Hop-by-hop routing, each routing table lists, for all reachable destinations, the address of the next device along the path to that destination; the next hop. Assuming that the routing tables are consistent, the simple algorithm of relaying packets to their destination's next hop thus suffices to deliver data anywhere in a network. Hop-by-hop is the fundamental characteristic of the IP Internetwork Layer [2] and the OSI Network Layer, in contrast to the functions of the IP End-to-End and OSI Transport Layers.

Function

During the process of routing, decisions of hosts and routers are aided by a database of routes known as the routing table. The routing table is not exclusive to a router. Depending on the routable protocol, hosts may also have a routing table that may be used to decide the best router for the packet to be forwarded. Host-based routing tables are optional for the Internet Protocol]].

The types of entries in a routing table:

Network Route: A route (path) to a specific Network ID in the internetwork.
Host Route : A route to a specific internetwork address (Network ID and Host ID). Host routes allow intelligent routing decisions to be made for each network address. Host routes are used to create custom routes to control or optimize specific types of network traffic.
Default Route: A route that is used when no other routes for the destination are found in the routing table. If a router or end system (such as a Personal computer|PC]] running Microsoft Windows]] or Linux]]), cannot find a route for a destination, the default route is used.

Difficulties with Routing Tables

The need to record routes to large numbers of devices using limited storage space represents a major challenge in routing table construction. In the Internet, the currently dominant address aggregation technology is a bitwise prefix matching scheme called Classless Inter-Domain Routing]] (CIDR).

Since in a network each node presumably possesses a valid routing table, routing tables must be consistent among the various nodes or routing loops]] can develop. This is particularly problematic in the hop-by-hop routing model in which the net effect of inconsistent tables in several different routers could be to forward packets in an endless loop. Routing loops have historically plagued routing, and their avoidance is a major design goal of routing protocols.

Contents of Routing Tables

The routing table consists of at least three information fields:-

  1. the network id: i.e. the destination network id
  2. cost: i.e. the cost of the path through which the packet is to be sent .
  3. next hop: next hop is the address of the next station to which the packet is to be sent on the way to destination .

Depending on the application and implementation, it can also contain additional values that refine path selection:

  1. quality of service associated with the route
  2. links to filtering criteria/access lists associated with the route

Routing tables also are a key aspect of certain security operations, such as unicast reverse path forwarding]] (uRPF) [3]. In this technique, which has several variants, the router also looks up, in the routing table, the source address of the packet. If there exists no route back to the source address, the packet is assumed to be malformed or an attack, and is dropped.

Network id Cost Next hop
........ ........ ........
........ ........ ........

References