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.
| 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. |
Usage Scenario
OSPF can be run on an interface only when the following two requirements are met:
With the two parameters, address and wildcard-mask, you can configure one or more interfaces in an area.
Precautions
To prevent security risks, do not set network 0.0.0.0.
# 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