< Home

network (OSPF)

Function

The network command specifies the interface that runs OSPF and the area to which the interface belongs to.

The undo network command removes the interface on which OSPF runs.

By default, the interface does not belong to any area.

Format

network address wildcard-mask [ description text ]

undo network address wildcard-mask

Parameters

Parameter Description Value
address Specifies the address of the network segment where the interface resides. It is in the decimal notation format.
wildcard-mask Specifies the wildcard mask of mask, which is similar to the reversed form of the mask of IP address. "1" represents that the corresponding bit in the IP address is ignored and "0" represents that this bit must be reserved. -
description text Specifies the description of the specified OSPF network segment. The description is a string of 1 to 80 case-sensitive characters with spaces.

Views

OSPF area view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

OSPF can be run on an interface only when the following two requirements are met:

  • The mask length of the interface's IP address is not less than that specified in the network command.
    When the wildcard-mask parameter in the network command is specified as 0, if the IP address of the interface and the IP address that is configured by the network address command are the same, OSPF is enabled on the interface.
  • The primary address of the interface is within the network segment address range specified in the network command. Otherwise, even if the secondary IP address of the interface is within the network segment range specified in the network command, the interface does not run OSPF.

With the two parameters, address and wildcard-mask, you can configure one or more interfaces in an area.

Precautions

  • By default, OSPF advertises the IP address of a Loopback interface in the form of 32-bit host route, which is irrelevant with the mask length of the IP address on the interface.
  • To advertise the network segment route of the loopback interface, configure the network type as NBMA or broadcast using the ospf network-type in the interface view.
  • When an OSPF sham link is configured, the local address cannot be advertised through the OSPF process of a private network.
  • Two areas with the including relationship cannot be configured between different processes in the same instance, or between different areas in the same process.
  • The ospf enable command configuration takes precedence over the network command configuration.
  • To prevent security risks, do not set network 0.0.0.0.

Example

# Specify the primary IP address of the interface that runs OSPF to be in the network segment of 10.1.20.0, and the ID of the OSPF area where the interface resides to 2. In addition, specify the description for the network segment.

<sysname> system-view 
[sysname] ospf 100
[sysname-ospf-100] area 2
[sysname-ospf-100-area-0.0.0.2] network 10.1.20.0 0.0.0.255 description this network is connected to Beijing
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >