A real-life situation
You configure Loopback1 on R3 with 172.16.3.1/24 to stand in for a test LAN and add it to OSPF. On R1, show ip route lists O 172.16.3.1/32, not 172.16.3.0/24. An extra network statement doesn't help. Later, a colleague changes one end of a router link to point-to-point to speed up convergence and forgets the other end: the neighbours still reach Full, yet routes through the link disappear. Both puzzles are about the OSPF network type.
The DR/BDR lesson introduced broadcast and point-to-point. This lesson covers all the types side by side.
What the network types are
| Network type | Default on | DR/BDR | Hello / dead | Neighbours found by |
|---|---|---|---|---|
| Broadcast | Ethernet | Yes | 10 / 40 s | Multicast hellos to 224.0.0.5 |
| Point-to-point | Serial with HDLC or PPP, GRE tunnels | No | 10 / 40 s | Multicast hellos to 224.0.0.5 |
| Non-broadcast (NBMA) | Frame Relay physical interfaces | Yes | 30 / 120 s | Unicast hellos to neighbours you configure |
| Point-to-multipoint | Only when configured | No | 30 / 120 s | Multicast hellos |
| Point-to-multipoint non-broadcast | Only when configured | No | 30 / 120 s | Unicast hellos to neighbours you configure |
| Loopback | Loopback interfaces | No | No hellos | None: advertised as a /32 host route |
The types differ in three ways that matter in practice:
- DR election. Broadcast and non-broadcast elect a DR and BDR, wait up to 40 seconds (the wait timer) when an interface comes up, and create a type 2 LSA for the segment. The point-to-point types don't.
- Timers. The timers are part of the hello check, so two types with different default timers can't become neighbours unless you change the timers by hand.
- Neighbour discovery. On networks without multicast (Frame Relay, some cloud networks) the router can't find neighbours by itself, so you list them with the
neighborcommand.
Why it works this way
OSPF was designed for every kind of link in use in the early 1990s: Ethernet LANs where everyone hears everyone, leased lines with exactly two routers, and WAN clouds such as Frame Relay where routers share a subnet but can't multicast and may not all reach each other. One behaviour can't fit them all. On Ethernet a DR saves work; between two routers it is pointless; on a partial-mesh WAN a DR that can't reach every spoke would break flooding, which is what point-to-multipoint avoids.
Today most links are Ethernet. Many of them connect exactly two routers, so engineers set them to point-to-point: no DR election, no 40-second wait, no type 2 LSA, and a simpler database.
The loopback /32 surprise
A loopback has the network type LOOPBACK. OSPF treats it as a single host and advertises it as a /32 host route, whatever mask is configured. That is usually fine for router IDs and management addresses. When a loopback stands in for a whole subnet, as in labs, change its network type:
R3#show ip ospf interface Loopback1 Loopback1 is up, line protocol is up Internet Address 172.16.3.1/24, Area 0, Attached via Network Statement Process ID 1, Router ID 3.3.3.3, Network Type LOOPBACK, Cost: 1 Loopback interface is treated as a stub Host
interface Loopback1
ip ospf network point-to-pointOn R3. The loopback is now advertised with its configured mask, and R1 shows O 172.16.3.0/24.
How to configure it on Cisco IOS
interface GigabitEthernet0/1
ip ospf network point-to-pointOn both routers of a two-router Ethernet link. The neighbourship restarts on the first one; configure the other end straight away.
interface Serial0/0/0
ip ospf network point-to-multipointOn every router of a hub-and-spoke WAN. Each router advertises its own address as a /32 host route, so spokes can reach each other through the hub.
interface Serial0/0/0
ip ospf network non-broadcast
!
router ospf 1
neighbor 10.0.0.2
neighbor 10.0.0.3Non-broadcast: hellos are sent as unicast to each configured neighbour. While the router polls a neighbour it hasn't heard from yet, that neighbour is in the Attempt state.
default ip ospf networkInterface command: returns the interface to the default type for its media.
Mismatches: which ones break the adjacency
| One end | Other end | Result |
|---|---|---|
| Broadcast | Point-to-point | Same timers, so the routers reach Full, but they describe the link differently. Routes over it can be missing. |
| Broadcast | Non-broadcast | 10/40 vs 30/120: hellos rejected, no neighbour (unless timers are set by hand). |
| Point-to-point | Point-to-multipoint | 10/40 vs 30/120: no neighbour. |
| Broadcast | Point-to-multipoint | 10/40 vs 30/120: no neighbour. |
The first row is the dangerous one, because show ip ospf neighbor looks healthy. Here is what happens on the R2–R3 link when R2's Gi0/1 is point-to-point and R3's Gi0/0 is still broadcast:
- Area 0, hello 10, dead 40. I don't do DRs: DR field 0.0.0.0.Hello from R2 to R3.Hello
- HelloArea 0, hello 10, dead 40. After my wait timer, I elect myself DR.Hello from R3 to R2.
- FullArea and timers match, so the hello check passes and the databases synchronise.
- My router LSA: a point-to-point link to 3.3.3.3, plus stub 10.0.23.0/30.LSU from R2 to R3.LSU
- LSUMy router LSA: a transit network whose DR is 10.0.23.2.LSU from R3 to R2.
- SPF can't use the linkSPF uses a link only if each end lists the other. R2 lists R3 directly; R3 lists a segment (via its DR) that R2 never mentions. The check fails, so no path crosses R2–R3.
R3#show ip ospf interface GigabitEthernet0/0 | include Network Type Process ID 1, Router ID 3.3.3.3, Network Type BROADCAST, Cost: 1
Common mistakes
- Changing the network type on one end of a link only.
- Expecting a DR on a point-to-point or point-to-multipoint network.
- Expecting the configured mask of a loopback to be advertised.
- Forgetting the
neighborcommands on a non-broadcast network, so no neighbours ever form. - Thinking Ethernet links default to point-to-point because only two routers are connected. The default comes from the media (Ethernet = broadcast), not from how many routers are attached.
💡 Exam tip: know the defaults (Ethernet = broadcast with DR, serial HDLC/PPP = point-to-point without DR, both 10/40), the command ip ospf network point-to-point, and that FULL/ - in show ip ospf neighbor means a link with no DR. Recognise 30/120 timers as the non-broadcast and point-to-multipoint types.
Key takeaways
- Broadcast (Ethernet): DR/BDR, 10/40. Point-to-point (serial): no DR, 10/40.
- Non-broadcast: DR/BDR, 30/120, neighbours configured by hand. Point-to-multipoint: no DR, 30/120, host routes.
- Different default timers mean no adjacency; broadcast vs point-to-point reaches Full but breaks routes.
- Loopbacks are advertised as /32 unless set to
ip ospf network point-to-point. - Setting two-router Ethernet links to point-to-point removes the DR election and the wait.
Check yourself
R3's Loopback1 is 172.16.3.1/24 and in OSPF with default settings. What does R1 show?
One end of a link is broadcast, the other non-broadcast, timers at default. What happens?
Which network type is the default on a serial interface using PPP?
Why set a two-router Ethernet link to point-to-point?