Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

OSPF cost and route selection

Hi

It is a quite simple question.  If there are multiple available paths from A to B (same area). Router will only update the shortest path(least cost) in the routing table or more than that?

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

OSPF cost and route selection

Hello Xi,

I'd like to add to Vivek's answer that what OSPF really has in its database are only topological pieces of information from which the resulting shortest path can be computed - or "stitched together". OSPF does not really precompute the backup paths even if they are available, rather, it only maintains the data from which the backup path can be computed later. If the primary path fails, OSPF has to reprocess its link-state database to compute the new best path. It does not have the backup path readily available.

Best regards,

Peter

6 REPLIES

OSPF cost and route selection

yes you are right. Router will have the best path installed into its routing table (i.e the one with least cost). But it will keep the backup path always in its OSPF database. You can see that by issuing show ip ospf database command.

Hope it helps.

Cisco Employee

OSPF cost and route selection

Hello Xi,

I'd like to add to Vivek's answer that what OSPF really has in its database are only topological pieces of information from which the resulting shortest path can be computed - or "stitched together". OSPF does not really precompute the backup paths even if they are available, rather, it only maintains the data from which the backup path can be computed later. If the primary path fails, OSPF has to reprocess its link-state database to compute the new best path. It does not have the backup path readily available.

Best regards,

Peter

OSPF cost and route selection

Thanks Peter to complete the post. Yes, OSPF has to re-run the SPF algorithm to compute a backup path even though it has the topological roadmap of the entire network.

Cisco Employee

OSPF cost and route selection

Just to add..

the routing protocols will calculate the best path for all the network that it knows off and sends it to the router's processor.

The router now takes all these path, compare the AD of each of the network advertised by various routing protocols and then decide on what should get into the routing table. the cost comes in as a Tie Breaker

-Vijay

Super Bronze

OSPF cost and route selection

Disclaimer

The   Author of this posting offers the information contained within this   posting without consideration and with the reader's understanding that   there's no implied or expressed suitability or fitness for any purpose.   Information provided is for informational purposes only and should not   be construed as rendering professional advice of any kind. Usage of  this  posting's information is solely at reader's own risk.

Liability Disclaimer

In   no event shall Author be liable for any damages whatsoever (including,   without limitation, damages for loss of use, data or profit) arising  out  of the use or inability to use the posting's information even if  Author  has been advised of the possibility of such damage.

Posting

One additional note for the OP, OSPF can maintain equal cost routes in the route table.

New Member

OSPF cost and route selection

Thanks for all of you guys.

742
Views
10
Helpful
6
Replies