Q about DR/BDR election

volfkhatvolfkhat Member Posts: 1,072 ■■■■■■■■□□
Hola,

So, i have a question about the election process.
Assume this scenario:

R1:
IP address- 10.1.1.1

R5:
IP address- 10.5.5.5

~ If all other factors were equal.... then we would say that R5 wins the DR.



But What if i throw a curveball:

R1:
10.1.1.1
Router-id: 10.10.10.10

R5:
10.5.5.5
Router-id: 5.5.5.5


Q1)
If both routers have the same priority... Who wins the DR election?
Is it based on the Higher 'IP address' or the Higher 'Router-id'?



Follow-up scenario:

R1:
10.1.1.1
Router-id: 10.10.10.10

R5:
10.5.5.5
Router-id: 10.10.10.10


Q2)
Again, assuming they have the same priority.... Who wins the DR?
(what is the Tie-breaker?)

And is it even allowed to have two routers with the same RID?

Thanks!

Comments

  • powmiapowmia Users Awaiting Email Confirmation Posts: 322
    Always the RID. If you don't explicitly set a RID, the router does it for you, based on the loopback. If you don't have a loopback, it's based on an interface IP.
  • NansNans Member Posts: 160
    FIrst thing if its a Point -to -point link you never have an election....

    If not the it happens in this order
    1. Priority
    2. RID
    3.HIghest Loopback address
    4.HIghest IP address

    So I am not answering questions looks like a homework to me :P. So you can answer following these statements. ....

    Regards...
    2016 Certification Goals: CCNP Route /COLOR][B][/B][I][B]X[/B][/I][COLOR=#008000-->Switch/COLOR]:study:[COLOR=#ff8c00-->TShoot[], CCDP []
  • volfkhatvolfkhat Member Posts: 1,072 ■■■■■■■■□□
    So...

    it is legal to have two Routers with the same RID?
  • NansNans Member Posts: 160
    volfkhat wrote: »
    So...

    it is legal to have two Routers with the same RID?


    For OSPF the R-IDs must not be same and in case of EIGRP they can be the same since it not used to elect for any purpose in EIGRP.

    I have done the simulation with packet tracer and used "Debug ip ospf events" . They will form adjacencies. But will never move to exchange state since there is conflict between two routers with the same ID. This is what i was show with "show ip ospf neighbor"

    Neighbor ID Pri State Dead Time Address Interface
    1.1.1.1 1 EXSTART/DR 00:00:31 172.16.10.1 GigabitEthernet0/0.

    I think this helps.

    Best to way to learn it is to try it yourself. It just took me 2 minutes.
    2016 Certification Goals: CCNP Route /COLOR][B][/B][I][B]X[/B][/I][COLOR=#008000-->Switch/COLOR]:study:[COLOR=#ff8c00-->TShoot[], CCDP []
  • volfkhatvolfkhat Member Posts: 1,072 ■■■■■■■■□□
    Hi Nans,

    Thanks for the insight.

    However,
    If you are saying that the Router-IDs can NOT be identical...

    then why did you reference 4 factors for the election:
    If not the it happens in this order
    1. Priority
    2. RID
    3.HIghest Loopback address
    4.HIghest IP address

    As you can see... if #2 can Never end with a 'tie'....
    then what's the point of defining a 3rd & 4th Tie-breaker (Loopback & Physical interface).

    ?
  • NansNans Member Posts: 160
    volfkhat wrote: »
    Hi Nans,

    Thanks for the insightful.

    However,
    If you are saying that the Router-IDs can NOT be identical...

    then why did you reference 4 factors for the election:


    As you can see... if #2 can Never be a "tie"....
    then what's the point of defining a 3rd & 4th Tie-breaker (Loopback & Physical interface).

    ?

    When you set R-ID they are considered nothing will be taken considered thereafter. I suggest you to go through the books regarding this. No disrespect did you read this topic..!!
    2016 Certification Goals: CCNP Route /COLOR][B][/B][I][B]X[/B][/I][COLOR=#008000-->Switch/COLOR]:study:[COLOR=#ff8c00-->TShoot[], CCDP []
  • mikeybinecmikeybinec Member Posts: 484 ■■■□□□□□□□
    Also, the router id is chosen by the three methods everybody stated above..BUT~!! Let's say you manually configure the R ID AFTER an election.. It doesnt change who's the boss (DR BDR) until you do a clear ip os pro

    But the main thing is no DR BDR on point to point, just broadcast
    Cisco NetAcad Cuyamaca College
    A.S. LAN Management 2010 Grossmont College
    B.S. I.T. Management 2013 National University
  • volfkhatvolfkhat Member Posts: 1,072 ■■■■■■■■□□
    Nans wrote: »
    When you set R-ID they are considered nothing will be taken considered thereafter. I suggest you to go through the books regarding this. No disrespect did you read this topic..!!

    Thanks for sharing.


    Perhaps someone else can better answer my question.

    Assumption:
    Most of us are aware of the 4 'tie-breakers' used in the ospf DR/BDR election process (for Broadcast/NBMA networks :)

    1. OSPF Priority
    2. Router ID address
    3. Highest Loopback address
    4. Highest Physical IP address


    Scenario:
    Assume we have a funtional network with 2 Routers configured to run OSPF.
    Assume they are Both operational, and are neighbors.
    Finally,
    assume Both routers are reloaded and come back up simultaneously.

    So... which router gets elected as the DR?

    Well, let's go through the Tie-breakers:

    1) Can the two Routers have an identical ospf Priority #?
    Yes.
    In fact, in this scenario, they both have a value of '1' (default).
    (so... on to the Next tie-breaker)

    2) Can the two Routers have identical Router-ID values?
    ??

    ~ Well, according to "Nans", the answer is NO.
    He tested this scenario in packet tracer, and a conflict arose preventing the election process from completing.

    So, it would seem logical that... the Router-ID values must be Unique.
    (sounds perfectly reasonable to me)

    So here's my hang-up:
    If we accept that the Router-IDs must be unique.... then doesn't that mean that one of the Routers must have a Higher Router-ID?
    Thus, it guarantees that there can NOT be Tie.

    Correct?

    Well, if this is true, then why are there two additional tie-breakers defined?
    (3-Highest Loopback address & 4-Highest Physical IP address)

    Just say'in :]
  • james43026james43026 Member Posts: 303 ■■□□□□□□□□
    Nans wrote: »
    For OSPF the R-IDs must not be same and in case of EIGRP they can be the same since it not used to elect for any purpose in EIGRP.

    I have done the simulation with packet tracer and used "Debug ip ospf events" . They will form adjacencies. But will never move to exchange state since there is conflict between two routers with the same ID. This is what i was show with "show ip ospf neighbor"

    Neighbor ID Pri State Dead Time Address Interface
    1.1.1.1 1 EXSTART/DR 00:00:31 172.16.10.1 GigabitEthernet0/0.

    I think this helps.

    Best to way to learn it is to try it yourself. It just took me 2 minutes.

    I'd like to comment on EIGRP neighbors and RID. If two directly connected routers in an EIGRP AS have the same RID they will become neighbors, but they will not accept internal or external routes that originate from one another. If they are not directly connected and have at least one router between them. Then internal routes will be exchanged between them, but external routes learned from each other would be rejected.
  • NansNans Member Posts: 160
    james43026 wrote: »
    I'd like to comment on EIGRP neighbors and RID. If two directly connected routers in an EIGRP AS have the same RID they will become neighbors, but they will not accept internal or external routes that originate from one another. If they are not directly connected and have at least one router between them. Then internal routes will be exchanged between them, but external routes learned from each other would be rejected.


    Point taken. May be i should read in more detail about EIGRP
    2016 Certification Goals: CCNP Route /COLOR][B][/B][I][B]X[/B][/I][COLOR=#008000-->Switch/COLOR]:study:[COLOR=#ff8c00-->TShoot[], CCDP []
  • YanioYanio Member Posts: 37 ■■□□□□□□□□
    It helps me to think of these not as 4 Tie-breakers, but 2. You have the OSPF priority and the Router-ID (however it's selected).

    The Priority value is looked at first. If they match then the Router-ID will be considered. It's worth remembering that even if the DR/BDR is selected on the priority value, both routers still need a Router-ID. Which is maybe one of the reasons why you need at least 1 'up' IP interface to initialize the OSPF process?

    The first option is to pick your own Router-ID. As mentioned if these values conflict then the routers won't reach a 'full' state, but will form an adjacency.

    The second and third options (highest loopback and highest physical IP) only come into play if you haven't manually declared a Router-ID. It allows the OSPF process to proceed even though you haven't configured an ID.

    This is all fairly new to me also, so i'm sure someone will correct anything I've gotten wrong!
    "That's what" -She
  • volfkhatvolfkhat Member Posts: 1,072 ■■■■■■■■□□
    Yanio wrote: »
    The second and third options (highest loopback and highest physical IP) only come into play if you haven't manually declared a Router-ID. It allows the OSPF process to proceed even though you haven't configured an ID.

    OH!!!!

    Yes, of course! That's the part that i wasn't getting.

    So actually... it is Possible (legal) for both routers to have an Identical Router-ID; when the value equals Null.
    Thus, you get a 'tie', and then you move onto tie-breaker #3 :]
    Yanio wrote: »
    It's worth remembering that even if the DR/BDR is selected on the priority value, both routers still need a Router-ID.

    Ah... again, i now understand :]

    Thanks very much Dude!!
    I see that you've only posted a few times on the forum.... but you've just helped me "get it".

    TechExams is a tremendous resource :]
  • _Gonzalo__Gonzalo_ Member Posts: 113
    I´m afraid you did not... Don´t worry, it can be confusing.

    It is not possible for two OSPF routers to have the same router id. It has previously been posted that priorities go like this:

    1. Priority
    2. RID - when manually set
    3.HIghest Loopback address
    4.HIghest IP address

    This was correct, I just completed it. Now, for what is giving you trouble:

    When no manual router ID is set, there is no RID=null. OSPF creates a RID using:

    3.HIghest Loopback address
    4.HIghest IP address

    That makes it impossible to have two routers with the same router ID.

    Hope this helps!
  • volfkhatvolfkhat Member Posts: 1,072 ■■■■■■■■□□
    You are right.

    And actually... the 4 steps are not really tie-breakers, are they?

    Rule "1" only identifies the Priority #.
    And Rules "2, 3 & 4" only identfiy the Router-ID.


    The only potential "tie" occurs when the Priority values are identical.
    The Router-ID value is what resolves this.

    :]
  • _Gonzalo__Gonzalo_ Member Posts: 113
    volfkhat wrote: »
    The only potential "tie" occurs when the Priority values are identical.
    The Router-ID value is what resolves this.

    :]

    Again, not exactly. When manually set, values are only compared to other manually set values. Same goes for loopbacks and interfaces.
  • james43026james43026 Member Posts: 303 ■■□□□□□□□□
    Nans wrote: »
    Point taken. May be i should read in more detail about EIGRP

    Most reading material and Cisco White papers won't actually tell you about this. I found out from a CCNP INE video.
  • james43026james43026 Member Posts: 303 ■■□□□□□□□□
    I think there may be some confusion on the router-ID and how it works. The router-ID can either be configured manually, or the router will configure it's own router-ID by selecting the highest IP address assigned to a loopback interface, if there are no loopback interfaces with a IP address, then the highest IP address assigned to a physical interface is selected. So if you configure your own router-ID, then the router will never try to select a router-ID for itself and will simply use the manually configured router-ID until it is told otherwise. Meaning that if two devices have the same router-ID they will simply not become neighbors if directly connected. And if not directly connected can cause strange routing issues
  • volfkhatvolfkhat Member Posts: 1,072 ■■■■■■■■□□
    _Gonzalo_ wrote: »
    Again, not exactly. When manually set, values are only compared to other manually set values. Same goes for loopbacks and interfaces.

    Ummm... I think you misunderstood(?)

    In my hypothetical:
    If you have 2 Routers on a Subnet.... and Both routers have an Priority Value of "1" (the default)...
    then you would have a Tie.

    Some other factor will have to be used to determine the DR.
    Hence, the Router-ID.

    ?
  • _Gonzalo__Gonzalo_ Member Posts: 113
    volfkhat wrote: »
    Ummm... I think you misunderstood(?)

    ?

    Maybe... I´ll try to explain again to see if I did. I´ll go for an example, with the following rules:

    1. Priority
    2. RID - when manually set
    3.HIghest Loopback address
    4.HIghest IP address

    Router A

    1. Priority 1
    2. RID configured manually 1.1.1.1
    3.HIghest Loopback address - It would not matter, as RID is manually set
    4.HIghest IP address- It would not matter, as RID is manually set

    RID 1.1.1.1

    Router B

    1. Priority 1
    2. RID not configured manually
    3.HIghest Loopback address - 2.2.2.2
    4.HIghest IP address- It would not matter, as loopback exists

    RID 2.2.2.2

    Now, which one would be DR?
    The answer is A, because it is manually set, even if RID of router B is higher.
  • YanioYanio Member Posts: 37 ■■□□□□□□□□
    _Gonzalo_ wrote: »
    Maybe... I´ll try to explain again to see if I did. I´ll go for an example, with the following rules:

    1. Priority
    2. RID - when manually set
    3.HIghest Loopback address
    4.HIghest IP address

    Router A

    1. Priority 1
    2. RID configured manually 1.1.1.1
    3.HIghest Loopback address - It would not matter, as RID is manually set
    4.HIghest IP address- It would not matter, as RID is manually set

    RID 1.1.1.1

    Router B

    1. Priority 1
    2. RID not configured manually
    3.HIghest Loopback address - 2.2.2.2
    4.HIghest IP address- It would not matter, as loopback exists

    RID 2.2.2.2

    Now, which one would be DR?
    The answer is A, because it is manually set, even if RID of router B is higher.

    I don't think that's right. AFAIK the OSPF process doesn't care where the Router-ID has come from, just which router has the highest. So in your situation Router B would be the DR.

    I think it might be a mistake to conflate the processes of deciding on a Router-ID and electing a DR/BDR. They are separate (although linked).
    "That's what" -She
  • volfkhatvolfkhat Member Posts: 1,072 ■■■■■■■■□□
    _Gonzalo_ wrote: »
    Now, which one would be DR?
    The answer is A, because it is manually set, even if RID of router B is higher.
    Yanio wrote: »
    I don't think that's right. AFAIK the OSPF process doesn't care where the Router-ID has come from, just which router has the highest. So in your situation Router B would be the DR.

    I think it might be a mistake to conflate the processes of deciding on a Router-ID and electing a DR/BDR. They are separate (although linked).


    LOL

    Okay... i'm in agreement with Yanio.
    Router B, all the way!

    But then again... i am humble enough to know that i am a n00b :]

    The Solution is quite Simple: Packet Tracer Exercise!!

    2 Routers connected together via a Switch.
    I will give them the values that Gonzalo listed...
    and then i will reload the Switch.

    Fun stuff!!
  • volfkhatvolfkhat Member Posts: 1,072 ■■■■■■■■□□
    Okay!!

    The Switch was reloaded to ensure that both Routers connect to the subnet at the same time.

    Here are the Results:
    R1#show ip ospf interface fastEthernet 0/0
    
    
    FastEthernet0/0 is up, line protocol is up
      Internet address is 192.168.1.1/24, Area 0
      Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
      Transmit Delay is 1 sec, State BDR, Priority 1
    [B]  Designated Router (ID) 2.2.2.2, Interface address 192.168.1.2[/B]
      Backup Designated Router (ID) 1.1.1.1, Interface address 192.168.1.1
    

    R2#show ip ospf interface fastEthernet 0/1
    
    
    FastEthernet0/1 is up, line protocol is up
      Internet address is 192.168.1.2/24, Area 0
      Process ID 1, Router ID 2.2.2.2, Network Type BROADCAST, Cost: 1
      Transmit Delay is 1 sec, State DR, Priority 1
    [B]  Designated Router (ID) 2.2.2.2, Interface address 192.168.1.2[/B]
      Backup Designated Router (ID) 1.1.1.1, Interface address 192.168.1.1
    

    And just in case you wondered:
    R1#show running-config
    
    !
    router ospf 1
    [B] router-id 1.1.1.1[/B]
     log-adjacency-changes
     network 192.168.1.0 0.0.0.255 area 0
    !
    
    -------
    R2#show running-config
    
    !
    router ospf 1
     log-adjacency-changes
     network 192.168.1.0 0.0.0.255 area 0
    !
    


    DOWN Goes Gonzalo!!!

    The upstart Yanio has defeated the CCNP!!!

    lol
  • _Gonzalo__Gonzalo_ Member Posts: 113
    volfkhat wrote: »
    DOWN Goes Gonzalo!!!

    The upstart Yanio has defeated the CCNP!!!

    lol

    I looked it up and you´re right. It was not the way I remembered it... If you believe that having a CCNP makes one infallible, you are mistaken.

    Regarding your comment, not elegant. I was just trying to help you, not competing with anyone...
  • volfkhatvolfkhat Member Posts: 1,072 ■■■■■■■■□□
    ha!

    Not at All my friend :]
    We're just here to learn about Networking... and have a little fun along the way.

    Trust me,
    Both Yanio's & your contributions to this thread have taught me a LOT about the election process. For that, i am in your debt.

    Fun stuff!

    and to recap:
    Rule "1" identifies the Priority #.
    And Rules "2, 3 & 4" identfiy the Router-ID.

    The only potential "tie" occurs when the Priority values are identical.
    The Router-ID value is what resolves/breaks the tie.
  • mgmguy1mgmguy1 Member Posts: 485 ■■■■□□□□□□
    Great post guys
    "A lot of fellows nowadays have a B.A., M.D., or Ph.D. Unfortunately, they don't have a J.O.B."

    Fats Domino
Sign In or Register to comment.