< 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, OSPF is not enabled on interfaces.

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 the area ID. The area ID can be in the format of a decimal integer or an IP address. The value ranges from 0 to 4294967295 when it is an integer.

Views

Ethernet interface view, Ethernet sub-interface view, Eth-Trunk interface view, Eth-Trunk sub-interface view, Tunnel interface view, Loopback interface view, Dialer interface view, VLANIF interface view, Virtual-Template interface view, BDIF 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.

Prerequisites

An area has been created by using the area command before you run the ospf enable [ process-id ] area area-id command to enable OSPF in the area.

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

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 belonging to different VPN instances cannot be added to the same OSPF process.

Example

# Enable OSPF on GigabitEthernet 0/0/1.

<sysname> system-view
[sysname] interface GigabitEthernet 0/0/1
[sysname-GigabitEthernet0/0/1] ospf enable 1 area 0
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >