Path preference - connorethanjay/CCNP-Enterprise-Preparation GitHub Wiki
1.10.d OSPF Path preference
The cost of an OSPF link is calculated by dividing the reference bandwith by the interface bandwith.
-
The default reference bandwith is 100,000,000 bits per second, or 100 Mbps. This can be changed.
- If you were to calculate the cost of a 100Mpbs link, your cost for that link would be 1.
-
1 Mbps - 100
-
10 Mbps - 10
-
100 Mbps - 1
-
1 Gbps - By default anything over 100mbps is also 1.
- The most efficient path from PC1 to PC2 in this case is from R1 > R2 > R3. This would have a cost of 3.
- Taking the path from R1 straight to R3 would cost 11.
Adjusting reference bandwidth
The following command changes the default reference bandwidth used in OSPF calculations.
Router(config-router)# auto-cost reference-bandwidth <bandwidth in Mbps>
The following command changes the default reference bandwidth used in OSPF calculations to 1 gbps.
Router(config-router)# auto-cost reference-bandwidth 1000