OSPF Reference Bandwidth Explained and Configuration Example

What is OSPF Reference Bandwidth:

OSPF Reference Bandwidth defines which interface link speed has an OSPF cost of 1.

Mathematically speaking:

Cost = 1, if Reference bandwidth = Interface Bandwidth (Interface speed)

OSPF Cost is assigned according to Interface bandwidth, the Formula is:

Cost = Reference bandwidth / Interface Bandwidth

This means that the Interface Bandwidth and the OSPF Interface Cost are inversely proportional.

In simple words, A higher Interface Bandwidth will have a lower Cost OSPF. The lowest OSPF cost is 1 when Interface Bandwidth is equal to Reference bandwidth.


Example:

if the Reference bandwidth=100 Mb/s, then the Cost of Any interface with a speed of 100 Mb/s is 1.

Link Speed = 100 Mb/s:

Cost = 100,000,000 bps 100,000,000 = 1


In the same way, Any interface with a Link speed less than 100 Mb/s would have a cost value greater than 1 (which will affect the SPF Dijkstra calculation).

Link Speed = 10 Mb/s:

Cost = 100,000,000 bps 10,000,000 = 10



OSPF Reference Bandwidth Limitation:

But, the issue here is when you have a link speed higher than 100 Mb/s, and you still use the same Reference Bandwidth, then the cost would be not accurate:

Link Speed = 1000 Mb/s:

Cost = 100,000,000 bps 1000,000,000 = 0,1 = (1 OSPF Cost)

So, the Cost of 1000 Mb/s link and 100 Mb/s link are equal when the Reference Bandwidth is 100 Mb/s.

In simple words, the issue with the OSPF Reference Bandwidth can be demonstrated when the Interface link speed is higher than the Reference Bandwidth because the OSPF Cost calculation doesn’t take into consideration the value under 1.




OSPF Reference Bandwidth Configuration

  • Change OSPF Reference Bandwidth:
Router1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router1(config)#router ospf 10
Router1(config-router)#auto-cost reference-bandwidth 1000000
% OSPF: Reference bandwidth is changed. 
        Please ensure reference bandwidth is consistent across all routers.
Router1(config-router)#end
Router1#

when this configuration is applied, the router will recalculate the OSPF cost for its interfaces in the OSPF process 10. 

Bilel Ameur

Enthusiastic Network Engineer specializing in Cisco ACI, passionate about solving challenges. A lifelong learner who loves gaining and sharing knowledge. Profile: https://www.linkedin.com/in/bilel-ameur-71116b2b5
5 1 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x