cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
453
Views
10
Helpful
2
Replies

Question to OSPF

as00001111
Level 1
Level 1

Hey cisco experts ;-)

which is the default formula for calculating the OSPF routing metric?

and what are the metrics for Fa, E, T1 and T3.

Thanks so far!

 

 

2 Replies 2

Krishnendu AR
Level 1
Level 1

OSPF calculates the cost of a link using the associated interface bandwidth command. The cost is calculated as follows:

Cost = Reference bandwidth/interface bandwidth.

The reference bandwidth is 100Mbps by default.  So a Fasterthernet interface will have a cost of 1 which is equal to 100/100.

Ethernet interface will have cost of 10 which is equal to 100/10.

Similarly a T1 line will have cost of 64 which is 100/1.544=64.76683937823834(Round off to 64)

However, you cast change the reference bandwidth to a different value using 'auto-cost reference bandwidth' command.

R1(config)#router ospf 1

R1(config-router)#auto-cost reference-bandwidth 1000

 

After this all cost calculation will be based on 1000Mbps.

 

Krishna

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

Per RFC OSPF standards, cost is not auto calculated nor is it directly related to bandwidth.

However, on most (all?) Cisco OSPF (v2) implementations, they auto calculate using 100 Mbps as a reference bandwidth, i.e. gig = 1, 100 Mbps = 1, 10 Mbps = 10, etc.

Other vendors may, or may not, auto calculate OSPF costs based on bandwidth.  If they do, they may also, and often do, use a different reference bandwidth than 100 Mbps.

Cisco implementations often allow you to change the auto cost reference value.