The network command specifies the interface that runs OSPF and the area to which the interface belongs.
The undo network command disables OSPF from an interface.
By default, the interface does not belong to any area.
Parameter | Description | Value |
---|---|---|
address |
Specifies the address of a network segment where an interface resides. |
The value is in dotted decimal notation. |
wildcard-mask |
Specifies the wildcard mask of an IP address, which is similar to the reversed form of an IP address mask. "1" represents that the corresponding bit in the IP address is ignored, and "0" represents that this bit must be reserved. |
The value is in dotted decimal notation. |
description text |
Specifies the description of an OSPF network segment. |
The value is a string of 1 to 80 case-sensitive characters, spaces not supported. |
Usage Scenario
With the two parameters, address and wildcard-mask, you can configure one or more interfaces in an area. For an interface that runs OSPF, the primary IP address of this interface must be in the range of the network segment specified by the network (OSPF) command. If the secondary IP address of the interface is in the range of the network segment specified by this command, the interface does not run OSPF.
OSPF can be run on the interface only when the following two requirements are met:Precautions
<HUAWEI> system-view [~HUAWEI] ospf 100 [*HUAWEI-ospf-100] area 2 [*HUAWEI-ospf-100-area-0.0.0.2] network 192.168.1.0 0.0.0.255 description this network is connected to Beijing