Re: Elementary Problem!

Farshad Tavallaei <farshad@ONEBOX.COM> Fri, 05 September 2003 06:43 UTC

Received: from cherry.ease.lsoft.com (cherry.ease.lsoft.com [209.119.0.109]) by ietf.org (8.9.1a/8.9.1a) with ESMTP id CAA06292 for <ospf-archive@LISTS.IETF.ORG>; Fri, 5 Sep 2003 02:43:31 -0400 (EDT)
Received: from PEAR.EASE.LSOFT.COM (209.119.0.19) by cherry.ease.lsoft.com (LSMTP for Digital Unix v1.1b) with SMTP id <6.00B41EA3@cherry.ease.lsoft.com>; Fri, 5 Sep 2003 2:43:34 -0400
Received: from PEACH.EASE.LSOFT.COM by PEACH.EASE.LSOFT.COM (LISTSERV-TCP/IP release 1.8e) with spool id 53938861 for OSPF@PEACH.EASE.LSOFT.COM; Fri, 5 Sep 2003 02:43:32 -0400
Received: from 67.17.166.10 by WALNUT.EASE.LSOFT.COM (SMTPL release 1.0i) with TCP; Fri, 5 Sep 2003 02:43:32 -0400
Received: from homejtm01a43f8 (unverified [12.232.1.110]) by ucmmail.com (Rockliffe SMTPRA 5.3.4) with ESMTP id <B0012584780@> for <OSPF@peach.ease.lsoft.com>; Fri, 5 Sep 2003 02:43:38 -0400
MIME-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.2616
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Importance: Normal
Message-ID: <000001c37379$ca1a3ca0$6e01e80c@homejtm01a43f8>
Date: Thu, 04 Sep 2003 23:49:00 -0700
Reply-To: Mailing List <OSPF@PEACH.EASE.LSOFT.COM>
Sender: Mailing List <OSPF@PEACH.EASE.LSOFT.COM>
From: Farshad Tavallaei <farshad@ONEBOX.COM>
Subject: Re: Elementary Problem!
To: OSPF@PEACH.EASE.LSOFT.COM
In-Reply-To: <20030905062230.56979.qmail@web41805.mail.yahoo.com>
Precedence: list
Content-Transfer-Encoding: 7bit

Rohit,

Here is a copy/paste from the RFC (please read carefully and tell me
what part you don't understand):

Electing the Designated Router

        This section describes the algorithm used for calculating a
        network's Designated Router and Backup Designated Router.  This
        algorithm is invoked by the Interface state machine.  The
initial time a router runs the election algorithm for a network,
the network's Designated Router and Backup Designated Router are
        initialized to 0.0.0.0.  This indicates the lack of both a
        Designated Router and a Backup Designated Router.

        The Designated Router election algorithm proceeds as follows:
        Call the router doing the calculation Router X.  The list of
        neighbors attached to the network and having established
        bidirectional communication with Router X is examined.  This
        list is precisely the collection of Router X's neighbors (on
this network) whose state is greater than or equal to 2-Way (see
        Section 10.1).  Router X itself is also considered to be on the
        list.  Discard all routers from the list that are ineligible to
        become Designated Router.  (Routers having Router Priority of 0
        are ineligible to become Designated Router.)  The following
        steps are then executed, considering only those routers that
        remain on the list:

        (1) Note the current values for the network's Designated Router
            and Backup Designated Router.  This is used later for
            comparison purposes.

        (2) Calculate the new Backup Designated Router for the network
            as follows.  Only those routers on the list that have not
            declared themselves to be Designated Router are eligible to
            become Backup Designated Router.  If one or more of these
            routers have declared themselves Backup Designated Router
            (i.e., they are currently listing themselves as Backup
            Designated Router, but not as Designated Router, in their
            Hello Packets) the one having highest Router Priority is
            declared to be Backup Designated Router.  In case of a tie,
            the one having the highest Router ID is chosen.  If no
            routers have declared themselves Backup Designated Router,
            choose the router having highest Router Priority, (again
            excluding those routers who have declared themselves
            Designated Router), and again use the Router ID to break
            ties.

        (3) Calculate the new Designated Router for the network as
            follows.  If one or more of the routers have declared
            themselves Designated Router (i.e., they are currently
            listing themselves as Designated Router in their Hello
            Packets) the one having highest Router Priority is declared
            to be Designated Router.  In case of a tie, the one having
            the highest Router ID is chosen.  If no routers have
