18. July 2012 · Comments Off on How To Calculate OSPF Cost · Categories: Cisco · Tags: , , ,

As a CCNA / CCNP candidate you are expected to understand how to set and interpret the OSPF cost function on your Cisco devices

During your career as a Cisco network engineer you will have to deal with setting and manipulating the OSPF costs on an interface.

OSPF uses a metric called “Cost” to calculate the metric of path. The cost is a cumulative value which is an incremental metric.

The cost is as a default based on the bandwidth of the interface. The Higher the interface bandwidth the lower the cost that is associated to that interface, to see the cost that is assigned to any given interface which is participating in OSPF issue the following command:

Router# show ip ospf interface

The output of this command will show the current cost given to this interface. The costs of the interface is calculated by taking the bandwidth of the interface and dividing this number by a value known as the “auto-cost reference-bandwidth”. This auto-cost reference-bandwidth is an integer used to calculate a standard metric across OSPF and is set to 100,000,000. The cost is calculated as follows:

100,000,000/BW More »

18. July 2012 · Comments Off on Calculating EIGRP Metric · Categories: Cisco · Tags: , ,

IGRP metric for a path to destination is calculated by the following rather complex mathematical formula:

IGRP Metric for the path =
[K1 * (B) + (K2 * (B))/(256-(Load)) + K3*(D)] * [K5/((Reliability) + K4)]

where:

K1, K2, K3, K4, K5: all are constants. Default values are: K1=K3=1, K2=K4=K5=0
(B) = 10,000,000 / (Smallest bandwidth in kilobits, along the path)
(Load): Outgoing interface load at this router, measured from integer 1 (0%) to 255 (100%)
(D) = Sum of outgoing interface delays along the path, starting from this router, in micro seconds, then divide by 10
(Reliability): Outgoing interface reliability at this router, measured from integer 1 (0%) to 255 (100%)

When we fill K1 to K5 constants with default values into the formula, it becomes very simple:

IGRP Metric for the path = (B) + (D)

Wait, what about EIGRP metric? EIGRP metric is just equal to the calculated IGRP metric value multiplied by 256.

EIGRP Metric for the path = 256 * (IGRP Metric for the path)

Of course, after the router calculates metric values of all candidate paths to the destination, it choose the path with the smallest metric value, to put in its routing table.