What is the Totally Stubby Area in OSPF? Detail Explained
What is Totally Stubby Area in OSPF? The Totally Stubby Area (TSA) is an area type in the…
OSPF neighbours progress through seven states before they can exchange routes. Knowing which state an adjacency is stuck in tells you almost exactly what is wrong, each state fails for a specific, small set of reasons.
Router# show ip ospf neighbor
Router# show ip ospf interface GigabitEthernet0/1| State | What has happened | Stuck here means |
|---|---|---|
| Down | No hello received from this neighbour | Interface down, OSPF not enabled, or hellos being filtered |
| Attempt | NBMA only, unicast hellos sent to a manually configured neighbour, no reply | Frame Relay or NBMA reachability problem |
| Init | A hello was received, but this router’s ID was not listed in it | One-way communication, the neighbour is not hearing you |
| 2-Way | Bidirectional communication confirmed; DR/BDR election happens here | Normal and permanent between two DROTHERs. A problem only if it should be Full. |
| ExStart | Master/slave roles being negotiated; sequence numbers agreed | MTU mismatch, or duplicate router IDs |
| Exchange | Database Description packets being swapped | MTU mismatch, or a unidirectional link |
| Loading | Link State Requests sent for LSAs the router lacks | Corrupted LSA, resource exhaustion, or a software bug |
| Full | Databases synchronised, the adjacency is up | This is where you want to be |
Init means you are receiving the neighbour’s hellos but your own router ID does not appear in their neighbour list. Communication is working in one direction only.
Causes: an ACL blocking OSPF (IP protocol 89) in one direction, a unidirectional fibre fault, or the neighbour having passive-interface set on that link, a passive interface listens but never sends.
This is the classic OSPF fault. During Exchange, routers send Database Description packets sized to the interface MTU. If the two ends disagree, the larger packet is dropped and the exchange never completes, while ping works perfectly, because a normal ping is small.
Router# show interfaces GigabitEthernet0/1 | include MTU
Router# ping 10.1.1.2 size 1500 df-bitFix the MTU to match on both sides. As a workaround only, OSPF can be told to skip the check:
Router(config-if)# ip ospf mtu-ignoreThis is a workaround, not a fix, a genuine MTU mismatch will still fragment or drop data traffic later.
The other ExStart cause is duplicate router IDs. Two routers claiming the same ID cannot negotiate master/slave.
Router(config-router)# router-id 1.1.1.1
Router# clear ip ospf processOn a broadcast segment, only the DR and BDR form full adjacencies with everyone. Two DROTHER routers deliberately stop at 2-Way with each other. That is designed behaviour, not a fault.
It is a fault when both routers should be adjacent, for example on a point-to-point link, or when one of them should be the DR. Check the priorities.
Everything in this list must match, or the neighbour never appears:
| Must match | Check with |
|---|---|
| Area ID | show ip ospf interface |
| Subnet and mask | show ip interface brief |
| Hello and dead intervals | show ip ospf interface |
| Authentication type and key | show ip ospf interface |
| Stub area flags | show ip ospf |
| MTU | show interfaces |
| Network type | show ip ospf interface |
Router IDs must be unique, not matching, that is the one item on the list that works the other way round.
On a broadcast segment with n routers, full-mesh adjacencies would be n(n−1)/2 relationships. OSPF avoids that by electing a Designated Router that everyone adjoins, plus a Backup Designated Router ready to take over.
Election rules:
Router ID itself is chosen as: an explicit router-id command, else the highest loopback address, else the highest active physical interface address. Always set it explicitly, otherwise it changes when an interface goes down, which restarts OSPF.
Router(config-if)# ip ospf priority 255 ! prefer this router as DR
Router(config-if)# ip ospf priority 0 ! never become DR or BDRThis surprises people. Once a DR is elected, a router that later appears with a higher priority does not take over. The existing DR keeps the role until it fails. If you want a specific router to be the DR, either configure priorities before the segment comes up, or clear the OSPF process on the current holder.
| Network type | DR/BDR elected? | Hello / dead |
|---|---|---|
| Broadcast (Ethernet) | Yes | 10 / 40 s |
| Non-broadcast (NBMA) | Yes, neighbours configured manually | 30 / 120 s |
| Point-to-point | No | 10 / 40 s |
| Point-to-multipoint | No | 30 / 120 s |
Setting a network type mismatch between two ends is a common cause of adjacencies that never form, the hello timers differ as a side effect.
224.0.0.5, AllSPFRouters. Every OSPF router listens here.224.0.0.6, AllDRouters. Only the DR and BDR listen; DROTHERs send their updates here.show ip ospf neighbor, note the state.Router# debug ip ospf adj
Router# debug ip ospf helloAlmost always an MTU mismatch between the two interfaces, or duplicate router IDs. Check MTU first, a DF-bit ping at the interface MTU confirms it in seconds.
Not between two DROTHER routers on a broadcast segment, that is normal and intended. It is a problem if the two routers should be adjacent, such as on a point-to-point link.
Set its OSPF priority higher and set the others to 0. But because the election is non-preemptive, you must do this before the segment comes up, or clear the OSPF process on the current DR afterwards.
Yes, for OSPF, unlike EIGRP, where they do not. A mismatch prevents the adjacency forming entirely. Changing the hello interval automatically adjusts the dead interval to four times its value.
The BDR is already fully adjacent with every router on the segment, so it promotes itself immediately and a new BDR is elected. That is the entire reason a BDR exists.
A loopback never goes down, so the router ID stays stable. If the ID is derived from a physical interface that fails, the router ID changes and the OSPF process restarts, dropping every adjacency. Setting router-id explicitly is better still.
One response to “OSPF States Explained — DR/BDR Election and Neighbor Adjacency”
[…] for XYZ city. Neighbor ships between these routers via loopbacks and internal communication through OSPF (open shortest path first […]