Skip to content

Network Ninja

The Long Road to Cisco

  • Home
  • About
  • Legal Disclaimer
  • Archives

« Update February 5th 2009
Week in Review – 2009/02/16 – 2009/02/22 »

Open Shortest Path First – OSPF Fundamentals – DR and BDR

Published
by
Deon Botha
on February 18, 2009
in BDR, BSCI, BSCI Notes, Certification, Cisco Systems, Concepts and Constructs, DR, OSPF and VLAN
. 9 Comments Tags: AP, B, BDR, BSCI, C, CCO, Certification, Cisco, Command, Config, Design, DR, Ethernet, Exam, LAN, LSA, LSAs, LSDB, networking, OSPF, Pass, redundancy, Router, Routers, RP, SE, SONA, Support, Switch, Theory, training, VLAN.

When routers are connected to the same broadcast segment (I.O.W. several routers are in the same VLAN, on the same switch you getting the idea). One router is assigned the duty to maintain adjacencies with all other routers on the segment. This is the designated router (DR) and the DR  router is selected using information in the Hello messages. For redundancy purposes a backup designated router (BDR) is also elected (There is a reason for this, read on).

DRs are created on multi-access links because the number of adjacencies grows at a quadratic rate. For a network of n routers, the number of adjacencies required would be:

ospf adjacency

Two (2) routers require the following adjacencies:

ospf adjacency 2

Four (4) routers require the following adjacencies:

ospf adjacency 4

Ten (10) Routers require the following adjacencies:

ospf adjacency 45

Maintaining a OSPF segment consumes more bandwidth and requires more processing resources (CPU and memory) as more routers are added onto a OSPF network (Due to keeping the tables updated and probability of changes occuring more frequently etc).

The DR and maintaining relationships

The purpose of a DR is to be the “one router” (sounds like the matrix) to which all other routers are adjacent (the router that has all the routes on the network). Using a DR reduces the number of adjacencies that consume bandwidth and processing to n – 1 (Larger networks will however still require more processing even if you are using a DR). With a DR the adjacencies scale more effectively and efficiently with the network (as one can see in the below figure and table).

To show this in a graphic way one can see how this “adjacency” relationship works without a DR, with a DR, and with a DR and BDR with a small example network using 5 routers.

OSPF Adjacenies

Taking this a step further and plotting out the exponential growth requirements of OSPF adjacencies the table below shows the number of adjacencies needed for 1 – 10 routers (imagine the CPU and Memory requirements, not to mention the bandwidth consumption). Plan accordingly when implementing OSPF (at this point you generally use OSPF because you have a non-homogenous network environment and need the open standard because of this fact, I dont really see a point otherwise cause its such a resource hog and mission to setup).

OSPF Adjacency with DR

The job of the DR

The role of the DR is to receive updates and distribute these updates to each segment router, making sure that each router acknowledges receipt and has a synchronized copy of the Link-State Database (LSDB).

Routers advertise changes to the “AllDRs” multicast address of 224.0.0.6 where the DR then advertise the Link-State advertisements (LSAs) using the “AllSPF” multicast address 224.0.0.5 where each router then ack receipt.

The BDR listens passively to this exchange and maintains a relationship with all the routers.

If the DR stops producing hellos, the BDR promotes itself and assumes the role of DR.

NB. DRs and BDRs are only useful on multi-access links because they reduce adjacencies. The concept of a DR is not used nor usefull on point-to-point links because there can only be one adjacency.

DRs are still however elected on Point-to-Point Ethernet links (most common type of links in networking these days) which is a rather pointless and resource waste/hog (as a DR is not really needed) which is why you will find that many design guides recommend changing Ethernet links to Point-to-Point mode to stop this from happening.

If a DR fails, the BDR is pomoted. The BDR is elected on the basis of highest OSPF priority, ties in OSPF priority are broken in favour of the highest IP ADDRESS.

The default priority is 1 and a priority of 0 (zero) prevents a router from being elected to the DR or BDR role.

Priority can be set from 0-255 (manually) to change the priority from default from the interface,

Router(config-if)#ip ospf priority number

DRs  are inherently seen as stable entities  once elected into the position, even if a Router joins a network with a “greater” priority the DR will not change.

OSPF Segment with Priorities

