The ospf enable command enables OSPF on an interface.
The undo ospf enable command disables OSPF on an interface.
By default, the interface does not run OSPF.
Parameter | Description | Value |
---|---|---|
process-id | Specifies the ID of an OSPF process. | The value is an integer ranging from 1 to 65535. The default value is 1. |
area area-id | Specifies an area ID. | The value can be a decimal integer or an IP address. When the value is an integer, the value ranges from 0 to 4294967295. |
Usage Scenario
The ospf enable command configuration takes precedence over the network command configuration.
After the undo ospf enable command is run to disable OSPF on an interface, the network configuration takes effect on the interface automatically.
Configuration Impact
The interface will alternate between Up and Down when the ospf enable command and the network command are run on the interface repeatedly.
Precautions
An interface can be configured with only one OSPF process.
The configured interface and the OSPF process must be in the same VPN.
# Enable VLANIF100 in the specified OSPF area.
<HUAWEI> system-view
[HUAWEI] interface vlanif 100
[HUAWEI-Vlanif100] ospf enable 1 area 0
# Enable GE0/0/1 in the specified OSPF area.
<HUAWEI> system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo portswitch [HUAWEI-GigabitEthernet0/0/1] ospf enable 1 area 0