What is an OSPF network type
OSPF changes its behaviour according to the nature of the link an interface is attached to. That classification is the network type. A link like Ethernet, where any number of routers can share one segment and multicast is delivered as-is, a leased line that connects exactly two routers, and a Frame Relay cloud where multicast does not get through all need different ways of finding neighbors and different answers to the question of whether a DR/BDR should be elected.
The network type changes the following four things.
| What changes | Description |
|---|---|
| Hello / dead interval | How often Hellos are sent, and how long after Hellos stop arriving a neighbor is declared down |
| DR/BDR election | On types where three or more routers can share a segment, a DR/BDR is elected to cut down the number of adjacencies (DR and BDR) |
| How neighbors are found | Automatically via multicast (224.0.0.5), or statically with the neighbor command |
| Representation in the LSDB | Types that elect a DR/BDR produce a Network-LSA (Type 2) and the link appears as Transit in the Router-LSA. Types that do not produce no Network-LSA, and the link is advertised as Point-to-Point |
The Hello and dead intervals have to match between neighbors. A Hello whose intervals do not match is discarded, so two ends with different network types can fail to form an adjacency for that reason alone.
The list of network types
RFC 2328 defines four network types (Section 1.2). Cisco’s implementation adds one more.
| Type | Hello / Dead | DR/BDR | Finding neighbors | Network-LSA | Typical use |
|---|---|---|---|---|---|
| Broadcast | 10 / 40 s | Elected | Automatic (224.0.0.5) | Yes | Ethernet (the default) |
| Point-to-point | 10 / 40 s | Not elected | Automatic (224.0.0.5) | No | A link with exactly two routers |
| Non-broadcast (NBMA) | 30 / 120 s | Elected | Static (neighbor) | Yes | A full mesh over Frame Relay or ATM |
| Point-to-multipoint | 30 / 120 s | Not elected | Automatic (224.0.0.5) | No | A partial mesh |
| Point-to-multipoint non-broadcast | 30 / 120 s | Not elected | Static (neighbor) | No | A partial mesh without multicast (a Cisco extension, not one of the four in the RFC) |
show ospf interface also shows LOOPBACK for loopback interfaces. That is not a link on which Hellos are sent; it only appears in the Router-LSA as a host route (a /32 stub network).
Verification on real devices
Three Cisco IOS XR (XRd 26.1.1) routers are connected in a line with every link in area 0, and only the network type of the R1–R2 Ethernet link is changed. The R2–R3 link is left at the default broadcast, so two types can be observed at the same time on R2.
On IOS XR the network type is set with the network command on the interface under router ospf. The default on Ethernet is broadcast.
The test runs in eight stages (STEP 0 to 7). The show output, syslog and running-config collected from all three routers at every STEP are gathered in Verification config and show output at the end of the article.
| STEP | Operation | Result on the R1–R2 link |
|---|---|---|
| 0 | Initial state (the default) | BROADCAST, Hello 10/Dead 40, a DR/BDR is elected |
| 1 | network point-to-point on both ends | POINT_TO_POINT, no DR/BDR, the Network-LSA disappears |
| 2 | Put R1 back to the default (mismatched types) | No adjacency forms and every OSPF route is lost |
| 3 | Put both ends back to the default | Recovered |
| 4 | network non-broadcast on both ends | NON_BROADCAST, Hello 30/Dead 120, no neighbor is discovered |
| 5 | Configure neighbor statically | The adjacency forms and Hellos become unicast |
| 6 | network point-to-multipoint on both ends | POINT_TO_MULTIPOINT, Hello 30/Dead 120, no DR, no neighbor needed |
| 7 | Remove the network configuration (final state) | Restored to the initial state |
Broadcast is the default (STEP 0)
show ospf interface shows the network type, the DR/BDR and the timers in one place. This article uses it as the main tool.
GigabitEthernet0/0/0/0 is up, line protocol is up
Internet Address 10.1.2.1/24, Area 0, SID 0, Strict-SPF SID 0
Label stack Primary label 0 Backup label 0 SRTE label 0
Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State BDR, Priority 1, MTU 1500, MaxPktSz 1500
Forward reference No, Unnumbered no, Bandwidth 1000000
RIB LC sync Yes
Designated Router (ID) 2.2.2.2, Interface address 10.1.2.2
Backup Designated router (ID) 1.1.1.1, Interface address 10.1.2.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:08:985It is Network Type BROADCAST, the DR is R2 (2.2.2.2), R1 itself is the BDR, and the timers are Hello 10, Dead 40. The LSDB holds a Network-LSA for this segment (Link ID 10.1.2.2).
RP/0/RP0/CPU0:R1#show ospf database
Sun Sep 6 05:02:42.895 UTC
OSPF Router with ID (1.1.1.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 42 0x80000003 0x00b343 2
2.2.2.2 2.2.2.2 36 0x80000003 0x00ded7 3
3.3.3.3 3.3.3.3 36 0x80000003 0x0004d3 2
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
10.1.2.2 2.2.2.2 43 0x80000001 0x0031e5
10.2.3.3 3.3.3.3 37 0x80000001 0x0046c1Changing to point-to-point (STEP 1)
Configure network point-to-point on both R1 and R2.
router ospf 1
area 0
interface GigabitEthernet0/0/0/0
network point-to-point
!
!
!GigabitEthernet0/0/0/0 is up, line protocol is up
Internet Address 10.1.2.1/24, Area 0, SID 0, Strict-SPF SID 0
Label stack Primary label 0 Backup label 0 SRTE label 0
Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 1
Transmit Delay is 1 sec, State POINT_TO_POINT, MTU 1500, MaxPktSz 1500
Forward reference No, Unnumbered no, Bandwidth 1000000
RIB LC sync Yes
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:06:819
Index 1/1, flood queue length 0The DR and BDR lines are gone entirely and State is now POINT_TO_POINT. The Hello and dead intervals stay at 10/40. In show ospf neighbor the role after the / becomes -.
RP/0/RP0/CPU0:R1#show ospf neighbor
Sun Sep 6 05:06:30.673 UTC
* Indicates MADJ interface
# Indicates Neighbor awaiting BFD session up
Neighbors for OSPF 1
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/ - 00:00:35 10.1.2.2 GigabitEthernet0/0/0/0
Neighbor is up for 00:01:30
Total neighbor count: 1The Network-LSA for this segment (10.1.2.2) has disappeared from the LSDB; the only one left is 10.2.3.3 for the R2–R3 segment. In exchange, R1’s Router-LSA has grown from two links to three.
RP/0/RP0/CPU0:R1#show ospf database
Sun Sep 6 05:06:32.582 UTC
OSPF Router with ID (1.1.1.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 92 0x80000005 0x006777 3
2.2.2.2 2.2.2.2 93 0x80000005 0x000a98 4
3.3.3.3 3.3.3.3 263 0x80000003 0x0004d3 2
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
10.2.3.3 3.3.3.3 264 0x80000001 0x0046c1The extra link is there because a point-to-point link is advertised as two things: a link to the peer router and a stub network for the segment itself. With no DR there is no Network-LSA, so the segment is represented as a stub.
RP/0/RP0/CPU0:R1#show ospf database router
Sun Sep 6 05:06:33.580 UTC
OSPF Router with ID (1.1.1.1) (Process ID 1)
Router Link States (Area 0)
LS age: 93
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.1
Advertising Router: 1.1.1.1
LS Seq Number: 80000005
Checksum: 0x6777
Length: 60
Number of Links: 3
Link connected to: a Stub Network
(Link ID) Network/subnet number: 1.1.1.1
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 1
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 2.2.2.2
(Link Data) Router Interface address: 10.1.2.1
Number of TOS metrics: 0
TOS 0 Metrics: 1The difference is visible on the wire too. With the Hellos from before and after the change in a single capture, the DR/BDR fields go from real addresses to 0.0.0.0.
| No. | Time | Source | Destination | Info |
|---|---|---|---|---|
| 1 | 0.000 | 10.1.2.2 | 224.0.0.5 | Hello Packet |
| 2 | 2.558 | 10.1.2.1 | 224.0.0.5 | Hello Packet |
| 3 | 9.484 | 10.1.2.2 | 224.0.0.5 | Hello Packet |
| 4 | 11.879 | 10.1.2.1 | 224.0.0.5 | Hello Packet |
| 5 | 16.011 | 10.1.2.1 | 224.0.0.5 | Hello Packet |
| 6 | 19.475 | 10.1.2.2 | 224.0.0.5 | Hello Packet |
| 7 | 25.623 | 10.1.2.1 | 224.0.0.5 | Hello Packet |
| 10 | 36.181 | 10.1.2.2 | 224.0.0.5 | Hello Packet |
| 11 | 45.231 | 10.1.2.1 | 224.0.0.5 | Hello Packet |
| 12 | 45.261 | 10.1.2.2 | 10.1.2.1 | DB Description |
Up to No.4 these are broadcast Hellos; from No.5 they are point-to-point Hellos. R2 switched a little later, so No.6 and No.8 still carry a DR. Once both sides show 0.0.0.0, the DBD exchange starts at No.12 and the adjacency is rebuilt.
Open Shortest Path First
OSPF Header
Version: 2
Message Type: Hello Packet (1)
Packet Length: 48
Source OSPF Router: 1.1.1.1
Area ID: 0.0.0.0 (Backbone)
Checksum: 0xce8f [correct]
Instance ID: Base IPv4 Unicast Instance (0)
Auth Type: Null (0)
Auth Data (none): 0000000000000000
OSPF Hello Packet
Network Mask: 255.255.255.0
Hello Interval [sec]: 10
Options: 0x12, (L) LLS Data block, (E) External Routing
0... .... = DN: Not set
.0.. .... = (O) Opaque: Not set
..0. .... = (DC) Demand Circuits: Not supported
...1 .... = (L) LLS Data block: Present
.... 0... = (N) NSSA: Not supported
.... .0.. = (MC) Multicast: Not capable
.... ..1. = (E) External Routing: Capable
.... ...0 = (MT) Multi-Topology Routing: No
Router Priority: 1
Router Dead Interval [sec]: 40
Designated Router: 10.1.2.2
Backup Designated Router: 10.1.2.1
Active Neighbor: 2.2.2.2
OSPF LLS Data Block
Checksum: 0x7fc4
LLS Data Length: 32 bytes
Extended options TLV
TLV Type: 1
TLV Length: 4
Options: 0x00000001, (LR) LSDB Resynchronization
.... .... .... .... .... .... .... ..0. = (RS) Restart Signal: Not set
.... .... .... .... .... .... .... ...1 = (LR) LSDB Resynchronization: Set
Local Interface ID
TLV Type: 18
TLV Length: 4
Local Interface ID: 00000003
Unknown LLS TLV
TLV Type: 32768
TLV Length: 8Open Shortest Path First
OSPF Header
Version: 2
Message Type: Hello Packet (1)
Packet Length: 44
Source OSPF Router: 1.1.1.1
Area ID: 0.0.0.0 (Backbone)
Checksum: 0xea9c [correct]
Instance ID: Base IPv4 Unicast Instance (0)
Auth Type: Null (0)
Auth Data (none): 0000000000000000
OSPF Hello Packet
Network Mask: 255.255.255.0
Hello Interval [sec]: 10
Options: 0x12, (L) LLS Data block, (E) External Routing
0... .... = DN: Not set
.0.. .... = (O) Opaque: Not set
..0. .... = (DC) Demand Circuits: Not supported
...1 .... = (L) LLS Data block: Present
.... 0... = (N) NSSA: Not supported
.... .0.. = (MC) Multicast: Not capable
.... ..1. = (E) External Routing: Capable
.... ...0 = (MT) Multi-Topology Routing: No
Router Priority: 1
Router Dead Interval [sec]: 40
Designated Router: 0.0.0.0
Backup Designated Router: 0.0.0.0
OSPF LLS Data Block
Checksum: 0x7fc4
LLS Data Length: 32 bytes
Extended options TLV
TLV Type: 1
TLV Length: 4
Options: 0x00000001, (LR) LSDB Resynchronization
.... .... .... .... .... .... .... ..0. = (RS) Restart Signal: Not set
.... .... .... .... .... .... .... ...1 = (LR) LSDB Resynchronization: Set
Local Interface ID
TLV Type: 18
TLV Length: 4
Local Interface ID: 00000003
Unknown LLS TLV
TLV Type: 32768
TLV Length: 8Mismatched network types prevent an adjacency (STEP 2 and 3)
Put only R1 back to the default (broadcast) and leave R2 as point-to-point. Both ends still have Hello/dead 10/40, so a timer mismatch cannot explain what happens.
R1 becomes the DR on its own, and the neighbor never gets past INIT.
GigabitEthernet0/0/0/0 is up, line protocol is up
Internet Address 10.1.2.1/24, Area 0, SID 0, Strict-SPF SID 0
Label stack Primary label 0 Backup label 0 SRTE label 0
Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1, MTU 1500, MaxPktSz 1500
Forward reference No, Unnumbered no, Bandwidth 1000000
RIB LC sync Yes
Designated Router (ID) 1.1.1.1, Interface address 10.1.2.1
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:08:082
Index 1/1, flood queue length 0
Next 0(0)/0(0)RP/0/RP0/CPU0:R1#show ospf neighbor
Sun Sep 6 05:10:54.370 UTC
* Indicates MADJ interface
# Indicates Neighbor awaiting BFD session up
Neighbors for OSPF 1
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 INIT/DROTHER 00:00:37 10.1.2.2 GigabitEthernet0/0/0/0
Total neighbor count: 1R2 does not count it as a neighbor at all.
GigabitEthernet0/0/0/0 is up, line protocol is up
Internet Address 10.1.2.2/24, Area 0, SID 0, Strict-SPF SID 0
Label stack Primary label 0 Backup label 0 SRTE label 0
Process ID 1, Router ID 2.2.2.2, Network Type POINT_TO_POINT, Cost: 1
Transmit Delay is 1 sec, State POINT_TO_POINT, MTU 1500, MaxPktSz 1500
Forward reference No, Unnumbered no, Bandwidth 1000000
RIB LC sync Yes
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:09:320
Index 1/1, flood queue length 0
Next 0(0)/0(0)
Last flood scan length is 1, maximum is 2
Last flood scan time is 0 msec, maximum is 0 msec
LS Ack List: current length 0, high water mark 2
Neighbor Count is 0, Adjacent neighbor count is 0The reason is recorded in show ospf trace hello. IOS XR keeps Hello processing in a trace buffer, so it can be read back later without having set up a debug.
405 Sep 6 05:11:29.430 ospf_rcv_hello: intf Gi0/0/0/0 area 0.0.0.0 from 1.1.1.1 10.1.2.1
406 Sep 6 05:11:29.430 ospf_validate_hello: non-zero DR 10.1.2.1 on non-multiaccess interface, ignoring hello
407 Sep 6 05:11:29.430 ospf_rcv_hello: WARN hello validation failed, ospf_rtr_id 1.1.1.1A point-to-point interface discards a Hello whose DR field is not zero. The broadcast side made itself the DR and puts its own address in the DR field, and the point-to-point side throws it away.
As a result R1 is left with no OSPF routes at all.
RP/0/RP0/CPU0:R1#show route ospf
Sun Sep 6 05:10:51.396 UTC
% No matching routes foundPutting both ends back to the default in STEP 3 restores the adjacency and the routes. The network type has to be the same on both ends of a link.
RP/0/RP0/CPU0:R1#show route ospf
Sun Sep 6 05:13:59.016 UTC
O 2.2.2.2/32 [110/2] via 10.1.2.2, 00:01:22, GigabitEthernet0/0/0/0
O 3.3.3.3/32 [110/3] via 10.1.2.2, 00:01:22, GigabitEthernet0/0/0/0
O 10.2.3.0/24 [110/2] via 10.1.2.2, 00:01:22, GigabitEthernet0/0/0/0Changing to non-broadcast (NBMA) (STEP 4 and 5)
Configure network non-broadcast on both ends.
router ospf 1
area 0
interface GigabitEthernet0/0/0/0
network non-broadcast
!
!
!GigabitEthernet0/0/0/0 is up, line protocol is up
Internet Address 10.1.2.1/24, Area 0, SID 0, Strict-SPF SID 0
Label stack Primary label 0 Backup label 0 SRTE label 0
Process ID 1, Router ID 1.1.1.1, Network Type NON_BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1, MTU 1500, MaxPktSz 1500
Forward reference No, Unnumbered no, Bandwidth 1000000
RIB LC sync Yes
Designated Router (ID) 1.1.1.1, Interface address 10.1.2.1
No backup designated router on this network
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
Hello due in 00:00:06:525
Index 1/1, flood queue length 0
Next 0(0)/0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
LS Ack List: current length 0, high water mark 3
Neighbor Count is 0, Adjacent neighbor count is 0The timers change to Hello 30, Dead 120, Wait 120, a DR is still elected (R1 made itself the DR), but not a single neighbor is found, because non-broadcast does not look for neighbors with multicast.
The capture shows that not one OSPF packet crosses the link during this time. With no configured peer to unicast to, not even Hellos are sent.
| No. | Time | Source | Destination | Info |
|---|---|---|---|---|
| 1 | 0.000 | 10.1.2.1 | 224.0.0.5 | Hello Packet |
| 2 | 2.214 | 10.1.2.2 | 224.0.0.5 | Hello Packet |
| 3 | 9.828 | 10.1.2.1 | 224.0.0.5 | Hello Packet |
| 4 | 12.060 | 10.1.2.2 | 224.0.0.5 | Hello Packet |
| 5 | 21.543 | 10.1.2.2 | 224.0.0.5 | Hello Packet |
| 6 | 329.594 | 10.1.2.1 | 10.1.2.2 | Hello Packet |
| 7 | 341.455 | 10.1.2.2 | 10.1.2.1 | Hello Packet |
| 8 | 341.460 | 10.1.2.1 | 10.1.2.2 | DB Description |
| 23 | 358.814 | 10.1.2.1 | 10.1.2.2 | Hello Packet |
| 24 | 370.473 | 10.1.2.2 | 10.1.2.1 | Hello Packet |
There is nothing at all between No.5 (21.5 s) and No.6 (329.6 s), about five minutes. No.6 is the first Hello after neighbor was configured, and its destination is the peer’s interface address 10.1.2.2 rather than 224.0.0.5.
router ospf 1
area 0
interface GigabitEthernet0/0/0/0
neighbor 10.1.2.2 ! neighbor 10.1.2.1 on R2
!
!
!Open Shortest Path First
OSPF Header
Version: 2
Message Type: Hello Packet (1)
Packet Length: 44
Source OSPF Router: 1.1.1.1
Area ID: 0.0.0.0 (Backbone)
Checksum: 0xde36 [correct]
Instance ID: Base IPv4 Unicast Instance (0)
Auth Type: Null (0)
Auth Data (none): 0000000000000000
OSPF Hello Packet
Network Mask: 255.255.255.0
Hello Interval [sec]: 30
Options: 0x12, (L) LLS Data block, (E) External Routing
0... .... = DN: Not set
.0.. .... = (O) Opaque: Not set
..0. .... = (DC) Demand Circuits: Not supported
...1 .... = (L) LLS Data block: Present
.... 0... = (N) NSSA: Not supported
.... .0.. = (MC) Multicast: Not capable
.... ..1. = (E) External Routing: Capable
.... ...0 = (MT) Multi-Topology Routing: No
Router Priority: 1
Router Dead Interval [sec]: 120
Designated Router: 10.1.2.1
Backup Designated Router: 0.0.0.0
OSPF LLS Data Block
Checksum: 0x7fc4
LLS Data Length: 32 bytes
Extended options TLV
TLV Type: 1
TLV Length: 4
Options: 0x00000001, (LR) LSDB Resynchronization
.... .... .... .... .... .... .... ..0. = (RS) Restart Signal: Not set
.... .... .... .... .... .... .... ...1 = (LR) LSDB Resynchronization: Set
Local Interface ID
TLV Type: 18
TLV Length: 4
Local Interface ID: 00000003
Unknown LLS TLV
TLV Type: 32768
TLV Length: 8Once neighbor is in place the adjacency forms and a DR/BDR is elected.
GigabitEthernet0/0/0/0 is up, line protocol is up
Internet Address 10.1.2.1/24, Area 0, SID 0, Strict-SPF SID 0
Label stack Primary label 0 Backup label 0 SRTE label 0
Process ID 1, Router ID 1.1.1.1, Network Type NON_BROADCAST, Cost: 1
Transmit Delay is 1 sec, State BDR, Priority 1, MTU 1500, MaxPktSz 1500
Forward reference No, Unnumbered no, Bandwidth 1000000
RIB LC sync Yes
Designated Router (ID) 2.2.2.2, Interface address 10.1.2.2
Backup Designated router (ID) 1.1.1.1, Interface address 10.1.2.1
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
Hello due in 00:00:21:917
Index 1/1, flood queue length 0
Next 0(0)/0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
LS Ack List: current length 0, high water mark 3
Neighbor Count is 1, Adjacent neighbor count is 1Changing to point-to-multipoint (STEP 6)
Remove neighbor and configure network point-to-multipoint on both ends.
router ospf 1
area 0
interface GigabitEthernet0/0/0/0
no neighbor 10.1.2.2 ! no neighbor 10.1.2.1 on R2
network point-to-multipoint
!
!
!GigabitEthernet0/0/0/0 is up, line protocol is up
Internet Address 10.1.2.1/24, Area 0, SID 0, Strict-SPF SID 0
Label stack Primary label 0 Backup label 0 SRTE label 0
Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_MULTIPOINT, Cost: 1
Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT, MTU 1500, MaxPktSz 1500
Forward reference No, Unnumbered no, Bandwidth 1000000
RIB LC sync Yes
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
Hello due in 00:00:02:902
Index 1/1, flood queue length 0The timers are the same 30/120 as non-broadcast, but no DR/BDR is elected and the adjacency forms without any neighbor configuration. Hellos go to the multicast address (224.0.0.5).
Open Shortest Path First
OSPF Header
Version: 2
Message Type: Hello Packet (1)
Packet Length: 48
Source OSPF Router: 1.1.1.1
Area ID: 0.0.0.0 (Backbone)
Checksum: 0xe630 [correct]
Instance ID: Base IPv4 Unicast Instance (0)
Auth Type: Null (0)
Auth Data (none): 0000000000000000
OSPF Hello Packet
Network Mask: 255.255.255.0
Hello Interval [sec]: 30
Options: 0x12, (L) LLS Data block, (E) External Routing
0... .... = DN: Not set
.0.. .... = (O) Opaque: Not set
..0. .... = (DC) Demand Circuits: Not supported
...1 .... = (L) LLS Data block: Present
.... 0... = (N) NSSA: Not supported
.... .0.. = (MC) Multicast: Not capable
.... ..1. = (E) External Routing: Capable
.... ...0 = (MT) Multi-Topology Routing: No
Router Priority: 1
Router Dead Interval [sec]: 120
Designated Router: 0.0.0.0
Backup Designated Router: 0.0.0.0
Active Neighbor: 2.2.2.2
OSPF LLS Data Block
Checksum: 0x7fc4
LLS Data Length: 32 bytes
Extended options TLV
TLV Type: 1
TLV Length: 4
Options: 0x00000001, (LR) LSDB Resynchronization
.... .... .... .... .... .... .... ..0. = (RS) Restart Signal: Not set
.... .... .... .... .... .... .... ...1 = (LR) LSDB Resynchronization: Set
Local Interface ID
TLV Type: 18
TLV Length: 4
Local Interface ID: 00000003
Unknown LLS TLV
TLV Type: 32768
TLV Length: 8What is distinctive about this type is that the segment is advertised as a /32 host route per peer rather than as a subnet. R1’s routing table now has 10.1.2.2/32, which none of the other types produce.
RP/0/RP0/CPU0:R1#show route ospf
Sun Sep 6 05:30:31.183 UTC
O 2.2.2.2/32 [110/2] via 10.1.2.2, 00:03:17, GigabitEthernet0/0/0/0
O 3.3.3.3/32 [110/3] via 10.1.2.2, 00:03:17, GigabitEthernet0/0/0/0
O 10.1.2.2/32 [110/1] via 10.1.2.2, 00:03:17, GigabitEthernet0/0/0/0
O 10.2.3.0/24 [110/2] via 10.1.2.2, 00:03:17, GigabitEthernet0/0/0/0In the Router-LSA, alongside the point-to-point link to the peer, R1’s own interface address 10.1.2.1/32 is advertised as a stub with a metric of 0. In a partial mesh, which pairs can reach each other directly differs from pair to pair, so the advertisement is done per pair rather than per subnet.
RP/0/RP0/CPU0:R1#show ospf database router
Sun Sep 6 05:30:36.515 UTC
OSPF Router with ID (1.1.1.1) (Process ID 1)
Router Link States (Area 0)
LS age: 203
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.1
Advertising Router: 1.1.1.1
LS Seq Number: 8000000e
Checksum: 0x4d88
Length: 60
Number of Links: 3
Link connected to: a Stub Network
(Link ID) Network/subnet number: 1.1.1.1
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 1
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 2.2.2.2
(Link Data) Router Interface address: 10.1.2.1
Number of TOS metrics: 0
TOS 0 Metrics: 1
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.1.2.1
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 0Back to the default (STEP 7)
Removing the network configuration returns the interface to broadcast, the default on Ethernet.
GigabitEthernet0/0/0/0 is up, line protocol is up
Internet Address 10.1.2.1/24, Area 0, SID 0, Strict-SPF SID 0
Label stack Primary label 0 Backup label 0 SRTE label 0
Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State BDR, Priority 1, MTU 1500, MaxPktSz 1500
Forward reference No, Unnumbered no, Bandwidth 1000000
RIB LC sync Yes
Designated Router (ID) 2.2.2.2, Interface address 10.1.2.2
Backup Designated router (ID) 1.1.1.1, Interface address 10.1.2.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:03:925network point-to-multipoint non-broadcast. However show ospf interface reports it as plain POINT_TO_MULTIPOINT, exactly like the ordinary point-to-multipoint type, so the two cannot be told apart there. You have to look at the running-config to know which one is in effect (the output taken during the test is under “Additional” for STEP 7 in the verification section at the end of the article).Comparing the Hello packets
Putting the Hellos actually seen for the four types side by side, the differences come down to three things: the destination address, the Hello/dead intervals and the DR/BDR fields.
| Type | Destination | Hello / Dead | DR field | Capture |
|---|---|---|---|---|
| Broadcast | 224.0.0.5 | 10 / 40 | 10.1.2.2 (the DR’s address) | ospf-network-type-p2p.pcap No.4 |
| Point-to-point | 224.0.0.5 | 10 / 40 | 0.0.0.0 | ospf-network-type-p2p.pcap No.5 |
| Non-broadcast | 10.1.2.2 (unicast) | 30 / 120 | 10.1.2.1 (the DR’s address) | ospf-network-type-nbma.pcap No.6 |
| Point-to-multipoint | 224.0.0.5 | 30 / 120 | 0.0.0.0 | ospf-network-type-p2mp.pcap No.4 |
Choosing a type in a design
- An Ethernet link with only two routers wastes less if it is set to point-to-point. The DR/BDR election (with its 40-second Wait timer) is no longer needed so the adjacency comes up faster, and one Network-LSA fewer keeps the LSDB smaller. As STEP 1 showed, the routes themselves do not change.
- Always use the same type on both ends. As in STEP 2, even with matching Hello/dead intervals a difference in type alone prevents the adjacency, and because
show ospf neighborstill lists the peer inINIT, the failure is hard to diagnose. - With non-broadcast, a missing
neighborstatement means a complete outage. Nothing at all is sent until it is configured, so a state where only one side is configured deserves attention too. - Broadcast and non-broadcast elect a DR/BDR. The details of that election on a segment with many routers are covered in DR and BDR.
Verification config and show output
At every STEP the following three files were collected from all three routers, split per router. The verification config is the ..._run.txt file (the final state is the one from STEP 7).
| File | Contents |
|---|---|
..._show.txt | show version / show interface description / show route / show route ospf / show ospf / show ospf interface / show ospf interface brief / show ospf neighbor / show ospf neighbor detail / show ospf database / show ospf database router / show ospf database network / show ospf statistics interface / show ospf routes / show ospf trace events / show ospf trace adj / show ospf trace hello |
..._log.txt | show logging narrowed down to that STEP. A marker is written with logmsg at the start of each STEP and its timestamp is passed to show logging start (STEP 0 holds the whole history since boot) |
..._run.txt | show running-config at that STEP (that is, the verification config of that STEP) |
Several STEPs also include the record of the commands checked on R1 right after the change (..._check.txt).
STEP 0: initial state (the default, broadcast) — BROADCAST, Hello 10/Dead 40, a DR/BDR is elected
| Router | show | syslog | running-config |
|---|---|---|---|
| R1 | show | log | run |
| R2 | show | log | run |
| R3 | show | log | run |
STEP 1: network point-to-point on both R1 and R2 — POINT_TO_POINT, no DR/BDR, the Network-LSA disappears
| Router | show | syslog | running-config |
|---|---|---|---|
| R1 | show | log | run |
| R2 | show | log | run |
| R3 | show | log | run |
STEP 2: put only R1 back to the default (mismatched types) — no adjacency forms and every OSPF route is lost
| Router | show | syslog | running-config |
|---|---|---|---|
| R1 | show | log | run |
| R2 | show | log | run |
| R3 | show | log | run |
Additional: R1 the mismatch
STEP 3: put R2 back to the default as well — recovered
| Router | show | syslog | running-config |
|---|---|---|---|
| R1 | show | log | run |
| R2 | show | log | run |
| R3 | show | log | run |
STEP 4: network non-broadcast on both ends — NON_BROADCAST, Hello 30/Dead 120, no neighbor is discovered
| Router | show | syslog | running-config |
|---|---|---|---|
| R1 | show | log | run |
| R2 | show | log | run |
| R3 | show | log | run |
Additional: R1 NBMA without neighbors
STEP 5: configure neighbor on both ends — the adjacency forms and Hellos become unicast
| Router | show | syslog | running-config |
|---|---|---|---|
| R1 | show | log | run |
| R2 | show | log | run |
| R3 | show | log | run |
Additional: R1 NBMA with static neighbors
STEP 6: remove neighbor and configure network point-to-multipoint — POINT_TO_MULTIPOINT, no DR, no neighbor needed
| Router | show | syslog | running-config |
|---|---|---|---|
| R1 | show | log | run |
| R2 | show | log | run |
| R3 | show | log | run |
Additional: R1 point-to-multipoint
STEP 7: remove the network configuration (final state) — restored to the same setup as the initial state
| Router | show | syslog | running-config |
|---|---|---|---|
| R1 | show | log | run |
| R2 | show | log | run |
| R3 | show | log | run |
Additional: R1 back to the default / R1 point-to-multipoint non-broadcast
The three capture files are below. All were taken on the R1–R2 link.
Download the capture of the switch to point-to-point, STEP 1 (ospf-network-type-p2p.pcap)
Download the capture of non-broadcast, STEP 4-5 (ospf-network-type-nbma.pcap)
Download the capture of point-to-multipoint, STEP 6 (ospf-network-type-p2mp.pcap)
References
| RFC | Title | Summary |
|---|---|---|
| RFC 2328 | OSPF Version 2 | The definition of the network types (Section 1.2) and the per-type interface behaviour (Section 9). |