cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
886
Views
0
Helpful
6
Replies

OSPF Costs for "Improper Connection"

So, I have a question that may be overly simplistic or even dumb/silly.  The network I manage now is fairly basic and I frequently find connections, where the previous engineer, would connect a switchport on one side is FastEthernet and GigabitEthernet on the other side.  And a question came to mind that I have not been able to find the answer to.  In a routing situation what if the connection on one side was Fa(OSPF cost 10) but the other side of the connection is Gi(OSPF cost of 1).  Does the algorithm base cost off of the speed capability of the port or the actual speed capability of the link(In my case above it would be FastEthernet)?

6 Replies 6

Joseph W. Doherty
Hall of Fame
Hall of Fame

By default, I recall, it uses the active speed.  So, for example, a gig interface running at 100 Mbps would be costed like the FE interface.

The way the SPF calculation works is every router in an area has a complete database of all the link states, and each router calculates its own shortest path based on where it is in the topology. The short answer to your question is it probably doesn't make a difference in the scenario that you describe. I am basing that on the assumption that there are not multiple links between these routers. If there were multiple links where the costs were different between one router and another, you could see some asymmetric traffic routing.

balaji.bandi
Hall of Fame
Hall of Fame

Adding to other comments - even though both devices have different speed, they negogiate with one speed that is fastethernet.

 

if this is the Only path for OSPF ? what choice you got here ?  (where is the cost coming in to picture ?)

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @AaronCurtis33893 ,

the actual speed of the link is used so both routers on both sides should agree on OSPF cost of the link .

Of course you need to configure under router ospf  a consistent reference bandwdith with the default value of 100 Mbps both a GE and an FE have cost 1.

Probably using a reference bandwidth of 100 Gbps is now a wise choice.

 

Hope to help

Giuseppe

 

Giuseppe mentions a great side note, OSPF auto costing on Cisco routers.

By default, as he notes, a reference bandwidth of 100 Mbps is used (by Cisco).  This means, unless you change the default, all links of 100 Mbps, or better, are treated alike (for costing).

Oh, also keep in mind, non-Cisco routers often use a different reference bandwidth or none at all.

Giuseppe also notes using a reference bandwidth of 100 gig, now is a wise choice.  Well, it used to be (still?) Cisco's OSPF used a 16 bit value for OSPF cost, which meant it wasn't that difficult to "overflow" it if you used a too high reference bandwidth.  This then would cause routers to be unable to pick the "best" path in some situations.  (NB: the "overflow" could occur on cumulative cost to destination or on interfaces with very little bandwidth, e.g. fractional T1s, again while using a high/large reference bandwidth.)

Hello @Joseph W. Doherty ,

yes the suggestion to use a 100G as reference bandwidth is appropriate for networks with links 10 Mbps or above.

OSPF metric is 16 bit for intra area routes O and it is 24 bit for Inter area routes.

Likely slow WAN links can be put in separate stub areas to minimize OSPF activity over them.

 

We can still apply an ip ospf cost command in interface mode that overrides auto-cost.

 

Hope to help

Giuseppe

 

Review Cisco Networking for a $25 gift card