02-16-2009 02:14 AM - edited 03-06-2019 04:03 AM
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
02-16-2009 02:26 AM
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.
02-16-2009 05:27 PM
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/ ? =
02-16-2009 05:56 PM
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
02-16-2009 03:28 AM
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
02-16-2009 05:18 PM
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
02-17-2009 12:09 AM
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
02-17-2009 04:50 AM
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.
02-22-2009 08:45 PM
Ok , thanks Giuseppe
02-16-2009 04:47 AM
"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.
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: