Configuring Network Types for OSPF Interfaces

OSPF classifies networks into four types based on the types of link layer protocols. You can configure the network type for an OSPF interface to forcibly change its original network type.

Context

The network types of the interfaces on both ends of a link must be the same; otherwise, the OSPF neighbor relationship cannot be established. By default, the network type of an interface depends on the physical interface. The network type of Ethernet interfaces is broadcast.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface interface-type interface-number

    The interface view is displayed.

  3. Run ospf network-type { broadcast | nbma | p2mp | p2p [ peer-ip-ignore ] }

    The network type of the OSPF interface is configured.

    When the network type is configured for an interface, the original network type of the interface is replaced.

    The network type can be configured based on the real world situations.
    • On an interface with the broadcast network type, if a router that does not support the multicast address exists, change the network type of the interface to NBMA.
    • On an interface with the NBMA network type, if the network is fully meshed or any two routers are directly connected, change the network type of the interface to broadcast and do not configure neighboring router information on the interface.
    • On an interface with the NBMA network type, if the network is not fully meshed, change the network type of the interface to P2MP. After that, two indirectly connected routers can communicate through one router that can directly reach both the two routers. After the network type of the interface is changed to P2MP, configuring neighboring router information on the interface is unnecessary.
    • If only two routers run OSPF on the same network segment, changing the network type of the interface to P2P is recommended.

    peer-ip-ignore is used to disable network segment check when IP address unnumbering is not configured for a P2P interface changed from a broadcast interface and the interface tries to establish an OSPF neighbor relationship. Specifically, OSPF performs an AND operation on the local subnet mask and the local IP address and on the local subnet mask and the remote IP address. An OSPF neighbor relationship can be established only when the results on the two ends are the same.

    OSPF cannot be configured on a null interface.

  4. Run commit

    The configuration is committed.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >