cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
937
Views
5
Helpful
5
Replies

How does OSPF handle same cost paths?

Krishnendu AR
Level 1
Level 1

Lets assume there are 2 routes to a remote destination with equal cost. But one is 1Gbps line and other one is 100Mbps.

How does OSPF handle this situation?

Krishna

5 Replies 5

Hello,

    You will see routes installed in the routing table. And then CEF(if enabled) will take care of the rest. Actually Per destination load balancing is used.

HTH,

Toshi

What if I want to make the 1Gbps line my preffered route? How should I tweak the cost formula?

Krishna

Hello,

    Sure you can. You can modify cost on 100M to be worst(65535) as well.

HTH,

Toshi

Hi,

You can

1) modify the cost per interface with the interface command:  ip ospf cost

2) modify the reference-bandwidth used to automatically calculate the cost with this  OSPF process command:

ospf auto-cost reference -bandwidth 

But this command will affect the cost of all interfaces and first command overrides the cost per interface

Regards.

Alain

Don't forget to rate helpful posts.

Hi All,

Just wanted to add quickly to what Alain said about the reference bandwidth.

The default reference bandwidth of 100 calculates all links of speed 100Meg AND ABOVE with a cost of 1.  This became a problem for us when we moved to 1Gig, and then 10Gig and 44 Gig interlinks.  We were having to manually configure the link costs for every link and sometimes people would forget and routing wouldn't work as expected.

What we now do is on every OSPF device, we set the reference bandwitdh as stated above by Alain.  the Value we chose to set on all devices is 100,000 as this would alllow us to in future have 100Gig links with a cost of 1.

I'm not suggesting you adopt this, as the decision is based upon the speed of your links and the size of your network.  You may also decide to manually set speeds, which has less of an impact when implementing on a live network.

Below is a chart that I made up at the time in order to make the decision.  Note that if any route's cost grows to 65535 it gets classed as unreachable and will not get installed in the routing table, so if you have lots of low bandwitdh links, you need to take this into account.


Reference Bandwidth44Gig10Gig1Gig100Meg10Meg8Meg2meg1Meg512k256k
Default1001111101350100195391

1,000111101001255001,0001,9533,906

10,00011101001,0001,2505,00010,00019,53139,063

44,00014444404,4005,50022,00044,00065,53565,535

100,0002101001,00010,00012,50050,00065,53565,53565,535

200,0005202002,00020,00025,00065,53565,53565,53565,535

300,0007303003,00030,00037,50065,53565,53565,53565,535

Be careful doing this, as Alain said - applying the command will change the automatically calculated costs of every interface on the device which hasn't had its cost set manually, so this might cause routing issues if you are not careful.

Hope that Helps,

Nick

Review Cisco Networking products for a $25 gift card