A router is a networking device that performs the function of forwarding data packets between the computer networks. The device is generally connected with two or more different networks. When a specific data packet comes across a router port, it reads the address information in the packet in order to determine which port the packet is required to be dispatched.
When the packet reaches at a router, the assessment of the destination IP address is made for the received packet and the routing decisions are taken in accordance with that. In order to determine which interface packet should be sent, the routers takes the help of Routing Tables. The key aspect of a routing table is that it enlists all the networks for which the routes are identifiable. The IP routing table meant for each router is unique of it’s stored within the RAM of the device.
Understanding IP Routing Table
An IP routing table comprises of a set of rules that are generally viewed in terms of table format. The rules are used in order to determine where the data packets are travelling over an IP (Internet Protocol) network. All kinds of Internet Protocol-enabled devices, comprising switches and routers, utilize the routing tables.
See below an example of an IP Routing Table (after issue of “show ip route” command) where Router learns route 184.108.40.206/24 via EIGRP protocol –
The Components of IP Routing Table:
A routing table comprises of necessary information in order to forward a particular packet via the best path suggestive to it’s destination. Here, each of the packet comprises of the information regarding it’s origin and destination. It is the job of the IP routing table to deliver the device with instructions in order to dispatch the packet through the next hop on it’s prescribed route across the network.
Please note that each of the entry associated with the IP routing table comprises of the following components-
- Network ID: The network-ID features the destination corresponding with the route.
- Subnet Mask: The mask employed to match a network ID to the destination IP address.
- Next Hop: The specific IP address over which the packet is transmitted (forwarded).
- Outgoing Interface: An outgoing interface is the interface where the packet has to go in order to reach down the destination network.
- Metric: Most common usage of the metric is indicating the minimal number of hops (i.e. routers crossed) to reach the network ID.
The Utility of IP Routing Table Entries:
The entries can be utilized in order to store up the following kinds of routes-
- Directly Linked Network IDs
- The Remote Network-IDs
The Route Determination Process:
Here at last, we are going to throw some light on the route determination process with the help of an example. Routers select best routes based on the following 3 key criteria’s –
Criteria 1 :
The route is selected with the longest match to the destination address and therefore traffic is forwarded. As an example, packet destined for 192.168.10.10 has 2 routes in routing table ie 192.168.0.0/16 and 192.168.10.0/24.The packets will be forwarded using the 192.168.10.0/24 route.
Criteria 2 :
If router receiving the same route/subnet from multiple routing protocols, in that case it will refer to administrative distance to break the ice. The route with lowest Administrative distance in the routing table will be preferred. As an example, Router received route 192.168.10.0/24 from EIGRP (AD = 90) and OSPF (AD=110). In this tie breaker, EIGRP route will be preferred since has lower AD than OSPF.
Criteria 3 :
In case router receives same route from same routing protocol, then criteria 1 and 2 will be of no use. In this case, metric value will be referred to and lowest value of metric will be considered as the best path.
Now, with that we conclude the description of IP routing table and its components.