8 Replies Latest reply: Aug 1, 2012 10:40 AM by Annamalai RSS

    Database Description Packet

    Annamalai

      Hi frnds

      From the past few days i was reading about OSPF ref from TCP/IP volume 1 author Doyle.

      Heres my small doubt in the link state database synchronization process and associated neighbor states.

      Who will send the first DD packet master or salve??

      Thanks

        • 1. Re: Database Description Packet
          ESummers

          I'm curious about answers to this as well.  According to the Cisco Press guide I referenced, the Master sends the first DBD.  However, I found actual behavior (older hardware...3620s and 2501s mind you) unexpected.

           

          In EXSTART, each router sent one DBD.  This was expected, as they were fighting for the right to be Master.  However, after those two packets, the Slave sent the first DBD packet containing a summary of its database.

           

          This wasn't what I expected, as RFC 2328 specifies that the Master will be the first to send the packet, and the slave acknowledges the master by repeating the Master's last sequence number.

           

          The only explanation I could come up with was that the Slave considered the Master's initial "I am the Master" packet to be the Master's first packet.  Indeed, the Slaves DBD packet echoed the sequence number of that packet, so it made some sense.  Hoping for confirmation or a correction.

          • 2. Re: Database Description Packet
            Nuno

            Hi annamalai,

             

            OSPF Master/Slave relation:

            When two neighbors are exchanging databases, they form a master/slave relationship.  The master sends the first Database Description Packet, and is the only part that is allowed to retransmit.  The slave can only respond to the master's Database  Description Packets, and the master/slave relationship is negotiated in state ExStart.

             

            For a more detailed explanation reffer to the section: "The Neighbor Data Structure" of RFC2328 - http://tools.ietf.org/html/rfc2328#page-80

             

            Edited:

             

            More detailed explanation of master/Slave relation:

             

            Description Packet copies its DD sequence number from the

                    neighbor data structure and then describes the current top of

                    the Database summary list.  Items are removed from the Database

                    summary list when the previous packet is acknowledged.

             

                    In state Exchange, the determination of when to send a Database

                    Description packet depends on whether the router is master or

                    slave:

             

             

                    Master

                        Database Description packets are sent when either a) the

                        slave acknowledges the previous Database Description packet

                        by echoing the DD sequence number or b) RxmtInterval seconds

                        elapse without an acknowledgment, in which case the previous

                        Database Description packet is retransmitted.

             

                    Slave

                        Database Description packets are sent only in response to

                        Database Description packets received from the master.  If

                        the Database Description packet received from the master is

                        new, a new Database Description packet is sent, otherwise

                        the previous Database Description packet is resent.

             

             

                    In states Loading and Full the slave must resend its last

                    Database Description packet in response to duplicate Database

                    Description packets received from the master.  For this reason

                    the slave must wait RouterDeadInterval seconds before freeing

                    the last Database Description packet.  Reception of a Database

                    Description packet from the master after this interval will

                    generate a SeqNumberMismatch neighbor event.

             

             

            section: "Sending Database Description Packets" - http://tools.ietf.org/html/rfc2328#page-103

             

             

             

            regards

            • 3. Re: Database Description Packet
              YapChinHoong

              First both declares themselves as Master, and then the Master will be elected due to the Router ID. And hence the Slave is then elected as well.

               

              http://www.itcertnotes.com/2011/02/ospf-neighbor-establishment-process.html

              • 4. Re: Database Description Packet
                Annamalai

                Hi frnds
                First of all my kind thanks for answering my question.

                ESummers i have read OSPF RFC 2328 Its says
                "The master sends the first Database Description Packet, and is the only part that is allowed to retransmit.
                The slave can only respond to the master's Database Description Packets"
                But Doyle says
                "The salves send the DD packet with MS bit 0 and this packet will be populated with LSA headers"

                From here's my confusion starts. As u said it may be bcoz of the seq num echo. Hoping for the confirmation
                Many thanks

                • 5. Re: Database Description Packet
                  Annamalai

                  Thanks nuno for the ospf rfc link

                  It will be very helpfull

                  • 6. Re: Database Description Packet
                    sambotech12

                    Is this Master/Slave database synchronization process in the CCNP Route book by Odom because I can't find it?

                     

                    Never mind.....I found it....

                    • 7. Re: Database Description Packet
                      ESummers

                      Found the answer.  From Routing TCP/IP Vol I (Doyle), Chapter 8, p358.

                       

                      It was basically as I thought.  Moving into EXSTART, each router sends an empty DBD packet with a sequence number and the Master/Slave bit set.  The "*****" (lower RID) acquieces and sends a packet as slave (M/S bit NOT set) echoing the Master's sequence number.  From the text, "The neighbor with the lower Router ID will become the slave and will reply with a DD packet in which the MS-bit is zero and the DD sequence number is set to the master's sequence number.  This DD packet will be the first packet populated with LSA summaries."

                       

                      I think it comes down to terminology.  You could say that the Master sends the first DBD packet by declaring that only the Master's original packet (of the two packets, to determine which RID was the Master) was the valid one.  The empty packet sent by the slave was ignored as "invalid" in the exchange.  The Slave sends the first DBD packet with LSA summaries IN RESPONSE TO the Master's packet (by echoing the sequence number).

                       

                      As far as who sends the first empty DBD packet first, I'm not sure if that can be determined or if it really matters as long as both routers follow the RFC requirements for the exchange process (which is used to restrict outstanding/"unacknowledged" DBD packets).  It likely comes down to timing (who sent/responded to a HELLO first) or race condition between the CPUs.

                       

                      Best regards, Ed

                      • 8. Re: Database Description Packet
                        Annamalai

                        After finishing the ospf theory part. I have worked on a simple ospf topology

                        and i have captured the ospf packets. In that i came to know the first DD packet with LSA HEADER will be sent from master.

                        Thanks ESummers and Nuno