There are no hard and fast answers to any of these questions, and they are largely implementation-dependent. For example, "new lsa is received when spf is running" implies a multithreaded environment (hats off to you for taking on this challenge if in fact you are doing so); the "best way" in turn depends on whether LSA database locking is required, etc., etc.
However, the short answer is that there is so much CPU power these days that, unless you are dealing with extremely large networks, the cost of SPF itself ought to be negligible. The real cost is how running SPF interacts with other parts of the system (the multithreading question, for example) and what comes *after* the SPF (how routing table and forwarding table updates are handled, what happens with potentially numerous dependent BGP routes, etc.) and all of that is highly implementation-dependent. Doing this well requires system-level analysis rather than just focusing on the protocol implementation. And of course the commercial reality is that, in a standards-based world, product differentiation is all about implementation, and so you may find it difficult to get guidance at this level of detail. For what it's worth, the OSPF spec is as close to a complete implementation guide as you'll find in a protocol standard. I happen to be philosophically opposed to such specs, as they make it more challenging to understand what normative behavior actually should be. The OSPF spec is a fine guide to building a solid implementation, albeit one with scaling challenges. To do it the "best way" requires a detailed understanding of the protocol's subtleties, and you won't find that written down anywhere. That's what makes it fun. ;-) --Dave On Nov 28, 2010, at 6:40 PM, p6 c6d6 wrote: > hi, > > when should an spf be run, there are several events which cause > the spf to be scheduled. i feel the rfc doesn't talk about it clearly. i want > to know all the cases which leads to the scheduling of spf, and running spf > eventually and i have the following questions. > > 1. when an interface state changes, should the spf be run immediately > or should i originate the router lsa and then run it. > > 2. what happens when an interface state change happens while spf is running. > > 3. what happens when a new lsa is received while spf is running. > > 4. should i run spf while one of my neighbor is in the process of dd exchange. > > i think there are awful lot of scenarios, i'm relatively new to ospf. i want > to > understand all the scenarios of spf scheduling (running) and the best way to > do it. > by bestway i mean, for example, if an interface state changes, is it good > to do spf right after i originate the router lsa or should i wait for some > time expecting i might receive some new lsas from my neighbors > because of my router lsa change. > > please shed some light. > > thanks > > > _______________________________________________ > OSPF mailing list > [email protected] > https://www.ietf.org/mailman/listinfo/ospf _______________________________________________ OSPF mailing list [email protected] https://www.ietf.org/mailman/listinfo/ospf
