cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
25985
Views
30
Helpful
9
Replies

OSPF auto-cost reference-bandwidth

amacdos
Level 1
Level 1

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

9 Replies 9

adamclarkuk_2
Level 4
Level 4

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.

Thanks Adam ,

How do I calculate the cost of my gigabit ethernet . What is the default cost of ethernet , fastethernet and gigabitethernet .

Example : Gigabit Ethernet

cost= 52428800000/ ? =

Hi ,

Sorry ,can I know , why do we need to change the default cost assigned . Because in my environment we only use Gig and Ten Gig . I am still new in this company

Giuseppe Larosa
Hall of Fame
Hall of Fame

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

Hi there ,

The difficult part is , that I couldn't understand is the GE interface becomes 50 , how do i get the origional reference BW for GE interface which 1 .

Is it like this

500000000 ( refrence bandwidth )/ 10000000 = 50

I am sorry , I am still new in networking

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

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.

Ok , thanks Giuseppe

Joseph W. Doherty
Hall of Fame
Hall of Fame

"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.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card