HOME

TheInfoList



OR:

In
computer networking A computer network is a collection of communicating computers and other devices, such as printers and smart phones. In order to communicate, the computers and devices must be connected by wired media like copper cables, optical fibers, or b ...
, a routing table, or routing information base (RIB), is a data table stored in a router or a network host that lists the routes to particular network destinations, and in some cases,
metrics Metric or metrical may refer to: Measuring * Metric system, an internationally adopted decimal system of measurement * An adjective indicating relation to measurement in general, or a noun describing a specific type of measurement Mathematics ...
(distances) associated with those routes. The routing table contains information about the topology of the network immediately around it. The construction of routing tables is the primary goal of
routing protocol A routing protocol specifies how routers communicate with each other to distribute information that enables them to select paths between nodes on a computer network. Routers perform the traffic directing functions on the Internet; data packet ...
s.
Static route Static routing describes a process by which routing is configured with fixed values that do not change at runtime unless manually edited. Static routes are used with and without dynamic Routing protocols and usually share the same routing table as ...
s are entries that are fixed, rather than resulting from routing protocols and network topology discovery procedures.


Overview

A routing table is analogous to a distribution map in
package delivery Package delivery, or parcel delivery, is the delivery of shipping containers, parcels, or high-value mail in single shipments. The service is provided by most postal systems, express mail, private courier companies, and less-than-truckload shipp ...
. Whenever a
node In general, a node is a localized swelling (a "knot") or a point of intersection (a vertex). Node may refer to: In mathematics * Vertex (graph theory), a vertex in a mathematical graph *Vertex (geometry), a point where two or more curves, lines ...
needs to send data to another node on a network, it must first know ''where'' to send it. If the node cannot directly connect to the destination node, it has to send it via other nodes along a route to the destination node. Each node needs to keep track of which way to deliver various packages of data, and for this it uses a routing table. A routing table is a database that keeps track of paths, like a map, and uses these to determine which way to forward traffic. A routing table is a data file in RAM that is used to store route information about directly connected and remote networks. Nodes can also share the contents of their routing table with other nodes. The primary function of a router is to forward a packet toward its destination network, which is the destination IP address of the packet. To do this, a router needs to search the routing information stored in its routing table. The routing table contains network/next hop associations. These associations tell a router that a particular destination can be optimally reached by sending the packet to a specific router that represents the next hop on the way to the final destination. The next hop association can also be the outgoing or exit interface to the final destination. With 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
Internet layer The internet layer is a group of internetworking methods, protocols, and specifications in the Internet protocol suite that are used to transport network packets from the originating host across network boundaries; if necessary, to the desti ...
and the OSI
Network Layer In the seven-layer OSI model of computer networking, the network layer is layer 3. The network layer is responsible for packet forwarding including routing through intermediate Router (computing), routers. Functions The network layer provides t ...
. When a router interface is configured with an IP address and subnet mask, the interface becomes a host on that attached network. A directly connected network is a network that is directly attached to one of the router interfaces. The network address and subnet mask of the interface, along with the interface type and number, are entered into the routing table as a directly connected network. A remote network is a network that can only be reached by sending the packet to another router. Routing table entries to remote networks may be either dynamic or static. Dynamic routes are routes to remote networks that were learned automatically by the router through a dynamic routing protocol. Static routes are routes that a network administrator manually configured. Routing tables are also a key aspect of certain security operations, such as unicast reverse path forwarding (uRPF). 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 involved in a network attack and is dropped.


Difficulties

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 Classless Inter-Domain Routing (CIDR ) is a method for allocating IP addresses for IP routing. The Internet Engineering Task Force introduced CIDR in 1993 to replace the previous classful network addressing architecture on the Internet. Its goal ...
(CIDR).
Supernetwork A supernetwork, or supernet, is an Internet Protocol (IP) network that is formed by aggregation of multiple networks (or subnets) into a larger network. The new routing prefix for the aggregate network represents the constituent networks in a s ...
s can also be used to help control routing table size.


Contents