To give an example of this an OSPF Segment with 5 Routers ( A – E, with different priorities 0 – 3). Taking what has been discussed previously A would be the DR, B the BDR, and E would never be elected. However this neglects the following set of circumstances:

Imagine the following sequence of events in this small segment,

  1. Router C starts first.
    1. Router C sends out Hellos and waits the dead time for a response from other routers.
    2. Receiving no Response, Router C conducts an Election and becomes the BDR.
    3. As there is no DR on this network, Router C then promotes itself to DR.
  2. Router E starts (priority= 0)
    1. Router E will not become the BDR due to its priority setting
  3. Router B starts and becomes the BDR.
  4. Router A starts
  5. Router D starts

In the above scenario the startup sequence of the routers caused the election of the DR and BDR (namely Router C is DR and Router B is BDR) which is not what would have been expected. This is because designated routers do not preempt, the elected DR/BDR serves in its role until reboot/failure (DR and BDR are stable entities on the network once elected).

In this network as it stands now If Router C restarts, Router B promotes itself to DR and Router A is elected BDR while C is down. If Router B goes down, Router A promotes itself and elects Router C or Router D (whichever has the highest IP Address). Finally when the BDR is rebooted, Router B wins the election for BDR.

NOTE: In addition to rebooting, clearing the OSPS process using the the command clear ip ospf process * on the DR will force the DR and BDR election.

Notes and Notices: This is a part of my personal BSCI notes and research to assist myself in learning and understanding the concepts and theory for the BSCI exam. I learn by making notes reading and writing things down and wish to file them where I can’t lose them. These notes are not to be seen, judged or mistaken for replacements to Cisco recognized and authorized training which I personally support and attend and suggest you undertake if you are going for the BSCI Certification.

« Update February 5th 2009
Week in Review – 2009/02/16 – 2009/02/22 »

Consider leaving a comment, suggestion, question or trackback. Its all about Networking innit.

9 Responses to “Open Shortest Path First – OSPF Fundamentals – DR and BDR”

Feed for this Entry Trackback Address

  1. 1 Aragoen Celtdra
    February 18, 2009 at 7:45 pm

    Nice to see you on the CCNP trail again.

    Reply

  2. Deon Botha Reply:
    February 18, 2009 at 8:22 pm

    Hi Aragoen,

    Yep back on the trail again :-)

    You still going strong on your end?

    Reply

  • 2 Aragoen Celtdra
    February 20, 2009 at 7:02 am

    LOL.. It would be nine months running towards passing the BSCI for me. I’m not sure if you would call that “strong” but I’m ready to deliver. :D Need to move on to BCMSN soon.

    Reply

  • Deon Botha Reply:
    February 25, 2009 at 6:32 am

    I wouldn’t worry too much about it, I just remember what Etherealmind always tells me. “Persistence pays” and I think he is onto something.

    As long as you heading in the direction of finishing and sooner or later it will get done.

    Reply

  • 3 MOS
    November 23, 2009 at 1:40 pm

    excellent explanation mate

    cheers

    Reply

  • 4 Satya
    January 26, 2010 at 6:19 pm

    Superb explanation…good work…my best luck to u..

    Reply

  • 5 killus
    February 21, 2010 at 7:25 am

    Yes, I understand you. In it something is also thought excellent, I support.
    Tell to me, please – where I can read about it?
    You are absolutely right. In it something is and it is excellent idea. I support you.
    As the expert, I can assist. I was specially registered to participate in discussion.
    In it something is. Many thanks for the help in this question. I did not know it.

    Reply

  • 6 wakatana
    April 26, 2010 at 5:31 pm

    Nice :) , but dont you have mistake in table ?
    - Number of adjacencies with DR and BDR is 2n-3
    - So if you have 5 routers you have 7 adjacencies (not 9) (also according your picture)

    Reply

    1. 1 Open Shortest Path First - OSPF Fundamentals - Scenario at Network Ninja
      Pingback on Jun 29th, 2009 at 8:58 pm

    Leave a Reply

    CommentLuv Enabledshow more

    Click to cancel reply

    Search



    Styled with Sawchuk

    Powered by WordPressabc and K21.0-RC7

    Entries Feed and Comments Feed

    37 queries. 0.9350 seconds.