05-16-2008 01:07 PM - edited 03-05-2019 11:02 PM
If 3 Routers are attached to the same OSPF Area and configured with the commands below (respectively), which router would become the Designated Router?
Router1 configured with:
router(config-if)#ip ospf priority 3
Router2 configured with:
router(config)#ip ospf interface loopback 0
Router3 configured with:
router(config-router)#ospf router-id 5.1.1.49
05-16-2008 01:24 PM
Ronald
You phrase the question in terms of 3 routers connected to the same OSPF area. But DR is not area dependent. If the 3 routers were in the same OSPF area and were each connected on a separate Ethernet (perhaps they are connected by serial interfaces to form the OSPF area) then each router would become Designated Router on its segment.
There is no global configuration command: ip ospf interface, so Router2 is probably disqualified in the question. Router3 sets a router ID which would be a factor in DR selection if the router priorities were equal. Since you have provided incomplete information about how the routers are configured and considering only the information given this router would have priority 1 and not become the DR. Router1 with OSPF priority 3 would become the DR.
HTH
Rick
05-17-2008 01:28 AM
Rick, I have a doubt here. When router-id is manually configured on the router, wont this be the final router-id & all other factors are ignored.
05-17-2008 04:37 AM
I agree with Rick and manually configured RID would have no effect when the priority is higher imho
05-17-2008 07:20 AM
I was thinking along those same line, but would like to know if one command supercedes the other, like logical loopback interfaces supercedes ip addresses configured on physical interfaces.
Any idea?
05-17-2008 07:25 AM
I guess what I basically want to know if one command had superiority or take precedence over the other.
05-17-2008 06:26 AM
The election is based on priorities and then on router-id. The election of the DR is not dependent upon the source of the RID.
Marius
05-17-2008 07:33 AM
so the "ip ospf priority 3" doesn't change the Routers (Router-id)?
05-17-2008 08:22 AM
Ronald,
Let me explain the whole process. DR election is not a matter of precedence, this is just comparison and election.
To select a DR, OSPF first! compares the OSPF priority of the participant interfaces of routers. This is the first criteria that OSPF looks, so RID etc is not a subject to discuss at that moment.
The router with the highest priority becomes the DR, regardless of RID etc. Now if the priorities tied! second comparison phase takes place.
If priorities are tied (equal)to select DR, OSPF compares the RIDs of participants. The router with the highest RID becomes the DR!
Now the second important point, how is RID selected in a router? Now we will see the precedence.
First of all, keep in mind that RID is not an IP address, it is a 32 bit descriptor that looks exactly like an IPv4 address.
a)By default in first place, the highest IP address assigned to any PHYSICAL! interface becomes the RID.
b)The highest IP address assigned to any(1 or more)! loopback interface becomes the RID, regardless of the IP addresses assigned to physical interfaces. That takes precedence over condition a) above
c)The command "router-id x.x.x.x" defines the RID as submitted x.x.x.x, regardless of any loopback interface or physical interface. This takes precedence over condition b) and condition a)
Interface priority has no effect on RID selection. It is a criteria for DR election.
One last important part for your question is, as Rick mentioned as lack of info, the interface priority.
As mentioned above, RID is selected among the interfaces that "does not"! have to be participating in OSPF since it is Router Specific!
But priority is interface-specific! So if you assign a priority to a non-participating interface in OSPF, that wont have any effect on DR election.
If you are working on a lab and assign RID manually or add a loopback interface, RID selection wont take place immediately, you will have to "clear ip ospf process *". I also remember a buggy version of IOS that ignores the loopback for election process, so work with latest IOS
Regards
05-17-2008 11:42 PM
I guess the following summarises DR BDR election
DR/BDR election
---------------
1) A list of rtr is created.criteria to be in list:-
a)priority > 0
b)OSPF state of 2way
2) From the above list, new list which consists of all rtr not claiming to be DR is compiled
3) BDR is choosen from list 2 based on:-
a)rtr with highest priority becomes BDR
b)if pri's equal the rtr with highest router-id becomes BDR
4) DR is chosen from remaining eligible rtr based on:-
a)rtr with highest priority becomes DR
b)if pri's equal the rtr with highest router-id becomes DR
5) if none of eligible rtr claim to be DR, BDR chosen from step 3 is promoted as DR.Step 3 would be repeated to elect BDR
Pls correct if wrong.
Regards
Sonu
05-18-2008 03:09 AM
Sonu
There are a couple of things in your list that are not quite right. In particular your step 4) and 5) miss the point that the DR is always selected by promoting the BDR to DR. There is not a direct election for DR and the BDR is always promoted to become DR.
Also in your 1) b) I do not believe that 2 way state is required. In particular if there is a segment with only a single router it can not become 2 way state (since there is no neighbor to become 2 way with) but the router will become the DR on that segment.
HTH
Rick
09-10-2012 11:57 AM
Rick,
I am not super privy to OSPF DR and BDR mechanics, just know what I read, and I am confused. Why do you make a point about the DR being a promoted BDR, and that there is no direct election? What does that knowledge help with when troubleshooting, or desiging, etc? Also, where do you get that from? This link from Cisco talks nothing of that, but instead, says that the DR is elected first, and then the BDR, which is what all Cisco's CCNA and CCNP literature states as well, so again, I am confused (but willing to learn new things! ).
http://www.cisco.com/en/US/tech/tk365/technologies_white_paper09186a0080094e9e.shtml#t21
Thanks,
Jared
09-10-2012 03:33 PM
Jared
I sympathesize about being confused. I studied OSPF for a long time and it is a complicated protocol. Much of the Cisco material has tried to simplify what is going on and to make it easier to understand. But the authoritative details are in the RFC that defines the protocol. I would refer you to RFC2328 which is the RFC that defines OSPFv2. In that RFC section 9.4 set forth the process of electing DR and BDR. It defines a series of steps for the elections and the election of BDR preceeds the election of the DR. So essentially the BDR is elected first.
In the step that elects the DR is this sentence:"If no routers have declared themselves Designated Router, assign the Designated Router to be the same as the newly elected Backup Designated Router. " Which says that you elect the DR by promoting the BDR (there is not a new election for DR) and then the election happens which selects the new BDR.
You can find that RFC and read it at this link:
http://www.ietf.org/rfc/rfc2328.txt
HTH
Rick
09-10-2012 05:55 PM
Thank you for answering this question so fast, and thank you for your explaination. I keep forgetting to check the RFC's vs Cisco's information.
09-10-2012 06:41 PM
Jared
Thank you for the response. We should remember that in general both the Cisco explanation and the RFC are describing the same behavior, but that in general the RFC will have more of the detail while Cisco will be more general and attempt to explain behaviors in more high level approaches.
HTH
Rick
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide