PDA

View Full Version : Question on OSPF - DR and DBR election


wilder7bc
07-10-2012, 11:33 PM
I was changing my topology over from Eigrp to OSPF. Order I added was same as the study guide starting with Corp > R1>R2>R3


I had issue because I put in 10.1.5.0 0.0.0.0 area 0 as you can see I mesed up the IP (really easy to mess up OSPF stuff lol) I was trouble shooting and at first did nto know what was wrong so I reloaded the routers Corp and R3.

I then checked show ip route and saw the ip error and fixed the wildcard error 0.0.0.255 or changed the IP to 10.1.5.2 (one of the two I cannot remember which but both should be a fix) and OSPF started working.

Corp connection to R3 is Ethernet
Corp connection to R1, and R2 is Serial PPP which from book stated the following:

------------------------------------------------------
"Broadcast (multi-access) Broadcast (multi-access) networks such as Ethernet allow multiple devices to connect to (or access) the same network as well as provide a broadcast ability in which a single packet is delivered to all nodes on the network. In OSPF, a DR and a BDR must be elected for each broadcast multi-access network.

Non-broadcast multi-access Non-broadcast multi-access (NBMA) networks are types such as Frame Relay, X.25, and Asynchronous Transfer Mode (ATM). These networks allow for multi-access but have no broadcast ability like Ethernet. So, NBMA networks require special OSPF configuration to function properly and neighbor relationships must be defined.

Point-to-point Point-to-point refers to a type of network topology consisting of a direct connection between two routers that provides a single communication path. The point-to-point connection can be physical, as in a serial cable directly connecting two routers, or it can be logical, as in two routers that are thousands of miles apart yet connected by a circuit in a Frame Relay network. In either case, this type of configuration eliminates the need for DRs or BDRs—but neighbors are discovered automatically.

Lammle, Todd (2011-03-08). CCNA Cisco Certified Network Associate Study Guide: Exam 640-802 (pp. 457-458). John Wiley and Sons. Kindle Edition.
--------------------------------------------------------

So I know that my DR and BDR will be Corp and R3 so I am good to go there. However, It says in the book that Router 3 should have won the election and became the DR instead of Corp because of having the higher IP.

In my case however Corp ended up as the DR instead of the DBR even though it had lower IP scheme and should have lost the election.

---------------------------------------------
Corp#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
192.168.40.1 0 FULL/ - 00:00:37 10.1.4.2 Serial0/2
192.168.20.1 0 FULL/ - 00:00:35 10.1.3.2 Serial0/1
192.168.20.1 0 FULL/ - 00:00:35 10.1.2.2 Serial0/0
172.16.10.1 1 FULL/BDR 00:00:31 10.1.5.2 FastEthernet0/
0
Corp#

============================================

R3#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
10.1.5.1 1 FULL/DR 00:00:30 10.1.5.1 FastEthernet0/
0
R3#

---------------------------------------------------------

does me restarting the routers or the order in which I added ospf to the routers figure in to why my corp has the DR instead of R3?

I seem to recall something about it going to the first router that finds it but was unsure, and was looking for a specific answer.

Respectfully,

Brian


-------------------EDITED--------------------

I reloaded the Corp router and when I did looks like now its changed around.

----------
Corp>en
Corp#show ip ospf ne

Neighbor ID Pri State Dead Time Address Interface
192.168.40.1 0 FULL/ - 00:00:35 10.1.4.2 Serial0/2
192.168.20.1 0 FULL/ - 00:00:34 10.1.3.2 Serial0/1
192.168.20.1 0 FULL/ - 00:00:33 10.1.2.2 Serial0/0
172.16.10.1 1 FULL/DR 00:00:30 10.1.5.2 FastEthernet0/
0
Corp


======================-

R3#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
10.1.5.1 1 FULL/BDR 00:00:33 10.1.5.1 FastEthernet0/
0
R3#

-------------------------

So when the DR goes down the BDR automatically takes over and becomes the DR? Is the only way to change that around by reloading one of the routers and what about the election process does not seem like it works very well, or does it really only work when we are installing OSPF on the routers and if so wouldnt the first router to get OSPF become the DR or would elections take over in that case?


I also ran the next test of "debug ip ospf adj" this is where you shut down the F0/0 on R3 and it then makes Corp the DR and then when you bring back up F0/0 on R3 it changes DR back to R3 and Corp back to BDR. This does not happy on mine it just shows that its loaded back up

