From point A to point B
Point A: you know that OSPF elects a DR and a BDR on Ethernet, and you learned the usual rule: the highest priority wins. Yet on your network the DR is exactly the router you did not expect. Point B: by the end of this chapter you will predict which router becomes DR, design the priorities of a provider network and read in the LSDB what each router advertises.
In the class we said it plainly: the rule “the highest priority wins” is incomplete. We proved it live with four routers and a configuration mistake that turned out to be the best lesson.
- A DR with priority 150 against a router with 250
- How the election really works: BDR first, no preemption
- A router with priority 255 that stays a DROTHER
- When 224.0.0.6 is used, seen in Wireshark
- A priority plan for Metro Ethernet
- Type 1 and type 3 LSAs in the database
The highest priority does not always win
First, the cleanup: shutting down serial 0/0 on R3 drops the EIGRP neighbor and ends the redistribution into the NSSA. The focus moves to area 40: a broadcast segment, 10.10.10.0/24, with R8, R9, R10 and R11 connected to a switch. OSPF is removed from all four and rebuilt. The plan: R8 will be the DR with priority 250.
R8# configure terminal
R8(config)# no router ospf 1
R8(config)# interface loopback 0
R8(config-if)# ip address 8.8.8.8 255.255.255.255
R8(config-if)# ip ospf 1 area 40
R8(config-if)# interface GigabitEthernet0/1
R8(config-if)# ip address 10.10.10.8 255.255.255.0
R8(config-if)# ip ospf priority 250
R8(config-if)# shutdown
R8(config-if)# router ospf 1
R8(config-router)# router-id 0.0.0.8
R8(config-router)# do debug ip ospf adj
R8(config-router)# interface GigabitEthernet0/1
R8(config-if)# no shutdown
! Missing: Gi0/1 is not in any OSPF area yet
Next comes R9, with priority 150, meant to be the BDR. Since it is an internal router, all its interfaces go into area 40 with a single network statement.
R9(config)# no router ospf 1
R9(config)# router ospf 1
R9(config-router)# router-id 0.0.0.9
R9(config-router)# network 0.0.0.0 255.255.255.255 area 40
R9(config-router)# interface loopback 0
R9(config-if)# ip address 9.9.9.9 255.255.255.255
R9(config-if)# interface GigabitEthernet0/0
R9(config-if)# ip address 10.10.10.9 255.255.255.0
R9(config-if)# ip ospf priority 150
R9(config-if)# do debug ip ospf adj
R9(config-if)# no shutdown
The neighbor does not come up. Wireshark only shows Hellos from R9. On R8, show run | section router reveals the problem: Gi0/1 is not in any area. ip ospf 1 area 40 is all it takes.
R8# show run | section router
R8# configure terminal
R8(config)# interface GigabitEthernet0/1
R8(config-if)# ip ospf 1 area 40
! debug: DBD, LSR, LSU, LSAck ... neighbor 0.0.0.9 goes FULL
R8(config-if)# do show ip ospf neighbor
R8(config-if)# do show ip ospf interface GigabitEthernet0/1 | include priority
R8(config-if)# do show ip ospf interface GigabitEthernet0/1
! DR: 0.0.0.9 (priority 150) · BDR: 0.0.0.8 (priority 250)
Now it works: the debug shows DBD, LSR, LSU and LSAck, and the neighbor reaches FULL. But there is a surprise. The DR is R9, with priority 150. R8, with 250, ended up as BDR.
How the election really works
Peter found the clue in the chat: R8 was out of the game. R9 arrived alone on the segment, found nobody and named itself DR.
This is the logic we explained in the class. Once routers reach 2-Way they are neighbors, and the election starts. The BDR is calculated first. If there is no DR, the BDR is promoted to DR and a new BDR is calculated. A router that arrives alone proposes itself as BDR, then as DR, and ends up as DR.
And the key rule: once elected, the DR does not change. It only changes if it fails or if the OSPF process restarts. When R8 came in with 250 and asked for the role, the segment already had a DR. Only one seat was free: BDR.
The election in area 40, step by step: priority only matters inside the same election. Diagram: The House of Routing.
Priority 255 and still a DROTHER
Next question for the audience: if R10 joins with priority 255, the maximum, what happens? A good practice from the class: in production, shut the interface, configure it, then bring it up. You should know what will happen before it happens.
R10(config)# interface GigabitEthernet0/0
R10(config-if)# shutdown
R10(config-if)# ip address 10.10.10.10 255.255.255.0
R10(config-if)# ip ospf 1 area 40
R10(config-if)# ip ospf priority 255
R10(config-if)# do debug ip ospf adj
R10(config-if)# no shutdown
R10(config-if)# do show ip ospf neighbor
! R10 is DROTHER: FULL/DR with 0.0.0.9, FULL/BDR with 0.0.0.8
R10(config-if)# router ospf 1
R10(config-router)# router-id 0.0.0.10
R10(config-router)# do clear ip ospf process
R11(config)# router ospf 1
R11(config-router)# router-id 0.0.0.11
R11(config-router)# network 0.0.0.0 255.255.255.255 area 0
R11(config-router)# interface GigabitEthernet0/0
R11(config-if)# shutdown
R11(config-if)# ip address 10.10.10.11 255.255.255.0
R11(config-if)# ip ospf priority 0
R11(config-if)# no shutdown
R11(config-if)# do debug ip ospf adj
! debug: mismatch area -> the network statement says area 0
R11(config-if)# router ospf 1
R11(config-router)# no network 0.0.0.0 255.255.255.255 area 0
R11(config-router)# network 0.0.0.0 255.255.255.255 area 40
R11(config-router)# do show ip ospf neighbor
! FULL/DR (R9), FULL/BDR (R8), 2WAY/DROTHER (R10)
R10’s debug shows the Wait state and, in 2-Way, the existing roles: DR 9, BDR 8. R10 has 255, but it arrived late and stays a DROTHER, FULL with the DR and the BDR.
Then R11 joins with priority 0: it does not take part in the election. There was a hiccup, “mismatch area”, because the network statement said area 0. Once fixed to area 40, R11 is FULL with R9 and R8, and in 2-Way with R10.
That 2-Way between DROTHERs is not an error. They are neighbors, not adjacent. A neighbor shows up in the Hellos. An adjacent router reaches FULL and exchanges routing information. That is exactly why the DR exists: DROTHERs send it their information and the DR advertises it to everyone. This way not every router forms an adjacency with every other.
224.0.0.5 and 224.0.0.6 in Wireshark
Many texts say that DROTHERs talk to the DR through 224.0.0.6, and you picture that traffic flowing all the time. The capture from the class shows something else.
What the capture shows when R10 joins as a DROTHER: unicast during the adjacency, 224.0.0.6 for flooding, then only Hellos. Diagram: The House of Routing.
- R10 sends its Hello to 224.0.0.5.
- It sends its DBD as unicast to 10.10.10.8, with the header of its type 1 LSA. In a type 1 LSA, the Link State ID is the router ID of its originator.
- R8 answers with an LSR: “send me what you said you had”.
- R10 replies with a unicast LSU carrying the full LSA: its links and its cost, the missing information.
- After the LSAck, R10 sends its update and its acknowledgment to 224.0.0.6.
- Then everything goes back to Hellos to 224.0.0.5, every 10 seconds.
How do you check who listens to 224.0.0.6? With show ip interface. The DR’s interface has joined the groups 224.0.0.5 and 224.0.0.6. R10’s, a DROTHER, only 224.0.0.5.
R9# show ip interface GigabitEthernet0/0
! DR: joined multicast groups 224.0.0.5 and 224.0.0.6
R10# show ip interface GigabitEthernet0/0
! DROTHER: joined 224.0.0.5 only
The DR fails: the BDR steps up
Jorge asked whether the DR was not simply the router with the highest router ID. The answer sums it all up: there is only one DR and one BDR per broadcast or NBMA segment, even if you have 10 routers with high priorities.
There is no preemption either, neither for the DR nor for the BDR. If the DR fails, priorities are not renegotiated: the BDR is promoted to DR and a new BDR is elected. If the old DR comes back, it stays a DROTHER until the next failure.
The test in the lab: Gi0/0 is shut down on R9, the DR.
R9(config)# interface GigabitEthernet0/0
R9(config-if)# shutdown
R11# show ip ospf neighbor
! After the dead interval: R8 FULL/DR, R10 FULL/BDR
R9(config)# interface GigabitEthernet0/0
R9(config-if)# no shutdown
R11# show ip ospf neighbor
! R9 is back, but as 2WAY/DROTHER
R11 does not notice right away: it is connected to a switch and its link stays up. This is an indirect failure, and you have to wait for the dead interval. To detect it sooner, Jesús mentioned BFD (Bidirectional Forwarding Detection).
When the timer expires, R8 goes from BDR to DR, and R10, the DROTHER with 255, becomes BDR. When R9 returns with no shutdown, the debug shows 2-Way with R8, R10 and R11, and the election says: DR 8, BDR 10. R9, the former DR, stays a DROTHER. It lost the throne.
Priority design over Metro Ethernet
What happens if you do not define the DR and BDR properly? Jesús answered on the whiteboard. Picture your provider connecting your branches with a VPLS service. For OSPF it is one big switch: a broadcast segment. The DR and BDR are decided before you type the first command.
A stepped priority plan over VPLS: the power-on order follows the priority order. Diagram: The House of Routing.
- Step by 10: 200, 190, 180 and 170. It is easy to read and you do not need to go up to 255.
- Decide who comes next. The third and fourth routers have no “BDR 2” role in OSPF: they will be DROTHERs. But with a priority above zero they take over in order if the first ones fail.
- Power on in order. If you power on the 170 router first and it is alone, it becomes DR. Power on the intended DR first and continue in order, so you never have to restart OSPF to fix the roles.
Jesús applied this model for more than 8 years with service providers, on networks of more than 10 branches: DR, BDR, two backups in line and the rest at priority 0. The real problems were two:
- Indirect failure: neighbors are slow to detect a failure behind a switch.
- MTU changes in the provider network, for example during a maintenance window with MPLS or an overlay port left misconfigured. The neighbor gets stuck in ExStart.
Cisco confirms it: with mismatched MTUs the neighbor stays in ExStart or Exchange. The fix is to match the MTU on both ends; ip ospf mtu-ignore is for rare cases. Behind that network there is a customer making sales: every outage costs.
Type 1 and type 3 LSAs in the lab
R10 gets a loopback, 10.10.110.10/32, in area 40, and R11 can already ping it.
R10(config)# interface loopback 0
R10(config-if)# no ip address
R10(config-if)# ip address 10.10.110.10 255.255.255.255
R10(config-if)# ip ospf 1 area 40
R11# ping 10.10.110.10
R11# show ip ospf database
R11# show ip ospf database router 0.0.0.8
Everything in area 40 is type 1 LSAs (router LSAs). Every OSPF router in the area originates one, and its Link State ID is the router ID. With show ip ospf database router you see what each one describes. R11’s has two links: a stub network, its loopback, and a connection to a transit network, the broadcast segment with a DR. It is the same content that traveled inside the LSU.
Now the design. R8 connects area 40 with area 32, but area 40 does not touch area 0. Every area must connect to the backbone: area 40 is discontiguous and needs a virtual link. Jesús was emphatic: it is a tool in your kit, like a screwdriver, not part of a native design. You configure it in chapter 7.
First, R8 has to talk to R7 in area 32. When its Gi0/0 comes up, the debug warns “Mismatched authentication type”: R7 uses type 2 (MD5) and R8 none. It is removed on R7 and the neighbor comes up; authentication returns in chapter 8.
R8(config)# interface GigabitEthernet0/0
R8(config-if)# ip ospf 1 area 32
R8(config-if)# no shutdown
! debug ip ospf adj: Mismatched authentication type. Input packet specified type 2
R7(config)# interface GigabitEthernet0/1
R7(config-if)# no ip ospf authentication
R8# show ip ospf neighbor
R8# show ip route
! O IA 1.1.1.1, O IA 2.2.2.2 ... learned through the ABR 0.0.0.1
R8# show ip ospf database
! Summary Net Link States (type 3) advertised by 0.0.0.1
Now R8 sees O IA routes: 1.1.1.1, 2.2.2.2 and the rest of area 0. In the LSDB they appear as Summary Net Link States, type 3 LSAs, advertised by 0.0.0.1, the ABR. Type 4 LSAs show up too.
The ABR translates the type 1 and 2 LSAs of one area into type 3 LSAs for another. A type 3 LSA does not describe the topology of area 0; it says “to reach this network, go toward 0.0.0.1”. R7, sitting in the middle, does not even appear. That is why we say that, between areas, OSPF follows a distance vector principle: direction and distance.
Class videos
These are the two videos from the 2nd OSPF Marathon that this chapter covers. They were recorded live with Cisco IOSv routers in GNS3, debug and Wireshark; the audio is in Spanish, with subtitles in Spanish, English, French and Portuguese.
- Day 2 · Part 2DR and BDR election: the highest priority does not always winWatch video
- Day 2 · Part 3DR/BDR without preemption, Metro Ethernet design and type 1 and 3 LSAsWatch video
Recorded live; Spanish audio with Spanish, English, French and Portuguese subtitles. When you play it, the video loads from YouTube. Day 2 playlist on YouTube
Test what you learned
1. R9 (priority 150) is DR. You enable OSPF on R8 (priority 250). Who is DR one minute later?
Answer. Still R9. The election is not preemptive: R8 accepts the existing DR and becomes BDR. It would only become DR if R9 fails or the OSPF process restarts.
2. The DR fails. The BDR has priority 250 and a DROTHER has 255. Who becomes the new DR?
Answer. The BDR. It is promoted to DR without comparing priorities. Then a new BDR is elected, and that is where the DROTHER with 255 wins.
3. Two DROTHERs see each other as 2WAY/DROTHER. Is there anything to fix?
Answer. No. They are neighbors, not adjacent. Each DROTHER only reaches FULL with the DR and the BDR. This prevents every router from forming an adjacency with every other.
4. How do you check that a router listens to 224.0.0.6?
Answer. With show ip interface on the segment interface. The DR and BDR have joined 224.0.0.5 and 224.0.0.6; a DROTHER only 224.0.0.5.
5. A router sees O IA routes advertised by 0.0.0.1. What LSA type are they and who is 0.0.0.1?
Answer. They are type 3 LSAs (Summary Net Link States). 0.0.0.1 is the ABR that translates the type 1 and 2 LSAs of another area into type 3 LSAs.
Your takeaways
- Priority only decides inside the same election; if a DR already exists, the new router accepts it.
- No preemption: the DR only changes if it fails or OSPF restarts. Then the BDR steps up and a new BDR is elected.
- Priority 0 means staying out. DROTHERs are FULL with the DR and BDR, and 2-Way among themselves.
- Only the DR and BDR listen to 224.0.0.6, and it is used when there is something to flood; at rest there are only Hellos to 224.0.0.5.
- Over VPLS or Metro Ethernet, design priorities in steps of 10 and power on the routers in that order.
- Real problems with providers: indirect failure (think BFD) and mismatched MTU, which leaves the neighbor in ExStart.
- A type 1 LSA describes a router’s links; a type 3, created by the ABR, only says where to go.
Official resources
- Understand OSPF Neighbor Statescisco.com
- Troubleshoot OSPF Neighbors Stuck in Exstart/Exchange Statecisco.com
- Understand OSPF Areas and Virtual Linkscisco.com
- IP Routing: OSPF Command Reference (ip ospf priority)cisco.com
- IP Routing: OSPF Command Reference (show ip ospf database)cisco.com
- OSPF Support for BFD over IPv4cisco.com
- RFC 2328: OSPF Version 2rfc-editor.org
Source and credits. Chapter written from the OSPF Masterclass that Jesús Espinoza recorded live in 2021. Text drafted with AI assistance and reviewed; original diagrams by The House of Routing. Technical details and configuration were checked against official Cisco documentation and IETF RFCs.