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.


CLI-based Configuration Guide - IP Unicast Routing

AR100, AR120, AR150, AR160, AR200, AR1200, AR2200, AR3200, and AR3600 V200R009

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 an area. A network segment belongs to only one area. that is, you need to specify an area for each interface that runs OSPF. In this document, network segment refers to the network segment to which the IP address of the OSPF interface belongs.

OSPF checks the network mask carried in a received Hello packets. If the network mask carried in a received Hello packet is different from the network mask of the local device, the Hello packet is discarded. As a result, an OSPF neighbor relationship is not 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-idnetwork ip-address wildcard-maskinterface interface-type interface-numberospf enable [ process-id ] area area-id

    The OSPF area view is displayed.

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

    • Enable OSPF in an OSPF area.

    1. Run

      Network segments belonging to an 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 equal to or greater than the mask length specified in the network command.

      • The primary IP address of the interface must be within the network segment specified by the network command.

      By default, OSPF advertises the IP address of the 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.

    1. Run the following command in the system view:interface interface-type interface-number

      The interface view is displayed.

    2. Run ospf enable [ process-id ] area area-id

      OSPF is enabled on the interface.

      An area ID can be input in the format of a decimal integer or an IPv4 address, but displayed in the format of IPv4 address.

Updated: 2019-12-27

Document ID: EDOC1000174069

Views: 196646

Downloads: 324

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Previous Next