A /24 loopback that shows up as /32
The OSPF network type is an interface setting that controls how OSPF uses a link. It affects neighbour discovery, default timers, election roles and the connection records shared with other routers. It does not change the physical cable, link speed or IP subnet mask.
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, one end of a router link is changed to point-to-point to remove DR election and the other end is left alone: 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.
Six network types and their defaults
Start with one Ethernet connection: R2 Gi0/1 is 10.0.23.1/30 and R3 Gi0/0 is 10.0.23.2/30. Both interfaces belong to area 0. Their router IDs, 2.2.2.2 and 3.3.3.3, identify the routers in OSPF; they are separate from the port addresses.
Broadcast is the Ethernet default, even with only two attached routers. OSPF elects a designated router (DR) to organise database exchanges and a backup designated router (BDR) ready to replace it. The election does not make either router the required next hop for user traffic.
On small screens, swipe sideways or focus the diagram and use the arrow keys.
Point-to-point treats the connection as a link to one other router. The two routers synchronise directly without DR or BDR roles. That is useful on an Ethernet link connecting exactly two routers, but it must be a deliberate setting at both ends.
On small screens, swipe sideways or focus the diagram and use the arrow keys.
A Hello discovers and maintains neighbours. The Dead interval is the allowed time without a valid Hello before declaring the neighbour lost. Multicast sends a packet to a group, such as OSPF routers at 224.0.0.5. Unicast sends it to one specified neighbour address. The table shows Cisco IOS defaults; configured timer overrides can differ.
On small screens, swipe sideways or focus the diagram and use the arrow keys.
The types differ in three ways that matter in practice:
- DR election. Broadcast and non-broadcast elect a DR and BDR, wait for the dead interval (the wait timer: 40 s on broadcast, 120 s on non-broadcast) when an eligible interface comes up, unless an election event ends the wait sooner. A DR with a Full neighbour originates a type 2 LSA for the shared transit 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 shared addressing does not prove a direct path
A wide area network (WAN) connects sites. A hub-and-spoke transport connects each branch, or spoke, to a central hub. The spokes may share one IP subnet without having a direct connection to each other. Before selecting an OSPF network type, check which router pairs can communicate and whether the transport delivers the required multicast packets. An interface name such as Tunnel0 does not answer those questions by itself.
In this separate example, R1 is the hub. R2 and R3 are spokes on 10.0.50.0/24. The WAN is already configured to deliver multicast between R1 and each spoke. All three OSPF interfaces use point-to-multipoint, area 0 and matching 30/120 timers. The lines below show the resulting neighbour paths over that transport.
On small screens, swipe sideways or focus the diagram and use the arrow keys.
Point-to-multipoint models the reachable neighbour pairs as individual links and avoids a DR election. R1 becomes Full with both spokes. R2 does not need to become adjacent to R3 over a transport path that does not exist. OSPF creates host routes for the multipoint interface addresses; on R2, a route to 10.0.50.3/32 through 10.0.50.1 directs traffic towards R3 through the hub, despite the shared /24 addressing.
The trade-off is additional host routes to inspect. If multicast discovery is unavailable, Cisco's point-to-multipoint non-broadcast option needs configured neighbours. Non-broadcast multi-access (NBMA) is another option, but it retains DR/BDR roles and requires a suitable reachability design. Neither setting creates missing transport connectivity.
Why one link behaviour couldn't fit 1990s WANs
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.
Ethernet is also common between just two routers. Setting these links to point-to-point removes the DR election, its wait procedure and the type 2 LSA for the segment. The trade-off is that this setting assumes a two-router connection; do not apply it blindly to a shared LAN with several OSPF routers.
The loopback /32 surprise
A loopback is an interface created in software. Here, R3 owns address 172.16.3.1 with mask 255.255.255.0 (/24) on Loopback1. The diagram compares two advertisements from that same interface, not two physical cables. A host route (/32) matches one address; a subnet route (/24) matches the whole prefix.
On small screens, swipe sideways or focus the diagram and use the arrow keys.
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-pointR3, global configuration mode; enter configure terminal from privileged EXEC first. OSPF must already include Loopback1 in area 0. This changes its advertised prefix to 172.16.3.0/24, not its assigned address.
Setting the network type 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-multipointSeparate WAN example above: from global configuration mode on R1, R2 and R3. Their addressed Serial0/0/0 interfaces already participate in area 0, and the transport already delivers the needed multicast. Verify the network type and 30/120 timers at all three ends.
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
On small screens, swipe sideways or focus the diagram and use the arrow keys.
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:
A link-state advertisement (LSA) describes part of the network. Routers carry these descriptions inside Link State Update (LSU) packets. The shortest path first (SPF) calculation then joins the descriptions into usable paths. Reaching Full means the neighbours have synchronised their databases; it does not guarantee that their descriptions of this connection agree. In the walkthrough below, R2 describes a direct router-to-router link while R3 describes a shared network. The missing matching connection prevents SPF from using that link.
Follow the mismatch from Hello packets to path calculation
- 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.
- FullAssume compatible addressing, authentication and other checks; in this example, 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.
Device key: R2, R3 (router)
The top line is the shared network link; port labels name its interfaces. Read message rows from top to bottom and follow each arrow from sender to receiver. Rows show protocol order, not additional cables or timing to scale.
Reading the addresses
IP labels identify interfaces or destinations. Subnet labels identify networks; /n is the prefix length. A router ID (RID) identifies a routing process and need not be a reachable interface.
An IP address alone is not a URL. A web URL includes a scheme such as https://; an address on a router or printer does not imply a website.
- R2: point-to-point · 10.0.23.1
- R3: broadcast · 10.0.23.2
R3#show ip ospf interface GigabitEthernet0/0 | include Network Type Process ID 1, Router ID 3.3.3.3, Network Type BROADCAST, Cost: 10
In practice this mismatch tends to appear after a change window: the point-to-point command went onto one router of the pair, and the change on the other router was skipped or rolled back.
Short lab: change the same link at both ends
In an isolated Cisco IOS or IOS XE lab, start R2 Gi0/1 and R3 Gi0/0 with broadcast OSPF, compatible addressing and working routes. Record the network type on each end. In R2's neighbour output, FULL/DR means the peer has the DR role; it does not describe R2's own role.
show ip ospf interface GigabitEthernet0/1
show ip ospf neighborR2, privileged EXEC. On R3 inspect GigabitEthernet0/0 instead. Record the current type, area, timers and neighbour role before the change.
Enter ip ospf network point-to-point under R2 Gi0/1 and R3 Gi0/0. The change can interrupt the adjacency, so perform it in the lab rather than on a link carrying production traffic. Recheck both ends after convergence. They should show point-to-point, matching 10/40 timers if unmodified, and Full with a dash instead of a DR/BDR role.
Finally check a known remote LAN route and test the assigned host address. Full is a database state, not an end-to-end traffic test. If you restore broadcast, restore it on both ends with default ip ospf network and verify the new election result; the elected roles need not be the same as before.
Network type mistakes that hide behind a Full neighbour
- Changing the network type on one end of a link only.
- Expecting a DR on a point-to-point or point-to-multipoint network.
- Assuming a loopback is advertised with its configured mask.
- 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.
Network types at a glance
- 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 can reach Full while routes are missing.
- 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.
Test yourself on network types
Sources: Cisco OSPF FAQ: loopbacks and neighbour roles and Cisco show ip ospf interface reference. IOS-style outputs are illustrative; inspect actual media defaults and configured timers on your platform.
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?