OSPF, despite its complexity, calculates the costs of a route in one of two remarkably simple ways:
A non–bandwidth-sensitive default value can be used for each OSPF interface.
OSPF can automatically calculate the cost of using individual router interfaces.
Regardless of which method is employed, the cost of any given route is calculated by summing the costs of all interfaces encountered along that route. A record is kept of the summed costs to known destination in OSPF's shortest-path tree.
OSPF can automatically calculate the cost of an interface. This algorithm is based on the amount of bandwidth that each interface type supports. The sum of the calculated values of all interfaces in a given route ...