ospf

Function

The ospf command creates and runs an OSPF process.

The undo ospf command terminates an OSPF process.

By default, OSPF is disabled, that is, no OSPF process runs.

Format

ospf process-id [ router-id route-id | vpn-instance vpname ] *

ospf [ router-id route-id | vpn-instance vpname ] *

undo ospf process-id

Parameters

Parameter Description Value
process-id

Specifies the ID of an OSPF process.

The value is an integer ranging from 1 to 4294967295. The default value is 1.

router-id route-id

Specifies a router ID.

The value is in dotted decimal notation.

vpn-instance vpname

Specifies the name of a VPN instance.

The value is a string of 1 to 31 case-sensitive characters.

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
ospf write

Usage Guidelines

Usage Scenario

You can set OSPF parameters only after creating an OSPF process.

OSPF supports multi-process. Multiple OSPF processes can independently run on the same device. Route exchange between different OSPF processes is similar to that between different routing protocols,<br /> The ID of a device can be configured manually. If no ID is specified by using a command, OSPF selects the system ID or interface IP address as the ID.

A router ID may be re-selected in the following situations:

  • The ospf router-id command is used to re-configure an OSPF router ID.
  • The system router ID is re-configured and the OSPF process is restarted.
  • The system ID or IP address that was elected as the router ID is deleted, and the OSPF process is restarted.

Configuration Impact

After an OSPF process is disabled using undo ospf command, the receive end still maintains the LSAs generated by this OSPF process. These invalid LSAs occupy system memory and are not deleted until the LSA age field (aging time) reaches 3600 seconds.

Precautions

An interface on a device belongs to only one OSPF process.

If a VPN instance is specified, the OSPF process specified in this command belongs to this VPN instance. If no VPN instance is specified, the OSPF process specified in this command belongs to the global VPN instance. vpn-instance-name cannot be changed after being specified.

Setting a unique router ID for each process on a device is recommended. If an incorrect operation or planning causes a router ID conflict between processes, route flapping occurs.

Before you run the undo ospf process-id command to delete an OSPF process, check whether SR is enabled. If SR is enabled, disable it and then delete the OSPF process. If SR remains and the OSPF process is reconfigured, the Opaque capability is changes, resulting in the remaining Opaque LSAs.

Running the undo ospf process-id command will also delete all configurations from the OSPF view. Therefore, exercise caution when running this command.

Example

# Run an OSPF process.
<HUAWEI> system-view
[~HUAWEI] ip vpn-instance huawei
[*HUAWEI-vpn-instance-huawei] ipv4-family
[*HUAWEI-vpn-instance-huawei-af-ipv4] quit
[*HUAWEI-vpn-instance-huawei] quit
[*HUAWEI] ospf 100 router-id 10.10.10.1 vpn-instance huawei
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >