ospf cost per interface

Unanswered Question
Apr 10th, 2012

Hi Experts

what is the ospf cost for 1G and FE, if i need to adjust cost per interface not under the ospf process

what is the impact of routing if we didnt tune the ospf cost ,as i know the default ospf cost is  100Mbps, while we have 1G in our network



I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (2 ratings)
cadet alain Tue, 04/10/2012 - 09:35


if you want to change the cost of the interface without modifying the reference bandwidth then you must issue the ip ospf cost interface command.

If you don't modify the cost then by default the Gig interface will have same cost as Fastethernet one and so instead of choosing the Gig interface as output interface you may be doing load balancing using both interfaces.



Ibrahim Jamil Tue, 04/10/2012 - 10:27


1)what is the ospf cost for 1G and FE?

2)what is the command means, ip ospf cost 2?????


cadet alain Tue, 04/10/2012 - 10:33


1)by default reference BW is 100 Mbps and cost is ref BW/ interface bandwidth and so by default cost of both interfaces is 1.

2) it means the cost of interface is 2 whatsoever and you can verify it with sh ip ospf interface | i Cost  command



cadet alain Tue, 04/10/2012 - 11:00

OSPF can only do equal cost load balancing so yes the cost can influence the load-balancing.



Ibrahim Jamil Tue, 04/10/2012 - 11:04

Hi Cadet

1)can u tell me the what cost should i configure under my gig interfaces wich running ospf?

2) did i need to change cost to x on all gig interface which running ospf??

3)pls note  , all my inreface running ospf are GIG

4)how to load balancing load sharing on all interface running ospf?


cadet alain Tue, 04/10/2012 - 12:15

if all your interfaces are Gig interfaces then you can leave it this way and all will get a cost of 1.

you'll be doing load balancing on all interfaces up to 6 if I remember well configurable with maximum-path command under routing process



mikeburr1234 Wed, 04/11/2012 - 21:21

hmmm, if you really need a lot of networks to be equal cost, you could always use redistribution instead of having the networks advertised directly in OSPF. You could then use a route map and set the metric and ensure that they are type-2 external routes. Then, if there are multiple paths to the networks, traffic should be fairly equally distributed where there are multiple paths. Any way that you could show the topology that you are dealing with?


Mike Burr

Mike's Technology and Finance Blog

Vasileios Bouloukos Fri, 04/13/2012 - 06:51


The default number of equal-cost paths that can be placed into the routing of a Cisco OSPF router is 4. We can change this default value by using “maximum-paths” command:

Router(config-router)#maximum-paths X

Cisco routers support up to 6 equal-cost paths




This Discussion