Subject: Re: OSPF Link state request list management question

From: "Manral, Vishwas" <[email-masked]>
Date: Wed, 11 Dec 2002 05:06:31 -0500

Hi Dan,

I am a bit confused about the scenario you have given, however let me try to
explain the behavior as given in the RFC(I think I got ur scenario right), I
am not sure about the Cisco implementation though.

1. Router B has an LSA x in the Link-State Request list on neighbors A and
C.

2. Now B gets the LSA from C. When this happens it removes the LSA from the
request list of A(I think you miss this step).

3. Now we get the same LSA from A, the link state request list of A however
does not contain this LSA, as it has been removed in step 2.

4. Hence we do not meet condition in step 6(of the RFC), and go to step 7,
and perform the steps needed when the same instance is got.

Regarding why in step 6 we restart DB exchange, I think it is because the
step does not occur in a valid condition, so if the condition is met
something is wrong with the DB exchange and hence the DB exchange is
restarted for precuation sake.

Regarding the an implementation which goes wrong in the above scenario, I
think it is probably a timing issue, where the LSA has been updated in the
LSDB but not removed from the request list, and the processing of the new
LSA is begun in the timeframe.

Please let me know if I have addressed ur concerns.

Thanks,
Vishwas

-----Original Message-----
From: Dovolsky, Dan [mailto:[email-masked]]
Sent: Wednesday, December 11, 2002 5:30 AM
To: [email-masked]
Subject: OSPF Link state request list management question

BSD.

I will be appreciated to anyone who can help me with following question:

Suppose we have some triangle network topology (routers A,B and C) where
each router has two adjacencies.

Router A has rebooted. After restart, it attempts to reestablish
adjacency with routers B and C. After exchange DB descriptors, Router B
decided,
that it has to request some missing LSA from router A and send request to
it.

Immediately after that, router B received this missing LSA from router C
(adjacency between A and C comes first). When the requested LSA received
from router A,
adjacency between B and A is restarted.

This behavior proved to be real on Cisco router, and it actually defined by
spec:

OSPF RFC2328, section 13.  The Flooding Procedure states:

      "(6)      Else, if there is an instance of the LSA on the sending
        neighbor's Link state request list, an error has occurred in the
        Database Exchange process.  In this case, restart the Database
        Exchange process by generating the neighbor event BadLSReq for
        the sending neighbor and stop processing the Link State Update
        packet."

However, in section 13.3.  Next step in the flooding procedure:

        "Also   included in this part of the flooding procedure is the
         maintenance of the neighbors' Link state request lists.
       ....
            (b) Else, if the adjacency is not yet full (neighbor state
                is Exchange or Loading), examine the Link state request
                list associated with this adjacency.  If there is an
                instance of the new LSA on the list, it indicates that
                the neighboring router has an instance of the LSA
                already.  Compare the new LSA to the neighbor's copy:

                o   If the new LSA is less recent, then examine the next
                    neighbor.

                o   If the two copies are the same instance, then delete
                    the LSA from the Link state request list, and
                    examine the next neighbor.[20]

                o   Else, the new LSA is more recent.  Delete the LSA
                    from the Link state request list.

            (c) If the new LSA was received from this neighbor, examine
                the next neighbor."

My question is why OSPF needs that section 13 (6) part and require
unnecessary adjacency restarting ?

Following to this section 6 text (sections 7 and 8) define this case
processing very well:

   "(7) Else, if the received LSA is the same instance as the database
        copy (i.e., neither one is more recent) the following two steps
        should be performed:

        (a) If the LSA is listed in the Link state retransmission list
            for the receiving adjacency, the router itself is expecting
            an acknowledgment for this LSA.  The router should treat the
            received LSA as an acknowledgment by removing the LSA from
            the Link state retransmission list.  This is termed an
            "implied acknowledgment".  Its occurrence should be noted
            for later use by the acknowledgment process (Section 13.5).

        (b) Possibly acknowledge the receipt of the LSA by sending a
            Link State Acknowledgment packet back out the receiving
            interface.  This is explained below in Section 13.5.

    (8) Else, the database copy is more recent.  If the database copy
        has LS age equal to MaxAge and LS sequence number equal to
        MaxSequenceNumber, simply discard the received LSA without
        acknowledging it. (In this case, the LSA's LS sequence number is
        wrapping, and the MaxSequenceNumber LSA must be completely
        flushed before any new LSA instance can be introduced).
        Otherwise, as long as the database copy has not been sent in a
        Link State Update within the last MinLSArrival seconds, send the
        database copy back to the sending neighbor, encapsulated within
        a Link State Update Packet. The Link State Update Packet should
        be sent directly to the neighbor..."

Regards,
Dan Dovolsky.

Office: 703-847-2438
[email-masked]

---

From: Acee Lindem <[email-masked]>
Date: Fri, 13 Dec 2002 01:59:42 -0500

Hi Dan,

Vishwas is correct.  See additional clarification and references to
applicable sections in RFC 2328.

The fact that a given implementation drops the adjacency is probably
due to the relative scheduling priorities for LS update processing
versus flooding (or possibly flooding is dampened).

Thanks,
Acee

> request list of A(I think you miss this step).

Precisely, B determines it is a newer LSA and floods it out some subset of
its interfaces (Section 13, step 5, (b)).

       (b) Otherwise immediately flood the new LSA out some subset of
           the router's interfaces (see Section 13.3).  In some cases
           (e.g., the state of the receiving interface is DR and the
           LSA was received from a router other than the Backup DR) the
           LSA will be flooded back out the receiving interface.  This
           occurrence should be noted for later use by the
           acknowledgment process (Section 13.5).

Then in section 13.3, the LSA is removed from router B's neighbor link
state request list for router A.

--
Acee