< Home

ospf enable

Function

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.

Format

ospf enable [ process-id ] area area-id

undo ospf enable [ process-id ] area area-id

Parameters

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.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

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.

  • The ospf enable command can be configured on an interface before an OSPF process is created. The interface specified by the ospf enable command and the created OSPF process must be in the same VPN.
  • If a process is created before the ospf enable command is run on an interface, the process of the interface and existing process must belong to the same VPN. Otherwise, the ospf enable command cannot be run.
  • If no OSPF process is created, interfaces that belong to different VPN instances cannot be added to the same OSPF process.

Example

# 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
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >