Introduction
This document describes initial configurations for Open Shortest Path First (OSPF) over non-broadcast links.
Background information
On non-broadcast media such as Frame Relay, X.25, ATM, and Switched Multimegabit Data Service (SMDS), OSPF can run in two modes:
-
Nonbroadcast Multiaccess (NBMA): simulates a broadcast model by election of a designated router (DR) and a backup designated router (BDR). There are two ways to simulate a broadcast model on an NBMA network: define the network type as broadcast with the ip ospf network broadcast interface sub-command or configure the neighbor statements which use the router ospf command.
-
Point-to-mutipoint: treats non-broadcast network as a collection of point-to-point links by configuration of the ip ospf network point-to-multipoint command.
You must define the network type on non-broadcast networks in order to avoid configuration of neighbor statements. This document provides sample configurations for OSPF over non-broadcast links. Use the show ip ospf interface command in order to check the network type of an interface that runs OSPF and the command show ip ospf neighbor is used to know the status of the neighbor router.
Prerequisites
Requirements
Cisco recommends that you understand the basic configuration of the OSPF routing protocol.
Components Used
The information in this document is based on these software and hardware versions:
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.
Network Diagram
This is the network diagram used in the configuration examples in this document.
Configurations for NBMA (Use Network Type Broadcast)
Router1 |
interface Loopback0
ip address 192.0.2.3 255.255.255.255
!
!
interface Serial2
ip address 192.0.2.1 255.255.255.0
encapsulation frame-relay
ip ospf network broadcast
no keepalive
frame-relay map ip 192.0.2.1 16 broadcast
!
!
router ospf 1
network 192.0.2.0 0.0.0.255 area 0
|
Router2 |
interface Loopback0
ip address 192.0.2.2 255.255.255.255
!
interface Serial1/0
ip address 192.0.2.1 255.255.255.0
encapsulation frame-relay
ip ospf network broadcast
no keepalive
clockrate 2000000
frame-relay map ip 192.0.2.1 16 broadcast
!
router ospf 1
network 192.0.2.0 0.0.0.255 area 0
!
|
Verification Tips
This is the show command output for Router1.
Router1# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.0.2.2 1 FULL/BDR 00:00:37 192.0.2.1 Serial2
Router1# show ip ospf interface s2
Serial2 is up, line protocol is up
Internet Address 192.0.2.1/24, Area 0
Process ID 1, Router ID 192.0.2.3, Network Type BROADCAST, Cost: 64
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 192.0.2.3, Interface address 192.0.2.1
Backup Designated router (ID) 192.0.2.2, Interface address 192.0.2.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:00
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 2
Last flood scan time is 0 msec, maximum is 4 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 192.0.2.2 (Backup Designated Router)
Suppress hello for 0 neighbor(s)
And the output for Router2 is as follows.
Router2# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.0.2.3 1 FULL/DR 00:00:38 192.0.2.1 Serial1/0
Router2# show ip ospf interface s1/0
Serial1/0 is up, line protocol is up
Internet Address 192.0.2.1/24, Area 0
Process ID 1, Router ID 192.0.2.2, Network Type BROADCAST, Cost: 64
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 192.0.2.3, Interface address 192.0.2.1
Backup Designated router (ID) 192.0.2.2, Interface address 192.0.2.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:03
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 2
Last flood scan time is 0 msec, maximum is 4 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 192.0.2.3 (Designated Router)
Suppress hello for 0 neighbor(s)
Configurations for NBMA (Use Neighbor Statements)
Router1 |
interface Loopback0
ip address 192.0.2.3 255.255.255.255
!
interface Serial2
ip address 192.0.2.1 255.255.255.0
encapsulation frame-relay
ip ospf priority 2
no keepalive
frame-relay map ip 192.0.2.1 16
!
router ospf 1
network 192.0.2.0 0.0.0.255 area 0
neighbor 192.0.2.1
!
|
Router2 |
interface Loopback0
ip address 192.0.2.2 255.255.255.255
!
interface Serial1/0
ip address 192.0.2.1 255.255.255.0
encapsulation frame-relay
no keepalive
clockrate 2000000
frame-relay map ip 192.0.2.1 16
!
router ospf 1
network 192.0.2.0 0.0.0.255 area 0
neighbor 192.0.2.1
!
|
Note: In the configurations just shown, the ip ospf priority 2 command on Router1 sets a higher interface priority than the default priority value of 1, which makes it a DR and Router2 the BDR for the NBMA network. If needed, you can set the priority value to 0 in order to configure a router to never become a DR/BDR. This is necessary in hub and spoke networks where the hub must be configured to become the DR, where as the spokes must neither be DR nor BDR. Though configuration of the neighbor statement on one end is sufficient to form adjacency, it is a good practice to have it configured on both the ends as shown. Also, the frame-relay map commands do not need to have the broadcast parameter because the OSPF packets are unicasted with the neighbor statement.
Verification Tips
This is the show command output for Router1.
Router1# show ip ospf neighbors
Neighbor ID Pri State Dead Time Address Interface
192.0.2.2 1 FULL/BDR 00:01:39 192.0.2.1 Serial2
Router1# show ip ospf interface s2
Serial2 is up, line protocol is up
Internet Address 192.0.2.1/24, Area 0
Process ID 1, Router ID 192.0.2.3, Network Type NON_BROADCAST, Cost: 64
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 192.0.2.3, Interface address 192.0.2.1
Backup Designated router (ID) 192.0.2.2, Interface address 192.0.2.1
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
Hello due in 00:00:19
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 2, maximum is 2
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 192.0.2.2 (Backup Designated Router)
Suppress hello for 0 neighbor(s)
And the output for Router2 is as follows.
Router2# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.0.2.3 1 FULL/DR 00:01:49 192.0.2.1 Serial1/0
Router2# show ip ospf interface s1/0
Serial1/0 is up, line protocol is up
Internet Address 192.0.2.1/24, Area 0
Process ID 1, Router ID 192.0.2.2, Network Type NON_BROADCAST, Cost: 64
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 192.0.2.3, Interface address 192.0.2.1
Backup Designated router (ID) 192.0.2.2, Interface address 192.0.2.1
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
Hello due in 00:00:01
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 2, maximum is 2
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 192.0.2.3 (Designated Router)
Suppress hello for 0 neighbor(s)
Configurations for Point-to-Multipoint
Router1 |
interface Loopback0
ip address 192.0.2.3 255.255.255.255
!
interface Serial2
ip address 192.0.2.1 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint
no keepalive
frame-relay map ip 192.0.2.1 16 broadcast
!
router ospf 1
network 192.0.2.0 0.0.0.255 area 0
!
|
Router2 |
interface Loopback0
ip address 192.0.2.2 255.255.255.255
!
interface Serial1/0
ip address 192.0.2.1 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint
no keepalive
clockrate 2000000
frame-relay map ip 192.0.2.1 16 broadcast
!
router ospf 1
network 192.0.2.0 0.0.0.255 area 0
|
Verification Tips
This is the show command output for Router1.
Router1# show ip ospf neighbors
Neighbor ID Pri State Dead Time Address Interface
192.0.2.2 1 FULL/ - 00:01:53 192.0.2.1 Serial2
Router1# show ip ospf interface s2
Serial2 is up, line protocol is up
Internet Address 192.0.2.1/24, Area 0
Process ID 1, Router ID 192.0.2.3, Network Type POINT_TO_MULTIPOINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT,
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
Hello due in 00:00:18
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 192.0.2.2
Suppress hello for 0 neighbor(s)
And the output for Router2 is as follows.
Router2# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.0.2.3 1 FULL/ - 00:01:58 192.0.2.1 Serial1/0
Router2# show ip ospf interface s1/0
Serial1/0 is up, line protocol is up
Internet Address 192.0.2.1/24, Area 0
Process ID 1, Router ID 192.0.2.2, Network Type POINT_TO_MULTIPOINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT,
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
Hello due in 00:00:18
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 192.0.2.3
Suppress hello for 0 neighbor(s)
Note: There are no DR and BDR elected when the NBMA network is configured as Point-to-Multipoint as shown in the outputs, since it is treated as a collection of point-to-point links.
For more information, see Configuring OSPF.
Related Information