----------------------------------
OSPF adjacency events debugging is on
Corp#
*Mar 1 00:22:49.579: OSPF: Cannot see ourself in hello from 172.16.10.1 on Fast
Ethernet0/0, state INIT
*Mar 1 00:22:49.583: OSPF: Neighbor change Event on interface FastEthernet0/0
*Mar 1 00:22:49.583: OSPF: DR/BDR election on FastEthernet0/0
*Mar 1 00:22:49.583: OSPF: Elect BDR 0.0.0.0
*Mar 1 00:22:49.583: OSPF: Elect DR 10.1.5.1
*Mar 1 00:22:49.583: DR: 10.1.5.1 (Id) BDR: none
*Mar 1 00:22:50.091: OSPF: Build router LSA for area 0, router ID 10.1.5.1, seq
0x8000000D, process 132
*Mar 1 00:22:50.095: OSPF: No full nbrs to build Net Lsa for interface FastEthe
rnet0/0
*Mar 1 00:22:50.095: OSPF: Build network LSA for FastEthernet0/0, router ID 10.
1.5.1
Corp#
*Mar 1 00:22:50.099: OSPF: Build network LSA for FastEthernet0/0, router ID 10.
1.5.1
*Mar 1 00:22:50.115: OSPF: Rcv LS UPD from 192.168.20.1 on Serial0/0 length 148
LSA count 1
*Mar 1 00:22:50.131: OSPF: Rcv LS UPD from 192.168.20.1 on Serial0/0 length 60
LSA count 1
Corp#
*Mar 1 00:22:54.579: OSPF: Rcv DBD from 172.16.10.1 on FastEthernet0/0 seq 0x16
53 opt 0x52 flag 0x7 len 32 mtu 1500 state INIT
*Mar 1 00:22:54.583: OSPF: 2 Way Communication to 172.16.10.1 on FastEthernet0/
0, state 2WAY
*Mar 1 00:22:54.587: OSPF: Neighbor change Event on interface FastEthernet0/0
*Mar 1 00:22:54.587: OSPF: DR/BDR election on FastEthernet0/0
*Mar 1 00:22:54.591: OSPF: Elect BDR 172.16.10.1
*Mar 1 00:22:54.591: OSPF: Elect DR 10.1.5.1
*Mar 1 00:22:54.595: DR: 10.1.5.1 (Id) BDR: 172.16.10.1 (Id)
*Mar 1 00:22:54.599: OSPF: Send DBD to 172.16.10.1 on FastEthernet0/0 seq 0x651
opt 0x52 flag 0x7 len 32
*Mar 1 00:22:54.599: OSPF: NBR Negotiation Done. We are the SLAVE
*Mar 1 00:22:54.603: OSPF: Send DBD to 172.16.10.1 on FastEthernet0/0 seq 0x165
3 opt 0x52 flag 0x2 len 112
*Mar 1 00:22:54.635: OSPF: Rcv DBD from 172.16.10.1 on FastEthernet0/0 seq 0x16
54 opt 0x52 flag 0x3 len 132 mtu 1500 state EXCHANGE
*Mar 1 00:22:54.639: OSPF: Send DBD to 172.16.10.1 on FastEthernet0/0 seq 0x165
4 opt 0x52 flag 0x0 len 32
*Mar 1 00:22:54.659: OSPF: Rcv DBD from 172.16.10.1 on FastEthernet0/0 seq 0x16
55 opt 0x52 flag 0x1 len 32 mtu 1500 state EXCHANGE
*Mar 1 00:22:54.663: OSPF: Exchange Done with 172.16.10.1 on FastEthernet0/0
*Mar 1 00:22:54.663: OSPF: Send LS REQ to 172.16.10.1 length 12 LSA count 1
*Mar 1 00:22:54.663: OSPF: Send DBD to 172.16.10.1 on FastEthernet0/0 seq 0x165
5 opt 0x52 flag 0x0 len 32
*Mar 1 00:22:54.671: OSPF: Rcv LS REQ from 172.16.10.1 on FastEthernet0/0 lengt
h 36 LSA count 1
*Mar 1 00:22:54.671: OSPF: Send UPD to 10.1.5.2 on FastEthernet0/0 length 124 L
SA count 1
*Mar 1 00:22:54.679: OSPF: Rcv LS UPD from 172.16.10.1 on FastEthernet0/0 lengt
h 76 LSA count 1
*Mar 1 00:22:54.691: OSPF: Synchronized with 172.16.10.1 on FastEthernet0/0, st
ate FULL
*Mar 1 00:22:54.691: %OSPF-5-ADJCHG: Process 132, Nbr 172.16.10.1 on FastEthern
et0/0 from LOADING to FULL, Loading Done
*Mar 1 00:22:54.715: OSPF: Rcv LS UPD from 192.168.20.1 on Serial0/0 length 76
LSA count 1
*Mar 1 00:22:55.107: OSPF: Build router LSA for area 0, router ID 10.1.5.1, seq
0x8000000E, process 132
*Mar 1 00:22:55.139: OSPF: Rcv LS UPD from 192.168.20.1 on Serial0/0 length 148
LSA count 1
*Mar 1 00:22:55.191: OSPF: Build network LSA for FastEthernet0/0, router ID 10.
1.5.1
*Mar 1 00:22:55.191: OSPF: Build network LSA for FastEthernet0/0, router ID 10.
1.5.1
*Mar 1 00:22:55.203: OSPF: Rcv LS UPD from 172.16.10.1 on FastEthernet0/0 lengt
h 76 LSA count 1
*Mar 1 00:22:55.227: OSPF: Rcv LS UPD from 192.168.20.1 on Serial0/0 length 60
LSA count 1
Corp#
Corp#
*Mar 1 00:22:59.555: OSPF: Neighbor change Event on interface FastEthernet0/0
*Mar 1 00:22:59.559: OSPF: DR/BDR election on FastEthernet0/0
*Mar 1 00:22:59.559: OSPF: Elect BDR 172.16.10.1
*Mar 1 00:22:59.563: OSPF: Elect DR 10.1.5.1
*Mar 1 00:22:59.563: DR: 10.1.5.1 (Id) BDR: 172.16.10.1 (Id)
*Mar 1 00:22:59.567: OSPF: Neighbor change Event on interface FastEthernet0/0
*Mar 1 00:22:59.567: OSPF: DR/BDR election on FastEthernet0/0
*Mar 1 00:22:59.571: OSPF: Elect BDR 172.16.10.1
*Mar 1 00:22:59.571: OSPF: Elect DR 10.1.5.1
*Mar 1 00:22:59.575: DR: 10.1.5.1 (Id) BDR: 172.16.10.1 (Id)
Corp#
*Mar 1 00:22:59.751: OSPF: Rcv LS UPD from 192.168.20.1 on Serial0/0 length 76
LSA count 1
Corp#
*Mar 1 00:23:04.631: OSPF: Rcv LS UPD from 192.168.20.1 on Serial0/0 length 76
LSA count 1
Corp#


