ospf network-type

Use ospf network-type to specify the network type for an interface.

Use undo ospf network-type to restore the default.

Syntax

ospf network-type { broadcast | nbma | p2mp [ unicast ] | p2p [ peer-address-check ] }

undo ospf network-type

Default

By default, the network type of an interface depends on its link layer protocol:

Views

Interface view

Predefined user roles

network-admin

Parameters

broadcast: Specifies the network type as broadcast.

nbma: Specifies the network type as NBMA.

p2mp: Specifies the network type as P2MP.

unicast: Specifies the P2MP interface to unicast OSPF packets. By default, a P2MP interface multicasts OSPF packets.

p2p: Specifies the network type as P2P.

peer-address-check: Checks whether the peer interface and the local interface are on the same network segment. Two P2P interfaces can establish a neighbor relationship only when they are on the same network segment.

Usage guidelines

If a router on a broadcast network does not support multicast, configure the network type for the connected interfaces as NBMA.

If any two routers on an NBMA network are directly connected through a virtual link, the network is fully meshed. You can configure the network type for the connected interfaces as NBMA. If two routers are not directly connected, configure the P2MP network type so that the two routers can exchange routing information through another router.

When the network type of an interface is NBMA or P2MP unicast, you must use the peer command to specify the neighbor.

If only two routers run OSPF on a network, you can configure the network type for the connected interfaces as P2P.

When the network type of an interface is P2MP unicast, all OSPF packets are unicast by the interface.

Examples

# Specify the OSPF network type for VLAN-interface 10 as NBMA.

<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf network-type nbma

Related commands

ospf dr-priority