hi all, im a little baffled as im working through OSPF (BSCI) and i created a lab with 2 routers connected to a switch on 10.1.1.0/24 and each R1 having loopback of 184.108.40.206/30 and R5 having loopback of 220.127.116.11/30 and as per OSPF R5 should be the DR as it has the highest ip on loopback int. but when i go to sh ip ospf neighbor from R5, it is showing 18.104.22.168 as the DR and not BDR which is what i was expecting. running 12.4IOS on a 7200 router. any ideas???
It does depends on how the routers have booted up. You are right R5 should be be elected as DR providing the priorities are the same.
Do a "clear ip ospf process" on both routers and run a "debug ip ospf hello" on each one and see what happens.
did clear ip ospf process and also shut down the f0/0 int as this was the interface it selected as RID. still same. i will run debug ip ospf hello and let you know how it goes. thanks for the reply
I feel that there is something missing here, you say that the router is using the F0/0 IP as its RID, i believe that this is the issue, can you please post a show ip ospf neighbor.
hi all, just to let you know that after rebooting the routers, its sorted itself out. R5 is now the DR and R1 the BDR...funny thins...thanks to all for taking the time to reply.
You are very welcomed, as a quick analysis, i believe that you have configured OSPF before configuring the loopback interface, and thus your router used the FE IP as its RID, which introduced the confusion, after you've reloaded the router, it will now use the loopback IP as its RID and everything will be sorted out.
The election of DR and BR happens in the Exstart State. Which happen only once at the time of change in topology( E.g when both DR and BR are down). IF the router are in full stat that means all routing table has exchanged and then you config the loopback interface the router ID will not change. It will change only when you restart the routers and re-election take place again.
More you can also force a router to be come a DR with config a loopback interface with higher IP address. Using the priority command. The default priority of a router is 1, if you increase it on a router it will become DR (but on re-election only). Moreover it you set the priority to zero that router will not take part in election thus will not be DR nor BR.
Do rate if helpful
rajat, thanks for the xplanation on the election .
mohamed, im sure i configured ospf after the interfaces as its my normal procedure, interfaces first then the routing protocol. but i'll be xtra careful next time.
aside to this, im trying to create a frame relay hub and spoke lab (using ospf) but im having problems pinging from routers 2 and 3 to r1 (the hub) R2 and R3 can ping one another..config of r1 is below...ospf not yet configured
ip address 10.1.1.1 255.255.255.252
ip address 22.214.171.124 255.255.255.0
serial restart-delay 0
clock rate 64000
frame-relay map ip 126.96.36.199 102
frame-relay map ip 188.8.131.52 102 broadcast
frame-relay map ip 184.108.40.206 103 broadcast
no frame-relay inverse-arp
It seems to me that in the previous part of this thread that there were really 2 questions: selection of the routerID by OSPF which has been discussed and election of DR/BDR. It may help to understand the question of election to understand that the behavior in the election is slightly different in a steady running state and at startup time. When the network is up and in a steady operating state the behavior of the election is as you describe it as based on comparing the routerID and electing the DR or BDR based on the comparison of the routerID. But when the network is just starting up if there is some delay between the first router becoming active and the second (or third) router becoming active then the behavior is slightly different. When a router becomes active in OSPF on a segment for which there should be a DR/BDR and it finds no other OSPF router then the router waits a little while and if it finds no neighbor then the router becomes DR without any comparison of its routerID. And if a second router becomes active before others then it will become the BDR without comparison of its routerID. I suspect that this may explain the situation in your original post in which a router became DR which you did not expect. Was that perhaps the first router to become active on that segment?
You have now raised another issue about the hub and spoke Frame Relay lab. You have posted the config of the hub router which seems to be ok. I note that the hub is disabling inverse-arp which means that the spoke routers will not learn dynamically from the hub router. If R2 and R3 are having problems pinging R1 (assuming that the Frame Relay connections are working correctly) I suspect that there is a problem with the Frame Relay maps on R2 and R3. Can you post the configs from the spoke routers and the output of show frame-relay map from the spoke routers?