# What is Routing Metric Value

If the router has more than one route found by two different routing protocols, for the same destination network, the router chooses Administrative Distance to choose the best one.

But in some cases, there will be two paths found by the same protocol, to the same destination network. Here the Routing Protocol will use Route Metric value to find the best path.

### How Route Metric value is calculated by different Routing Protocols?

#### Routing Information Protocol (RIP) Metric value

RIP (Routing Information Protocol) uses hop count as the metric.

Hop count is the number of routers through which data must pass from source network to reach the destination.

Hop Count = Number of Routers data must pass from source network to reach the destination.

Click the following link to know more about RIP (Routing Information Protocol) metric.

#### Enhanced Interior Gateway Routing Protocol (EIGRP) Metric value

Consider above network topology. Here we have two paths to reach the Destination Network from the Source Network, Path 1 and Path 2. For Routing Information Protocol (RIP), the best path is the path with least Hop Count, which is Path 2.

But if we consider the Bandwidth of the connecting links, 1.544 Mbps Bandwidth (along Path 2) is far less than that of 100 Mbps Bandwidth (along Path 1) and practically it is better to send the traffic via Path 1, even we have one more Hop to cross.

Routing Information Protocol (RIP) consider only the Distance (as Hop count) from Source Network to Destination Network to find the best path. Other factors like Bandwidth of connecting links, Delay etc are ignored by Routing Information Protocol (RIP) while selecting the best path.

Enhanced Interior Gateway Routing Protocol (EIGRP) uses a complex equation to find the Route Metric value.

Enhanced Interior Gateway Routing Protocol (EIGRP) consider the following network performance related attributes to calculate the EIGRP metric value. 1) Bandwidth 2) Delay 3) Reliability and 4) Load

EIGRP Metric = 256*((K1*Bandwidth) + (K2*Bandwidth)/(256-Load) + K3*Delay)*(K5/(Reliability + K4)))

By default, the values of K1 and K3 are set to 1, and K2, K4 and K5 are set to 0.

Hence the above equation is deduced to

EIGRP Metric = 256*(Bandwidth + Delay)

Click the following link to know more about Enhanced Interior Gateway Routing Protocol (EIGRP) Metric.

#### Open Shortest Path First (OSPF) Metric value (OSPF Cost Value)

Open Shortest Path First (OSPF) Metric value is also known as OSPF Cost Value. OSPF cost value for a particular route (path) is the accumulated cost to send packets from source network to destination network using that route.

The cost of an interface is inversely proportional to the bandwidth of that interface. Higher bandwidth interface has lower cost and low bandwidth interface has higher cost.In other words, the cost for sending data over a 1 Mbps WAN link will be higher that a 8 Mbps WAN link.

OSPF uses a reference bandwith of 100 Mbps to calculate the cost value.

The formula used to calculate the cost is 100000000 (100 Mbps converted to Bps)/Actual Bandwidth of the link in Bps.

If a router has a 8 Mbps WAN Link, the cost value for that link will be

100000000/8000000 = 12.5

Following are some of the factors to choose a best path to destination.

 Metric Routing Protocols Description Bandwidth The bandwidth of the links in Kbps (T1=1,554) Cost IP OSPF Measurement in the inverse of the bandwidth of the links Delay IP EIGRP, IP IGRP Time it takes to reach the destination Hop count IP RIP How many routers away from the destination Load IP EIGRP, IP IGRP The path with the least utilization Reliability IP EIGRP, IP IGRP The path with the least amount of errors or downtime

If a router found multiple paths with the same Administrative Distance value and Metric value to a destination, load balancing can occur. Cisco IOS Software has a limit of six equal-cost routes on the routing table, but some protocols set their own limitations. For example, EIGRP allows up to four equal-cost routes.

For almost all Routing Protocols, the route with least metric is considered as best route.