# How OSPF metric?

Discussion in 'Cisco' started by BB, Jan 5, 2005.

1. ### BBGuest

I have a question about OSPF cost. According cisco, to calculate cost in
OSPF, we use the formula: 10^8/BW. What's OSPF cost in Gigabit/10Gigabit
Ethernet interfaces

Thank you

BB, Jan 5, 2005

2. ### Hansang BaeGuest

On Wed, 5 Jan 2005 11:06:17 +0700, "BB" <> wrote:

>I have a question about OSPF cost. According cisco, to calculate cost in
>OSPF, we use the formula: 10^8/BW. What's OSPF cost in Gigabit/10Gigabit
>Ethernet interfaces
>

You can use "ip ospf cost" under the interfaces to manually set the
costs. Or you can use "auto-cost reference-bandwidth xxx' under the
OSPF process to modify the FastE-OCX+-FDDI-GigE == 1 problem.

hsb

"Somehow I imagined this experience would be more rewarding" Calvin
********************************************************************
Due to the volume of email that I receive, I may not not be able to
********************************************************************

Hansang Bae, Jan 5, 2005

3. ### Ivan OstrešGuest

In article <>, says...
> I have a question about OSPF cost. According cisco, to calculate cost in
> OSPF, we use the formula: 10^8/BW. What's OSPF cost in Gigabit/10Gigabit
> Ethernet interfaces
>

AFAIK, cost for interfaces with bandwidth equal or larger than 10^8 bps
is normalized to 1. It is not a good practice to left it that way
because it will not "see" the difference between (high bandwidth)
circuits.

The main reason for all this is that people which created OSPF spec in
the first place, didn't expect to have such a great bandwidth that is
available today. Seems it was a common mistake in IT in the past (just
remember DOS and 640K limit).

To fix problems you could use manual 'ip ospf cost' interface command
which will set appropriate cost to specified inteface. This might look
as a solution to a problem, but really it is not because you need to
lower bandwidth on Gig interfaces and you can't go into negative cost.

Probably the best way would be to use 'auto-cost reference-bandwidth'
command under your routing process command mode. It will put specified
bandwidth as a reference. The important thing is that you have to put
the same reference bandwidth to all OSPF routers in your OSPF domain to
get desired results.

You should be warned that while doing this, you might loose connectivity
on your routers for a while because routers have to run SPF algoritm
again. It could also create additional connectivity problems because of
possible asynchronous routing while not all the 'reference-bandwidth'
commands are in their place.

HTH,

--
-Ivan.

*** Use Rot13 to see my eMail address ***

Ivan Ostreš, Jan 5, 2005
4. ### peart

Joined:
May 29, 2008
Messages:
4
peart, Jun 18, 2008