The routing table consists of at least three information fields: #''network identifier'': The destination subnet and netmask #''metric'': The routing metric of the path through which the packet is to be sent. The route will go in the direction of the gateway with the lowest metric. #''next hop'': The next hop, or gateway, is the address of the next station to which the packet is to be sent on the way to its final destination Depending on the application and implementation, it can also contain additional values that refine path selection: #''quality of service'' associated with the route. For example, the U flag indicates that an IP route is up. #''filtering criteria'':
Access-control list In computer security, an access-control list (ACL) is a list of permissions associated with a system resource (object or facility). An ACL specifies which users or system processes are granted access to resources, as well as what operations are al ...
s associated with the route #''interface'': Such as eth0 for the first Ethernet card, eth1 for the second Ethernet card, etc. Shown below is an example of what the table above could look like on a computer connected to the internet via a
home router A residential gateway is a small consumer-grade gateway which bridges network access between connected local area network (LAN) hosts to a wide area network (WAN) (such as the Internet) via a modem, or directly connects to a WAN (as in EttH), wh ...
: * The columns Network destination and Netmask together describe the Network identifier as mentioned earlier. For example, destination 192.168.0.0 and netmask 255.255.255.0 can be written as 192.168.0.0/24. * The Gateway column contains the same information as the Next hop, i.e. it points to the gateway through which the network can be reached. * The Interface indicates what locally available interface is responsible for reaching the gateway. In this example, gateway 192.168.0.1 (the internet router) can be reached through the local network card with address 192.168.0.100. * Finally, the Metric indicates the associated cost of using the indicated route. This is useful for determining the efficiency of a certain route from two points in a network. In this example, it is more efficient to communicate with the computer itself through the use of address 127.0.0.1 (called ''localhost'') than it would be through 192.168.0.100 (the IP address of the local network card).


Forwarding table

Routing tables are generally not used directly for
packet forwarding Packet forwarding is the relaying of packets from one network segment to another by nodes in a computer network. Models The simplest forwarding model unicastinginvolves a packet being relayed from link to link along a chain leading from th ...
in modern router architectures; instead, they are used to generate the information for a simpler
forwarding table A forwarding information base (FIB), also known as a forwarding table or MAC (address) table, is most commonly used in network bridging, routing, and similar functions to find the proper output network interface controller to which the input inte ...
. This forwarding table contains only the routes which are chosen by the
routing algorithm Routing is the process of selecting a path for traffic in a network or between or across multiple networks. Broadly, routing is performed in many types of networks, including circuit-switched networks, such as the public switched telephone netw ...
as preferred routes for packet forwarding. It is often in a compressed or pre-compiled format that is optimized for hardware storage and
lookup In computer science, a lookup table (LUT) is an array that replaces runtime computation of a mathematical function with a simpler array indexing operation, in a process termed as ''direct addressing''. The savings in processing time can be sig ...
. This router architecture separates the
control plane In network routing, the control plane is the part of the router architecture that is concerned with establishing the network topology, or the information in a routing table that defines what to do with incoming packets. Control plane functions, ...
function of the routing table from the
forwarding plane In routing, the data plane, sometimes called the forwarding plane or user plane, defines the part of the router architecture that decides what to do with packets arriving on an inbound interface. Most commonly, it refers to a table in which the ...
function of the forwarding table.Forwarding and Control Element Separation (ForCES) Framework
L. Yang ''et al.'', RFC3746, April 2004. This separation of control and forwarding provides uninterrupted high-performance forwarding.


See also

*
Luleå algorithm The Luleå algorithm of computer science, designed by , is a technique for storing and searching internet routing tables efficiently. It is named after the Luleå University of Technology, the home institute/university of the technique's authors. ...
*
Internet protocol suite The Internet protocol suite, commonly known as TCP/IP, is a framework for organizing the communication protocols used in the Internet and similar computer networks according to functional criteria. The foundational protocols in the suite are ...


References


External links


IP Routing
from the Linux Network Administrators Guide {{DEFAULTSORT:Routing Table Internet architecture Routing Data structures