declared themselves Designated Router, assign the Designated Router to
be the same as the newly elected Backup Designated Router.

        (4) If Router X is now newly the Designated Router or newly the
Backup Designated Router, or is now no longer the Designated Router or
no longer the Backup Designated Router, repeat steps 2 and 3, and then
proceed to step 5.  For example, if Router X is now the Designated
Router, when step 2 is repeated X will no longer be eligible for Backup
Designated Router election.  Among other things, this will ensure that
no router will declare itself both Backup Designated Router and
Designated Router.[5]

        (5) As a result of these calculations, the router itself may now
            be Designated Router or Backup Designated Router.  See
            Sections 7.3 and 7.4 for the additional duties this would
            entail.  The router's interface state should be set
accordingly.  If the router itself is now Designated Router, the new
interface state is DR.  If the router itself is now Backup Designated
Router, the new interface state is Backup. Otherwise, the new interface
state is DR Other.

        (6) If the attached network is non-broadcast, and the router
            itself has just become either Designated Router or Backup
            Designated Router, it must start sending Hello Packets to
            those neighbors that are not eligible to become Designated
            Router (see Section 9.5.1).  This is done by invoking the
            neighbor event Start for each neighbor having a Router
            Priority of 0.

        (7) If the above calculations have caused the identity of either
the Designated Router or Backup Designated Router to change, the set of
adjacencies associated with this interface will need to be modified.
Some adjacencies may need to be formed, and others may need to be
broken.  To accomplish this, invoke the event AdjOK?  on all neighbors
whose state is at least 2-Way.  This will cause their eligibility for
adjacency to be reexamined.

        The reason behind the election algorithm's complexity is the
        desire for an orderly transition from Backup Designated Router
        to Designated Router, when the current Designated Router fails.
        This orderly transition is ensured through the introduction of
        hysteresis: no new Backup Designated Router can be chosen until
        the old Backup accepts its new Designated Router
        responsibilities.

        The above procedure may elect the same router to be both
        Designated Router and Backup Designated Router, although that
        router will never be the calculating router (Router X) itself.
        The elected Designated Router may not be the router having the
        highest Router Priority, nor will the Backup Designated Router
        necessarily have the second highest Router Priority.  If Router
        X is not itself eligible to become Designated Router, it is
        possible that neither a Backup Designated Router nor a
        Designated Router will be selected in the above procedure.

        Note also that if Router X is the only attached router that is
        eligible to become Designated Router, it will select itself as
        Designated Router and there will be no Backup Designated Router
        for the network.


Best regards,

Farshad


-----Original Message-----
From: Mailing List [mailto:OSPF@PEACH.EASE.LSOFT.COM] On Behalf Of Rohit
Gupta
Sent: Thursday, September 04, 2003 11:23 PM
To: OSPF@PEACH.EASE.LSOFT.COM
Subject: Elementary Problem!

What happens when two OSPF speaking routers are
simultaneously switched on a broadcast network? Both
of them will put the DR and the BDR as Zero in their
HELLO packets.

They will both start with Neighbor Down state and
Interface down state. Once the Interface will come up
both will go to Waiting state. Now when they recieve
the HELLO message listiing each other they will reach
the 2-Way state.

What happens after that is not clear to me from the
RFC. How does the DR and BDR get elected? DO we wait
for the Wait timer to get expired?

The scenario is clear to me when one of them has
already elected a DR and a BDR. What is not clear to
me is when none of them have elected a DR and BDR.

Please help!

Regards,
Rohit


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com