OSPF auto-cost reference-bandwidth

Unanswered Question


Hi guys , I have a problem , in understanding ospf costs . Below is the command .


router ospf 1

router-id 1.1.1.3

log-adjacency-changes

auto-cost reference-bandwidth 50000

area 0 authentication message-digest

passive-interface default

no passive-interface GigabitEthernet5/1

no passive-interface GigabitEthernet6/1

network 1.1.1.254 0.0.0.0 area 0

network 1.1.1.66 0.0.0.0 area 0

network 1.1.1.7 0.0.0.0 area 0

network 1.1.1.4 0.0.0.0 area 0

network 1.1.1.254 0.0.0.0 area 0


Does it mean , OSPF has to use the , 50000 - 50 Gbps everywhere






  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 3.5 (5 ratings)
Loading.
adamclarkuk_2 Mon, 02/16/2009 - 02:26
User Badges:
  • Silver, 250 points or more

Hi


The standard OSPF cost model works on :-


cost= 100000000/bandwith in bps


The auto-cost reference-bandwidth commands changes the first value in the above formula, but uses Mbits per second as the argument, so the formula will now be


cost= 52428800000/bandwith in bps


If you do mess with this value, make sure you do it on all routers in your network.

Giuseppe Larosa Mon, 02/16/2009 - 03:28
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

Hello Alman,

if you change the reference bandwidth you need to do it on all your routers or possible routing problems can occur.


With your change for example the OSPF cost of a GE interface becomes 50 (from 1 using the original reference BW) so it is important to be consistent in this parameter.


Hope to help

Giuseppe


Giuseppe Larosa Tue, 02/17/2009 - 00:09
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

Hello Alman,

no problems these forums are intended for these questions and doubts.

the auto reference bandwidth expressed in Mbps is actually the numerator in the OSPF formula for link cost:


OSPF cost = Ref.BW /Interface. BW


50000000000 / 10000000000 = 50


to be noted that the cost cannot be zero.


The default reference BW is 100 Mbps.

So with default BW Ref value all links with speed > = 100 Mbps are considered equal with OSPF cost 1.

This is also the reason for changing the reference value.

the OSPF cost is a 16 bits unsigned integer.

Using a 50 Gbps reference BW allows to handle links with a lower speed limit of 762 kbps (50000 Mbps / 65535 gives this result)


so you need to take care of sub-T1 link speeds if there in your network use on them

ip ospf cost 65535


the total path OSPF cost is a 24 bits unsigned integer.


Hope to help

Giuseppe


Joseph W. Doherty Tue, 02/17/2009 - 04:50
User Badges:
  • Super Bronze, 10000 points or more

Also, within an OSPF area end-to-end link costs are cumulative. So, its possible to "overflow" cumulative cost value even though one link cost doesn't.

Joseph W. Doherty Mon, 02/16/2009 - 04:47
User Badges:
  • Super Bronze, 10000 points or more

"Does it mean , OSPF has to use the , 50000 - 50 Gbps everywhere "


No, you don't have to use it everywhere, but if you don't you need to be very careful in its application. If you have multiple paths via different routers and each is costing same bandwidth differently, other routers might not select the path as you normally would expect. (Much as if you were setting OSPF cost manually per interface.)


Also keep in mind, the OSPF cost value can overflow, which might happen sooner when you adjust for such high bandwidths.

Actions

This Discussion