No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.


Configuration Guide - IP Unicast Routing

CloudEngine 12800 and 12800E V200R002C50

This document describes the configurations of IP Unicast Routing, including IP Routing, Static Route, RIP, RIPng, OSPF, OSPFv3, IPv4 IS-IS, IPv6 IS-IS, BGP, Routing Policy, and PBR.

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Enabling OSPF

Enabling OSPF


After creating an OSPF process, you need to configure the network segments included in areas. A network segment can belong to only one area. That is, you need to specify an area for each interface that runs OSPF. In this document, a network segment refers to the network segment where the IP address of an OSPF interface resides.

OSPF checks the network mask carried in a received Hello packet. If the network mask carried in a received Hello packet is different from that of the local device, the Hello packet is discarded. Therefore, the OSPF neighbor relationship cannot be established.


  1. Run system-view

    The system view is displayed.

  2. Run ospf [ process-id ]

    The OSPF process view is displayed.

  3. Run area area-id

    The OSPF area view is displayed.

  4. OSPF can be enabled in an OSPF area or on a specific interface.

    • Enable OSPF in an OSPF area, run network ip-address wildcard-mask

      Network segments belonging to the area are configured.

      OSPF can properly run on an interface only when the following conditions are met:

      • The IP address mask length of the interface is greater than or equal to the mask length specified in the network command.

      • The primary IP address of the interface belongs to the network segment specified in the network command.

      By default, OSPF advertises the IP address of a loopback interface as a 32-bit host route, which is irrelevant to the mask length configured on the loopback interface. To advertise routes to the network segment of the loopback interface, configure the network type as NBMA or broadcast in the interface view. For details, see Configuring Network Types of OSPF Interfaces.

    • Enable OSPF on an interface. Run the following command in the system view:
      1. Run interface interface-type interface-number

        The interface view is displayed.

      2. (On an Ethernet interface), run undo portswitch
        The interface is switched to Layer 3 mode.By default, an Ethernet interface works in Layer 2 mode.If an Ethernet interface already has Layer 2 configuration, this command fails to be executed on the interface. Before running this command on the interface, delete all the Layer 2 configuration of the interface.

        If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to switch these interfaces to Layer 3 mode in batches.

      3. Run ospf enable process-id area area-id

        OSPF is enabled on the interface.

  5. Run commit

    The configuration is committed.

Updated: 2019-03-21

Document ID: EDOC1000166601

Views: 275740

Downloads: 161

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Previous Next