----------------------------------

I am just currious over these questions in my last paragraph.

Thanks,

Brian

wilder7bc
07-11-2012, 12:14 AM
I may have an idea of what s wrong. I ran the following:

----------

Corp#show ip ospf interface
Vlan1 is up, line protocol is up
Internet Address 10.1.1.1/24, Area 0
Process ID 132, Router ID 10.1.5.1, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 10.1.5.1, Interface address 10.1.1.1
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

=================

R3#show ip ospf int
R3#show ip ospf interface
FastEthernet0/0 is up, line protocol is up
Internet Address 10.1.5.2/24, Area 0
Process ID 1, Router ID 172.16.10.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 10.1.5.1, Interface address 10.1.5.1
Backup Designated router (ID) 172.16.10.1, Interface address 10.1.5.2
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

-------------------------

For some reason it looks like the RID for router 3 is 10.1.5.2 instead of 172.16.10.1

I would have thought it would pick the 172 as the RID not sure why it has not. I am going to test this by creating a loop back on R3 and will post back my results.


------------------
hhmm I may have ran the wrong command because I think this one gives me the RID:

R3#show ip ospf
Routing Process "ospf 1" with ID 172.16.10.1
Start time: 00:06:03.484, Time elapsed: 01:34:28.500

=======

Corp#show ip ospf
Routing Process "ospf 132" with ID 10.1.5.1
Start time: 00:00:05.764, Time elapsed: 00:42:09.796

if thats the case this still makes no sense but I will try the loop back still just to double check

Brian

wilder7bc
07-11-2012, 12:48 AM
Well from my tests when it does not give back DR to the router even if it has a higher RID. The only way to give it back is by reload or I used the

"clear ip ospf process"

when I did this it will then assign the DR back to the router which has the higher rid or basically the one that will win the election.

I had thought in the book when Mr Lammle shut down his F0/0 that it gave the DR away but when he started back up his F0/0 that it took back the DR but from my tests atleast on my routers that does not seem to be the case. Maybe a typo, or different routers, or something else.


From my test it only gives back the DR to the one that would win the election when you reload or restart the OSPF process.

=============

Well that did not work either...... I thought it did but all that happens is when you clear the ospf on one router it seems to go to the other router....

So maybe its GNS3 I will reconnect up my home lab tomorrow and try it on my hardware, and see if I get any different results. Im irritated now lol. oh well time to go to bed its 1am here and I have to get up for work at 7am :)

