cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2007
Views
7
Helpful
14
Replies

OSPF topology table vs LSDB database

riad1990new
Level 1
Level 1

Hello,

I've been reading a lot recently about OSPF, and I want to confirm something that might sound stupid, but is the LSDB database the same as the topology database/table? or is the topology table simply calculated from the LSDB? if they are not the same, what's the difference?

And to my understanding, OSPF has three tables which it maintains, the topology, neighbor, and routing table. For the routing table, does it contain all possible OSPF routes, or up to the number of routes configured in the

maximum-path

command/or the default number of OSPF ECMP routes?

Thanks,
Riad.

1 Accepted Solution

Accepted Solutions

Where is

show ip ospf topolgy

Friend it is 

Show ip eigrp topolgy

 And that what I mention from first comment.

Make double check on photo you share 

View solution in original post

14 Replies 14

M02@rt37
VIP
VIP

Hello @riad1990new,

The LSDB is a collection of all LSA that OSPF routers in an area have received. It's essentially a database that holds the link-state information about the network.

The Topology database, often referred to as the SPF databasr, is derived from the LSDB. It is constructed by calculating the shortest path tree using Dijkstra's algorithm. This database represents the network's topology and is used to determine the best paths to various destinations.

The OSPF routing table contains the best routes determined by SPF, and the

maximum-path

command controls the number of ECMP paths for a specific destination that can be installed in the routing table. It doesn't limit the number of OSPF routes stored in the fouting table.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Thanks M02@rt37, I understood your explanation regarding the topology table, but for the OSPF routing table, I want to clarify one thing, when you said " It doesn't limit the number of OSPF routes stored in the fouting table", did you mean it doesn't limit the number of routes stored in the OSPF routing table?

@riad1990new 

Rather, it controls the maximum number of ECMP paths that can be installed in the routing table for a specific destination.

For example, if you set

maximum-path 4

, it means OSPF can install up to 4 equal-cost paths to a particular destination in the routing table, facilitating load balancing.

The

maximu-path

 command primarily affects the selection and installation of ECMP paths for load balancing purposes but does not restrict the number of OSPF routes that can be stored in the OSPF routing table.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

It same 

Ospf use LSDB terminology 

Eigrp use topology terminology 

Lsdb or topology dont have any rule in ecmp.

Ecmp is appear in rib but the db save all paths even if it 100.

The db is collecting all lsa and then sfp do process to select best path.

images (12).jpeg

As  i mention before topology is for eigrp and lsdb is for ospf.

Thanks MHM Cisco World, but I'm a bit confused now because you guys are saying two different things.

You're saying that the LSDB and topology table are the same thing, and ECMP is only applied when the OSPF routes are promoted to the router's routing table, not the topology or OSPF routing table correct?

And also, if you are saying that the LSDB and the topology table are the same thing, then when OSPF applies the SPF/Dijkstra algorithm, it will result in the OSPF routing table, right? and from that table, routes may or may not get promoted to the router's routing table, correct?

@MHM Cisco World 

Correct that

maximum-path

 command in OSPF controls the number of ECMP routes that can be installed in the RIB for a particular destination ?

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

From it name it lsa db (lsdb) it collects lsa from all neighbor' and sfp process lsa and select best one (or many if ecmp) then push the prefix to rib.

It only terminology different it same.

But MHM Cisco World, if it's just terminology, take a look at this screenshot, there are two separate commands:

show ip ospf topology

and

show ip ospf database

I know there's a description next to each command, but that's why I've posted this post, I want to confirm, are they the same thing or not.

Thanks,

Riad.

Where is

show ip ospf topolgy

Friend it is 

Show ip eigrp topolgy

 And that what I mention from first comment.

Make double check on photo you share 

Thanks @MHM Cisco World for that clarification.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Friend you are always so so welcome.

Have a nice day 

MHM

Martin L
VIP
VIP

Unless you are talking about Multi-Topology Routing (MTR) which is supported and implemented in OSPF -see link here.- I understand confusion since many OSPF outputs will show word "topology base", The ENCOR book is clear:

OSPF sends to neighboring routers link-state advertisements (LSAs) that contain the link state and link metric. The received LSAs are stored in a local database called the link-state database (LSDB), and they are flooded throughout the OSPF routing domain, just as the advertising router advertised them. .... The LSDB provides the topology of the network, in essence providing for the router a complete map of the network. All OSPF routers run the Dijkstra shortest path first (SPF) algorithm to construct a loop-free topology of shortest paths.  OSPF dynamically detects topology changes within the network and calculates loop-free paths in a short amount of time with minimal routing protocol traffic.

If OSPF identifies multiple paths in the path selection algorithms, those routes are installed into the routing table as equal-cost multipathing (ECMP) routes. The default maximum number of ECMP paths is four paths. The default ECMP
setting can be overwritten with the command

maximum-paths maximum-paths

under the OSPF process to modify the default setting.

Source: ENCOR book, Cisco press, 2020

Regards, ML
**Please Rate All Helpful Responses **

Joseph W. Doherty
Hall of Fame
Hall of Fame

Possibly it might help to understand the LSDB is just what it's named, i.e. a database of all known LSAs (which can include LSAs not within a particular area). From this database, specific OSPF area topology directed graphs can be constructed for all connected OSPF areas.  Dijkstra algorithm can then be used to find the least cost metric path to all other networks reachable via a particular area.  Multiple equal cost paths might be found to the same network.

Once an area's shortest path topology has been computed (again from using the LSDB information), the route table entries can be generated, i.e. for destination networks their next hop, or hops (ECMP).

I believe, Cisco OSPF did not, historically, retain the area topology graph(s) and it had to be completely recomputed with any area topology change.

Then several years ago they provided a new optional feature ISPF (incremental SPF), which did NOT recompute a whole area's topology, just the part of the topology tree impacted by a change (which might save considerably amount of SPF computation).

I recall (?) reading, within the last year, the ISPF feature is no longer an option because it's now always on.

Anyway, the point of the above, I believe Cisco's OSPF did not actually keep the computed topology, until recently, and possibly does not, even now, provide a way to "view" the computed topology.

BTW, as an aside, some years back we tried out a 3rd party software package which would visually graph out an area's topology, at that moment.  Basically, you set up this software to have an OSPF adjacently with an area router.  So, it knew/computed the topology as well as a router.  (The software had other features such as alarming on topology changes, etc.)

Review Cisco Networking for a $25 gift card