< Home

ospf

Function

The ospf command creates and runs the OSPF process.

The undo ospf command disables the OSPF process.

By default, the system does not run the OSPF protocol.

Format

ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *

undo ospf process-id [ flush-waiting-timer time ]

Parameters

Parameter Description Value
process-id Indicates the OSPF process ID. The value is an integer ranging from 1 to 65535.
router-id router-id Specifies the OSPF router ID. In dotted decimal notation.
vpn-instance vpn-instance-name Specifies the name of the VPN-instance. The value must be the name of an existing VPN instance. The VPN instance name indicates a common VPN or the VPN created for a virtual system.
flush-waiting-timer time Indicates the interval for generating aged LSAs. The parameter takes effect only when it is set. The value is an integer that ranges from 1 to 40, in seconds.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

OSPF supports multi-process. Multiple OSPF processes can run on the same device, and they are independent of each other. Route interaction between different OSPF processes is similar to route interaction between different routing protocols.

Creating an OSPF process is a prerequisite for configuring parameters for OSPF.

The router ID can be configured manually. If no ID is specified using a command, the system automatically selects the IP address of the interface as the router ID. The largest IP address in loopback interface addresses is taken as the router ID. If no loopback interface is configured, the largest IP address configured on the interface is selected as the router ID.

A new router ID is selected in the following circumstances:
  • Configuring a new OSPF router ID using this command
  • Configuring a new system router ID, and restarting the OSPF process
  • Deleting the IP address of the router ID selected as the system router ID, and restarting the OSPF process

Configuration Impact

When an OSPF process is stopped, the receive end always reserves invalid LSAs. This occupies the memory of the system. These LSAs are deleted only when they expire, specifically, when the LS age field in the LSA reaches 3600 seconds.

When the LS age field (aging time) in the LSA header reaches 3600 seconds, this LSA is deleted.

Precautions

An interface of a device only belongs to one OSPF.

If the VPN-instance is specified, the OSPF process belongs to that instance. Otherwise, it belongs to the global instance. The process instance cannot be changed and it needs to be specified when the process is enabled for the first time.

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.

Example

# Enable OSPF.

<sysname> system-view
[sysname] 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 >