Configure the OSPF Network Type
According to the link protocol types, OSPF classifies networks into four types:
- Broadcast Network: When the link protocol of the network is Ethernet or Fiber Distributed Data Interface (FDDI), the default OSPF network type is broadcast network.
- Point To Point Network (P2P Network): When the link protocol is Point to Point Protocol (PPP), Link Access Procedure Balanced (LAPB), or High-level Data Link Control (HDLC), the default OSPF network type is P2P network.
- Non-Broadcast Multi-Access Network (NBMA Network): When the link protocol is ATM, frame relay, or X.25, the default OSPF network type is NBMA.
- Point To Multi-Point Network (P2MP): No link protocol will be regarded by OSPF as the P2MP network by default. Usually, the NBMA network that is not totally connected is configured as the OSPF P2MP network.
You can modify the network type of an OSPF interface according to the actual requirement. The network types of the interfaces through which OSPF neighbors are set up must be the same; otherwise, normal learning of routes is affected.
Configuration Condition
Before configuring the OSPF network type, ensure that:
- Interface IP addresses have been configured so that neighbor nodes are reachable at the network layer.
- Enable OSPF.
Configure the Network Type of an OSPF Interface to Broadcast
A broadcast network supports multiple devices (more than two devices). These devices can exchange information with all the devices in the network. OSPF uses Hello packets to dynamically discover neighbors.
Table 7-6 Configuring the Network Type of an OSPF Interface to Broadcast
Step
|
Command
|
Description
|
Enter the global configuration mode.
|
configure terminal
|
-
|
Enter the interface configuration mode.
|
interface interface-name
|
-
|
Configure the network type of an OSPF interface to broadcast.
|
ip ospf network broadcast
|
Mandatory.
By default, the network type of an OSPF interface is determined by the link layer protocol.
|
Configure the Network Type of an OSPF Interface to P2P
A P2P network is a network that consists of two devices. Each device is located at one end of a P2P link. OSPF uses Hello packets to dynamically discover neighbors.
Table 7-7 Configuring the Network Type of an OSPF Interface to P2P
Step
|
Command
|
Description
|
Enter the global configuration mode.
|
configure terminal
|
-
|
Enter the interface configuration mode.
|
interface interface-name
|
-
|
Configure the OSPF network type to P2P.
|
ip ospf network point-to-point
|
Mandatory.
By default, the network type of an OSPF interface is determined by the link layer protocol.
|
Configure the Network Type of an OSPF Interface to NBMA
An NBMA network supports multiple devices (more than two devices), but the devices does not have the broadcast capability, therefore, you must specify a neighbor manually.
Table 7-8 Configuring the Network Type of an OSPF Interface to NBMA
Step
|
Command
|
Description
|
Enter the global configuration mode.
|
configure terminal
|
-
|
Enter the interface configuration mode.
|
interface interface-name
|
-
|
Configure the OSPF network type to NBMA.
|
ip ospf network non-broadcast
|
Mandatory.
By default, the network type of an OSPF interface is determined by the link layer protocol.
|
Enter the global configuration mode.
|
exit
|
-
|
Enter the OSPF configuration mode.
|
router ospf process-id [ vrf vrf-name ]
|
-
|
Configure a neighbor for the NBMA network.
|
neighbor neighbor-ip-address [ cost cost-value / priority priority-value / poll-interval interval-value ]
|
Mandatory.
In an NBMA network, a neighbor must be specified manually.
|
Configure the Network Type of an OSPF Interface to P2MP
When an NBMA network is not fully connected, you can configure its network type to P2MP to save network overhead. If the network type is configured to P2MP unicast, you need to specify a neighbor manually.
Table 7-9 Configuring the Network Type of an OSPF Interface to P2MP
Step
|
Command
|
Description
|
Enter the global configuration mode.
|
configure terminal
|
-
|
Enter the interface configuration mode.
|
interface interface-name
|
-
|
Configure the OSPF network type to P2MP.
|
ip ospf network point-to-multipoint [ non-broadcast ]
|
Mandatory.
By default, the network type of an OSPF interface is determined by the link layer protocol.
|
Enter the global configuration mode.
|
exit
|
-
|
Enter the OSPF configuration mode.
|
router ospf process-id [ vrf vrf-name ]
|
-
|
Configure a neighbor for the P2MP unicast network.
|
neighbor neighbor-ip-address [ cost cost-value / priority priority-value / poll-interval interval-value ]
|
If the interface network type is set to P2MP unicast, it is mandatory.
|