cost = reference-bandwidth / interface bandwidth
[edit interfaces [INT]] bandwidth
[edit protocols ospf area [AREA] interface [INT]] metric
[edit protocols ospf] reference-bandwidth [REF-BW]
Default reference BW is 100Mb. Meaning that links that have a speed of 100Mbs or more, will have a cost of 1.
Reference Bw = cost * bandwidth
For example, if we want that a GigabitEthernet interface has a cost of 7:
Reference BW = 7 * 10.00.000.000
Reference BW = 7.000.000.000
The result should be
We should try to avoid having interfaces with the maximum metric on OSPF (65535)
It's recommended that all routers use the same reference bandwidth.