09-28-2023 10:27 PM - last edited on 10-11-2023 03:20 AM by Translator
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.
Solved! Go to Solution.
09-28-2023 11:47 PM - last edited on 10-11-2023 03:34 AM by Translator
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
09-28-2023 10:43 PM - last edited on 10-11-2023 03:23 AM by Translator
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.
09-28-2023 11:00 PM
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?
09-28-2023 11:06 PM - last edited on 10-11-2023 03:29 AM by Translator
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.
09-28-2023 10:49 PM
It same
Ospf use LSDB terminology
Eigrp use topology terminology
09-28-2023 11:14 PM - edited 09-28-2023 11:18 PM
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.
As i mention before topology is for eigrp and lsdb is for ospf.
09-28-2023 11:19 PM - edited 09-28-2023 11:30 PM
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?
09-28-2023 11:24 PM - last edited on 10-11-2023 03:31 AM by Translator
Correct that
maximum-path
command in OSPF controls the number of ECMP routes that can be installed in the RIB for a particular destination ?
09-28-2023 11:38 PM
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.
09-28-2023 11:43 PM - last edited on 10-11-2023 03:33 AM by Translator
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.
09-28-2023 11:47 PM - last edited on 10-11-2023 03:34 AM by Translator
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
09-28-2023 11:55 PM
Thanks @MHM Cisco World for that clarification.
09-29-2023 12:02 AM
Friend you are always so so welcome.
Have a nice day
MHM
09-29-2023 07:03 AM - last edited on 10-11-2023 03:41 AM by Translator
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 **
09-29-2023 07:48 AM
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.)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide