04-23-2015 03:01 AM - edited 03-07-2019 11:41 PM
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!
04-23-2015 03:49 AM
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
04-23-2015 06:54 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide