Wednesday 2 October 2019

What is Routing Table and How Routing Tables work?

What is Routing Table and How Routing Tables work?

In this article we will learn about what is routing table  and How Routing Tables work. We also discus about the routing table of static and dynamic routes. First we give you a little introduction of routing table.

What is Routing Table ?

A routing table is used for performing the route selections and it contains the best routes to each destinations. A router's routing table stores information about the following:

  • Directly connected routes: these routes come from the router's active interfaces. Routers add a directly connected route when an interface is configured with an IP address and activated.
  • Remote routes : these are remote networks connected to other routers. The routes that go to these networks can be configured statically or learn dynamically using dynamic routing protocols.

Specifically, a routing table is a data file that is in RAM and is used to store route information on remote and directly connected networks. The routing table contains network or next hop associations. These associations indicate to the router that a particular destination can be reached optimally if the packet is sent to a particular router that represents the next hop on the way to the final destination. The association of the next jump can also be the output interface to the next destination.

Origins of Routing Table

On Cisco routers, the show ip route command can be used to display the IPv4 routing table of a router. Routers provide additional route information, including how the route was discovered, how long the route was in the routing table and what specific interface should be used to reach a predefined destination.
Entries in the routing table can be added as follows:

  1. Local route interfaces : added when the interface is configured and active.
  2. Directly connected interfaces : added when the interface is configured and active.
  3. Static routes : added when a route is manually configured and the exit interface is active.
  4. Dynamic routing protocol : added when routing protocols that dynamically discover the network, such as EIGRP or OSPF, are implemented and when networks are identified.

The sources of the routing table entries are identified with a code. The code identifies the way the route was discovered. For example, frequent codes include the following:

  • L : Identifies the address assigned to the interface of a router. This allows the router to determine effectively whether it receives a packet for the interface or for forwarding.
  • C : Show a directly connected network.
  • S : representing a static route created to reach a specific network.
  • D : Identifies a network that is dynamically discovered from another router with EIGRP.
  • Or : indicates a network that is dynamically discovered from another router with the OSPF routing protocol.

Remote Network Routing Table entries:

As a network administrator, it is essential to know how to interpret the contents of the IPv4 and IPv6 routing tables. So the following image shows an entry in the IPv4 routing table on R1 for the route to the remote network 10.1.1.0.

The entry indicates the following information:


  • Origin of the route: identifies the way in which the route was discovered.
  • Destination network : Identifies the address of the remote network.
  • Administrative distance : identifies the reliability of the origin of the route. The lower values ​​indicate the preferred route origin.
  • Metric : Identifies the value assigned to reach the remote network. The lower values ​​indicate the preferred routes.
  • Next hop : Identifies the IPv4 address of the next router to which the packet should be forwarded.
  • Route timestamp : Identifies the time that has passed since the route was discovered.
  • Outbound interface : Identifies the outbound interface that should be used to forward a packet to the final destination.

Directly Connected Network Routing Table entries:

An active interface, correctly configured and directly connected, generates two entries in the routing table. The following image shows the entries in the IPv4 routing table on R1 for the directly connected network 192.168.10.0.


The entries contain the following information:


  • Origin of the route : identifies the way in which the route was discovered. Directly connected interfaces have two route source codes. The "C" code identifies a directly connected network. The "L" code identifies the IPv4 address assigned to the router interface.
  • Destination network : the address of the remote network.
  • Outbound interface : Identifies the outbound interface used to forward packets to the destination network. (How Routing Tables work?)

Routing Table of Static Routes:

They are configured manually and define an explicit route between two network devices. Unlike dynamic routing protocols, static routes are not updated automatically and must be reconfigured manually if the network topology is modified. The benefits of using static routes include improved security and resource efficiency. Static routes consume less bandwidth than dynamic routing protocols, and no CPU cycle is used to calculate and communicate routes.
There are two types of common static routes in the routing table:

Static route to a specific network : Static routes are identified in the routing table with the code “S” and configured with the following command.
Router (config) # ip route network mask {next-hop-ip | exit-intf}
Default static route : They are similar to a default gateway on a host and are useful when a router has only one exit point to another router. They are configured as follows:
Router (config) # ip route 0.0.0.0 0.0.0.0 {exit-intf | next-hop-ip}

Routing Table of Dynamic Routes

Routers use dynamic routing protocols to share information about the status and possibility of connecting remote networks. Dynamic routing protocols perform various activities, such as network detection and maintenance of routing tables.

Dynamic routing

Network discovery is the ability of a routing protocol to share information about networks that it knows with other routers that are also using the same routing protocol. Instead of relying on manually configured static routes to remote networks on each router, dynamic routing protocols allow routers to discover these networks automatically through other routers. These networks and the best route to each are added to the router routing table and are identified as networks discovered by a specific dynamic routing protocol.
During network discovery, routers exchange routes and update their routing tables. The routers converge once they finish the exchange and update their routing tables. Then, the routers keep the networks in their routing tables.


  • IPv4 routing protocols : EIGRP (enhanced internal gateway routing protocol), OSPF (open the shortest route first), IS-IS (intermediate system to intermediate system), RIP (routing information protocol)
  • IPv6 routing protocols : RIPng (next generation RIP), OSPFv3, EIGRP for IPv6
How Routing Tables work?

No comments:

Post a Comment