Respectfully,

Brian

wilder7bc
07-11-2012, 01:59 AM
Well I was going to go to bed but I had to keep playing around...

Guess what I found at the very end of the chapter almost....

"Hold on though. Even if you change the priority of the interface, the router will not become the DR of the LAN segment until both the existing DR and the BDR are shut down. Once an election occurs, that’s all she wrote, and the election won’t happen again until the DR and BDR are reloaded and/or shut down. Just having a router with a better RID come up on your network doesn’t mean your DR or BDR will change!"

Lammle, Todd (2011-03-08). CCNA Cisco Certified Network Associate Study Guide: Exam 640-802 (p. 479). John Wiley and Sons. Kindle Edition.

So it does look like its working as intended and both the DR and the BDR have to go down or re-start in order for a new election to happen.

Some of what was said earlier in the chapter kind of vaguely led to something different thus my opinion..

Anyway I think I can now go to bed for real.


G`night

Big Evil
07-11-2012, 03:58 AM
Yes that is right there is no preempt in OSPF -

So in summary - your DR fails, the BDR takes over and a new BDR is elected. The DR come back online, but does not become the DR again, nor the BDR.
This is an exam type question.

Another little gem about OSPF - if you set up an router with no loopback or RID and send it out to site and you do not un-shut the interfaces the OSPF process will not start when the router is powered up. Why - because OSPF requires a RID to function. You will see on the cmd line OSPF failed to start. Nice - hence why a loopback or RID should be used as neither go down.

HTH.

wilder7bc
07-11-2012, 08:12 AM
Yes that is right there is no preempt in OSPF -

So in summary - your DR fails, the BDR takes over and a new BDR is elected. The DR come back online, but does not become the DR again, nor the BDR.
This is an exam type question.

Another little gem about OSPF - if you set up an router with no loopback or RID and send it out to site and you do not un-shut the interfaces the OSPF process will not start when the router is powered up. Why - because OSPF requires a RID to function. You will see on the cmd line OSPF failed to start. Nice - hence why a loopback or RID should be used as neither go down.

HTH.

That is good information I cannot tell you how many times I setup my topology and got all my information setup and forgot to do a no shutdown and later am going what the hex. I know now why everyone says show ip int br is a gem of a command and why its became one of my most used commands already.


Another thing I noticed if your following a written topology and copying from paper if your not careful and give the IP address to each interface say 10.1.1.1 and 10.1.1.1 you dont get an error and it just does not work lol... I did that on EIRGP setup and was trying to find the error which I can never find the error until I fall back to my old habbit of ok lets start from beginning peel back everything starting from basic layer and systematically go through trouble shooting steps then using that sound logic I almost always find my problem.

It sucks when something goes wrong, but you really seem to learn the material well when you have to trouble shoot and are looking for real problems. It drives that into your memory big time.

Thanks again for the answer!

Respectfully,

Brian

Big Evil
07-11-2012, 08:20 AM
Funny enough when i was a wee pup in a NOC the end users did not want to use our routers the ISP provided and he had a 2811. He logged a ticket with the NOC that was given to me, his DSL was not coming up. We had line tests, frame engineer etc all out and they said it was all working - seven days later he emailed in and said he had not done a "no shut" on his DSL interface.

Boy, did he feel like a fool - even more so when we passed him a £300 bill for engineering visits. ;-)

Yeah i have been there - get a huge chunk of info from notepad (i write nearly all my configs out in NP) the paste it in - when stuff does not work your right, back to the basics! LOL

lammle
07-11-2012, 10:17 AM
This was an excellent thread!!
TL

lammle
07-11-2012, 10:22 AM
Well I was going to go to bed but I had to keep playing around...

Guess what I found at the very end of the chapter almost....

"Hold on though. Even if you change the priority of the interface, the router will not become the DR of the LAN segment until both the existing DR and the BDR are shut down. Once an election occurs, that’s all she wrote, and the election won’t happen again until the DR and BDR are reloaded and/or shut down. Just having a router with a better RID come up on your network doesn’t mean your DR or BDR will change!"

Lammle, Todd (2011-03-08). CCNA Cisco Certified Network Associate Study Guide: Exam 640-802 (p. 479). John Wiley and Sons. Kindle Edition.

So it does look like its working as intended and both the DR and the BDR have to go down or re-start in order for a new election to happen.

Some of what was said earlier in the chapter kind of vaguely led to something different thus my opinion..

Anyway I think I can now go to bed for real.


G`night


YES! This is so very true, once an election takes place, it is over.
You can set priorities and shut down the interfaces on the multi-access networks, or doa clear ip ospf process - those work too.
TL