OSPF Database and LSA Number Question

TenisuBakaTenisuBaka Member Posts: 46 ■■□□□□□□□□
Hello,

So I am reading the TSHOOT foundation book, and on page 168 it reviews what LSAs are and the basic types. That part is fine, but what I am having trouble understanding is the number of each type on each router. According to my understanding of the material presented, each router will calculate the LSA totals (by type of course) with the inclusion of ITS LSAs. I am having trouble wrapping my brain around this. I always thought this database was just keeping track of communications received. Why would each router include its own LSAs?

Comments

  • trackittrackit Member Posts: 224
    Every router in area has to have EXACT same topology table of that area, ie everybody in an area have to have exatly same LSA-s for that area.

    it doesnt matter if router originates an LSA or receives it from somebody else... everybody keeps the same topology table for specific area.

    for me it seems logical.... otherwise how would you run the SPF algorithm if you exclude your own LSA-s from the database
  • TenisuBakaTenisuBaka Member Posts: 46 ■■□□□□□□□□
    I see what u are saying, I guess it makes sense in that context, but why is it designed this way?

    About the algorithm, here is how I think about it: the whole point of a routing algorithm is to calculate paths to non-connected routes, so my thought process is opposite-why does the algorithm need the routers direct networks?
  • trackittrackit Member Posts: 224
    here is a nice demonstration of SPF algorithm...

    YouTube - Graphs: Dijkstra's Algorithm


    The point is that everybody has to have complete and exactly the same topology table and you have to keep track of LSA-s that you have originated, if you exclude them from the topology table then you cant run SPF

    EDIT: and of course you have to keep track of self-originated LSA-s also because each LSA has its own sequence number and age etc...
  • TenisuBakaTenisuBaka Member Posts: 46 ■■□□□□□□□□
    Thanks for that video link. After I process what I saw, it will become clear to me. Processing takes a little time for me though. Thanks a lot for that!

    I know the router has to keep track of its LSAs for management purposes, like you said about it having a sequence number. I just had it in mind that communications sent and communications received were organized separately. But that video helped me understand why, at least for the purpose of executing Dijkstra`s algorithm properly, the directly connected networks need to be included. However, in the real world as this algorithm is applied to OSPF, would there ever be a situation where a path that went around several vertices would ever have a better cost than a directly connected network? Very interesting. Would love to hear that story if anyone has one.

    Thanks for giving me some new perspectives and things to think about! :)

    Wait, after just posting this I was thinking about the routing table. Directly connected networks are populated in the table by default regardless of activation of or which routing protocol is used. As far as I know (which is not so much...) IOS and routers in general are not designed to further process directly connected routes to find possible alternatives. So now I am confused again and need to return to my previous question: why does OSPF need the directly connected networks in the database to run the algorithm?
  • trackittrackit Member Posts: 224
    TenisuBaka wrote: »
    However, in the real world as this algorithm is applied to OSPF, would there ever be a situation where a path that went around several vertices would ever have a better cost than a directly connected network?

    no, directly connected networks have a metric of 0 and you cant beat that ;)
  • trackittrackit Member Posts: 224
    TenisuBaka wrote: »
    Wait, after just posting this I was thinking about the routing table. Directly connected networks are populated in the table by default regardless of activation of or which routing protocol is used. As far as I know (which is not so much...) IOS and routers in general are not designed to further process directly connected routes to find possible alternatives. So now I am confused again and need to return to my previous question: why does OSPF need the directly connected networks in the database to run the algorithm?

    because if you dont have full topology table (full view of the topology, including your own links) then you cant run SPF against that incomplete database :)
  • TenisuBakaTenisuBaka Member Posts: 46 ■■□□□□□□□□
    Yes, but why? I would really like to know that!
  • TenisuBakaTenisuBaka Member Posts: 46 ■■□□□□□□□□
    Hey Trackit,

    After chewing on it for a few days and reading the general link state protocol section of Doyle's book, I think I finally got it.

    Just wanted to say I appreciate you participating in the thread and trying to help me out!
  • trackittrackit Member Posts: 224
    you're welcome ;)
  • CyanicCyanic Member Posts: 289
    The sh ip ospf database self-originate shows the LSA of the router is indeed in the database.
  • TenisuBakaTenisuBaka Member Posts: 46 ■■□□□□□□□□
    I wasn't doubting the facts of the situation. I was just having a really hard time wrapping my head around the logic of it, especially since nothing like that was ever mentioned during my BSCI study. Thanks for the tip though.
  • CyanicCyanic Member Posts: 289
    I was just curious about this too since I'm knee deep in BSCI land. Started digging around with the sh ip ospf database commands and saw this; Its good practice.
Sign In or Register to comment.