No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Command Reference

CloudEngine 8800, 7800, 6800, and 5800 V200R002C50

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
OSPF Configuration Commands

OSPF Configuration Commands

NOTE:

The CE6810LI does not support IPv4 Layer 3 forwarding. After the IPv4 function is enabled on an interface of the CE6810LI, the configured IPv4 address can only be used to manage the switch.

abr-summary (OSPF area)

Function

The abr-summary command configures route summarization on an Area Border Router (ABR).

The undo abr-summary command disables route summarization on an ABR.

By default, route summarization is not configured on ABRs.

Format

abr-summary ip-address mask [ [ cost { cost | inherit-minimum } | [ advertise [ generate-null0-route ] | not-advertise | generate-null0-route [ advertise ] ] ] * ]

undo abr-summary ip-address mask

Parameters

Parameter Description Value
ip-address Specifies the IP address of a summarized route. The value is in dotted decimal notation.
mask Specifies the mask of the IP address of the summarized route. The value is in dotted decimal notation.
advertise | not-advertise Determines whether to advertise the summarized route. By default, the summarized route is advertised. -
cost cost Specifies the cost of the summarized route. By default, the cost of the summarized route is the highest cost of specific routes. The value is an integer that ranges from 0 to 16777214.
inherit-minimum Indicates that the smallest cost of specific routes is used as the cost of the summarized route. -
generate-null0-route Generates a blackhole route to prevent routing loops. -

Views

OSPF area view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a large-scale OSPF network, route search speed may decrease due to the large routing table size. Configure route summarization to reduce the routing table size and simplify management.

In route summarization, multiple routes with the same IP prefix are summarized into one. If a link connected to a device within a summarized IP address range alternates between Up and Down states, the link status change is not advertised to the devices outside the IP address range. This prevents route flapping and improves network stability.

The abr-summary command configures route summarization on an ABR. When the ABR sends routing information to other areas, it originates Type 3 LSAs for each network segment. If any contiguous segments exist in this area, run the abr-summary command to summarize these segments into one. The ABR then sends just one summarized LSA, and no LSAs that belong to the summarized network segment specified by the command. Therefore, the routing table size is reduced, and switch performance is improved.

Precautions

  • This command applies only to ABRs for intra-area route summarization. The asbr-summary command configures AS Boundary Routers (ASBRs) to summarize the routes imported by OSPF.

  • Route summarization cannot be configured on ABRs in different areas of the same process.

Example

# In OSPF 100 area 1, summarize routes in two network segments, 10.42.10.0 and 10.42.110.0, into one route 10.42.0.0, and advertise the summarized route to other areas.

<HUAWEI> system-view 
[~HUAWEI] ospf 100 
[*HUAWEI-ospf-100] area 1 
[*HUAWEI-ospf-100-area-0.0.0.1] network 10.42.10.0 0.0.0.255
[*HUAWEI-ospf-100-area-0.0.0.1] network 10.42.110.0 0.0.0.255
[*HUAWEI-ospf-100-area-0.0.0.1] abr-summary 10.42.0.0 255.255.0.0 
Related Topics

area (OSPF)

Function

The area command creates an OSPF area and displays the OSPF area view.

The undo area command deletes a specified area.

By default, the system does not creates an OSPF area.

Format

area area-id

undo area area-id

Parameters

Parameter Description Value
area-id Specifies the area ID. The area with the area-id being 0 is a backbone area. The value can be a decimal integer or in dotted decimal notation. When the value is an integer, the value ranges from 0 to 4294967295.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The number of devices increases with the expansion of the network. This leads to a large LSDB on every OSPF-enabled device on a large-scale network. Consequently, route flapping frequently occurs and thus a large number of OSPF packets are transmitted on the network, which wastes bandwidth resources.

OSPF resolves this problem by partitioning an AS into different areas. An area is regarded as a logical group and each group is identified by an area ID.

Configuration Impact

After OSPF partitions the AS into different areas, functions, such as the timer, filter, and summarization, of multiple devices in the same area, can be planned and configured uniformly in the area. Therefore, the size of the LSDB is reduced and the network performance is improved.

Prerequisites

Run the ospf command before you run the area command to start the OSPF process and enter the OSPF view.

Precautions

  • At the border of an area resides a switch instead of a link.
  • A network segment or a link belongs to only one area. The area to which each OSPF interface belongs must be specified.
  • The backbone area is responsible for forwarding inter-area routing information. The routing information between the non-backbone areas must be forwarded through the backbone area.
  • All non-backbone areas maintain the connectivity with the backbone area and the backbone areas in different OSPF areas maintain the connectivity with each other.
  • If the undo area command is run, all configurations in the OSPF area are deleted. Therefore, exercise caution when using the command.

Example

# Enter the view of an OSPF area.

<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] area 0
[*HUAWEI-ospf-100-area-0.0.0.0]
Related Topics

asbr-summary

Function

The asbr-summary command configures AS Boundary Routers (ASBRs) to summarize the routes imported by OSPF.

The undo asbr-summary command disables ASBRs from summarizing the routes imported by OSPF.

By default, ASBRs do not summarize the routes imported by OSPF.

Format

asbr-summary ip-address mask [ [ not-advertise | generate-null0-route ] | tag tag | cost cost | distribute-delay interval ] *

undo asbr-summary ip-address mask

Parameters

Parameter Description Value
ip-address Specifies the IP address of a summarized route. The value is in dotted decimal notation.
mask Specifies the mask of the IP address of the summarized route. The value is in dotted decimal notation.
not-advertise Indicates that the summarized route is not advertised. If this parameter is not specified, the summarized route is advertised. -
generate-null0-route Generates a blackhole route to prevent routing loops. -
tag tag Specifies the tag of the summarized route. The value is an integer that ranges from 0 to 4294967295. The default value is 1.
cost cost Specifies the cost of the summarized route. By default, for Type 1 external routes, the cost of the summarized route is the highest cost of specific routes; for Type 2 external routes, the cost of the summarized route equals the highest cost of specific routes plus 1. The value is an integer that ranges from 0 to 16777214.
distribute-delay interval Specifies the delay in advertising the summarized route. The value is an integer that ranges from 1 to 65535, in seconds.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a large-scale OSPF network, route search speed may decrease due to the large routing table size. Configure route summarization to reduce the routing table size and simplify management.

In route summarization, multiple routes with the same IP prefix are summarized into one. If a link connected to a device within a summarized IP address range alternates between Up and Down states, the link status change is not advertised to the devices outside the IP address range. This prevents route flapping and improves network stability.

Imported routes with the same prefix can be summarized into one and advertised as one route using the asbr-summary command. Route summarization reduces routing information and routing table size, improving device performance.

After route summarization is implemented:

  • If the local device is an ASBR in a common area, the local device summarizes all imported Type 5 LSAs within the summary address range.
  • If the local device is an ASBR in an NSSA, the local device summarizes all imported Type 5 and Type 7 LSAs within the summary address range.
  • If the local device functions as both an ASBR and ABR in an NSSA, the local device summarizes all imported Type 5 and Type 7 LSAs within the summary address range, and summarizes the Type 5 LSAs that have been transformed from Type 7 LSAs.

Precautions

When a large number of routes are summarized, specify the distribute-delay parameter to set the delay in advertising the summarized routes. This ensures that the advertised summarized routes contain more valid routes and avoids network flapping and incorrect routing information.

Example

# Configure route summarization for the imported routes.

<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] asbr-summary 10.2.0.0 255.255.0.0 not-advertise tag 2 cost 100

# Cancel route summarization for the imported routes.

[*HUAWEI-ospf-100] undo asbr-summary 10.2.0.0 255.255.0.0

authentication-mode (OSPF area)

Function

The authentication-mode command sets the authentication mode and password for an OSPF area.

The undo authentication-mode command cancels the authentication mode configured for an OSPF area.

By default, no authentication mode is configured.

Format

authentication-mode simple [ plain plain-text | [ cipher ] cipher-text ]

authentication-mode { md5 | hmac-md5 | hmac-sha256 } [ key-id { plain plain-text | [ cipher ] cipher-text } ]

authentication-mode keychain keychain-name

undo authentication-mode

Parameters

Parameter Description Value
simple Sets simple authentication. In simple authentication, the password type is cipher by default.
NOTICE:

Simple authentication carries potential risks. HMAC-SHA256 authentication is recommended.

-
plain Sets a plaintext password. Only a plaintext password can be entered, and only plain text is displayed when the configuration file is viewed.
NOTICE:

If plain is specified, the password is saved in the configuration file in plain text. This carries security risks. It is recommended to specify cipher to save the password in cipher text.

Currently, only the HMAC-MD5 and HMAC-SHA256 algorithms can be used in OSPF.

-
plain-text Sets a plaintext password. The value is a string of case-sensitive characters that can be letters or digits without spaces. When double quotation marks are used around the string, spaces are allowed in the string. In simple authentication, the value is a string of 1 to 8 characters. In md5, hmac-md5 or hmac-sha256 authentication, the value is a string of 1 to 255 characters.
cipher Sets a ciphertext password. When cipher is configured, the password can only be entered in cipher text. Then, the password is displayed in cipher text in configuration files. MD5 authentication, HMAC-SHA256 authentication or HMAC-MD5 authentication defaults to use the password in cipher text.
cipher-text Specifies the ciphertext password.
  • In simple authentication, a plaintext password is 1 to 8 characters, and a ciphertext password is 24 to 128 characters.
  • In MD5, HMAC-MD5, or HMAC-SHA256 authentication, a plaintext password is a string of 1 to 255 characters, and a ciphertext password is a string of 20 to 432 characters.
NOTE:

The password does not contain the question mark (?) and spaces. However, when the password is enclosed in quotation marks ("), spaces are allowed in the password.

md5 Indicates MD5 authentication using the ciphertext password.
NOTICE:

MD5 authentication carries potential risks. HMAC-SHA256 authentication is recommended.

-
hmac-md5 Indicates HMAC MD5 authentication using the ciphertext password.
NOTICE:

HMAC-MD5 authentication carries potential risks. HMAC-SHA256 authentication is recommended.

-
hmac-sha256 Indicates HMAC-SHA256 authentication. -
key-id Specifies an authentication ID. The value is an integer that ranges from 1 to 255.
keychain Indicates keychain authentication.
NOTE:

Before configuring this parameter, run the keychain command to create a keychain. Then, run the key-id, key-string, and algorithm commands to configure a key ID, a password, and an authentication algorithm for this keychain. Otherwise, OSPF authentication will fail.

Currently, only the HMAC-MD5 and HMAC-SHA256 algorithms can be used in OSPF.

-
keychain-name Specifies the keychain name. The value is a string of 1 to 47 case-insensitive characters except question marks (?) and spaces. However, when double quotation marks (") are used to include the string, spaces are allowed in the string.

Views

OSPF area view

Default Level

2: Configuration level

Usage Guidelines

Precautions

The authentication modes and passwords of all the devices must be the same in any given area, but can differ between several areas.

The ospf authentication-mode command used in the interface view takes precedence over the authentication-mode command used in the OSPF area view.

Example

# Configure HMAC-SHA256 authentication for OSPF area 0.

<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] area 0
[*HUAWEI-ospf-100-area-0.0.0.0] authentication-mode hmac-sha256 

bandwidth-reference (OSPF)

Function

The bandwidth-reference command sets the bandwidth reference value that is used to calculate interface costs.

The undo bandwidth-reference command restores the default bandwidth reference value.

The default bandwidth reference value is 100 Mbit/s.

Format

bandwidth-reference value

undo bandwidth-reference

Parameters

Parameter Description Value
value Specifies the bandwidth reference value for link cost calculation. The value is an integer ranging from 1 to 2147483648, in Mbit/s. The default value is 100Mbit/s.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The calculation formula is as follows: Interface cost = Bandwidth reference value/Interface bandwidth. The integer of the calculated result is the interface cost. If the calculated result is smaller than 1, the interface cost value is 1. If the bandwidth-reference command is executed to configure a new bandwidth reference value, the interface cost will be changed. As a result, OSPF will re-select routes.

The default bandwidth reference value is 100 Mbit/s. The interface cost value is 100000000 divided by the interface bandwidth value.

Precautions

After the bandwidth-reference command is configured in a process view, bandwidth reference values of all interfaces in the process are changed to the specified value.

Generally, OSPF automatically calculate the link cost for an interface based on the bandwidth of the interface. You can modify the interface cost using the ospf cost command.

The bandwidth-reference command can be operate on Eth-Trunk interfaces as same with on physical interfaces. If the command is run on an Eth-Trunk interface, the bandwidth of the Eth-Trunk interfaceis equal to the total bandwidth of all its member interfaces.

Example

# Set the bandwidth reference value of the link cost to 1000 Mbit/s.

<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] bandwidth-reference 1000

bfd all-interfaces (OSPF)

Function

The bfd all-interfaces enable command enables BFD in an OSPF process.

The bfd all-interfaces { min-rx-interval receive-interval | min-tx-interval transmit-interval | detect-multiplier multiplier-value | frr-binding } * command sets the parameter values of a BFD session.

The undo bfd all-interfaces enable command disables BFD in an OSPF process.

The undo bfd all-interfaces { min-rx-interval | min-tx-interval | detect-multiplier | frr-binding } * command restores the default parameter values of a BFD session.

By default, BFD is not enabled at OSPF process.

Format

bfd all-interfaces enable

undo bfd all-interfaces enable

bfd all-interfaces { min-rx-interval receive-interval | min-tx-interval transmit-interval | detect-multiplier multiplier-value | frr-binding } *

undo bfd all-interfaces { min-rx-interval [ receive-interval ] | min-tx-interval [ transmit-interval ] | detect-multiplier [ multiplier-value ] | frr-binding } *

Parameters

Parameter Description Value
min-rx-interval receive-interval Indicates the minimum interval at which BFD packets are received from the remote end.

The value is an integer. The value ranges from 3 to 1000 on the CE6880EI and 50 to 1000 on other models. The value is expressed in milliseconds. The default value is 1000 ms.

min-tx-interval transmit-interval Indicates the minimum interval at which BFD packets are sent to the remote end.

The value is an integer. The value ranges from 3 to 1000 on the CE6880EI and 50 to 1000 on other models. The value is expressed in milliseconds. The default value is 1000 ms.

detect-multiplier multiplier-value Indicates the local detection multiplier. The value is an integer ranging from 3 to 50. By default, it is 3.
frr-binding Associates the BFD session status and link status on an interface. That is, when the BFD status goes Down, the link status of the interface also goes Down. This enables traffic to be switched to the backup path. -

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

BFD can fast detect faults in communication with neighbors, thus minimizing the impact of such faults on services.

OSPF IP FRR requires the lower layer to fast respond to the link change so that traffic can be rapidly switched to the backup link if a link fails. In such a case, if frr-binding is configured, the association between the BFD session status and link status is enabled on an interface. If the BFD session is Down, the link of the interface is faulty.

You can bind a BFD session to an interface or an OSPF process. If a BFD session is bound to an interface and an OSPF process, the BFD session bound to an interface takes precedence over that bound to an OSPF process.

Precautions

  • receive-interval is negotiated between local min-rx-interval and remote min-tx-interval, and the bigger of local min-rx-interval and remote min-tx-interval is used as the remote min-tx-interval. If the local end does not receive any BFD packets within the interval of receive-interval × multiplier-value (local detection multiplier), it declares that the remote end is unreachable.
  • Two ends can set up a BFD session only when the bfd command is run on both ends to configure BFD globally and the bfd all-interfaces enable command is run. In addition, BFD sessions can be created only between the two ends that have set up an OSPF neighbor relationship in the Full state.
  • The bfd all-interfaces command and the ospf bfd block command are mutually exclusive.

Example

# Enable BFD in a OSPF process and set both the minimum interval for sending BFD packets and the minimum interval for receiving BFD packets to 300 ms and the local detection multiplier to 5.

<HUAWEI> system-view
[~HUAWEI] ospf 
[*HUAWEI-ospf-1] bfd all-interfaces enable
[*HUAWEI-ospf-1] bfd all-interfaces min-tx-interval 300 min-tx-interval 300 detect-multiplier 5

default (OSPF)

Function

The default command configures default parameters for OSPF to import external routes. The parameters include the cost, type (Type 1 or Type 2), tag, and number of imported routes.

The undo default command restores the default setting.

By default, the default cost of the external routes is 1; the type of the imported external routes is Type 2; the default tag value is 1.

Format

default { cost { cost-value | inherit-metric } | tag tag | type type } *

undo default { cost [ cost-value | inherit-metric ] | tag [ tag ] | type [ type ] } *

Parameters

Parameter Description Value
cost cost-value Specifies the default cost of the external routes imported by OSPF. The value is an integer ranging from 0 to 16777214. By default, it is 1.
inherit-metric Indicates that the cost of the imported route is the cost carried in the route. If no cost is specified, the default cost set through the default command is used. -
tag tag Specifies the tag of the external routes. The value is an integer ranging from 0 to 4294967295. By default, it is 1.
type type Specifies the type of the external routes.
The value is an integer ranging from 1 to 2. By default, it is 2.
  • 1: Type 1 external route
  • 2: Type 2 external route

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The imported external routes carry various parameters that can change the priorities and next hops of those routes in the OSPF routing table.

By setting default parameters for OSPF to import external routes, you can change the OSPF routing policies.

The route tag is used to identify protocol-related information. For example, it can be used to differentiate AS numbers when OSPF receives BGP routes. In addition, configuring tag applies the OSPF routing policies to tagged routes.

Follow-up Procedure

The priority of the default (OSPF) command is the lowest. Thus, ensure that no other commands are configured when configuring this command. Otherwise, this command cannot take effect.

Precautions

You can run the following commands to set the cost of the imported route. The following commands are listed in the descending order of cost priorities.
  • Run the apply cost command to set the cost of a route.
  • Run the import-route (OSPF) command to set the cost of an imported route.
  • Run the default (OSPF) command to set the default cost of an imported route.

Example

# Set the default values of the cost, type, and tag.

<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] default cost 10 tag 100 type 2

default-cost (OSPF Aera)

Function

The default-cost command sets the cost of the Type3 default route that is transmitted to the STUB or NSSA by OSPF.

The undo default-cost command restores the default setting.

By default, the cost of the Type3 default route transmitted to the STUB or NSSA is 1.

Format

default-cost cost

undo default-cost

Parameters

Parameter Description Value
cost Specifies the cost of the Type3 default route transmitted to the stub or NSSA by OSPF. The value is an integer ranging from 0 to 16777214.

Views

OSPF area view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Configuring the cost of a default route can change the selected OSPF route, improving the flexibility of networking.

This command is applicable to the area border route (ABR) to the STUB or NSSA.

Prerequisites

A default route exists in the local routing table.

Example

# Set Area 1 as a STUB area, and set the cost of the Type 3 default route transmitted to this STUB area to 20.

<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] area 1
[*HUAWEI-ospf-100-area-0.0.0.1] stub
[*HUAWEI-ospf-100-area-0.0.0.1] default-cost 20
Related Topics

default-route-advertise (OSPF)

Function

The default-route-advertise command advertises default routes in a common OSPF area.

The undo default-route-advertise command disables advertisement of default routes in a common OSPF area.

By default, OSPF devices in a common OSPF area do not advertise default routes.

Format

default-route-advertise [ [ always | permit-calculate-other ] | cost cost | type type | route-policy route-policy-name | distribute-delay delay-time ] *

default-route-advertise summary cost cost

default-route-advertise [ permit-calculate-other | cost cost | type type | route-policy route-policy-name | distribute-delay delay-time | permit-ibgp ] *

undo default-route-advertise

Parameters

Parameter Description Value
always

Generates and advertises an LSA that describes the default route, regardless of whether there are active default routes of other processes in the routing table of the host.

  • If always is configured, the switch configured with the always parameter does not calculate the default routes from other switchs.
  • If always is not configured, an LSA for advertising a default route is generated based on activated non-OSPF default routes in the routing table of the local device. If the routing table has no such a route, the LSA cannot be generated.
-
permit-calculate-other

Generates and advertises an ASE LSA that describes the default route only when there are active default routes of other processes in the routing table of the host. The device still calculates the default routes from other devices.

NOTE:
If neither always nor permit-calculate-other is configured,
  • when there are active default routes of other processes in the routing table of the host, the device does not calculate the default routes from other devices.
  • when there are not active default routes of other processes in the routing table of the host, the device still calculates the default routes from other devices.
-
cost cost Specifies the cost of the ASE LSA. The value is an integer that ranges from 0 to 16777214. The default value is 1.
type type Specifies the type of the external routes.
The value is 1 or 2. The default value is 2.
  • 1: Type 1 external route
  • 2: Type 2 external route
route-policy route-policy-name Specifies the name of a routing policy. The device advertises default routes according to the parameters of the configured routing policy when there are matched default OSPF routing entries generated by other processes. The name is a string of 1 to 200 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
distribute-delay delay-time Specifies the delay timer for advertising the default route. The value is an integer that ranges from 1 to 65535.
summary Advertises the Type 3 summary LSA of the specified default route. Before specifying this parameter, ensure that VPN is enabled. Otherwise, routes cannot be advertised. -
permit-ibgp Imports IBGP routes. -

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The import-route (OSPF) command cannot be used to import a default route from another AS. Running the default-route-advertise command on an ASBR can advertise a non-OSPF default route in a common OSPF area.

If the ASBR has a default route, the default-route-advertise command enables the ASBR to advertise the default route 0.0.0.0 to the OSPF area.

If the ASBR has no default route, the default-route-advertise always command or the default-route-advertise command can be used:
  • With always configured: The ASBR can advertise the default route 0.0.0.0 even if there is no default route. This allows the default route to retain in the routing table and prevents the ASBR from using a default route sent by another device.

  • Without always configured: The ASBR generates an LSA that describes a default route only when the local routing table contains an active default route that is not an OSPF except BGP route.

    If the local routing table contains an active default BGP route, the default route can be injected to the OSPF routing table based on the following situations:

    • Whether the ospf process-id vpn-instance vpn-instance-name command is run together with the vpn-instance-capability simple command:
      • If the two commands are executed together, to inject an active default EBGP route into the OSPF routing table, run the default-route-advertise command. To inject an active default IBGP route to the OSPF routing table, run the import-route bgp permit-ibgp command before you run the default-route-advertise command.
      • If only the ospf process-id vpn-instance vpn-instance-name command is run, to inject an active default EBGP or IBGP route into the OSPF routing table, run the default-route-advertise command.
    • If the ospf process-id vpn-instance vpn-instance-name command is not run, to inject an active default EBGP route into the OSPF routing table, run the default-route-advertise command. To inject an active default IBGP route to the OSPF routing table, run the import-route bgp permit-ibgp command before you run the default-route-advertise command.
Injecting an IBGP route into the OSPF routing table may cause a routing loop. Exercise caution when you perform this step.
If a routing policy is configured with match-any, and multiple routes match the policy, a default LSA will be generated based on the optimal route. The principles for select an optimal route are as follows:
  1. A route configured with type takes precedence over that not configured with type, and a route configured with a smaller type value takes precedence over that configured with a larger type value.
  2. A route configured with cost takes precedence over that not configured with cost, and a route configured with a smaller cost value takes precedence over that configured with a larger cost value.
  3. A route configured with tag takes precedence over that not configured with tag, and a route configured with a smaller tag value takes precedence over that configured with a larger tag value.

Prerequisites

Before advertising a default route, OSPF compares the priorities of default routes in an OSPF area and then advertises a default route with the highest priority. If a static default route is configured on an OSPF device, check that the priority of the static default route is lower than that of the default route to be advertised by OSPF. This ensures that the default route advertised by OSPF will be added to the routing table of the OSPF device.

Configuration Impact

After the default-route-advertise command is configured on the ASBR, the ASBR will generate a Type 5 ASE LSA with a link state ID of 0.0.0.0 and mask of 0.0.0.0. In addition, it will advertise the ASE LSA in an entire OSPF area.

If a routing policy is configured, default routes are advertised based on the following principles:

  • If a default route matches the routing policy, a default route is generated on an OSPF device based on the parameters configured in the routing policy. Parameters such as cost, tag, and type can be configured in the routing policy.
  • If the default route does not match the routing policy, and always is configured, the default route is still advertised.
    • If always is not configured, the OSPF device will not advertise the default route.
    • If always is configured, OSPF devices will advertise the default route. In addition, only always configured in the default-route-advertise command takes effect on advertisement of default routes.

Precautions

In different OSPF areas, OSPF advertises default routes using different modes. This default-route-advertise command can be used to advertise default routes in a common OSPF area. In a stub area, totally stub area, or totally NSSA, default routes are advertised automatically. In an NSSA, the nssa default-route-advertise command is used to advertise default routes.

Example

# Advertise the ASE LSA of the default route to the OSPF area, with no default route on the local device.

<HUAWEI> system-view
[~HUAWEI] ospf 1
[*HUAWEI-ospf-1] default-route-advertise always

description (OSPF)

Function

The description command configures the description of an OSPF process.

The undo description command deletes the description.

By default, there is no description of an OSPF process.

Format

description text

undo description

Parameters

Parameter Description Value
text Specifies the description of an OSPF process. The description is a string of 1 to 80 characters.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The description of an OSPF process helps identify special processes, facilitating network maintenance.

Configuration Impact

If the description command is run multiple times, the latest configuration overrides the previous one.

Example

# Configure the description of the OSPF process.

<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] description this process contains 3 areas

description (OSPF Area)

Function

The description command configures the description of an OSPF area.

The undo description command deletes the description.

By default, there is no description of an OSPF area.

Format

description text

undo description

Parameters

Parameter Description Value
text Specifies the description of an OSPF area. The description is a string of 1 to 80 characters.

Views

OSPF area view

Default Level

2: Configuration level

Usage Guidelines

The description of an OSPF area helps identify special areas, facilitating network maintenance.

Example

# Configure the description of OSPF area 1.

<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] area 1
[*HUAWEI-ospf-100-area-0.0.0.1] description this is a stub area
Related Topics

display default-parameter ospf

Function

The display default-parameter ospf command displays the default OSPF configuration.

Format

display default-parameter ospf

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

None

Example

# Display the default OSPF configuration.

<HUAWEI> display default-parameter ospf
                                                                       
 Process View:                                                         
 -------------------------------------------------------               
   Default Metric                                : 1                   
   Default Tag                                   : 1                   
   Default Type                                  : 2                   
   SPF Intelligent-timer Max-interval (msec)     : 5000                
   SPF Intelligent-timer Start-interval (msec)   : 50                  
   SPF Intelligent-timer Hold-interval (msec)    : 200                 
   Lsa Maxage (sec)                              : 3600                
   Lsa Refresh Time (sec)                        : 1800                
   Lsa Maxagediff Interval (sec)                 : 900                 
   Minimum Lsa Arrival Interval (sec)            : 1                   
   Minimum Lsa Originate Interval (sec)          : 5                   
   Bandwidth-Reference (Mbps)                    : 100                 
   Sham Link Cost                                : 1                   
   VPN Domain ID                                 : 0                   
   VPN Router Tag                                : 0                   
   Route Preference for Internal Routes          : 10                  
   Route Preference for External Routes          : 150                 
 -------------------------------------------------------               
                                                                       
 Area View:                                                            
 -------------------------------------------------------               
   Default Stub Cost                             : 1                   
 -------------------------------------------------------               
                                                                       
 Interface View:                                                       
 -------------------------------------------------------               
   P2P&Broadcast Hello Interval (sec)            : 10                  
   P2MP&NBMA Hello Interval (sec)                : 30                  
   P2P&Broadcast Dead Interval (sec)             : 40                  
   P2MP&NBMA Dead Interval (sec)                 : 120                 
   Poll Interval (sec)                           : 120                 
   Router DR Priority                            : 1                   
   Retransmit Interval (sec)                     : 5                   
   Transmit Delay (sec)                          : 1                   
 -------------------------------------------------------               
Table 9-26  Description of the display default-parameter ospf command output

Item

Description

Process View

Indicates the process view.

Default Metric

Indicates the default metric of the imported external route.

Default Tag

Indicates the default tag value of the imported external route.

Default Type

Indicates the default type of the imported external route.

SPF Intelligent-timer Max-interval(msec)

Indicates the default maximum interval of SPF calculation.

SPF Intelligent-timer Start-interval(msec)

Indicates the default start interval of SPF calculation.

SPF Intelligent-timer Hold-interval(msec)

Indicates the default hold interval of SPF calculation.

Lsa Maxage(sec)

Indicates the default maximum age of the LSA.

Lsa Refresh Time(sec)

Indicates the default maximum interval for generating an LSA. If the LS age of the LSAs generated by the device reaches the LSA Refresh Time, a new instance needs to be generated for the LSAs.

Lsa Maxagediff Interval(sec)

Indicates the default value difference in the MaxAge fields of LSAs. If the value difference in the MaxAge fields of two LSAs is greater than MaxAgeDiff Interval, the two LSAs are considered to belong to different instances of the same LSA.

Minimum Lsa Arrival Interval(sec)

Indicates the default minimum interval for receiving the same LSA.

Minimum Lsa Originate Interval(sec)

Indicates the default minimum interval for sending the same LSA.

Bandwidth-Reference (Mbps)

The bandwidth reference value.

Sham Link Cost

Indicates the default cost of the sham link.

VPN Domain ID

Indicates the default domain ID of the VPN.

VPN Router Tag

Indicates the default router tag of the VPN.

Route Preference for Internal Routes

Indicates the default preference of the internal route.

Route Preference for External Routes

Indicates the default preference of the external route.

Area View

Indicates the area view.

Default Stub Cost

Indicates the default cost of a stub area.

Interface View

Indicates the interface view.

P2P&Broadcast Hello Interval(sec)

Indicates the default interval for sending Hello packets on a P2P or broadcast network.

P2MP&NBMA Hello Interval(sec)

Indicates the default interval for sending Hello packets on a P2MP or NBMA network.

P2P&Broadcast Dead Interval(sec)

Indicates the default interval for declaring a neighbor to be Down after no Hello packets are received on a P2P or broadcast network.

P2MP&NBMA Dead Interval(sec)

Indicates the default interval for declaring a neighbor to be Down after no Hello packets are received on a P2MP or NBMA network.

Poll Interval(sec)

Indicates the default interval for the local device to send Hello packets to a neighbor in the Down state on the NBMA network. The value of Poll Interval is greater than the value of Hello Interval.

Router DR Priority

Indicates the default priority of the DR.

Retransmit Interval(sec)

Indicates the default interval for retransmitting packets.

Transmit Delay(sec)

Indicates the default estimated time for transmitting an LSU packet over this interface. LSAs in the LSU packet must have their age incremented by this amount before transmission.

display gtsm statistics

Function

The display gtsm statistics command displays GTSM statistics on a specified LPU or all LPUs.

Format

display gtsm statistics { slot-id | all }

Parameters

Parameter Description Value
slot-id Displays the GTSM statistics of the device with a specified stack ID. -
all Displays GTSM statistics on the device. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display gtsm statistics command to view GTSM statistics, including the total number of BGP, LDP, and OSPF packets, the number of packets that have passed, and the number of discarded packets, on the device.

Example

# View GTSM statistics on the device.

<HUAWEI> display gtsm statistics all
GTSM Statistics Table
---------------------------------------------------------------
SlotId  Protocol   Total Counters  Drop Counters  Pass Counters
---------------------------------------------------------------
2       BGP                    18              0             18
2       BGPv6                   0              0              0 
2       OSPF                    0              0              0
2       LDP                     0              0              0
2       OSPFv3                  0              0              0 
2       RIP                     0              0              0 
---------------------------------------------------------------
Table 9-27  Description of the display gtsm statistics command output

Item

Description

SlotId

stack id

Protocol

Protocol type:
  • Software-based forwarding: protocol differentiated, displaying BGP, BGPv6, OSPF, LDP, OSPFv3, or RIP

  • Hardware-based forwarding: protocol undifferentiated, displaying "-----"

Total Counters

Total number of packets

Drop Counters

Total number of dropped packets

Pass Counters

Total number of packets that have passed

Related Topics

display ospf abr-asbr

Function

The display ospf abr-asbr command displays information about the ABRs and ASBRs of OSPF.

Format

display ospf [ process-id ] abr-asbr [ router-id ]

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process. The value is an integer ranging from 1 to 4294967295.
router-id Specifies the router ID of an ABR or ASBR. In dotted decimal notation.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Area Border Router (ABR) can belong to two or more areas, and one of the areas must be a backbone area. An ABR is used to connect the backbone area and non-backbone areas. It can be physically or logically connected to the backbone area.

AS Boundary Router (ASBR) exchanges routing information with other ASs. An ASBR may not reside at the boundary of an AS. It can be an internal device or an ABR. If an OSPF device imports external routes, the device is an ASBR.

This command can view information about the ABRs and ASBRs of OSPF.

Example

# Display information about the ABRs and ASBRs of OSPF.

<HUAWEI> display ospf abr-asbr
 OSPF Process 1 with Router ID 10.1.1.1
 Routing Table to ABR and ASBR

 Type        Destination     Area            Cost       Next-Hop         RtType  
 INTRA-AREA  10.1.1.2        0.0.0.1         1          192.168.1.2      ABR/ASBR
Table 9-28  Description of the display ospf abr-asbr command output

Item

Description

Type

Intra-area or inter-area router

Destination

Router ID of the ABR or ASBR

Area

Area ID

Cost

Cost of the route from the local device to the ABR or ASBR

Next-Hop

Next hop address through which packets are transmitted to the ABR or ASBR

RtType

Area border router (ABR) or as boundary router (ASBR)

display ospf asbr-summary

Function

The display ospf asbr-summary command displays information about OSPF route summarization.

Format

display ospf [ process-id ] asbr-summary [ ip-address mask ]

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process. The value is an integer ranging from 1 to 4294967295.
ip-address Specifies the matched IP address. It is in dotted decimal notation.
mask Specifies the mask of the IP address. If no IP address or mask is specified, summarization information of all the imported routes is displayed. It is in dotted decimal notation.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

After an AS is divided into areas, configuring route aggregation can reduce routing information transmitted between areas, thus reducing the size of the routing table and improving route performance.

Run abr-summary command displays information about OSPF route summarization.

Example

# Display summarization information about all the imported OSPF routes.

<HUAWEI> display ospf asbr-summary
          OSPF Process 1 with Router ID 192.168.1.2
                  Summary Addresses
 Total summary address count: 1
                  Summary Address
 net         : 10.0.0.0
 mask        : 255.0.0.0
 tag         : 10
 status      : Advertise
 Cost        : 0 (Not Configured)
Delay        : 30 (Configured)
 The Count of Route is : 2
Table 9-29  Description of the display ospf asbr-summary command output

Item

Description

Total Summary address count

Number of routes that are being summarized through the asbr-summary command

net

Network address of the summarized route

mask

Network mask of the summarized route

tag

Tag of the summarized route

status

Advertisement status of the summarized route:
  • Advertise: indicates that the summarized route is advertised.

  • DoNotAdvertise: indicates that the summarized route is not advertised.

Cost

Cost of the summarized route

Delay

Delay for advertising the summarized route

The Count of Route is

Number of routes that are being summarized

Related Topics

display ospf bfd session

Function

The display ospf bfd session command displays information about the BFD-enabled neighbor.

Format

display ospf [ process-id ] bfd session interface-type interface-number [ router-id ]

display ospf [ process-id ] bfd session { router-id | all }

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process. The value is an integer ranging from 1 to 4294967295.
interface-type interface-number Specifies the type and number of the interface. -
router-id Specifies the router ID of the neighbor. In dotted decimal notation.
all Indicates all the OSPF-enabled interfaces in the OSPF process. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

In BFD for OSPF, a BFD session is associated with OSPF. The BFD session fast detects a link fault and then notifies OSPF of the fault. This speeds up OSPF's response to the change of the network topology.

The display ospf bfd session command displays information about the BFD-enabled neighbor.

Example

# Display information about the BFD-enabled neighbor.

<HUAWEI> display ospf bfd session all
          OSPF Process 1 with Router ID 10.10.10.3

  Area 0.0.0.0 interface 10.10.1.1 (25GE1/1/14)'s BFD Sessions

 NeighborId:20.20.20.20       AreaId:0.0.0.0           Interface:25GE1/1/14                                                
 BFDState:Up                  rx    :1000              tx       :1000                                                      
 Multiplier:3                 BFD Local Dis:16385      LocalIpAdd:10.10.1.1                                                
 RemoteIpAdd:10.10.1.2        Diagnostic Info:No diagnostic information

   Total UP/DOWN/UNKNOWN BFD Session Number : 1 / 0 / 0
Table 9-30  Description of the display ospf bfd session all command output

Item

Description

NeighborId

Router ID of the neighbor

AreaId

Area ID

Interface

Interface that establishes a BFD session with the neighbor

BFDState

BFD status:
  • up
  • down
  • unknown

rx

Receiving interval

tx

Sending interval

Multiplier

Multiplier

BFD Local Dis

BFD local discriminator

LocalIpAdd

Local IP address

RemoteIpAdd

Remote IP address

Diagnostic Info

Diagnostic information

Total UP/DOWN/UNKNOWN BFD Session Number

  • UP: the number of BFD sessions in Up state
  • DOWN: the number of BFD sessions in Down state
  • UNKNOWN: the number of BFD sessions in Unknown state

display ospf brief

Function

The display ospf brief command displays OSPF brief information.

Format

display ospf [ process-id ] brief

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process.

If no OSPF process ID is specified, brief information about all the OSPF processes is displayed.

The value is an integer ranging from 1 to 4294967295.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

In addition to OSPF brief information, running this command also displays the following information:
  • Configured Router ID.

  • Configured VPN domain ID.

When locating OSPF faults, you can run the display ospf brief command to obtain OSPF brief information. You can then analyze OSPF faults according to the brief information.

Example

# Display OSPF brief information.

<HUAWEI> display ospf brief
 OSPF Process 10 with Router ID 10.10.10.10                                     
                                                                                
 RouterID: 10.10.10.10          Border Router:                                  
 Multiple VPN instance is not enabled                                           
 Global DS-TE Mode is disabled                                                  
 Graceful-restart capability is disabled                                        
 Helper support capability is not configured                                    
 SPF schedule interval        : Max 10000ms, Start 500ms, Hold 1000ms           
 Default ASE parameters       : Metric: 1 Tag: 1 Type: 2                        
 Route preference             : 10                                              
 ASE route preference         : 150                                             
 Intra route preference       : 10                                              
 Inter route preference       : 10                                              
 SPF computation count        : 4                                               
 RFC 1583 compatible
 OSPF is in LSDB overflow status(remain time: 205s)                                                            
 Retransmission limitation is disabled
 Import routes limitation is enabled
  Self ASE LSA count: 8
  Current status: Normal                                          
 Area count                   : 1                                               
 Nssa area count              : 0                                               
 Exchange/Loading neighbors   : 0                                               
                                                                                
 Area: 0.0.0.0          MPLS TE not enabled                                     
                                                                                
 Authtype: None   Area flag: Normal                                             
 SPF scheduled count: 4                                                         
 Exchange/Loading neighbors: 0                                                  
 Router ID conflict state: Normal
 Import routes limitation is enabled
  Self NSSA LSA count: 2
  Current status: Normal                                               
                                                                                
 Interface: 10.1.1.2 (Vlanif100)                                                
 Cost: 1       State: DR         Type: Broadcast            MTU: 1500           
 Priority: 1                                                                    
 Designated Router: 10.1.1.2                                                    
 Backup Designated Router: 10.1.1.1                                             
 Timers: Hello 10, Dead 40, Wait 40, Poll 120, Retransmit 5, Transmit Delay 1
Table 9-31  Description of the display ospf brief command output

Item

Description

RouterID

Indicates the current router ID

Border Router

Indicates the border router:
  • AS: indicates an Autonomous System Border Router (ASBR).

  • AREA: indicates an Area Border Router (ABR).

  • NSSA: indicates the ABR of an NSSA.

Multiple VPN instance

Whether VPN multi-instance is enabled.

Global DS-TE Mode

Indicates the globally configured DS-TE mode:
  • Non-standard IETF Mode: indicates that the IETF mode is not supported.
  • Standard IETF Mode: indicates that the IETF mode is supported.

Graceful-restart capability

Indicates whether the graceful restart is disabled:
  • disabled: indicates that graceful restart is disabled.

  • planned only: indicates that planned-GR is supported.

  • un-planned: indicates that unplanned-GR is supported.

  • totally: indicates that totally GR is supported.

Helper support capability

Indicates whether the Helper mode is enabled:
  • enabled: indicates that the Helper mode is enabled.

  • not configured: indicates that the Helper mode is disabled.

SPF schedule interval

Indicates the interval for performing SPF calculation.

Default ASE parameters

Indicates the default value of the external LSA.
  • Metric
  • Tag
  • Type

Route preference

Indicates the preference of the default route.

ASE route preference

Indicates the preference of the AS-External route.

Intra route preference

Priority of the intra-area route.

Inter route preference

Priority of the inter-area route.

SPF computation count

Indicates the number of times that SPF calculation is performed.

RFC 1583 compatible

Indicates whether RFC 1583 compatibility is enabled.

OSPF is in LSDB overflow status (remain time: 205s)

The OSPF LSDB is overloaded with external routes. The remaining time of the overload timer is 205s in this example.

If the number of external routes in the OSPF LSDB has reached or exceeded 90% of the maximum number, the following information is displayed: OSPF LSDB is approaching overflow limit.

To configure the maximum number of external routes supported by the OSPF LSDB, run the lsdb-overflow-limit number command.

Retransmission limitation

Whether a retransmission limit is configured.

Import routes limitation

Whether a limit is configured on the number of LSAs generated when an OSPF process imports external routes.

Self ASE LSA count

Number of existing ASE LSAs.

This field is displayed only in an OSPF process.

Current status

A limit has been configured on the number of LSAs generated when an OSPF process imports external routes. The current status can be as follows:

  • Normal: The number of LSAs generated when an OSPF process imports external routes is less than or equal to the lower alarm threshold (in percentage) multiplied by the maximum number allowed.
  • Approach limit: The number of LSAs generated when an OSPF process imports external routes is approaching (reaching or exceeding 90% of) the upper alarm threshold.
  • Exceed limit: The number of LSAs generated when an OSPF process imports external routes has reached or exceeded the maximum number allowed.

To configure the upper and lower alarm thresholds, run the import-route limit limit-number [ threshold-alarm { upper-limit upper-limit-value | lower-limit lower-limit-value } * ] command.

Area count

Indicates the number of areas in the current process.

Nssa area count

Indicates the number of NSSA areas in the current process.

Exchange/Loading neighbors

Indicates the number of neighbors in the ExChange/Loading state.

Area

Indicates information about each area in the current process, including ID of the current area in the format of XXX.XXX.XXX.XXX.

MPLS TE

Whether MPLS TE is enabled.

Authtype

Indicates the area authentication type, including none-authentication, simple authentication, MD5 authentication, and HMAC-MD5 authentication.

Area flag

Indicates the flag used to describe the area attributes, including Transit/Vlink/Stub/Nssa.

SPF scheduled count

Indicates the type of last SPF calculation, such as All, Router, Net, Intra, SumNet, SumASB, ASE, and NSSA.

Router ID conflict state

Indicates the status of the automatic recovery function. The value can be one of the following:
  • Normal: the automatic recovery function is properly detecting router ID conflict.

  • Wait select: the automatic recovery function delays defining a new router ID if the device starts after an unexpected delay (two hours by default).

  • Selecting: the automatic recovery function restarts the OSPF process with the router ID and waits for the restarted OSPF process to take effect.

  • RtrId Changed: the automatic recovery function determines whether router ID conflict occurs after the new router ID takes effect and returns to the Normal state if no new router ID conflict is detected.

  • Suspend: the automatic recovery function does not define a new router ID any longer if the maximum number of conflict times is reached (three times by default).

Self NSSA LSA count

Number of existing ASE LSAs.

This field is displayed only in an OSPF process.

Interface

Indicates interface information in the area.

Cost

Indicates the cost of an OSPF interface.

State

Indicates the interface status, including Down, Waiting, Loopback, P-2-P, DR, and BDR DR OTHER. DR and BDR DR OTHER exist in only broadcast and NBMA networks, and P-2-P exists in only P2P and P2MP Vlinks.

Type

Indicates the interface type, including P2P, broadcast, NBMA, and P2MP.

MTU

Indicates the MTU value of the interface.

Priority

Indicates the interface priority.

Designated Router

Indicates that the current interface is the DR.

Backup Designated Router

Indicates that the current interface is the BDR.

Timers

Indicates the interval of the timer, including Hello, Dead, Wait, Poll, Retransmit, and Transmit Delay.

Related Topics

display ospf cumulative

Function

The display ospf cumulative command displays OSPF statistics.

Format

display ospf [ process-id ] cumulative

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process.

If no OSPF process ID is specified, statistics of all the OSPF processes are displayed.

The value is an integer ranging from 1 to 4294967295.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

The command output can help you troubleshoot OSPF faults.

Example

# Display OSPF statistics.

<HUAWEI> display ospf cumulative
                                                                                
OSPF Process 1 with Router ID 192.168.5.5                                       
  IO Statistics                                                                 
  Type                    Input     Output                                      
  Hello                   59950     179800                                      
  DB Description          20894      41788                                      
  Link State Request          2          2                                      
  Link State Update       48686        320                                      
  Link State Ack            318      48603                                      
                                                                                
 ASE: Disabled                                                                  
 LSAs originated by this router                                                 
 Router            : 1                                                          
 Network           : 2                                                          
 Summary-Network   : 0                                                          
 Summary-ASBR      : 0                                                          
 External          : 0                                                          
 NSSA              : 0                                                          
 Opaque Link scope : 0                                                          
 Opaque Area scope : 0                                                          
 Opaque AS scope   : 0                                                          
                                                                                
 LSAs Originated   : 3                                                          
 LSAs Received     : 48679                                                      
                                                                                
  Routing Table:                                                                
    Intra Area: 5  Inter Area: 0  ASE: 0                                        
                                                                                
 Up Interface Cumulate: 3                                                       
 -------------------------------------------------------                        
 Neighbor cumulative data. (Process 1)                                          
 -------------------------------------------------------                        
 Down:        0 Init:         0 Attempt:     0 2-Way:    0                      
 Exstart:     0 Exchange:     0 Loading:     0 Full:     1                      
 Retransmit Count: 0                                                            
                                                                                
 Neighbor cumulative data. (Total)                                              
 -------------------------------------------------------                        
 Down:        0 Init:         0 Attempt:     0 2-Way:    0                      
 Exstart:     0 Exchange:     0 Loading:     0 Full:     1                      
 Retransmit Count: 0                                                            
Table 9-32  Description of the display ospf cumulative command output

Item

Description

IO Statistics

Statistics of the transmitted packets and LSAs

Type

OSPF packet type

Input

Number of received packets

Output

Number of sent packets

Hello

OSPF Hello packet

DB Description

OSPF Database Description packet

Link State Request

OSPF Link State Request packet

Link-State Update

OSPF Link State Update packet

Link-State Ack

OSPF Link State Acknowledgement packet

ASE

Number of ASE routes (when there are no ASE routes, Disabled is displayed)

LSAs originated by this router

Detailed statistics of the transmitted LSAs

Router

Router LSA

Network

Network LSA

Sum-Net

Type 3 summary LSA

Summary-ASBR

Type 4 summary LSA

External

AS external LSA

NSSA

NSSA

Opaque Link scope

Number of Type 9 Opque LSAs

Opaque Area scope

Number of Type 10 Opque LSAs

Opaque AS scope

Number of Type 11 Opque LSAs

LSAs originated

Generated LSAs

LSAs Received

Received LSAs

Routing Table

Routing table

Intra Area

Number of intra-area routes

Inter Area

Number of inter-area routes

Up Interface Cumulate

Statistics of up state interface

Neighbor Cumulate

Statistics of neighbors

Neighbor cumulative data.

Detailed statistics of neighbors:
  • Down

  • Init

  • Attempt

  • 2-Way

  • Exstart

  • Exchange

  • Loading

  • Full

Retransmit Count

Total number of nodes in the retransmission list

Related Topics

display ospf ecmp-group

Function

The display ospf ecmp-group command displays information about OSPF ECMP groups.

Format

display ospf [ process-id ] ecmp-group

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process. The value is an integer ranging from 1 to 4294967295.

Views

User view

Default Level

1: Monitoring level

Usage Guidelines

When OSPF load balancing is implemented, this command can be used to check whether indirect next hop IDs are correctly assigned. This helps to implement a rapid route switchover.

Example

# Display information about OSPF ECMP groups.

<HUAWEI> display ospf ecmp-group
          OSPF Process 1 with Router ID 10.1.1.1
                 OSPF ECMP Group Information
----------------------------------------------------------------
 ECMPGroupId MtId Flag  RefCnt    NextHop
----------------------------------------------------------------
  1627389964    0 D          1    10.1.1.1
----------------------------------------------------------------
Flags: D-Direct, URT-Unicast Routing Table
Used ECMP Group Number: 1

Total Used ECMP Group Number: 1
Unused ECMP Group Number: 39
Unused ECMP Group List:
 1627389965, 1627389966, 1627389967, 1627389968, 1627389969, 1627389970, 1627389
971, 1627389972, 1627389973, 1627389974, 1627389975, 1627389976, 1627389977, 162
7389978, 1627389979, 1627389980, 1627389981, 1627389982, 1627389983, 1627389984,
 1627389985, 1627389986, 1627389987, 1627389988, 1627389989, 1627389990, 1627389
991, 1627389992, 1627389993, 1627389994, 1627389995, 1627389996, 1627389997, 162
7389998, 1627389999, 1627390000, 1627390001, 1627390002, 1627390003
Table 9-33  Description of the display ospf ecmp-group command output

Item

Description

OSPF ECMP Group Information

Information about an OSPF ECMP group

ECMPGroupId

ID of an ECMP group

MtId

Topology ID

Flag

Flag of an ECMP group

RefCnt

Number of times an ECMP group is referenced

NextHop

Routing information on the next hop

Used ECMP Group Number

Number of used ECMP groups in a process

Total Used ECMP Group Number

Total number of used ECMP groups

Unused ECMP Group Number

Number of remaining available ECMP groups

Unused ECMP Group List

List of remaining available ECMP groups

display ospf error

Function

The display ospf error command displays OSPF error information.

Format

display ospf [ process-id ] error [ lsa | interface interface-type interface-number ]

Parameters

Parameter Description Value
process-id

Specifies the ID of an OSPF process.

If no OSPF process ID is specified, error information of all OSPF processes is displayed.

The value is an integer ranging from 1 to 4294967295.
lsa Display the OSPF LSA errors. -
interface-type interface-number Specifies the type and number of interfaces. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

When locating OSPF faults, you can run the display ospf error command to obtain OSPF error information. You can then analyze OSPF faults according to the OSPF error information information.

Example

# Display OSPF error information.

<HUAWEI> display ospf error
          OSPF Process 1 with Router ID 10.1.1.1
                  OSPF error statistics

General packet errors:
 0       : IP: received my own packet     0       : Bad packet
 0       : Bad version                    0       : Bad checksum
 0       : Bad area id                    0       : Drop on unnumbered interface
 0       : Bad virtual link               0       : Bad authentication type
 0       : Bad authentication key         0       : Packet too small
 0       : Packet size > ip length        0       : Transmit error
 0       : Interface down                 0       : Unknown neighbor

 0       : Bad authentication sequence number
HELLO packet errors:
 0       : Netmask mismatch               0       : Hello timer mismatch
 0       : Dead timer mismatch            0       : Extern option mismatch
 0       : Router id confusion            0       : Virtual neighbor unknown
 0       : NBMA neighbor unknown          0       : Invalid Source Address
52      : Invalid DR                      0       : LSDB overflow

DD packet errors:
 11      : Neighbor state low             0       : Router id confusion
 0       : Extern option mismatch         0       : Unknown LSA type
 0       : MTU option mismatch

LS ACK packet errors:
 53      : Neighbor state low             0       : Bad ack
 0       : Duplicate ack                  0       : Unknown LSA type

LS REQ packet errors:
 0       : Neighbor state low             0       : Empty request
 0       : Bad request

LS UPD packet errors:
 0       : Neighbor state low             7       : Newer self-generate LSA
 0       : LSA checksum bad               1       : Received less recent LSA
 0       : Unknown LSA type
 0       : Received LSA within LSA Arrival interval

Opaque errors: 
 0       : 9-out of flooding scope        0       : 10-out of flooding scope 
 0       : 11-out of flooding scope

Retransmission for packet over Limitation errors: 
 0       : Number for DD Packet           0       : Number for Update Packet 
 0       : Number for Request Packet
              
Receive Grace LSA errors:
 0       : Number of invalid LSAs         0       : Number of policy failed LSAs
 0       : Number of wrong period LSAs

Configuration errors:
 0       : Tunnel cost mistake 
 0       : The network type of the neighboring interface is not consistent
Table 9-34  Description of the display ospf error command output

Item

Description

General packet errors

Indicates general packet errors.

IP: received my own packet

Indicates that the packet sent by its own interface is received.

Bad packet

Indicates that the parsed packet is incorrect, including the checksum of the length field.

Bad version

Indicates that the OSPF version is incorrect, that is, it is not version 2.

Bad checksum

Indicates that the OSPF checksum is incorrect.

Bad area id

Indicates that the area ID in the received packet does not match the local area ID. (Vlink can receive packets from only Area 0 and its own area.)

Drop on unnumbered interface

Indicates that the unnumbered rather than P2P interface receives packets (the interface must be of the P2P type).

Bad virtual link

Indicates that the Vlink receives invalid packets.

Bad authentication type

Indicates that packet authentication is incorrect.

Packet size > ip length

Indicates that the length of the OSPF packet is greater than the permitted length of the IP packet.

Packet too small

Indicates that the length of the received packet does not equal the sum of the IP header length and the packet length.

Transmit error

Indicates that sending packets to the socket fails.

Interface down

Indicates the number of times that the OSPF interface goes Down.

Unknown neighbor

Indicates that OSPF packets are received from non-OSPF neighbors on NBMA networks, virtual links, and sham links.

Bad authentication sequence number

Indicates bad authentication sequence number errors.

HELLO packet errors

Indicates Hello packet errors.

Netmask mismatch

Indicates that the address mask does not match the local address mask.

Hello timer mismatch

Indicates that the Hello intervals on the two ends are inconsistent.

Dead timer mismatch

Indicates that the Dead intervals on the two ends are inconsistent.

Router id confusion

Indicates that the router IDs on the two ends are the same.

Virtual neighbor unknown

Indicates that the router ID of the packet is inconsistent with that of the neighbor that is configured by the virtual link.

NBMA neighbor unknown

Indicates that the status of the NBMA neighbor is not active.

Invalid Source Address

The source address of LSA is invalid.

Invalid DR

Statistics about Hello packets with non-zero DR priorities received by a P2P interface.

LSDB overflow

Number of received Hello packets when the OSPF LSDB is overloaded.

DD packet errors

Indicates DD packet errors.

Neighbor state low

Indicates the following situations:
  • A DD packet is received but its neighbor status is lower than 2-way.

  • An LSR packet is received but its neighbor status is lower than Exchange.

  • An LSU packet is received but its neighbor status is lower than Exchange.

  • An LSAck packet is received but its neighbor status is lower than Exchange.

Newer self-generate LSA

Indicates the number of new self-generated LSAs. This field is reserved for future use.

Extern option mismatch

Indicates that the Option bit of the Hello packet is incorrect.

MTU option mismatch

Indicates that the MTU check of the OSPF interface is enabled and the MTU of the DD packet received by the interface is greater than the MTU of the interface.

Unknown LSA type

Indicates the unknown LSA type.

LSA checksum bad

Indicates that the LSA checksum is incorrect.

LS ACK packet errors

Indicates LSAck packet errors.

Bad ack

Indicates the number of times that incorrect LSAck packets are received.

Duplicate ack

Indicates the number of times that duplicate LSAck packets are received.

LS REQ packet errors

Indicates LSR packet errors.

Empty request

Indicates empty LSR packets.

Bad request

Indicates the BadRequest event in the protocol.

LS UPD packet errors

Indicates LSU packet errors.

Received less recent LSA

Indicates that the LSA older than the local LSA is received.

Opaque errors

Indicates opaque errors.

9-out of flooding scope

Indicates the number of Type 9 LSAs that exceed the flooding scope.

10-out of flooding scope

Indicates the number of Type 10 LSAs that exceed the flooding scope.

11-out of flooding scope

Indicates the number of Type 11 LSAs that exceed the flooding scope.

Unknown TLV type

Indicates the unknown TLV type.

Retransmission for packet over Limitation errors

Indicates the number of times that retransmitting packets expires.

Number for DD Packet

Indicates the number of times that retransmitting DD packets expires.

Number for Update Packet

Indicates the number of times that retransmitting LSU packets expires.

Number for Request Packet

Indicates the number of times that retransmitting LSR packets expires.

Receive Grace LSA errors

Indicates the number of received incorrect Grace LSAs.

Configuration errors

Indicates configuration errors.

Tunnel cost mistake

Indicates the number of times that the cost of the OSPF tunnel interface is smaller than 1. This count increases by one each time the cost of the OSPF tunnel interface is smaller than one. If the cost is smaller than one, the cost is calculated as one.

The network type of the neighboring interface is not consistent.

Indicates that the network types of the neighboring interfaces are different.

# Display the OSPF LSA errors.
<HUAWEI> display ospf error lsa
 OSPF Process  1  with Router ID 10.1.1.14

 Last Received Bad LSA Header
    LS Age             : 36
    Link State Type    : 0x0008
    Link State ID      : 0.0.1.66
    Advertising Router : 10.10.10.22
    LS Sequence Number : 0x80000002
    LS Checksum        : 0x00bd2e
    Length             : 96
    Interface          : Vlanif100
    Recv Time          : 2011-05-27 14:37:17
Table 9-35  Description of the display ospf error lsa command output

Item

Description

Last Received Bad LSA Header

The bad LSA information of last reviced

LS Age

Aging time of the LSA

Link State Type

LSA type

Link State ID

LSA state ID

Advertising Router

Router that advertises or generates LSAs

LS Sequence Number

Sequence number in the LSA header

LS Checksum

LSA checksum

Length

Size of the LSA

Interface

LSA Receiving interface

Recv Time

LSA Receiving time

display ospf graceful-restart

Function

The display ospf graceful-restart command displays the status of OSPF GR.

Format

display ospf [ process-id ] graceful-restart [ verbose ]

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process. The value is an integer ranging from 1 to 4294967295.
verbose Displays detailed information about OSPF GR. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To view details of the GR and the statistics, run the display ospf graceful-restart command.

Example

# Display OSPF GR information.

<HUAWEI> display ospf graceful-restart
         OSPF Process 1 with Router ID 20.1.1.1               

 Helper-policy support                : planned and un-planned, strict lsa check
 Current GR state                     : Normal

 Number of restarting neighbors : 0

 Last exit reason:
  On Helper     : none
Table 9-36  Description of the display ospf graceful-restart command output

Item

Description

Helper-policy support

Policy that supports the Helper:

  • planned: indicates that the Helper supports only planned GR.
  • un-planned: indicates the Helper supports unplanned GR.
  • strict lsa check: indicates that the Helper supports strict external LSA check.
  • ignore external lsa check: indicates that the Helper does not check external LSAs.
  • never: indicates that the device does not support the Helper mode.

Current GR state

Current GR status:

  • Normal: indicates that GR is in the Normal state.
  • Helper: indicates that the device enters the Helper mode.

Number of restarting neighbors

Number of restarted routers displayed on the Helper.

Last exit reason

Reason why the device exits from GR.

  • none: indicates that GR is not implemented.
  • successful exit: indicates that the OSPF process exits after GR is implemented successfully.
  • grace period expire recv flush grace lsa: indicates that the GR restarter deletes the flushed grace LSA.
  • recv change lsa: indicates that the local interface receives the changed LSA.
  • recv two grace lsa: indicates that the local interface receives two grace LSAs.
  • recv one way hello: indicates that the local interface receives an 1-way Hello packet from the peer interface. That is, the neighbor goes Down.
  • policy check fail: indicates that the Helper policy check fails.
  • nbr reset: indicates that NBR restarts.
  • if change: indicates that the status of an interface changes. For example, the interface changes from Up to Down or the configuration of the interface changes.
  • proc change: indicates that the configuration of the Helper in this OSPF instance changes.

On Helper

Reason why the Helper exits from GR.

# Display detailed information about OSPF GR.

<HUAWEI> display ospf graceful-restart verbose
         OSPF Process 1 with Router ID 20.1.1.1               

 Helper-policy support                : planned, strict lsa check
 Current GR state                     : Normal

 Number of restarting neighbors : 0

 Last exit reason:
  On Helper     : none
  All area count      : 1
              Area ID    : 0.0.0.1
 Authtype       :  None     Area flag : Normal
 Normal interface count: 1
 Interface: 6.6.6.2 (Vlanif100)
 GR state : Normal                  State: BDR          Type: Broadcast
 Neighbor count of this interface : 1
 Neighbor          IP address         GR state     Helper period   Grace Period Left   Last Helper Exit reason
 1.1.1.1           6.6.6.1            Normal       0               0                   none
Table 9-37  Description of the display ospf graceful-restart command output

Item

Description

All area count

Number of areas in the process

Area ID

Area ID

Authtype

Authentication type

Area flag

Area flag:

  • Normal
  • NSSA
  • Stub

Normal interface count

Number of interfaces in the area

Interface

IP address of the interface

GR state

GR status of an interface:

  • Normal
  • Helper

State

Interface status:

  • Point to Point
  • DR
  • BDR
  • DROther
  • Waiting
  • Down

Type

Interface type:

  • P2P
  • P2MP
  • NBMA
  • Broadcast

Neighbor count of this interface

Number of neighbors on the interface

Neighbor

Router ID of the neighbor

IP address

IP address of the neighboring interface

Helper period

Period of the GR helper

Grace Period Left

Status of the neighbor:

  • Normal
  • Restarter

Last Helper Exit reason

Cause for exiting the helper mode of the neighbor for the last time:

  • none: indicates that GR does not occur.
  • successful exit: indicates that GR is correctly performed and ended.
  • grace period expired: indicates that the GR period expires.
  • received flushed grace LSA: indicates that flushed grace LSAs are received.
  • flooding changed LSA: indicates that changed LSAs are received.
  • received multiple grace LSA: indicates that multiple grace LSAs are received.
  • received 1-way hello packet: indicates that 1-way Hello packets are received.
  • policy check failed for received grace LSA: indicates that the Helper policy is not matched.
  • neighbor reset: indicates that topology changes after the reset command is run on the neighbor of the helper.
  • interface state changed: indicates that the interface status is changed.
  • graceful restart unconfigured at process level: indicates that GR is not configured for the neighbor.

display ospf hostname-table

Function

The display ospf hostname-table command displays information about OSPF dynamic hostnames.

Format

display ospf [ process-id ] hostname-table

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process The value is an integer ranging from 1 to 4294967295.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To facilitate network management, configure dynamic hostnames to identify routers. After you run the hostname command to configure a dynamic hostname for a router, the router generates a router information (RI) Opaque LSA, from which you can check the mapping between the router ID and the dynamic hostname.

After a router receives a RI Opaque LSA, you can run the display ospf hostname-table command on the router to check the mapping between the router ID and the dynamic hostname.

Example

# Display information about OSPF dynamic hostnames.

<HUAWEI> display ospf hostname-table
        OSPF Process 1 with Router ID 10.10.10.3
                Hostname Table Information

                Area: 0.0.0.1

 Router ID            Hostname
 10.10.10.3           RTR_BLR
 10.1.1.1             RTR_SHANGHAI
 255.255.255.254      RTR_BJI

                Area: 0.0.0.2

 Router ID            Hostname
 10.10.10.3           RTR_BLR
 10.30.1.1            RTR_DELHI

                AS-Scope

 Router ID            Hostname
 10.20.1.1            RTR_SHENZHEN
 255.255.255.254      RTR_BJI
Table 9-38  Description of the display ospf hostname-table command output

Item

Description

Area

Flooded OSPF hostname in the area

Router ID

Router ID

Hostname

OSPF hostname

AS-Scope

Flooded hostname in the OSPF AS

Related Topics

display ospf interface

Function

The display ospf interface command displays information about OSPF interfaces.

Format

display ospf [ process-id ] interface [ [ all | interface-type interface-number ] [ verbose ] | no-peer ]

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process. The value is an integer ranging from 1 to 4294967295.
all Displays information about all OSPF interfaces. -
no-peer Displays information about the interfaces whose states are Up but have no neighbors. -
interface-type interface-number Specifies the interface type and the interface number. -
verbose Display verbose configuration information. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

The display ospf interface command output displays the configuration and operating status of OSPF, which facilitate fault location and configuration verification.

Example

# Display OSPF interface information.

<HUAWEI> display ospf interface
                                                                                
OSPF Process 1 with Router ID 192.168.5.5                                       
                                                                                
 Area: 0.0.0.0          MPLS TE not enabled                                     
                                                                                
 Interface             IP Address      Type         State    Cost    Pri        
 Vlanif200             192.168.3.1     Broadcast    DR       1       1          
 Vlanif100             192.168.2.1     Broadcast    DR       1       1          
 Vlanif30              10.110.3.1      Broadcast    DR       1       1          
Table 9-39  Description of the display ospf interface command output

Item

Description

Area

ID of the area to which the interface belongs

Interface

Name of interface

IP Address

Interface IP address

Type

Interface type: P2P, P2MP, broadcast, or NBMA

State

Status of the interface, which is determined by the OSPF interface state machines

  • Down: The status of the interface is Down. If an interface is Down, the interface is unavailable and cannot be used to transmit traffic.
  • Loopback: The interface connecting to the network on the device is in the Loopback state. The loopback interface cannot be used to transmit data but can collect interface information by performing the ICMP ping operation or bit error detection.
  • Waiting: The device is determining the DR and BDR on the network. The DR or BDR election mechanism should not be implemented until the waiting period ends. This prevents unnecessary changes in the DR and BDR roles.
  • P-2-P: The interface is connected to the P2P network or a virtual link.
  • DROther: The device itself is not elected as the DR or BDR. Instead, another device connecting to the broadcast network or NBMA network is elected as the DR. The device starts to set up adjacency with the DR and BDR (if existing).
  • BDR: The device functions as the BDR on the network, and will turn into a DR when the current DR fails. The device sets up adjacency with other devices that access the network.
  • DR: The device functions as the DR on the network. The device sets up adjacency with other devices that access the network.

Cost

Cost of the interface

Pri

Priority of the device interface during the DR and BDR election The greater the value, the higher the priority.

# Display information about the specified OSPF interface.
<HUAWEI> display ospf interface vlanif 100
                                                                                
OSPF Process 1 with Router ID 192.168.5.5                                       
                                                                                
 Area: 0.0.0.0          MPLS TE not enabled                                     
                                                                                
 Interface: 192.168.2.1 (Vlanif100)                                             
 Cost: 0       State: DR         Type: Broadcast            MTU: 1500           
 Priority: 1                                                                    
 Designated Router: 192.168.2.1                                                 
 Backup Designated Router: 0.0.0.0                                              
 Timers: Hello 10 , Dead 40 , Wait 40 , Poll 120 , Retransmit 5 , Transmit Delay
 1                                                                              
Table 9-40  Description of the display ospf interface interface-type interface-number command output

Item

Description

Interface

Interface IP address + interface number + IP address of the neighbor, which is used for PTP

MTU

MTU value of the interface

Timers

Interval for timers:
  • Hello
  • Dead
  • Wait
  • Poll
  • Retransmit
  • Transmit Delay

BFD Timers

BFD Timers

# Display detailed configuration information.
<HUAWEI> display ospf interface 10GE 1/0/1 verbose
                                                                                                                                    
OSPF Process 1 with Router ID 192.168.80.180                                                                                        
                                                                                                                                    
 Area: 0.0.0.2          MPLS TE not enabled                                                                                         
                                                                                                                                    
 Interface: 192.168.3.10 (10GE1/0/1)                                                                                                
 Cost: 1       State: Down         Type: Broadcast            MTU: 1500                                                             
 Priority                 : 1                                                                                                       
 Designated Router        : 0.0.0.0                                                                                                 
 Backup Designated Router : 0.0.0.0                                                                                                 
 Timers: Hello 10, Dead 40, Wait 40, Poll 120, Retransmit 5, Transmit Delay 1                                                       
 Opaque ID: 0   Previous state: Down                                                                                                
 Effective cost : 1, enabled by OSPF Protocol                                                                                       
 Suppress flapping peer: enable(flapping-count: 0, threshold: 10)                                                                   
                                                                                                                  
Table 9-41  Description of the display ospf interface verbose command output

Item

Description

OpaqueId

Opaque ID of the interface.

PrevState

Previous state of the interface.

Effective cost

Effective cost of the interface:

  • enabled by OSPF Protocol: default value or the one configured using the ospf cost command.
  • enabled by IGP_LDP: interface cost configured in LDP.
  • enabled by BGP_IGP: interface cost configured in BGP.
Related Topics

display ospf lsdb

Function

The display ospf lsdb command displays the OSPF Link-State Database (LSDB).

Format

display ospf [ process-id ] lsdb [ brief ]

display ospf [ process-id ] lsdb [ { [ { router | network | summary | asbr | ase | nssa | opaque-link | opaque-area | opaque-as } [ link-state-id ] ] [ originate-router [ advertising-router-id ] | hostname hostname | self-originate ] } ] [ age { min-value min-age-value | max-value max-age-value } * ]

display ospf [ process-id ] lsdb [ { [ { router | network | summary | asbr | ase | nssa | opaque-link | opaque-area | opaque-as } [ link-state-id ] ] [ originate-router [ advertising-router-id ] | self-originate ] } ] [ age { min-value min-age-value | max-value max-age-value } * ] [ resolve-hostname ]

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process. The value is an integer ranging from 1 to 4294967295.
brief Displays brief information about the LSDB. -
router Displays information about the device LSA. -
network Displays information about the network LSA. -
summary Displays information about the network summary LSA. -
asbr Displays information about the ASBR summary LSA. -
ase Displays information about the AS external LSA. -
nssa Displays information about the status of external links in the NSSA. -
opaque-link Displays information about the opaque link LSA. -
opaque-area Displays information about the opaque area LSA. -
opaque-as Displays information about the opaque AS LSA. -
originate-router Displays the LSA of the advertising router. -
link-state-id Specifies the ID of an LSA. The value is an IP address in dotted decimal notation.
advertising-router-id Specifies the Router ID of the device that advertises the LSA. The value is an IP address in dotted decimal notation.
hostname hostname Displays LSDB information using a hostname. -
self-originate Displays information about the self-originated LSA. -
age Displays the LSAs that meet the age filtering rule. -
min-value min-age-value Displays information about only LASs with the age value greater than or equal to the min-age-value value. The value is an integer ranging from 0 to 3600.
max-value max-age-value Displays information only about LASs with the age value less than or equal to the max-age-value value. The value is an integer ranging from 0 to 3600.
resolve-hostname Displays LSDB information using a hostname that is being resolved. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

By running the display ospf lsdb command displays information about the LSDB in various modes. That is, you can view any of the following:

  • Brief information about the LSDB
  • LSAs of a specified type
  • LSAs of the originating device
  • Locally originated LSAs

The command output can display information about the OSPF LSDB, which helps you troubleshoot OSPF faults.

Example

# Display brief information about the OSPF LSDB.

<HUAWEI> display ospf lsdb
                                                                                                                                    
OSPF Process 100 with Router ID 192.168.1.1                                                                                         
Link State Database                                                                                                                 
                                                                                                                                    
Type 10 Opaque (Area-Local Scope) Database                                                                                          
----------------------------------------------------------------------------                                                        
 Type      LinkState ID    AdvRouter        Age    Len Sequence   Area                                                              
 Opq-Area  10.0.0.0        192.168.1.1     1274     28 80000001   0.0.0.0                                                           
                                                                                                                                    
Type 10 Opaque (Area-Local Scope) Database                                                                                          
----------------------------------------------------------------------------                                                        
 Type      LinkState ID    AdvRouter        Age    Len Sequence   Area                                                              
 Opq-Area  10.0.0.0        192.168.1.1     1274     28 80000001   0.0.0.1                                          
Table 9-42  Description of the display ospf lsdb command output

Item

Description

Area

Area whose LSDB information needs to be displayed

Type

LSA type: Router, Network, Sum-Net, Sum-Asbr, NSSA, External, Opq-Link, Opq-Area, and Opq-As

LinkState ID

Link State ID in the LSA header

AdvRouter

Device that advertises or generates LSAs

Age

Aging time of the LSA

Len

Size of the LSA

Sequence

Sequence number in the LSA header

Metric

Metric

# Display information about router LSAs in the LSDB.

<HUAWEI> display ospf lsdb router
                                                                                
OSPF Process 1 with Router ID 192.168.5.5                                       
Area: 0.0.0.0                                                                   
----------------------------------------------------------------------------    
                                                                                
  Type      : Router                                                            
  Ls id     : 192.168.5.5                                                       
  Adv rtr   : 192.168.5.5                                                       
  Ls age    : 1299                                                              
  Len       : 72                                                                
  Options   :  E                                                                
  seq#      : 80000156                                                          
  chksum    : 0x908d                                                            
  Link count: 4                                                                 
     Link ID: 192.168.3.1                                                       
     Data   : 192.168.3.1                                                       
     Link Type: TransNet                                                        
     Metric : 1                                                                 
     Link ID: 192.168.2.0                                                       
Table 9-43  Description of the display ospf lsdb router command output

Item

Description

Ls id

Link State ID in the LSA header

Adv rtr

The device that advertises or generates LSAs

Ls age

Aging time of the LSA

Options

Indicates the Options field as below:

  • E: allows Flood AS-external-LSAs.
  • MC: forwards IP multicast packets.
  • N/P: processes Type-7 LSAs.
  • DC: processes the required links.

seq#

Sequence number, which is used to check the order of LSAs

Chksum

LSA checksum

Link count

Number of links

Link ID

Link ID of the router LSA, which is classified according to the link type

Data

Link data of the router LSA

Link Type

Link type of the router LSA: P-2-P, TransNet, StubNet, or Virtual

Metric

Link metric of the router LSA

# Display information about network LSAs in the LSDB.

<HUAWEI> display ospf 1 lsdb network 10.1.1.1
                                                                                
OSPF Process 1 with Router ID 192.168.5.5                                       
Area: 0.0.0.0                                                                   
----------------------------------------------------------------------------    
                                                                                
  Type      : Network                                                           
  Ls id     : 192.168.3.1                                                       
  Adv rtr   : 192.168.5.5                                                       
  Ls age    : 991                                                               
  Len       : 32                                                                
  Options   :  E                                                                
  seq#      : 80000114                                                          
  chksum    : 0x1e57                                                            
  Net mask  : 255.255.255.0                                                     
     Attached Router: 192.168.17.2                                              
     Attached Router: 192.168.5.5                                               
Table 9-44  Description of the display ospf lsdb network command output

Item

Description

Net mask

Network mask of the network LSA

Attached Router

Device that is connected to the network

# Display information about network summary LSAs in the LSDB.

<HUAWEI> display ospf 1 lsdb summary 10.20.1.0
OSPF Process 1 with Router ID 10.20.1.2
Area: 0.0.0.2
---------------------------------------------------------------------------- 

  Type      : Sum-Net
  Ls id     : 192.168.1.0
  Adv rtr   : 10.20.1.1
  Ls age    : 70
  Len       : 28
  Options   :  E
  seq#      : 80000001
  chksum    : 0x18D2
  Net mask  : 255.255.255.0
  Tos 0  metric: 1
Table 9-45  Description of the display ospf lsdb summary command output

Item

Description

Net mask

Network mask of the network summary LSA

Tos

Type of service of the network summary LSA

Metric

Metric or cost of the route from the advertising router to the network, which is carried in the network summary LSA

# Display information about ASBR summary LSAs in the LSDB.
<HUAWEI> display ospf 1 lsdb asbr
OSPF Process 1 with Router ID 10.1.1.1
Area: 0.0.0.2
----------------------------------------------------------------------------

  Type      : Sum-Asbr
  Ls id     : 10.1.1.2
  Adv rtr   : 10.1.1.1
  Ls age    : 467
  Len       : 28
  Options   :  E
  seq#      : 80000001
  chksum    : 0x6DBE
  Tos 0  metric: 1
# Display information about AS external LSAs in the LSDB.
<HUAWEI> display ospf 100 lsdb ase
OSPF Process 100 with Router ID 10.66.1.1
Link State Database

  Type      : External
  Ls id     : 192.168.1.0
  Adv rtr   : 10.66.1.2
  Ls age    : 743
  Len       : 36
  Options   :  E
  seq#      : 80000001
  chksum    : 0xB60A
  Net mask  : 255.255.255.0
  Tos 0  metric: 1
  E type    : 2
  Forwarding Address : 0.0.0.0
  Tag       : 1
Table 9-46  Description of the display ospf lsdb ase command output

Item

Description

Net mask

Network mask of the ASE or NSSA LSA

Tos

Type of service of the ASE or NSSA LSA

Metric

Metric or cost of the route from the advertising router to the network, which is carried in the ASE or NSSA LSA

E type

E type of the ASE or NSSA LSA

Forwarding Address

Forwarding address of the ASE or NSSA LSA

Tag

32-bit tag, which is carried in ASE or NSSA LSA to avoid routing loops

# Display information about NSSA external LSAs in the LSDB.

<HUAWEI> display ospf 1 lsdb nssa 192.168.1.0
OSPF Process 1 with Router ID 10.1.1.1
Area: 0.0.0.1
----------------------------------------------------------------------------

  Type      : NSSA
  Ls id     : 192.168.1.0
  Adv rtr   : 10.2.2.2
  Ls age    : 521
  Len       : 36
  Options   : None
  seq#      : 80000005
  chksum    : 0x9ea7
  Net mask  : 255.255.255.0
  TOS 0  Metric: 1
  E type    : 2
  Forwarding Address : 10.20.1.2
  Tag       : 1

# Display information about Opaque-link LSAs in the LSDB.

<HUAWEI> display ospf 1 lsdb opaque-link
          OSPF Process 1 with Router ID 10.10.10.1
                    Area: 0.0.0.0
                  Link State Database
 Link State Database for interface 10.1.1.1 (Vlanif200) Type: Broadcast

  Type      : Opq-Link
  Ls id     : 192.168.0.0
  Adv rtr   : 10.10.10.2
  Ls age    : 12
  Len       : 44
  Options   :  E
  seq#      : 80000001
  chksum    : 0x9579
         Opaque type : 3, Opaque ID : 0
         Grace LSA TLV information:
         Grace Period        : 1800
         GR reason           : 1
         IP address          : 10.1.1.2    
Table 9-47  Description of the display ospf lsdb opaque-link command output

Item

Description

Opaque Type

Opaque-link LSA

Opaque ID

Opaque ID of an Opaque-link LSA (Link state ID in the LSA header consists of Opaque type and Opaque ID.)

Grace LSA TLV information:

GR information

Grace Period

GR waiting period

GR reason

Cause of GR

  • 0: unknown

  • 1: software

  • 2: upgrade

  • 3: switchover

IP address

Address of the interface that performs GR on the switch

# Display information about Opaque-area LSAs in the LSDB.

<HUAWEI> display ospf 1 lsdb opaque-area
OSPF Process 1 with Router ID 10.10.10.1
Area: 0.0.0.0
----------------------------------------------------------------------------
  Type      : Opq-Area
  Ls id     : 10.0.0.1
  Adv rtr   : 10.10.10.1
  Ls age    : 639
  Len       : 200
  Options   :  E
  seq#      : 80000001
  chksum    : 0x2175
  Opaque Type: 1
  Opaque Id: 1
  Opaque lsa information:

     00 02 00 b0 00 01 00 01 02 00 00 00 00 02 00 04
     0a 01 01 01 00 03 00 04 0a 01 01 01 00 04 00 04
     00 00 00 00 00 05 00 04 00 00 00 01 80 02 00 04
     00 00 00 01 00 06 00 04 00 00 00 00 00 07 00 04
     00 00 00 00 80 00 00 04 00 00 00 00 00 09 00 04
     00 00 00 00 00 08 00 20 00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00 80 01 00 20 00 00 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 0a 00 09
     00 00 00 00 00 00 00 00 00 00 00 00 00 0c 00 04
     00 01 00 01
Related Topics

display ospf nexthop

Function

The display ospf nexthop command displays OSPF next hop information.

Format

display ospf [ process-id ] nexthop

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process. The value is an integer ranging from 1 to 4294967295.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

The command output can display information about all the OSPF next hops, which helps you troubleshoot OSPF faults.

Example

# Display OSPF next hop information.

<HUAWEI> display ospf nexthop
                OSPF Process 100 with Router ID 10.0.0.1
                       Routing Nexthop information
Next hops:
Address          Type      Refcount  IntfAddr       Intf Name
----------------------------------------------------------------------
10.0.0.1         Local     3         10.0.0.1       Vlanif100
10.0.0.2         Local     5         10.0.0.1       Vlanif100
Table 9-48  Description of the display ospf nexthop command output

Item

Description

Next hops

Detailed information about the next hop

Address

Address of the next hop

Type

Type of the route passing through the next hop. Local indicates that the route is destined for the local network segment.

Refcount

Number of OSPF routes that use the next hop

IntfAddr

IP address of the interface

Intf Name

Name of the interface

Related Topics

display ospf peer

Function

The display ospf peer command displays information about neighbors in each OSPF area.

Format

display ospf [ process-id ] peer [ [ interface-type interface-number ] [ neighbor-id ] | brief ] [ resolve-hostname ]

display ospf [ process-id ] peer [ [ interface-type interface-number ] [ hostname hostname ] | last-nbr-down ]

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process. The value is an integer ranging from 1 to 4294967295.
interface-type interface-number Specifies the interface type and the interface number. -
neighbor-id Specifies the neighbor's Router ID. It is in dotted decimal notation.
brief Displays brief information about neighbors in each OSPF area. -
last-nbr-down Displays brief information about the last neighbor that goes Down in the OSPF area. -
resolve-hostname Displays resolved hostname information. -
hostname hostname Displays LSDB information using a hostname. It is a string of 1 to 255 characters.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

The command output can display information about OSPF neighbors, and help you troubleshoot OSPF faults, verify the configurations of OSPF neighbors, and check whether the neighbor performs Graceful Restart (GR).

Example

# Display information about the OSPF neighbor.

<HUAWEI> display ospf peer
OSPF Process 1 with Router ID 192.168.5.5                                       
 Area 0.0.0.0 interface 192.168.3.1 (Vlanif200)'s neighbors                     
  Router ID: 192.168.17.2       Address : 192.168.3.2                           
  State    : Full               Mode    : Nbr is Master      Priority: 1        
  DR       : 192.168.3.1        BDR     : 192.168.3.2        MTU     : 0        
  Dead timer due in  32  sec
  Retrans timer interval: 5
  Neighbor is up for 00:00:05
  Authentication Sequence: [ 0 ]
Table 9-49  Description of the display ospf peer command output

Item

Description

Area

Area to which the neighbor belongs

interface

Interface that connects to the neighbor

Router ID

Router ID of the neighbor

Address

Address of the neighboring interface

State

Neighbor status:
  • Down: It is the initial status of the neighbor, indicating that the neighbor does not receive any information. On an NBMA network, when the neighbor is in the Down state, Hello packets can still be transmitted at the poll interval, which is longer than the Hello interval.

  • Attempt: It exists only on an NBMA network, indicating that two ends are attempting to establish the neighbor relationship. The interval for sending Hello packets is the Hello interval, which is shorter than the poll interval.

  • Init: It indicates that the Hello packet has been received from the neighbor.

  • 2-Way: It indicates that the Hello packet has been received from the neighbor, and the neighbor list of the Hello packet contains the local Router ID. That is, the two ends can interwork.

  • ExStart: It is the first step of establishing adjacencies. In this step, the master and slave relationship and DD sequence number are negotiated.

  • Exchange: It indicates that the LSDBs start to be synchronized. In this process, DD packets, LSR packets, and LSU packets are exchanged.

  • Loading: It indicates that the LSDBs are being synchronized. In this process, LSR packets and LSU packets are exchanged.

  • Full: It indicates that the LSDB of the neighbor is already synchronized, and the Full adjacency is established between both ends.

Mode

Master or slave in the process of exchanging DD packets:
  • Nbr is Master: indicates that the neighbor is the master and actively sends DD packets.

  • Nbr is Slave: indicates that the neighbor is the slave and cooperates with the master to send DD packets.

Priority

Priority of the neighboring device

DR

Designated router

BDR

Backup designated router

MTU

MTU value of the neighboring interface

Dead timer due (in seconds) : 35

The dead timer due in 35 seconds

Retrans timer interval

Interval for retransmitting LSAs, in seconds

Neighbor is up for

Duration that the neighbor has been Up.

Authentication Sequence

Authentication sequence number

# Display brief information about OSPF neighbors.

<HUAWEI> display ospf 1 peer brief
         OSPF Process 1 with Router ID 10.10.10.1
                   Peer Statistic Information

 Total number of peer(s): 1                                                              
 Peer(s) in full state: 1 
 ----------------------------------------------------------------------------
 Area Id         Interface                  Neighbor id      State
 0.0.0.0         Vlanif10                   10.10.10.3       Full            
Table 9-50  Description of the display ospf peer brief command output

Item

Description

Area Id

Area to which the neighbor belongs

Interface

Interface that connects to the neighbor

Neighbor id

Router ID of the neighbor

# Display information about the OSPF neighbor that goes Down for the last time.

<HUAWEI> display ospf 1 peer last-nbr-down
          OSPF Process 1 with Router ID 10.20.1.1

                         Last Down OSPF Peer
                                                                          
         Neighbor Ip Address : 10.66.1.2                                
         Neighbor Area   Id  : 0.0.0.0                                    
         Neighbor Router Id  : 10.20.1.2                                  
         Interface           : Vlanif400                       
         Immediate Reason    : Neighbor Down Due to Kill Neighbor   
         Primary Reason      : Hello Not Seen                        
         Down Time           : [2010/02/11] 06:50:23
Table 9-51  Description of the display ospf peer last-nbr-down command output

Item

Description

Neighbor Ip Address

Address of the neighboring interface

Neighbor Area Id

Area to which the neighbor belongs

Neighbor Router Id

Router ID of the neighbor

Interface

Interface that connects to the neighbor

Immediate Reason

Immediate reason that the neighbor goes Down:
  • Neighbor Down Due to Inactivity: indicates that the inactivity timer times out.
  • Neighbor Down Due to LL Down: indicates that the link is Down. For example, the interface goes Down from Up or the IP address of the link is deleted.
  • Neighbor Down Due to Kill Neighbor: indicates that the kill neighbor event is generated on the neighbor state machine.
  • Neighbor Down Due to 1-Wayhello: indicates that the neighbor goes Down because it receives a 1-way packet.
  • Received: indicates that the AdjOK? event is generated on this interface.
  • Neighbor Down Due to SequenceNum Mismatch: indicates that the SequenceNum Mismatch event is generated on the neighbor state machine.
  • Neighbor Down Due to BadLSreq: indicates that the BadLSreq event is generated on the neighbor state machine.

Primary Reason

Primary reason that the neighbor goes Down:
  • Hello Not Seen: indicates that no Hello packet is received.
  • Interface Parameter Mismatch: indicates that the parameters set on both ends of the link do not match.
  • I Bit Incorrect in DD: In neighbor flapping scenarios, DD packet mis-sequencing causes the neighor relationship to become Down.
  • Logical Interface State Change: indicates that the status of the logical interface changes.
  • Physical Interface State Change: indicates that the status of the physical interface changes.
  • OSPF Process Reset: indicates that the OSPF process restarts.
  • Area reset: indicates that the area restarts because the area type changes.
  • Area Option Mis-match: indicates that the area options of the interfaces on both ends of the link do not match.
  • Vlink Peer Not Reachable: indicates that the neighbor on the virtual link is not reachable.
  • Sham-Link Unreachable: indicates that the neighbor on the sham link is not reachable.
  • Undo Network Command: indicates that the network command is deleted.
  • Undo NBMA Peer: indicates that the neighbor configuration on the NBMA interface is deleted.
  • Passive Interface Down: indicates that the neighbor relationship goes Down because the silent-interface command is configured on the local interface.
  • Opaque Capability Enabled: indicates that Opaque capability is enabled.
  • Opaque Capability Disabled: indicates that Opaque capability is disabled.
  • Virtual Interface State Change: indicates that the status of a virtual link interface changes.
  • BFD Session Down: indicates that the BFD session goes Down.
  • Down Retransmission Limit Exceed: indicates that the number of retransmission times reaches the limit.
  • 1-Wayhello Received: indicates that the device receives 1-way hello packets.
  • Router State Change from DR or BDR to DROTHER: indicates that the interface state machine changes to DROTHER from DR or BDR.
  • Neighbor State Change from DR or BDR to DROTHER: indicates that the neighbor state machine changes to DROTHER from DR or BDR.
  • NSSA Area Configure Change: indicates that the configuration of the NSSA area changes.
  • Stub Area Configure Change: indicates that the configuration of the Stub area changes.
  • Received Invalid DD Packet: indicates that invalid DD packets are received.
  • Not Received DD during RouterDeadInterval: indicates that no DD packet is received during the time when the Dead timer starts.
  • M,I,MS bit or SequenceNum Incorrect: indicates that the M, I, and MS bits do not comply with specifications in the protocol.
  • Unable Opaque Capability,Find 9,10,11 Type Lsa: indicates that Type9, Type10, and Type11 LSAs are received and Opaque capability is disabled.
  • Not NSSA,Find 7 Type Lsa in Summary List: indicates that this area is not an NSSA area and Type7 LSAs are found in the summary table.
  • LSrequest Packet,Unknown Reason: indicates that LSR packets are received with the reason unknown.
  • NSSA or STUB Area,Find 5 ,11 Type Lsa: indicates that this area is an NSSA or Stub area and Type5 and Type11 LSAs are found.
  • LSrequest Packet,Request Lsa is Not in the Lsdb: indicates that the neighbor sends an LSR to this process or area to request an LSA and this LSA does not exist in the LSDB of this process.
  • LSrequest Packet, exist same lsa in the Lsdb: indicates that this process receives an LSA that is same as that in the LSDB and the LSA is found in the request list of the neighbor.
  • LSrequest Packet, exist newer lsa in the Lsdb: indicates that this process receives a new LSA that exist in the local LSDB and the LSA is found in the request list of the neighbor.
  • Neighbor state was not full when LSDB overflow: indicates that the LSDB overflows and the neighbor state machine is not Full.
  • Filter LSA configuration change: indicates that the configuration of LSA filter changes.
  • ACL changed for Filter LSA: indicates that the ACL configuration of LSA filter changes.
  • Reset Ospf Peer: indicates that the OSPF neighbor is restarted.
  • Neighbor state was not full when LSDB overflow: When the LSDB overflows, the neighbor status changes to Down if the neighbor status does not become Full.
  • DD retrans times upto limit: indicates that the DD packet retransmission count reaches the upper limit.
  • Link Fault or Interface Configuration change: indicates that a link fault occurs or the interface configuration changes.

Down Time

Time when the neighbor goes Down

Related Topics

display ospf request-queue

Function

The display ospf request-queue command displays the OSPF request list.

Format

display ospf [ process-id ] request-queue [ interface-type interface-number ] [ neighbor-id ]

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process. The value is an integer ranging from 1 to 4294967295.
interface-type interface-number Specifies the interface type and number. -
neighbor-id Specifies the neighbor's Router ID. It is in dotted decimal notation.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

The command output can help you troubleshoot OSPF faults.

Example

# Display the OSPF request list.

<HUAWEI> display ospf request-queue
 OSPF Process 1 with Router ID 10.1.1.1
 OSPF Request List
  The Router's Neighbor is Router ID 10.4.4.4         Address 172.16.4.2
  Interface 172.16.4.1        Area 0.0.0.2
  Request list:
       Type       LinkState ID      AdvRouter         Sequence   Age
       Router     10.1.1.1           10.1.1.1         8000001b   677
Table 9-52  Description of the display ospf request-queue command output

Item

Description

The Router's Neighbor is Router ID

Router ID of the neighbor

Address

IP address of the neighboring interface

Interface

IP address of the interface

Area

Area to which the local device belongs

Request list

Request list

Type

LSA type:

Router LSA, network LSA, network summary LSA, ASBR summary LSA, AS external LSA, NSSA LSA, and opaque LSA

LinkState ID

Link state ID in the LSA header

AdvRouter

Advertising router in the LSA header

Sequence

Sequence number in the LSA header

Age

Aging time in the LSA header

display ospf retrans-queue

Function

The display ospf retrans-queue command displays the OSPF retransmission list.

Format

display ospf [ process-id ] retrans-queue [ interface-type interface-number ] [ neighbor-id ]

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process. The value is an integer ranging from 1 to 4294967295.
interface-type interface-number Specifies the interface type and number. -
neighbor-id Specifies the neighbor's Router ID. It is in dotted decimal notation.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

The command output can help you troubleshoot OSPF faults.

Example

# Display the OSPF retransmission list.

<HUAWEI> display ospf retrans-queue
          OSPF Process 1 with Router ID 192.168.1.1
                  OSPF Retransmit List
 Area 0.0.0.0 interface 10.66.1.1 (Vlanif400)'s neighbors
  Retransmit list:
  Neighbor ID: 10.20.1.2
 Type             LinkState ID      AdvRouter         Sequence   Age
 1                192.168.1.1       192.168.1.1       8000000b     4
 5                10.1.1.0          192.168.1.1       80000001     4
 5                10.1.2.0          192.168.1.1       80000001     4
 5                10.1.3.0          192.168.1.1       80000001     4
 5                10.1.4.0          192.168.1.1       80000001     4
 5                10.1.5.0          192.168.1.1       80000001     4
 5                10.1.6.0          192.168.1.1       80000001     4
 5                10.1.7.0          192.168.1.1       80000001     4
 5                10.1.8.0          192.168.1.1       80000001     4
 5                10.1.9.0          192.168.1.1       80000001     4
 5                10.1.10.0         192.168.1.1       80000001     4
Table 9-53  Description of the display ospf retrans-queue command output

Item

Description

Area

Area ID

interface

IP address of the interface

Retransmit list

Retransmission list

Neighbor ID

Router ID of the neighbor

Type

LSA type

LinkState ID

Link state ID in the LSA header

AdvRouter

Advertising router in the LSA header

Sequence

Sequence number in the LSA header

Age

Aging time in the LSA header

display ospf routing

Function

The display ospf routing command displays the OSPF routing table.

Format

display ospf [ process-id ] routing router-id [ router-id ] [ age { min-value min-age-value | max-value max-age-value } * ]

display ospf [ process-id ] routing [ ip-address [ mask | mask-length ] ] [ interface interface-type interface-number ] [ nexthop nexthop-address ] [ age { min-value min-age-value | max-value max-age-value } * ]

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process. The value is an integer ranging from 1 to 4294967295.
router-id router-id Specifies the router ID of a destination router. The value is in dotted decimal notation.
ip-address Specifies the IP address. The value is in dotted decimal notation.
mask Specifies the subnet mask. The value is in dotted decimal notation.
mask-length Specifies the mask length. The value is an integer ranging from 0 to 32.
interface interface-type interface-number Specifies the type and number of the interface. -
nexthop nexthop-address Displays the route with the specified next hop IP address. The value is in dotted decimal notation.
age Displays the LSAs that meet the age filtering rule. -
min-value min-age-value Displays information about only LSAs with the age value greater than or equal to the min-age-value value. The value is an integer ranging from 1 to 4294967295.
max-value max-age-value Displays information only about LSAs with the age value less than or equal to the max-age-value value. The value is an integer ranging from 1 to 4294967295.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

By using this command with different parameters, you can view the routes of a specified interface or next hop.

The command output can help you troubleshoot OSPF faults.

Example

# Display the OSPF routing table.

<HUAWEI> display ospf routing
                                                                                
OSPF Process 1 with Router ID 192.168.5.5                                       
                                                                                
 Routing for Network                                                            
 ------------------------------------------------------------------------------ 
 Destination            Cost Type       Next-Hop        AdvRouter       Area    
                                                                                
 10.110.2.0/24             2 Stub       192.168.3.2     192.168.17.2    0.0.0.0 
                                                                                
 10.110.3.0/24             1 Direct     10.110.3.1      192.168.5.5     0.0.0.0 
                                                                                
 192.168.2.0/24            1 Direct     192.168.2.1     192.168.5.5     0.0.0.0 
                                                                                
 192.168.3.0/24            1 Direct     192.168.3.1     192.168.5.5     0.0.0.0 
                                                                                
                                                                                
 Total Nets: 4                                                                  
 Intra Area: 4  Inter Area: 0  ASE: 0  NSSA: 0                                  
Table 9-54  Description of the display ospf routing command output

Item

Description

Destination

Destination network

Cost

Cost of the route to the destination address

Type

Type of the destination network:
  • Inter-area: indicates inter-area routes.

  • Intra-area: indicates intra-area routes.

    • Stub: indicates the routes advertised by router LSAs, which correspond to the direct routes of non-broadcast and non-NBMA networks.

    • Transit: indicates the routes advertised by network LSAs.

Next-Hop

Next hop address to the destination address

AdvRouter

Device that advertises LSAs

Area

Area ID

Tag

Tag of the external route

Total Nets

Total number of networks in an area, between areas, in ASE areas, and in NSSAs.

Intra Area

Total number of intra-area networks (that is, stub networks and transit networks)

Inter Area

Total number of inter-area networks

ASE

Total number of networks in the ASE area

NSSA

Total number of networks in the NSSA

# Display the routes to a specified destination address.
<HUAWEI> display ospf routing 10.1.1.1
 
Flags: A - Added to URT, S - Secondary route

         OSPF Process 1 with Router ID 1.1.1.1

 Destination    : 10.1.1.0/24
 AdverRouter    : 10.1.1.1             Tag              : 1
 Cost           : 1                    Type             : Type2
 NextHop        : 10.1.1.2             Interface        : Vlanif111
 Priority       : High
 Backup NextHop : 10.1.1.3             Backup Interface : Vlanif333
 Backup Type    : LFA LINK
 Flags          : A/-
Table 9-55  Description of the display ospf routing ip-adress command output

Item

Description

Backup NextHop

IP address of the next backup hop

Backup Interface

Outbound interface of the next backup hop

Backup Type

Backup type
  • LFA LINK: backup LFA links.
  • LFA LINK-NODE: backup LFA links and nodes.
Related Topics

display ospf spf-statistics

Function

The display ospf spf-statistics command displays route calculation statistics in OSPF processes.

Format

display ospf [ process-id ] spf-statistics [ verbose ]

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process.

If no OSPF process ID is specified, brief information about route calculation statistics in all processes is displayed.

The value is an integer ranging from 1 to 4294967295.
verbose Displays detailed information about route calculation statistics. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

The display ospf spf-statistics command displays route calculation statistics in OSPF processes, including the time when route calculation occurs, cause of route calculation, and number of changed routes.

When identifying the cause of OSPF route flapping, you can run this command to obtain OSPF route calculation statistics, and then identify the cause according to the command output.

Example

# Display brief information about route calculation statistics in OSPF process 1.

<HUAWEI> display ospf 1 spf-statistics
           OSPF Process 1 with Router ID 10.2.2.2
Routing table change statistics:
Date          Time            Intra       Inter    External    Reason
2008-08-14    10:17:16        17          17       17          LSA
2008-08-14    09:16:47        77          62       127         Other
2008-08-14    08:16:37        0           0        0           LSA
2008-08-14    07:04:40        24          230      108         LSA
2008-08-14    06:03:15        204         230      18          Other
2008-08-14    05:02:55        34          236      128         LSA
2008-08-14    04:01:49        54          130      158         LSA
2008-08-14    03:01:48        44          220      138         LSA
2008-08-14    02:01:43        22          233      158         LSA
2008-08-14    01:00:53        977         897      907         LSA
Table 9-56  Description of the display ospf spf-statistics command output

Item

Description

Date

Date when route calculation occurs

Time

Time when route calculation occurs

Intra

Number of intra-area routes in the routing table, which are changed because of route calculation

Inter

Number of inter-area routes in the routing table, which are changed because of route calculation

External

Number of external routes in the routing table, which are changed because of route calculation

Reason

Cause of route calculation:
  • LSA: indicates that route calculation is caused by LSAs.
  • Other: indicates that route calculation is caused by other causes. For example, the configuration changes; or the interface goes Down.

# Display detailed information about route calculation statistics in OSPF process 1.

<HUAWEI> display ospf 1 spf-statistics verbose
           OSPF Process 1 with Router ID 10.10.10.2
Routing table change statistics:
Index: 1   
           Time     : 2008-11-29,17:36:59
           Intra    : 0 Added,0 Deleted
           Inter    : 0 Added,0 Deleted
           External : 10 Added,0 Deleted
           The reason of calculation is:LSA
           NO.     Type          LS ID             Adv Router
           1       External      10.1.5.0          10.10.10.1
           2       External      10.1.3.0          10.10.10.1
           3       External      10.1.9.0          10.10.10.1
           4       External      10.1.4.0          10.10.10.1
           5       External      10.1.2.0          10.10.10.1
           6       External      10.1.8.0          10.10.10.1
           7       External      10.1.7.0          10.10.10.1
           8       External      10.1.6.0          10.10.10.1
           9       External      10.1.10.0         10.10.10.1
           10      External      10.1.1.0          10.10.10.1
Table 9-57  Description of the display ospf spf-statistics verbose command output

Item

Description

Time

Date and time when route calculation occurs

Intra

Number of intra-area routes in the routing table, which are added and deleted because of route calculation.

Inter

Number of inter-area routes in the routing table, which are added and deleted because of route calculation.

External

Number of external routes in the routing table, which are added and deleted because of route calculation.

The reason of calculation is

Cause of route calculation:

  • LSA: indicates that route calculation is caused by LSAs.
  • Other: indicates that route calculation is caused by other causes. For example, the configuration changes; or the interface goes Down.

No.

Sequence number of the LSA that causes route calculation, which ranges from 1 to 10

Type

Type of the LSA that causes route calculation, including Router, Network, Sum-Net, External, and NSSA

LS ID

Link state ID of the LSA that causes route calculation

Adv Router

Router ID of the switch that generates the LSA that causes route calculation

display ospf statistics updated-lsa

Function

The display ospf statistics updated-lsa command displays the frequent updates of the LSAs that the LSDB receives.

Format

display ospf [ process-id ] statistics updated-lsa [ originate-router advertising-router-id | history ]

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process.

If no OSPF process ID is specified, this command displays brief information about the route calculation statistics in all processes.

The value is an integer ranging from 1 to 4294967295.
originate-router Specifies the link status of the advertising switch. -
advertising-router-id Specifies the ID of the advertising switch. In dotted decimal notation
history Specifies the update history of LSAs that the LSDB receives. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

The display ospf statistics updated-lsa command is used to display the frequent updates of LSAs, facilitating the location of the cause for a routing flapping.

  • If the history parameter is not configured, the display ospf statistics updated-lsa command only displays the updates of LSAs within the latest hour.
  • If the history parameter is configured, the display ospf statistics updated-lsa command displays the update history of LSAs within the last 24 hours.

Precautions

  • If you run the reset ospf command to restart the OSPF process, the real-time and historical statistics on the process will be cleared.
  • The display ospf statistics updated-lsa command is used only to display the frequent updates of LSAs. The updated LSAs are compared with the LSAs in the local LSDB, and those with the age greater than 900 will not be displayed except those with the age of 3600.

Example

# Display the LSA updates within the last one hour.

<HUAWEI> display ospf statistics updated-lsa
          OSPF Process 1 with Router ID 10.1.1.1
               Statistics of Received LSAs

 Begin time: 11:37:32/2011/04/25

 AdvRouter           Total        Updated at
 10.1.1.1            18           11:37:40/2011/04/25
 10.2.2.2            5            11:37:40/2011/04/25
 10.3.3.3            5            11:37:41/2011/04/25
 10.4.4.4            5            11:37:41/2011/04/25
 10.5.5.5            2            11:37:40/2011/04/25
 10.6.6.6            3            11:37:40/2011/04/25
 10.7.7.7            5            11:37:40/2011/04/25
 10.8.8.8            6            11:37:41/2011/04/25
Table 9-58  Description of the display ospf statistics updated-lsa command output

Item

Description

Begin time

Start time of collecting statistics

AdvRouter

Advertising switch

Total

Total update times of LSAs

Updated at

Latest update time

# Display the LSA updates of the specified advertising switch.

<HUAWEI> display ospf statistics updated-lsa originate-router 10.1.1.1
          OSPF Process 1 with Router ID 10.2.2.2
               Statistics of Received LSAs

 Begin time: 11:37:32/2011/04/25

 AdvRouter      : 10.1.1.1
 Total          : 6                 Updated at      : 11:37:41/2011/04/25
 Router(1)      : 3                 Network(2)      : 2
 Summary-Net(3) : 0                 Summary-Asbr(4) : 0
 External(5)    : 1                 nssa(7)         : 0
 Opaque-link(9) : 0                 Opaque-area(10) : 0
 Opaque-AS(11)  : 0 
Table 9-59  Description of the display ospf statistics updated-lsa originate-router command output

Item

Description

Router(1)

Update times of Router LSAs

Network(2)

Update times of Network LSAs

Summary-Net(3)

Update times of Network Summary LSAs

Summary-Asbr(4)

Update times of ASBR Summary LSAs

External(5)

Update times of AS External LSAs

nssa(7)

Update times of Type7 LSAs

Opaque-link(9)

Update times of Type9 LSAs

Opaque-area(10)

Update times of Type10 LSAs

Opaque-AS(11)

Update times of Type11 LSAs

# Display the update history of LSAs.

<HUAWEI> display ospf statistics updated-lsa history
          OSPF Process 1 with Router ID 10.1.1.1
          History Information for Received LSAs

 Record  1:
 Begin time: 11:39:32/2011/04/25
 End   time: 11:41:32/2011/04/25

 no Record

 Record  2:
 Begin time: 11:37:32/2011/04/25
 End   time: 11:39:32/2011/04/25

 AdvRouter      : 10.1.1.1          Total           : 18
 Router(1)      : 0                 Network(2)      : 0
 Summary-Net(3) : 0                 Summary-Asbr(4) : 18
 External(5)    : 0                 nssa(7)         : 0
 Opaque-link(9) : 0                 Opaque-area(10) : 0
 Opaque-AS(11)  : 0 

 AdvRouter      : 10.2.2.2          Total           : 5
 Router(1)      : 3                 Network(2)      : 2
 Summary-Net(3) : 0                 Summary-Asbr(4) : 0
 External(5)    : 0                 nssa(7)         : 0
 Opaque-link(9) : 0                 Opaque-area(10) : 0
 Opaque-AS(11)  : 0 

 AdvRouter      : 10.3.3.3          Total           : 5
 Router(1)      : 3                 Network(2)      : 2
 Summary-Net(3) : 0                 Summary-Asbr(4) : 0
 External(5)    : 0                 nssa(7)         : 0
 Opaque-link(9) : 0                 Opaque-area(10) : 0
 Opaque-AS(11)  : 0 

 AdvRouter      : 10.4.4.4          Total           : 5
 Router(1)      : 2                 Network(2)      : 2
 Summary-Net(3) : 0                 Summary-Asbr(4) : 0
 External(5)    : 1                 nssa(7)         : 0
 Opaque-link(9) : 0                 Opaque-area(10) : 0
 Opaque-AS(11)  : 0 
Table 9-60  Description of the display ospf statistics updated-lsa history command output

Item

Description

Record

Record number

End time

End time of collecting statistics

display ospf statistics maxage-lsa

Function

The display ospf statistics maxage-lsa command displays information about router LSAs that have reached the maximum aging time.

Format

display ospf [ process-id ] statistics maxage-lsa

Parameters

Parameter Description Value
process-id

Specifies the ID of an OSPF process.

If no process ID is specified, information about all OSPF processes is displayed.

The value is an integer ranging from 1 to 65535.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To check information about router LSAs that have reached the maximum aging time, run the display ospf statistics maxage-lsa command. The command output helps locate the cause of route flapping.

Example

# Display information about router LSAs that have reached the maximum aging time.

<HUAWEI> display ospf statistics maxage-lsa
          OSPF Process 1 with Router ID 1.1.1.1
               Statistics of Received LSAs

         -------------------------------------------

                     Area: 0.0.0.0
LinkState ID                 MaxAge count       Last MaxAge time
     1.1.1.1                            1   2014-03-22  11:12:00
Table 9-61  Description of the display ospf statistics maxage-lsa command output

Item

Description

LinkState ID

Link state ID in the LSA header

MaxAge count

Number of times an LSA reached the maximum aging time

Last MaxAge time

Time when an LSA last reached the maximum aging time

display ospf topology

Function

The display ospf topology command displays information about the topology calculated for OSPF routes.

Format

display ospf [ process-id ] topology [ area area-id ] [ statistics | verbose ]

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process. The value is an integer ranging from 1 to 4294967295.
area area-id Specifies the ID of an OSPF area. The value is an integer ranging from 0 to 4294967295 or in the format of an IPv4 address.
statistics Displays statistics about the topology calculated for OSPF routes. -
verbose Displays detailed information about the topology calculated for OSPF routes. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To view information about the topology calculated for OSPF routes, including the time when route calculation is performed, cause of route calculation, and the number of changed routes, run the display ospf topology command. The command output helps you diagnose the OSPF route flapping.

Example

# Display detailed information about the topology calculated for OSPF routes.

<HUAWEI> display ospf topology
          OSPF Process 1 with Router ID 10.10.10.9
 Bits :
 B - ABR    E - ASBR    V - VIRTUAL    NT - NSSA translator

 OSPF Area 0.0.0.0 topology
 Type  ID            Bits    Metric    Next-Hop        Interface
 Rtr   10.10.10.8    B       1         10.11.11.1      10GE1/0/1
 Rtr   10.10.10.9    E       1         --               
 Net   10.11.11.1    B       1         10.11.11.2      10GE1/0/2
Table 9-62  Description of the display ospf topology command output

Item

Description

Bits

Router type

B - ABR

Area border router

E - ASBR

Autonomous system boundary router

V - VIRTUAL

Virtual link router

NT - NSSA translator

ABR in an NSSA that translates LSAs

Type

LSA type

ID

Route advertiser

Metric

Cost

Next-Hop

Router ID of the next hop

Interface

Interface of the next hop

display ospf troubleshooting

Function

The display ospf troubleshooting command displays information about OSPF neighbor disconnections.

Format

display ospf troubleshooting

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To check information about OSPF neighbor disconnections, run the display ospf troubleshooting command. A maximum of five OSPF neighbor disconnections can be displayed in the command output.

Example

# Display diagnostic information about OSPF neighbor disconnections.

<HUAWEI> display ospf troubleshooting
Total counts: 2
--------------------------------------------------------------------------------
Sequence   Time                      Event Description                          
--------------------------------------------------------------------------------
 1         2015-11-25 09:28:18       The OSPF 1 peer 1.1.1.1 went Down because o
                                     f mismatched Hello timers. Please check the
                                      OSPF Hello timer configuration.(Interface 
                                     = 10GE1/0/1, PingResult = 5 packets suc
                                     cess, 0 packets timeout)
 2         2015-11-25 09:27:42       The OSPF 1 peer 1.1.1.1 went Down because 1
                                     -way Hello packets were received. Please ch
                                     eck the status of neighbor interface.(Inter
                                     face = 10GE1/0/1)
--------------------------------------------------------------------------------
Table 9-63  Description of the display ospf troubleshooting command output

Item

Description

Total counts

The count of OSPF neighbor disconnections

Sequence

Sequence number

Time

Time when the OSPF neighbor disconnection occurred

Event Description

Description of the OSPF neighbor disconnection event

display snmp-agent trap feature-name ospf all

Function

The display snmp-agent trap feature-name ospf all command displays all trap messages of the OSPF module.

Format

display snmp-agent trap feature-name ospf all

Parameters

None

Views

All views

Default Level

3: Management level

Usage Guidelines

None.

Example

# Display all trap messages of the OSPF module.

<HUAWEI> display snmp-agent trap feature-name ospf all
------------------------------------------------------------------------------                                  
                    
Feature name: OSPF                                                                                                         

Trap number : 36                                                                        
------------------------------------------------------------------------------                                            
Trap name                      Default switch status   Current switch status                                               
hwOspfv2GreaterAgeLsaRecived   off                     off
hwOspfv2ImportAseRouteExceed   off                     off
hwOspfv2ImportAseRouteExceedClear                                                             
                               off                     off
hwOspfv2ImportAseRouteThreshold                                                               
                               off                     off                                                          
hwOspfv2ImportAseRouteThresholdClear                                                         
                               off                     off
hwOspfv2ImportNssaRouteExceed  off                     off
hwOspfv2ImportNssaRouteExceedClear                                                           
                               off                     off
hwOspfv2ImportNssaRouteThreshold                                                             
                               off                     off
hwOspfv2ImportNssaRouteThresholdClear                                                        
                               off                     off
hwOspfv2IntraAreaDRIpAddressConflict                                                                                      
                               on                      on                                                                 
hwOspfv2IntraAreaRouterIdConflictRecovered                                                                               
                               on                      on                                                                 
hwOspfv2IntraAreaRouteridConflict                                                                                         
                               on                      on                                                                  
hwOspfv2LsdbApproachingOverflow                                                               
                               off                     off
hwOspfv2LsdbApproachingOverflowClear                                                         
                               off                     off
hwOspfv2LsdbOverflow           off                     off
hwOspfv2LsdbOverflowClear      off                     off
hwOspfv2PeerFlappingSuppressStatusChange                                                                                  
                               off                     off                                                                
ospfIfAuthFailure              off                     off                                                                
ospfIfConfigError              off                     off                                                                
ospfIfRxBadPacket              off                     off                                                                
ospfIfStateChange              off                     off                                                                
ospfLsdbApproachingOverflow    off                     off
ospfLsdbOverflow               off                     off
ospfMaxAgeLsa                  off                     off                                                                
ospfNbrRestartHelperStatusChange                                                                                          
                               off                     off                                                                 
ospfNbrStateChange             off                     off                                                                
ospfNssaTranslatorStatusChange off                     off                                                                
ospfOriginateLsa               off                     off                                                                
ospfTxRetransmit               off                     off                                                                
ospfVirtIfAuthFailure          off                     off                                                                
ospfVirtIfConfigError          off                     off                                                                
ospfVirtIfRxBadPacket          off                     off                                                                 
ospfVirtIfStateChange          off                     off                                                                 
ospfVirtIfTxRetransmit         off                     off                                                                
ospfVirtNbrRestartHelperStatusChange                                                                                      
                               off                     off                                                                
ospfVirtNbrStateChange         off                     off                                                                
          
Table 9-65  Description of the display snmp-agent trap feature-name ospf all command output

Item

Description

Feature name

Name of the feature

Trap number

Number of traps

Trap name

Name of the trap:
  • hwospfv2greateragelsarecived: It is sent when the aging time of a received LSA is greater than 1800s.
  • hwospfv2importaserouteexceed: It is sent when the number of ASE LSAs generated when an OSPF process imported external routes reached or exceeded the maximum number allowed.
  • hwospfv2importaserouteexceedclear: It is sent when the number of ASE LSAs generated when an OSPF process imported external routes fell below 90% of the maximum number allowed.
  • hwospfv2importaseroutethreshold: It is sent when the number of ASE LSAs generated when an OSPF process imported external routes exceeded the upper alarm threshold (in percentage) multiplied by the maximum number allowed.
  • hwospfv2importaseroutethresholdclear: It is sent when the number of ASE LSAs generated when an OSPF process imported external routes fell to or below the lower alarm threshold (in percentage) multiplied by the maximum number allowed.
  • hwospfv2importnssarouteexceed: It is sent when the number of NSSA LSAs generated when an OSPF process imported external routes reached or exceeded the maximum number allowed.
  • hwospfv2importnssarouteexceedclear: It is sent when the number of NSSA LSAs generated when an OSPF process imported external routes fell below 90% of the maximum number allowed.
  • hwospfv2importnssaroutethreshold: It is sent when the number of NSSA LSAs generated when an OSPF process imported external routes exceeded the upper alarm threshold (in percentage) multiplied by the maximum number allowed.
  • hwospfv2importnssaroutethresholdclear: It is sent when the number of NSSA LSAs generated when an OSPF process imported external routes fell to or below the lower alarm threshold (in percentage) multiplied by the maximum number allowed.
  • hwOspfv2IntraAreaDRIpAddressConflict: It is sent when ip addresses of DRs in an intra area conflict.
  • hwOspfv2IntraAreaRouterIdConflictRecovered: indicates the system automatically changed the router ID after detecting a router ID conflict in an OSPF area.
  • hwOspfv2IntraAreaRouteridConflict: It is sent when router ID conflict was detected in an intra area.
  • hwospfv2lsdbapproachingoverflow: It is sent the number of external routes in the OSPF LSDB reached or exceeded 90% of the maximum number.
  • hwospfv2lsdbapproachingoverflowclear: It is sent the number of external routes in the OSPF LSDB fell below 90% of the maximum number allowed.
  • hwospfv2lsdboverflow: It is sent the number of external routes in the OSPF LSDB exceeded the maximum number allowed.
  • hwospfv2lsdboverflowclear: It is sent the number of external routes in the OSPF LSDB fell to the normal range.
  • hwOspfv2PeerFlappingSuppressStatusChange: It is sent when the status of OSPF neighbor relationship flapping suppression changed.
  • ospfIfAuthFailure: It is sent when interface authentication fails.
  • ospfIfConfigError: It is sent when the interface configuration is incorrect.
  • ospfIfRxBadPacket: It is sent when a bad packet is received on the interface.
  • ospfIfStateChange: It is sent when the interface status changes.
  • ospflsdbapproachingoverflow: It is sent the number of external routes in the OSPF LSDB exceeded the maximum number allowed.
  • ospflsdboverflow : It is sent the number of external routes in the OSPF LSDB reached or exceeded 90% of the maximum number.
  • ospfMaxAgeLsa: It is sent when Max Age LSAs are generated.
  • ospfNbrRestartHelperStatusChange: It is sent when the GR Helper status changes.
  • ospfNbrStateChange: It is sent when the neighbor status changes.
  • ospfNssaTranslatorStatusChange: It is sent when the status of the NSSA device that translates Type 7 LSAs into Type 5 LSAs changes.
  • ospfOriginateLsa: It is sent when local LSAs are generated.
  • ospfTxRetransmit: It is sent when packets are retransmitted.
  • ospfVirtifAuthFailure: indicates that the virtual interface authentication fails.
  • ospfVirtifConfigError: indicates that the virtual interface configuration is incorrect.
  • ospfVirtifRxBadPacket: indicates that the virtual interfaces receives an invalid packet.
  • ospfVirtifStateChange: indicates that the virtual interface status changes.
  • ospfVirtifTxRetransmit: indicates that packets are retransmitted on the virtual interface.
  • ospfVirtNbrRestartHelperStatusChange: indicates that the GR Helper status changes.
  • ospfVirtNbrStateChange: indicates that the virtual neighbor status changes.

Default switch status

Status of the default trap switch:
  • on: indicates that the trap function is enabled.
  • off: indicates that the trap function is disabled.

Current switch status

Status of the current trap switch:
  • on: indicates that the trap function is enabled.
  • off: indicates that the trap function is disabled.

dn-bit-set

Function

The dn-bit-set disable command disables OSPF from setting the DN bit in LSAs.

The undo dn-bit-set disable command enables OSPF to set the DN bit in LSAs.

By default, OSPF is enabled to set the DN bit in LSAs.

Format

dn-bit-set disable { summary | ase | nssa }

undo dn-bit-set disable { summary | ase | nssa }

Parameters

Parameter Description Value
summary Specifies that the DN bit is not set in summary LSAs. -
ase Specifies that the DN bit is not set in ASE LSAs. -
nssa Specifies that the DN bit is not set in NSSA LSAs. -

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The dn-bit-set disable command can be used in the following scenarios:

  • In the VPN option A scenario, the local PE imports BGP routes to generate LASs and advertise the generated LASs to the peer PE. According to RFC 4577, setting of the DN bit is restricted. The peer PE may fail to calculate a route. In this situation, the dn-bit-set disable command can be used to set the DN bit on or remove the setting of the DN bit from the local PE.
  • When a PE is connected to an MCE, the MCE needs to calculate routes advertised by the PE. By default, the MCE does not check the DN bit. In this situation, the dn-bit-set disable command can be used to set the DN bit on or remove the setting of the DN bit from the local PE.
NOTE:
To prevent routing loops, the OSPF multi-instance process uses a bit as a flag. The bit is called DN bit.

Configuration Impact

When the dn-bit-set disable command is used to disable OSPF from setting the DN bit in LSAs, routing loops may occur. If the parameter ase or nssa is specified, the DN bit in ASE LSAs or NSSA LSAs is not set. You can use the route-tag command to set the same tag value to prevent routing loops. Therefore, it is recommended that the dn-bit-set disable command be used in only the scenarios specified in Usage Scenario.

If the dn-bit-set disable ase command is configured, the DN bit is not set in type 5 LSAs that are converted from type 7 LSAs even if the DN bit is set in type 7 LSAs.

Precautions

The dn-bit-set disable command can be configured for only private OSPF processes. The configuration of this command takes effect only on the PEs.

The dn-bit-check disable command can be used to control whether OSPF running on the peer PE checks the DN bit when calculating routes.

Example

# Disable OSPF from setting the DN bit in ASE LSAs.

<HUAWEI> system-view 
[~HUAWEI] ip vpn-instance huawei
[*HUAWEI-vpn-instance-huawei] route-distinguisher 100:1
[*HUAWEI-vpn-instance-huawei-af-ipv4] quit
[*HUAWEI-vpn-instance-huawei] quit
[*HUAWEI] ospf 100 vpn-instance huawei
[*HUAWEI-ospf-100] dn-bit-set disable ase

dn-bit-check

Function

The dn-bit-check disable command disables OSPF from checking the DN bit in LSAs.

The undo dn-bit-check disable command enables OSPF to check the DN bit in LSAs.

By default, OSPF is enabled to check the DN bit in LSAs.

Format

dn-bit-check disable { summary [ router-id router-id ] | ase | nssa }

undo dn-bit-check disable { summary [ router-id router-id ] | ase | nssa }

Parameters

Parameter Description Value
summary Specifies that the DN bit in summary LSAs is not checked. -
router-id router-id Specifies the ID of a device on which the DN bit in summary LSAs is checked. -
ase Specifies that the DN bit in ASE LSAs is not checked. -
nssa Specifies that the DN bit in NSSA LSAs is not checked. -

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In the VPN option A scenario, the local PE imports BGP routes to generate LSAs and advertise the generated LSAs to the peer PE. According to RFC 4577, setting of the DN bit is restricted. The peer PE may fail to calculate a route. In this situation, you need to use the dn-bit-check disable command to disable OSPF from checking the DN bit in LSAs.

NOTE:
To prevent routing loops, the OSPF multi-instance process uses a bit as a flag. The bit is called DN bit.

Configuration Impact

When the dn-bit-check disable command is run, routing loops may occur. If the parameter ase or nssa is specified, the DN bit in ASE LSAs or NSSA LSAs is not checked. You can use the route-tag command to set the same tag value to prevent routing loops. Therefore, run the dn-bit-check disable command only in the scenario specified in Usage Scenario.

Precautions

When a PE is connected to an MCE, the MCE does not check the DN bit by default.

The dn-bit-check disable command can be configured only for private OSPF processes. The configuration of this command takes effect only on the PEs.

In this scenario, you can run the dn-bit-set disable command to set the DN bit on or remove the setting of the DN bit from the local PE.

Example

# Disable OSPF from checking the DN bit in summary LSAs.

<HUAWEI> system-view
[~HUAWEI] ip vpn-instance huawei
[*HUAWEI-vpn-instance-huawei] route-distinguisher 100:1
[*HUAWEI-vpn-instance-huawei-af-ipv4] quit
[*HUAWEI-vpn-instance-huawei] quit
[*HUAWEI] ospf 100 vpn-instance huawei
[*HUAWEI-ospf-100] dn-bit-check disable summary router-id 10.1.1.1
Related Topics

domain-id (OSPF)

Function

The domain-id command sets the ID for an OSPF domain.

The undo domain-id command restores the default setting.

By default, the domain ID is null.

Format

domain-id { null | domain-id [ type type value value | secondary ] * }

undo domain-id [ domain-id [ type type value value ] ]

Parameters

Parameter Description Value
domain-id Specifies the ID of an OSPF domain.

The domain ID can be an integer or in dotted decimal notation.

  • If it is an integer, the value ranges from 0 to 4294967295, and it is converted to dotted decimal notation when the ID is displayed.
  • If it is in dotted decimal notation, it is displayed as entered.
null Indicates that the OSPF domain ID is null. -
type type Specifies the type of the OSPF domain ID. It can be 0005, 0105, 0205, or 8005. By default, it is 0005.
value value Specifies the value of the type of the OSPF domain ID. The value is a hexadecimal number that ranges from 0x0 to 0xffff, and the default value is 0x0.
secondary Indicates the ID of a secondary domain. The maximum number of domain-id secondary in each OSPF process is 1000.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Domain IDs are used to identify domains.

If the local OSPF area and an OSPF area of a remote VPN attempt to exchange Type 3 LSAs, the two areas must be in the same OSPF domain. You can run the domain-id command to configure the same domain ID for the two OSPF areas.

The routes that are imported from a PE switch are advertised using External-LSAs. The routes destined for different nodes in the same OSPF domain are advertised based on Type 3 LSAs. This requires that the nodes in the same OSPF domain be configured with the same domain ID.

If the undo domain-id command without any parameter is executed, the primary domain ID will be deleted.

Configuration Impact

Before sending routes to a remote CE switch, a PE switch sends Type 3 LSAs or Type 5 LSAs to the CE based on domain ID. If local domain IDs are the same as or compatible with remote domain IDs in BGP routes, the PE advertises Type 3 routes. If local domain IDs are different from or incompatible with remote domain IDs in BGP routes, the PE advertises Type 5 routes.

Precautions

  • Each OSPF domain has one or multiple domain IDs. One of them is a primary ID and the others are secondary IDs.
  • If an OSPF instance does not have a specific domain ID, its ID is considered as null.
  • If the value of the domain ID is 0, secondary cannot be configured.
  • The maximum number of domain-id secondary items configured in an OSPF process is 1000.
  • The domain-id command is forbidden in public network.

Example

# Set the OSPF domain ID.

<HUAWEI> system-view
[~HUAWEI] ospf 1
[*HUAWEI-ospf-1] domain-id 234

eca-route-type compatible

Function

The eca-route-type compatible command sets the route type of the extended community attribute of OSPF VPN to 0x8000.

The undo eca-route-type compatible command restores the route type of the extended community attribute of OSPF VPN to 0x0306.

By default, the route type of the extended community attribute of OSPF VPN is 0x0306.

Format

eca-route-type compatible

undo eca-route-type compatible

Parameters

None

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The eca-route-type compatible command is used in OSPF VPN scenarios.

  • For the switch supporting RFC 4577, you can set the route type of the extended community attribute of OSPF VPN to 0x0306 and configure the switch to identify both 0x0306 and 0x8000 route types.
  • For the switch that does not support RFC 4577, you can set the route type of the extended community attribute of OSPF VPN to 0x8000 and configure the switch to identify only the 0x8000 route type.

By running the eca-route-type compatible command enables different switchs to communicate with each other and avoid the failure in parsing the route type because the route type of the extended community attribute of OSPF VPN is unrecognized.

Precautions

The eca-route-type compatible command is forbidden in public network.

Example

# Set the route type of the extended community attribute of OSPF VPN to 0x8000.

<HUAWEI> system-view
[~HUAWEI] ip vpn-instance huawei
[*HUAWEI-vpn-instance-huawei] route-distinguisher 100:1
[*HUAWEI-vpn-instance-huawei-af-ipv4] quit
[*HUAWEI-vpn-instance-huawei] quit
[*HUAWEI] ospf 1 vpn-instance huawei
[*HUAWEI-ospf-1] eca-route-type compatible

filter export (OSPF Area)

Function

The filter export command filters the outgoing Type3 LSAs of the local area.

The undo filter export command restores the default setting.

By default, the outgoing Type3 LSAs of the local area cannot be filtered.

Format

filter { acl-number | acl-name acl-name | ip-prefix ip-prefix-name | route-policy route-policy-name } export

undo filter [ acl-number | acl-name acl-name | ip-prefix ip-prefix-name | route-policy route-policy-name ] export

Parameters

Parameter Description Value
acl-number Specifies the number of a basic ACL. The value is an integer ranging from 2000 to 2999.
acl-name acl-name Specifies the name of a named basic ACL. The value is a string of 1 to 32 case-sensitive characters except spaces. The value must start with a letter (case-sensitive).
ip-prefix ip-prefix-name Specifies the name of an IP prefix list. The name is a string of 1 to 169 case-sensitive characters except spaces. When double quotation marks are used to include the string, spaces are allowed in the string.
route-policy route-policy-name Specifies the name of a routing policy. The name is a string of 1 to 200 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

Views

OSPF area view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The command can be used to filter out invalid LSAs sent to neighbors to reduce the size of the LSDB and speed up network convergence.

Configuration Impact

After filtering conditions are set for the outgoing summary LSAs to be advertised using the filter export command, only the outgoing Type3 LSAs that pass the filtering can be advertised.

Precautions

  • The command can be configured only on an ABR.
  • Run the filter import command to set filtering conditions for the incoming Type3 LSAs to be advertised.

Example

# Configure OSPF to filter outgoing Type 3 LSAs.

<HUAWEI> system-view
[~HUAWEI] ospf 1
[*HUAWEI-ospf-1] area 1
[*HUAWEI-ospf-1-area-0.0.0.1] filter 2000 export

filter import (OSPF Area)

Function

The filter import command filters the incoming Type3 LSAs of the local area.

The undo filter import command restores the default setting.

By default, the incoming Type3 LSAs cannot be filtered.

Format

filter { acl-number | acl-name acl-name | ip-prefix ip-prefix-name | route-policy route-policy-name } import [ include-abr-summary ]

undo filter [ acl-number | acl-name acl-name | ip-prefix ip-prefix-name | route-policy route-policy-name ] import

Parameters

Parameter Description Value
acl-number Specifies the number of a basic ACL. The value is an integer ranging from 2000 to 2999.
acl-name acl-name Specifies the name of a named basic ACL. The value is a string of 1 to 32 case-sensitive characters except spaces. The value must start with a letter (case-sensitive).
ip-prefix ip-prefix-name Specifies the name of an IP prefix list. The name is a string of 1 to 169 case-sensitive characters except spaces. When double quotation marks are used to include the string, spaces are allowed in the string.
route-policy route-policy-name Specifies the name of a route-policy. The name is a string of 1 to 200 case-sensitive characters except spaces. When double quotation marks are used to include the string, spaces are allowed in the string.
include-abr-summary Specifies a routing policy for the summarized route on the ABR. -

Views

OSPF area view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After filtering conditions are set for the incoming summary LSAs to be advertised using the filter import command, only the incoming Type3 LSAs that pass the filtering can be received.

Configuration Impact

The command can be used to filter out invalid LSAs sent to neighbors to reduce the size of the LSDB and speed up network convergence.

Precautions

  • The command can be configured only on an ABR.
  • Run the filter export command to set filtering conditions for the outgoing Type3 LSAs to be advertised.

Example

# Configure an ABR to filter incoming Type 3 LSAs of the area where the ABR resides.

<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] area 1
[*HUAWEI-ospf-100-area-0.0.0.1] filter ip-prefix my-prefix-list import

filter-lsa-out peer

Function

The filter-lsa-out peer command configures a switch to filter the LSAs that are sent by the specified neighbors on a P2MP network.

The undo filter-lsa-out peer command cancels the configuration.

By default, the LSAs that are sent by the specified neighbor on a P2MP network are not filtered.

Format

filter-lsa-out peer ip-address { all | { summary [ acl { acl-number | acl-name } ] | ase [ acl { acl-number | acl-name } ] | nssa [ acl { acl-number | acl-name } ] } * }

undo filter-lsa-out peer ip-address

Parameters

Parameter Description Value
ip-address

Specifies the IP address of a P2MP neighbor. This parameter is configured by the neighbor using the ip address command.

The value is in dotted decimal notation.
all Filters all the outgoing LSAs except Grace LSAs. -
summary Filters the outgoing network summary LSAs (Type 3). -
acl acl-number Specifies the number of a basic ACL. The value is an integer that ranges from 2000 to 2999.
acl acl-name Specifies the name of a named ACL. The value is a string of 1 to 32 case-sensitive characters except spaces. The value must start with a letter (case-sensitive).
ase Filters the outgoing AS external LSAs (Type 5). -
nssa Filters the outgoing NSSA LSAs (Type 7). -

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a P2MP network, when multiple P2MP links exist between two devices, you can configure the local device to filter the outgoing LSAs on the specified link. This can reduce unnecessary LSA retransmission attempts and save bandwidth resources.

For a named ACL, when the rule command is used to configure filtering rules, only the source address range that is specified by the source parameter and the period of time that is specified by the time-range parameter take effect.

Prerequisites

OSPF does not regard a network as a P2MP network by default regardless of any link layer protocol. A P2MP network is forcibly changed from the network of another type. The network type has been changed to the P2MP by using the ospf network-type p2mp command.

Configuration Impact

This command is valid for all the interfaces of the OSPF process.

Follow-up Procedure

Configure a device to filter the outgoing LSAs on the specified OSPF interface by using the ospf filter-lsa-out command.

Example

# On a P2MP network, configure a switch to filter all the LSAs (except Grace LSAs) sent to neighbor 10.1.1.1.

<HUAWEI> system-view
[~HUAWEI] ospf 1
[*HUAWEI-ospf-1] filter-lsa-out peer 10.1.1.1 all
Related Topics

filter-policy export (OSPF)

Function

The filter-policy export command filters the imported routes when these routes are advertised based on a filtering policy.

The undo filter-policy export command restores the default setting.

By default, the imported routes to be advertised cannot be filtered.

Format

filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-name } export [ protocol [ process-id ] ]

undo filter-policy [ acl-number | acl-name acl-name | ip-prefix ip-prefix-name ] export [ protocol [ process-id ] ]

Parameters

Parameter Description Value
acl-number Specifies the number of a basic ACL. The value is an integer that ranges from 2000 to 2999.
acl-name acl-name Specifies the name of a named ACL. The value is a string of 1 to 32 case-sensitive characters except spaces. The value must start with a letter (case-sensitive).
ip-prefix ip-prefix-name Specifies the name of an IP prefix list. The name is a string of 1 to 169 case-sensitive characters except spaces. When double quotation marks are used to include the string, spaces are allowed in the string.
protocol process-id Filters imported routes of a specified protocol. The value can be direct, rip, isis, bgp, ospf, or static. When the routing protocol is RIP, IS-IS, or OSPF, you can specify a process ID. The value is an integer that ranges from 1 to 4294967295. The default value is 1.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After OSPF imports external routes using the import-route command, you can use the filter-policy export command to filter the imported routes to be advertised. Only the external routes that pass the filtering can be converted into AS-external LSAs and advertised.

The protocol or process-id parameter can be specified to determine a specified protocol or process. If the protocol or process-id parameter is not specified, OSPF filters all imported routes.

Precautions

  • This command can be configured only on the ASBR because AS-external-LSAs are generated by an ABSR.

Example

# Filter the routes that are imported from RIP and advertised by OSPF based on a filtering policy.

<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] import-route rip
[*HUAWEI-ospf-100] filter-policy 2000 export
Related Topics

filter-policy import (OSPF)

Function

The filter-policy import command configures a filtering policy to filter routes received by OSPF.

The undo filter-policy import command restores the default setting.

By default, OSPF does not filter routes.

Format

filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-name | route-policy route-policy-name [ secondary ] } import

undo filter-policy [ acl-number | acl-name acl-name | ip-prefix ip-prefix-name | route-policy route-policy-name [ secondary ] ] import

Parameters

Parameter Description Value
acl-number Specifies the basic ACL number. The value is an integer ranging from 2000 to 2999.
acl-name acl-name Specifies the name of a Named ACL. The value is a string of 1 to 32 case-sensitive characters except spaces. The value must start with a letter (case-sensitive).
ip-prefix ip-prefix-name Specifies the name of the address prefix list. The name is a string of 1 to 169 case-sensitive characters except spaces. When double quotation marks are used to include the string, spaces are allowed in the string.
route-policy route-policy-name Specifies the name of the route policy. The name is a string of 1 to 200 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
secondary Selecte secondary route. -

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The filter-policy import command is used to set a filtering policy for received routes. Only the routes that pass the filtering can be added to the routing table. The routes that fails to pass the filtering cannot be added to the routing table but can be advertised.

The OSPF routing information is recorded in the LSDB. Instead of filtering the received or sent LSAs, the device filters routes calculated by OSPF using the filter-policy import command.

Precautions

For a named ACL configured using the acl (system view) command, when the rule (ACL view) command is used to configure a filtering rule, the filtering rule takes effective only when the source address range is specified by the source parameter and the time period is specified by the time-range parameter.

Example

# Configure OSPF to filter the received routes.

<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] filter-policy 2000 import

frr (OSPF)

Function

The frr command creates an OSPF FRR view and displays the OSPF FRR view.

The undo frr command enables the system to exit from an OSPF FRR view and deletes the OSPF FRR view.

By default, no OSPF FRR view is created.

Format

frr

undo frr

Parameters

None

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The frr command is used to enter the OSPF FRR view. OSPF FRR functions need to be configured in the OSPF FRR view.

Prerequisites

The OSPF function has been enabled using the ospf command.

Configuration Impact

The frr command is only used to enter the OSPF FRR view but not to enable FRR. To enable FRR, you need to run this command and other commands in the OSPF FRR view.

Follow-up Procedure

You can run the loop-free-alternate command to implement basic FRR functions. In this manner, the device can create the loop-free backup link.

Example

# Enter the OSPF FRR view.

<HUAWEI> system-view
[~HUAWEI] ospf 1
[*HUAWEI-ospf-1] frr
[*HUAWEI-ospf-1-frr] 

frr-policy route (OSPF FRR)

Function

The frr-policy route command configures a filtering policy for the OSPF IP FRR backup routes. The filtering policy determines what kind of OSPF backup route can be added to the routing table.

The undo frr-policy route command cancels the filtering function.

By default, the filtering function is disabled.

Format

frr-policy route route-policy route-policy-name

undo frr-policy route

Parameters

Parameter Description Value
route-policy route-policy-name

Specifies the name of the policy used to filter OSPF backup routes.

The name is a string of 1 to 200 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

Views

OSPF FRR view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

OSPF IP FRR allows devices to fast switch traffic on fault links to backup links without interrupting traffic. This protects traffic and greatly improves the reliability of OSPF networks.

After the filtering policy is configured using the frr-policy route command, only the OSPF backup route that satisfies filtering rules can be delivered to the forwarding table.

To protect the traffic over a specific OSPF route, you can configure a filtering policy route-policy-name that the OSPF route matches to ensure that the backup route can be added to the forwarding table. When this route fails, OSPF can fast switch the traffic to a backup route.

Prerequisites

Before using the frr-policy route command, the OSPF IP FRR view has been entered by using the frr command, and the function of OSPF IP FRR has been enabled by using the loop-free-alternate command.

Precautions

The frr-policy route command is cyclic in nature, and only the latest configuration takes effect.

Example

# Configure OSPF to add the OSPF backup routes that match the named ACL abc to the IP routing table.

<HUAWEI> system-view
[~HUAWEI] ospf
[*HUAWEI-ospf-1] frr
[*HUAWEI-ospf-1-frr] loop-free-alternate
[*HUAWEI-ospf-1-frr] frr-policy route route-policy abc

graceful-restart (OSPF)

Function

The graceful-restart command configures a device as a GR helper.

The undo graceful-restart command cancels the configuration.

By default, the device does not function as a GR helper.

Format

graceful-restart [ helper-role { { { { ip-prefix ip-prefix-name | acl-number acl-number | acl-name acl-name } | ignore-external-lsa | planned-only } * } | never } ]

undo graceful-restart [ helper-role [ { { ip-prefix [ ip-prefix-name ] | acl-number [ acl-number ] | acl-name [ acl-name ] } | ignore-external-lsa | planned-only } * ] ]

undo graceful-restart helper-role never

Parameters

Parameter Description Value
ip-prefix ip-prefix-name Specifies the name of an IP prefix list. The name is a string of 1 to 169 case-sensitive characters except spaces. When double quotation marks are used to include the string, spaces are allowed in the string.
acl-number acl-number Specifies the basic ACL number. The value is an integer ranging from 2000 to 2999.
acl-name acl-name Specifies the name of a named basic ACL. The value is a string of 1 to 32 case-sensitive characters, spaces not supported. The name must start with a letter or digit, and cannot contain only digits.
ignore-external-lsa Prevents the device from checking Type 5 and Type 7 LSAs. -
planned-only Indicates that the device supports only planned GR. By default, the device supports both planned GR and unplanned GR.
never Indicates that the router does not support the Helper mode. -

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After an OSPF process is restarted through GR, the restarter and the helper reestablish the neighbor relationship, exchange routing information, synchronize LSDBs, and update routing tables and FIBs to ensure network stability.

Example

# Configure a device as an OSPF GR helper and configure the helper to support only planned GR.

<HUAWEI> system-view
[~HUAWEI] ospf 1
[*HUAWEI-ospf-1] graceful-restart helper-role planned-only

gtsm default-action

Function

Using the gtsm default-action command, you can set the default action to be taken on the packets that do not match the GTSM policies.

By default, the packets that do not match the GTSM policies can pass the filtering.

Format

gtsm default-action { drop | pass }

Parameters

Parameter Description Value
drop Indicates that the packets that do not match the GTSM policies cannot pass the filtering and are dropped. -
pass Indicates that the packets that do not match the GTSM policies can pass the filtering. -

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The GTSM checks the validity of the TTL value of the IP packets that match the GTSM policies. For the packets that do not match the policies, GTSM takes the default action, that is, sending the packets to the MPU or dropping them.

Precautions

For the BGP GTSM or BGP4+ GTSM, if "drop" is set as the default GTSM action for packets, you need to configure TTL values for all the packets sent from valid peers in the GTSM policy. If TTL values are not configured for the packets sent from a peer, the device will discard the packets sent from the peer and cannot establish a connection to the peer. Therefore, GTSM enhances security but reduces the ease of use.

You can enable the log function to record packet drop for troubleshooting.

If only the private network policy or the public network policy is configured, it is recommended that you set the default action to be taken on the packets that do not match the GTSM policy to pass. This prevents the packets of other instances from being dropped by mistake.

Example

# Set the default action to be taken on the packets that do not match the GTSM policies to Drop.

<HUAWEI> system-view
[~HUAWEI] gtsm default-action drop
Related Topics

hostname (OSPF)

Function

The hostname command enables the OSPF dynamic hostname function.

The undo hostname command disables the OSPF dynamic hostname function.

By default, the OSPF dynamic hostname function is disabled.

Format

hostname [ hostname ]

undo hostname

Parameters

Parameter Description Value
hostname Specifies the OSPF hostname. The value is a string of 1 to 255 characters.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Application Scenario

To facilitate network management, configure dynamic hostnames to identify routers. After you run the hostname command to configure a dynamic hostname for a router, the router generates a router information (RI) Opaque LSA, from which you can check the mapping between the router ID and the dynamic hostname.

RI Opaque LSAs are generated based on the following rules:

  • The rules based on which RI Opaque LSAs are generated on ASBRs are as follows:
    • ASBRs that are connected to NSSA or Stub areas generate and flood Type 10 RI Opaque LSAs (Type 10 RI LSAs).
    • ASBRs that are not connected to NSSA or Stub areas generate and flood AS RI LSAs (Type 11 RI LSAs).
    • ASBRs that are connected to NSSA or Stub areas only does not generate RI Opaque LSAs within the AS.
  • ABRs and internal area routers flood RI Opaque LSAs to its connected areas.

After a router receives a RI Opaque LSA, you can run the display ospf hostname-table command on the router to check the mapping between the router ID and the dynamic hostname.

Prerequisites

The Opaque LSA capability has been enabled using the opaque-capability enable command.

Precautions

If you specify hostname in this command, hostname is advertised as the dynamic hostname. If no hostname is specified in this command, the hostname specified in the sysname command is advertised as the dynamic hostname.

Example

# Configure OSPF hostname BLR and enable the OSPF dynamic hostname function.

<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] opaque-capability enable
[*HUAWEI-ospf-100] hostname BLR

import-route (OSPF)

Function

The import-route command imports routes learned by other protocols.

The undo import-route command cancels the configuration.

By default, routes learned by other protocols are not imported.

Format

import-route { bgp [ permit-ibgp ] | direct | rip [ process-id-rip ] | static | unr | isis [ process-id-isis ] | ospf [ process-id-ospf ] } [ cost cost | route-policy route-policy-name | tag tag | type type ] *

undo import-route { bgp | direct | rip [ process-id-rip ] | static | isis [ process-id-isis ] | ospf [ process-id-ospf ] }

Parameters

Parameter Description Value
bgp Specifies the BGP protocol whose routes are imported.
NOTE:

The parameter can only import EBGP routes but not IBGP routes.

-
permit-ibgp IBGP routes that are permitted to be imported. The import of IBGP routes may cause route loops. Therefore, this command must not be configured unless it is necessary. -
direct Specifies the direct protocol whose routes are imported. -
rip Specifies the RIP protocol whose routes are imported. -
process-id-rip Specifies the process ID of the protocol whose routes are imported. The value is an integer ranging from 1 to 4294967295. The default value is 1.
static Specifies the static protocol whose routes are imported. -
unr Imports UNR routes. -
isis Specifies the IS-IS protocol whose routes are imported. -
process-id-isis Specifies the process ID of the protocol whose routes are imported. The value is an integer ranging from 1 to 4294967295. The default value is 1.
ospf Specifies the OSPF protocol whose routes are imported. -
process-id-ospf Specifies the process ID of the protocol whose routes are imported. The value is an integer ranging from 1 to 4294967295. The default value is 1.
cost cost Indicates the route cost. The value is an integer ranging from 0 to 16777214. By default, it is 1.
route-policy route-policy-name Imports only the route that meets the requirements of the specified route-policy. The name is a string of 1 to 200 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
tag tag Specifies the tag of the external LSA. The value is an integer ranging from 0 to 4294967295. By default, it is 1.
type type Specifies the type of the external routes.
The value is an integer ranging from 1 to 2. By default, it is 2.
  • 1: Type 1 external route
  • 2: Type 2 external route

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Importing the routes discovered by other routing protocols can enrich OSPF routing information.

OSPF routes are classified into the following types in the descending order of priorities:

  • Intra-area routes: refer to the routes in an area within an autonomous system.

  • Inter-area routes: refer to the routes between different areas of the same AS. Intra-area routes and area external routes are internal routes of an AS.

  • Type 1 external routes: When the cost of external routes equals that of AS internal routes, and can be compared with the cost of OSPF routes, these external routes have a high reliability and can be configured as Type 1 external routes.

  • Type 2 external routes: When the cost of the routes from an ASBR to the destination outside an AS is much greater than the cost of the internal routes to the ASBR, these external routes has a low reliability and can be configured as Type 2 external routes.

On a non-PE device, only EBGP routes are imported after the import-route bgp command is configured. IBGP routes are also imported after the import-route bgp permit-ibgp command is configured. If IBGP routes are imported, routing loops may occur.In this case, run the preference (OSPF) and preference (BGP) commands to prevent loops by specifying preferences of OSPF and BGP routes.If IBGP routes need to be imported, configure the import-route bgp permit-ibgp command, and run the preference (OSPF) and preference (BGP) commands to set the preference of OSPF ASE routes lower than that of IBGP routes (preference value of OSPF ASE routes larger than that of IBGP routes).

On a PE, configuring the import-route bgp command imports both EBGP routes and IBGP routes, no matter whether the import-route bgp permit-ibgp command is configured or not.If the import-route bgp permit-ibgp command and the default-route-advertise (OSPF) command are both configured, the active IBGP default routes can be imported into OSPF.

Prerequisites

You must create a route-policy by running the route-policy command before running the import-route command to import certain external routes by the route-policy.

Procedure

The costs of a Type 1 external route and a Type 2 external route are as follows:

  • The cost of a Type 1 external route equals the cost for the OSPF device to reach an ASBR plus the cost of the route from the ASBR to the destination.
  • The cost of a Type 2 external route equals the cost of the route from an ASBR to the destination.

Configuration Impact

After a route-policy is configured, the OSPF process imports only routes of a network segment that satisfy certain conditions. This prevents devices from receiving routes not required.

Precautions

You can use the default (OSPF) command to configure default parameters for OSPF to import external routes, including the cost, type (Type 1 or Type 2), tag, and number of routes.

NOTE:

The import-route (OSPF) command cannot import the default route of an external protocol. To enable a device to advertise the default route of an external protocol it learns when updating the OSPF routing table to other devices within the area, run the default-route-advertise (OSPF) command.

After the import-route direct command is executed, routes to the network segment where the IP address of the management interface belongs are also imported in the OSPF routing table. Therefore, use this command with caution.

Example

# Import Type 2 RIP routes, with the process 40, the tag being 33 and cost being 50.

<HUAWEI> system-view 
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] import-route rip 40 type 2 tag 33 cost 50

import-route limit (OSPF)

Function

The import-route limit command configures a limit on the number of LSAs generated when an OSPF process imports external routes.

The undo import-route limit command deletes the limit configured on the number of LSAs generated when an OSPF process imports external routes.

By default, the number of LSAs generated when an OSPF process imports external routes is not limited.

Format

import-route limit limit-number [ threshold-alarm { upper-limit upper-limit-value | lower-limit lower-limit-value } * ]

undo import-route limit [ limit-number ] [ threshold-alarm [ upper-limit upper-limit-value | lower-limit lower-limit-value ] * ]

Parameters

Parameter Description Value
limit-number Specifies a limit on the number of LSAs generated when an OSPF process imports external routes. The value is an integer ranging from 1 to 4294967295.
threshold-alarm Indicates an alarm threshold. -
upper-limit upper-limit-value Specifies the upper alarm threshold, in percentage. The value is an integer ranging from 1 to 100. The default value is 80.
lower-limit lower-limit-value Specifies the lower alarm threshold, in percentage. The value is an integer ranging from 1 to 100. The default value is 70.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

If OSPF imports a large number of external routes and advertises them to a device with a smaller routing table capacity, the device may restart unexpectedly. To address this problem, run the import-route limit command to configure a limit on the number of LSAs generated when an OSPF process imports external routes.

Check the overload status based on the value of the Current status field in the display ospf brief command output.
  • Normal: The number of LSAs generated when an OSPF process imports external routes is less than or equal to the lower alarm threshold (in percentage) multiplied by the maximum number allowed.
  • Approach limit: The number of LSAs generated when an OSPF process imports external routes is approaching (reaching or exceeding 90% of) the upper alarm threshold.
  • Exceed limit: The number of LSAs generated when an OSPF process imports external routes has reached or exceeded the maximum number allowed.

Ensure that upper-limit-value is greater than or equal to lower-limit-value.

The system generates alarms based on the following rules:

  • The system generates the OSPF_1.3.6.1.4.1.2011.5.25.155.31.7 hwOspfv2ImportAseRouteThreshold alarm if the number of ASE LSAs generated when an OSPF process imports external routes exceeds the upper alarm threshold (in percentage) multiplied by the maximum number allowed.

    The system generates the OSPF_1.3.6.1.4.1.2011.5.25.155.31.8 hwOspfv2ImportAseRouteThresholdClear alarm if the number falls to or below the lower alarm threshold (in percentage) multiplied by the maximum number allowed.

  • The system generates the OSPF_1.3.6.1.4.1.2011.5.25.155.31.9 hwOspfv2ImportAseRouteExceed alarm if the number of ASE LSAs generated when an OSPF process imports external routes is greater than or equal to the maximum number allowed.

    The system generates the OSPF_1.3.6.1.4.1.2011.5.25.155.31.10 hwOspfv2ImportAseRouteExceedClear alarm if the number of ASE LSAs generated when an OSPF process imports external routes falls below 90% of the maximum number allowed.

  • The system generates the OSPF_1.3.6.1.4.1.2011.5.25.155.31.11 hwOspfv2ImportNssaRouteThreshold alarm if the number of NSSA LSAs generated when an OSPF process imports external routes exceeds the upper alarm threshold (in percentage) multiplied by the maximum number allowed.

    The system generates the OSPF_1.3.6.1.4.1.2011.5.25.155.31.12 hwOspfv2ImportNssaRouteThresholdClear alarm if the number falls to or below the lower alarm threshold (in percentage) multiplied by the maximum number allowed.

  • The system generates the OSPF_1.3.6.1.4.1.2011.5.25.155.31.13 hwOspfv2ImportNssaRouteExceed alarm if the number of NSSA LSAs generated when an OSPF process imports external routes is greater than or equal to the maximum number allowed.

    The system generates the OSPF_1.3.6.1.4.1.2011.5.25.155.31.14 hwOspfv2ImportNssaRouteExceedClear alarm if the number of NSSA LSAs generated when an OSPF process imports external routes falls below 90% of the maximum number allowed.

Example

# Set the limit on the number of LSAs generated when an OSPF process imports external routes, the upper alarm threshold, and lower alarm threshold to 3000, 85%, and 75%, respectively.

<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] import-route limit 3000 threshold-alarm upper-limit 85 lower-limit 75
Related Topics

loop-free-alternate (OSPF FRR)

Function

The loop-free-alternate command enables OSPF IP FRR to generate a loop-free backup route.

The undo loop-free-alternate command disables OSPF IP FRR.

By default, OSPF IP FRR is disabled.

Format

loop-free-alternate

undo loop-free-alternate

Parameters

None

Views

OSPF FRR view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The Loop Free Alternate (LFA) is a method of implementing FRR. Through LFA, a device can generate a loop-free backup link and FRR can be implemented.

OSPF IP FRR takes effect only after the loop-free-alternate command is run.

OSPF LFA FRR uses the SPF algorithm to calculate the shortest path to the destination node, with each neighbor that provides a backup link as the root node. The backup next hop is node-based, which applies to single-source routing scenarios. As networks are increasingly diversified, two ABRs or ASBRs are deployed to improve network reliability. In this case, OSPF FRR in a multi-source routing scenario is needed. In Figure 9-1, Switch B and Switch C function as ABRs to forward area 0 and area 1 routes. Switch E advertises an intra-area route. Upon receipt of the route, Switch B and Switch C translate it to a Type 3 LSA and flood the LSA to area 0. After OSPF FRR is enabled on Switch A, Switch A considers Switch B and SwitchC as its neighbors. Without a fixed neighbor as the root node, Switch A fails to calculate FRR backup next hop. To address this problem, a virtual node is simulated between Switch B and Switch C and used as the root node of Switch A, and Switch A uses the LFA algorithm to calculate the backup next hop. This solution converts multi-source routing into single-source routing.

Figure 9-1  OSPF FRR in a multi-source routing scenario

To implement OSPF IP FRR over specified routes, run the frr-policy route route-policy route-policy-name command to configure an OSPF IP FRR filtering policy so that only the OSPF backup routes that match the filtering conditions of the policy can be added to the forwarding table. If the primary link fails, OSPF can switch traffic to the backup link immediately.

Prerequisites

before configuring the command, you can create an OSPF IP FRR view and enter the OSPF IP FRR view by running the frr command.

Precautions

If you do not want the link that transmits important service traffic to function as the backup link of other links, you need to configure the ospf frr block command on the interface connecting to the link before configuring the OSPF IP FRR function. In this manner, the link will not be designated as the backup link during FRR calculation.

Example

# Enable OSPF IP FRR through LFA.

<HUAWEI> system-view
[~HUAWEI] ospf
[*HUAWEI-ospf-1] frr
[*HUAWEI-ospf-1-frr] loop-free-alternate

lsa-age refresh disable (OSPF)

Function

The lsa-age refresh disable command disables OSPF LSA aging management.

The undo lsa-age refresh disable command enables OSPF LSA aging management.

By default, OSPF LSA aging management is enabled.

Format

lsa-age refresh disable

undo lsa-age refresh disable

Parameters

None

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

If an exception occurs on the age field of LSAs, LSAs may be aged unexpectedly, causing LSA flapping or a route calculation error. For example, if the abnormal aging time is 2500s and the actual aging time is 500s, LSAs are aged prematurely. To address this problem, OSPF LSA aging management is enabled by default. If the aging time in a received LSA is greater than 1800s, OSPF considers the LSA abnormal and changes the aging time to 1700s until the aging time values of all LSAs in the area become the same. In this case, routes can be calculated correctly.

Example

# Disable OSPF LSA aging management.

<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] lsa-age refresh disable

lsa-arrival-interval

Function

The lsa-arrival-interval command sets the interval for receiving LSAs.

The undo lsa-arrival-interval command restores the default interval for receiving LSAs.

By default, an intelligent timer is enabled. The interval for receiving LSAs is expressed in milliseconds. The maximum interval for updating LSAs is 1000 milliseconds (ms), the initial interval is 500 ms, and the Holdtime interval is 500 ms.

Format

lsa-arrival-interval { interval | intelligent-timer max-interval start-interval hold-interval }

lsa-arrival-interval suppress-flapping suppress-interval

undo lsa-arrival-interval

undo lsa-arrival-interval suppress-flapping suppress-interval [ threshold threshold ]

Parameters

Parameter Description Value
interval Specifies the interval for receiving LSAs. The value is an integer ranging from 0 to 10000, in ms.
intelligent-timer Enables an intelligent timer to receive LSAs. -
max-interval Specifies the maximum interval for receiving LSAs. The value is an integer ranging from 1 to 120000, in ms. The default value is 1000.
start-interval Specifies the initial interval for receiving LSAs. The value is an integer ranging from 0 to 60000, in ms. The default value is 500.
hold-interval Specifies the Holdtime interval for receiving LSAs. The value is an integer ranging from 1 to 60000, in ms. The default value is 500.
suppress-flapping Enables OSPF LSA suppression. -
suppress-interval Specifies an OSPF LSA suppression period. The value is an integer ranging from 0 to 600, in seconds. The default value is 10 seconds.
threshold threshold Specifies the suppression threshold of OSPF LSAs . The value is an integer ranging from 3 to 100. The default value is 30.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

OSPF defines that the interval for receiving LSAs is 1s. This prevents network connections or frequent route flapping from consuming excessive network bandwidth or device resources.

On a stable network where routes need to be fast converged, you can change the interval for receiving LSAs to 0s. In this manner, the change of the topology or route can be immediately sensed, which speeds up route convergence.

To configure the maximum LSA suppression period, run the lsa-arrival-interval suppress-flapping command. If frequent LSA flapping occurs, the larger value between lsa-arrival-interval suppress-flapping and lsa-arrival-interval is used to suppress LSA flapping.

If there is no special network requirement, default values are recommended.

Procedure

After an intelligent timer is enabled, the interval for receiving LSAs is as follows:
  1. The initial interval for the SPF calculation is specified in start-interval.
  2. The interval for the SPF calculation for the nth (n≥2) time is equal to hold-interval × 2(n-2).
  3. When the interval specified in hold-interval × 2(n-2) reaches the maximum interval specified in max-interval, OSPF performs the SPF calculation at the maximum interval until no SPF calculation is performed within max-interval. After the maximum interval elapses, the calculation mechanism goes back to step 1.
  4. If no flapping occurs within the interval of max-interval that starts upon the end of the previous SPF calculation, the intelligent timer exits.

  5. If no flapping occurs in the previous interval and flapping occurs in the current interval, SPF calculation is delayed for a period of the start-interval. After the SPF calculation is complete, the current interval is used for the next SPF calculation.

Precautions

It is recommended to set the receiving interval specified by lsa-arrival-interval to be a value smaller than or equal to the Holdtime interval specified bylsa-originate-interval.

Example

# Set the interval for receiving LSAs to 0 milliseconds.

<HUAWEI> system-view 
[~HUAWEI] ospf 1
[*HUAWEI-ospf-1] lsa-arrival-interval 0

lsa-originate-interval

Function

The lsa-originate-interval command sets the interval for updating LSAs.

The undo lsa-originate-interval command restores the default interval for updating LSAs.

By default, the intelligent timer is enabled; the maximum interval for updating LSAs is 5000 ms, the initial interval is 500 ms, and the Holdtime interval is 1000 ms.

Format

lsa-originate-interval { 0 | { intelligent-timer max-interval start-interval hold-interval | other-type interval } * }

lsa-originate-interval suppress-flapping suppress-interval [ threshold threshold ]

undo lsa-originate-interval

undo lsa-originate-interval suppress-flapping suppress-interval

Parameters

Parameter Description Value
0 Sets the interval for updating LSAs to 0 ms, that is, deletes the initial interval (5000 ms) for updating LSAs. -
intelligent-timer Enables an intelligent timer to update OSPF Type-1 LSA (Router LSA) , Type-2 LSA (Network LSA), Type-5 LSA (AS-external-LSA) and Type-7 LSA (NSSA LSA). -
max-interval Specifies the maximum interval for updating OSPF LSAs. The value is an integer ranging from 1 to 120000, in ms. The default value is 5000.
start-interval Specifies the initial interval for updating OSPF LSAs. The value is an integer that ranges from 0 to 60000, in ms. The default value is 500.
hold-interval Specifies the Holdtime interval for updating OSPF LSAs. The value is an integer ranging from 1 to 60000, in ms. The default value is 1000.
other-type Sets the interval to update OSPF Type-3 LSA (Network-summary-LSA), Type-4 LSA (ASBR-summary-LSA) and Type-10 LSA (Opaque LSA). -
interval Specifies the interval for updating LSAs. The value is an integer ranging from 0 to 10, in seconds. The default value is 5.
suppress-flapping Enables OSPF LSA suppression. -
suppress-interval Specifies an OSPF LSA suppression period. The value is an integer ranging from 0 to 600, in seconds. The default value is 10 seconds.
threshold threshold Specifies the suppression threshold that takes effect when the OSPF LSAs to be sent flap. The value is an integer ranging from 3 to 100. The default value is 30.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

OSPF sets the interval for updating LSAs to 5s. This prevents network connections or frequent route flapping from consuming excessive network bandwidth or device resources.

On a stable network where routes need to be fast converged, you can change the interval for updating LSAs to 0s. In this manner, the change of the topology or route can be immediately advertised on the network through LSAs, which speeds up route convergence.

If there is no special network requirement, default values are recommended.

To configure the maximum LSA suppression period, run the lsa-originate-interval suppress-flapping command. If frequent LSA flapping occurs, the larger value between lsa-originate-interval suppress-flapping and lsa-originate-interval is used to suppress LSA flapping.

Execution Process

After an intelligent timer is enabled, the interval for updating LSAs is as follows:

  1. The initial interval for the SPF calculation is specified in start-interval.
  2. The interval for the SPF calculation for the nth (n≥2) time is equal to hold-interval × 2(n-2).
  3. When the interval specified in hold-interval × 2(n-2) reaches the maximum interval specified in max-interval, OSPF performs the SPF calculation at the maximum interval until no SPF calculation is performed within max-interval. After the maximum interval elapses, the calculation mechanism goes back to step 1.
  4. If no flapping occurs within the interval of max-interval that starts upon the end of the previous SPF calculation, the intelligent timer exits.

  5. If no flapping occurs in the previous interval and flapping occurs in the current interval, SPF calculation is delayed for a period of the start-interval. After the SPF calculation is complete, the current interval is used for the next SPF calculation.

Precautions

It is recommended to set the updating interval specified by lsa-originate-interval to be a value longer than or equal to the Holdtime interval specified by lsa-arrival-interval.

Example

# Set the interval for updating LSAs to 0 milliseconds.

<HUAWEI> system-view
[~HUAWEI] ospf 1
[*HUAWEI-ospf-1] lsa-originate-interval 0
Related Topics

lsdb-overflow-limit (OSPF)

Function

The lsdb-overflow-limit command configures a maximum number of external routes supported by the OSPF LSDB.

The undo lsdb-overflow-limit command deletes the configured maximum number of external routes supported by the OSPF LSDB.

By default, the maximum number of external routes supported by the OSPF LSDB is not limited.

Format

lsdb-overflow-limit number

undo lsdb-overflow-limit [ number ]

Parameters

Parameter Description Value
number Specifies the maximum number of external routes supported by the OSPF LSDB. The value is an integer ranging from 1 to 1000000.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If the number of external routes (carried in Type 5 LSAs and Type 7 LSAs) imported by OSPF exceeds the value defined in the PAF file, excess external routes are discarded.

To address this problem, run the lsdb-overflow-limit command to configure a maximum number of external routes supported by the OSPF LSDB. If the number of external routes imported by OSPF exceeds the configured maximum number, the device deletes self-generated non-default external routes to ensure the proper forwarding of other external routes.

Prerequisites

Running the display ospf brief command. If OSPF is in LSDB overflow status is displayed in the command output, the OSPF LSDB in the current OSPF process is overloaded. If OSPF LSDB is approaching overflow limit is displayed in the command output, the number of external routes in the OSPF LSDB has reached or exceeded 90% of the maximum number.

Then, run the lsdb-overflow-limit command to set the maximum number of external routes supported by the OSPF LSDB.

The device generates alarms based on the following rules:

  • When the number of external routes in the OSPF LSDB reaches or exceeds 90% of the maximum number, the device generates the OSPF_1.3.6.1.4.1.2011.5.25.155.31.15 hwOspfv2LsdbApproachingOverflow alarm.

    When the number of external routes in the OSPF LSDB falls below 90% of the maximum number, the device generates the OSPF_1.3.6.1.4.1.2011.5.25.155.31.16 hwOspfv2LsdbApproachingOverflowClear alarm.

  • When the number of external routes in the OSPF LSDB reaches the maximum number, the device generates the OSPF_1.3.6.1.4.1.2011.5.25.155.31.17 hwOspfv2LsdbOverflow alarm.

    When the number of external routes in the OSPF LSDB falls below the maximum number, the device generates the OSPF_1.3.6.1.4.1.2011.5.25.155.31.18 hwOspfv2LsdbOverflowClear alarm.

Precautions

The number parameter specified in the lsdb-overflow-limit command must be the same on all devices in the OSPF AS.

Example

# Set the maximum number of external routes supported by the OSPF LSDB to 400000.

<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] lsdb-overflow-limit 400000
Related Topics

maximum load-balancing (OSPF)

Function

The maximum load-balancing command sets the maximum number of equal-cost routes for carrying out load balancing.

The undo maximum load-balancing command restores the default setting.

The default maximum number of equal-cost OSPF routes for carrying out load balancing is 32(64 on the CE6870EI).

Format

maximum load-balancing number

undo maximum load-balancing

Parameters

Parameter Description Value
number Specifies the maximum number of equal-cost routes. The value is an integer that ranges from 1 to 32.
NOTE:
The value range on the CE6870EI is 1~64.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If a routing protocol discovers multiple routes with the same cost to a single destination, they can carry out load balancing. The maximum load-balancing command sets the maximum number of equal-cost routes that can carry out load balancing. This optimizes the routing policy and ensures traffic forwarding on a complex network.

Configuration Impact

Packets will be load-balanced by multiple equal-cost routes to a single destination.

Follow-up Procedure

If more existing equal-cost OSPF routes than the value set using the maximum load-balancing command are available, if equal-cost routes need to be specified for load balancing, the nexthop ip-address weight value command allows routes with a specified weight to carry out load balancing.

Precautions

To disable load balancing, set the value of number to 1.

Example

# Set the maximum number of the equal-cost routes.

<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] maximum load-balancing 2

# Restore the default maximum number of equal-cost routes for carrying out load balancing.

<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] undo maximum load-balancing
Related Topics

maxage-lsa route-calculate-delay (OSPF)

Function

The maxage-lsa route-calculate-delay command configures the route calculation delay function to suppress frequent OSPF LSA flapping.

The undo maxage-lsa route-calculate-delay command disables the function.

By default, the route calculation delay to suppress frequent OSPF LSA flapping is 10s.

Format

maxage-lsa route-calculate-delay delay-interval

undo maxage-lsa route-calculate-delay

Parameters

Parameter Description Value
delay-interval Specifies a route calculation delay. The value is an integer ranging from 0 to 65535, in seconds. The default value is 10 seconds.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Frequent OSPF LSA flapping on the remote device may lead to route flapping on the local device, affecting services. To address this problem, run the maxage-lsa route-calculate-delay command to configure the local device to delay route calculation in the case of frequent OSPF LSA flapping, which suppresses route flapping locally.

Example

# Set the route calculation delay to suppress frequent OSPF LSA flapping to 200s.

<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] maxage-lsa route-calculate-delay 200

network (OSPF Area)

Function

The network command specifies the interface that runs OSPF and the area to which the interface belongs.

The undo network command deletes the interface that runs OSPF.

By default, an interface does not belong to any area.

Format

network network-address wildcard-mask [ description text ]

undo network network-address wildcard-mask

Parameters

Parameter Description Value
network-address Specifies the address of the network segment where the interface resides. The value is in dotted decimal notation.
wildcard-mask Specifies the wildcard mask of an IP address, which is similar to the reversed form of the mask of the IP address. For example, 0.0.0.255 indicates that the mask length is 24 bits. The value is in dotted decimal notation.
description text Specifies the description of the specified OSPF network segment. The value is a string of 1 to 80 case-sensitive characters with spaces allowed.

Views

OSPF area view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After creating an OSPF process, you can run the network command to configure the network segments in an area and specify network-address and wildcard-mask to configure one or multiple interfaces in an area. To run OSPF on an interface, ensure that the primary IP address of this interface is in the network segment range specified in the network (OSPF) command. If the secondary IP address of the main interface is in the network segment range specified in this command, the main interface cannot run OSPF.

OSPF can run on an interface only when the following two conditions are met:
  • The mask length of the interface's IP address is not less than that specified in the network command. OSPF uses a reverse mask. For example, 0.0.0.255 indicates that the mask length is 24 bits.
    NOTE:
    When the wildcard-mask parameter in the network command is set to all 0s, OSPF can run on the interface if the IP address of the interface is the IP address specified in the network network-address command.
  • The primary address of the interface is within the network segment range specified in the network command.

Precautions

  • OSPF neighbor relationships cannot be established using the secondary IP addresses of interfaces.

  • After the network 0.0.0.0 0.0.0.0 command is executed, routes to the network segment where the IP address of the management interface belongs are also imported in the OSPF routing table. Therefore, use this command with caution.

  • For the same network address wildcard-mask, the last description configured by description takes effect.

  • On a loopback interface, by default, OSPF advertises its IP address in the form of a 32-bit host route, independent of the mask length of the IP address on the interface.

  • To advertise the network segment route of a loopback interface, you need to run the ospf network-type command to set the network type to broadcast or NBMA.

  • If a large number of interfaces that do not need to run OSPF services borrow the IP address of a loopback interface, running the ospf enable command rather than the network command on the loopback interface is recommended. If the network command is run on the loopback interface, the configurations of some commands, such as the command used to configure, delete, or modify the loopback interface's IP address or the undo network command, may fail to be delivered, and device performance is affected after a master/slave main control board swtichover is performed.

Example

# Configure the primary IP address of the interface that runs OSPF to be in the network segment of 192.168.1.0/24, set the ID of the OSPF area where the interface resides to 2, and configure the description for the network segment.

<HUAWEI> system-view 
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] area 2
[*HUAWEI-ospf-100-area-0.0.0.2] network 192.168.1.0 0.0.0.255 description this network is connected to Beijing

nexthop (OSPF)

Function

The nexthop command sets the preference for the equal-cost routes. After OSPF calculates the equal-cost routes, the next hop is chosen from these equal-cost routes based on the value of weight. The smaller the value is, the higher the preference is.

The undo nexthop command cancels the preference of these equal-cost routes.

By default, the value of weight is 255. Equal-cost routes have no preference, and they forward packets at the same time. Load balancing is performed among them.

Format

nexthop ip-address weight value

undo nexthop ip-address

Parameters

Parameter Description Value
ip-address Indicates the IP address of next hop. The value is in dotted decimal notation.
weight value Indicates the weight of the next hop. The smaller the value is, the higher the preference of the route is. It is an integer that ranges from 1 to 254.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

If the number of equal-cost routes in a network is greater than the value set by using the maximum load-balancing command, if equal-cost routes need to be specified for load balancing, the nexthop command to used to increase the priorities of these routes.

Example

# Set the preference of equal-cost routes in OSPF.

<HUAWEI> system-view
[~HUAWEI] ospf 1
[*HUAWEI-ospf-1] nexthop 10.0.0.3 weight 1

nssa (OSPF Area)

Function

The nssa command configures an NSSA.

The undo nssa command cancels the configuration of an NSSA.

By default, no OSPF area is configured as an NSSA.

Format

nssa [ default-route-advertise [ backbone-peer-ignore ] | no-import-route | no-summary | set-n-bit | suppress-forwarding-address | translator-always | translator-interval interval-value | zero-address-forwarding ] *

undo nssa

Parameters

Parameter Description Value
default-route-advertise Generates default Type7 LSAs on the ASBR and then advertises them to the NSSA.
NOTE:

The ABR generates a default NSSA LSA (Type7 LSA) automatically and advertises it in the NSSA.

Type 7 LSAs carrying the default route will be generated only when the default route 0.0.0.0/0 exists in the routing table on the ASBR.

-
backbone-peer-ignore Prevents the ABR from checking the neighbor status when the ABR generates default Type 7 LSAs and advertises them to the NSSA. Specifically, the ABR generates default Type 7 LSAs and advertises them to the NSSA as long as an interface that is Up exist in the backbone area. -
no-import-route Indicates that no external route is imported to an NSSA. -
no-summary Indicates that an ABR is prohibited from sending summary LSAs to the NSSA. -
set-n-bit Sets the N-bit in DD packets. -
suppress-forwarding-address Sets the FA of the Type 5 LSAs translated from Type 7 LSAs by the NSSA ABR to 0.0.0.0. -
translator-always Specifies an ABR in an NSSA as an all-the-time translator. Multiple ABRs in an NSSA can be configured as translators. -
translator-interval interval-value Specifies the timeout period of a translator. The value is an integer ranging from 1 to 120, in seconds. The default value is 40.
zero-address-forwarding Sets the FA of the generated NSSA LSAs to 0.0.0.0 when external routes are imported by the ABR in an NSSA. -

Views

OSPF area view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

An NSSA is configured in the scenario where AS external routes are to be imported but not forwarded to save system resources. AS external routes can be imported to an NSSA and transmitted to the entire NSSA.

All switchs in the NSSA must be configured with NSSA attributes using the nssa command.

The nssa command is applicable to the following scenarios:
  • The default-route-advertise parameter is configured to advertise Type 7 LSAs carrying the default route on the ASBR to the NSSA.

    Regardless of whether the default route 0.0.0.0/0 exists in the routing table on the ABR, Type 7 LSAs carrying the default route will be generated. However, Type 7 LSAs carrying the default route will be generated only when the default route 0.0.0.0/0 exists in the routing table on the ASBR.

  • If an ASBR also functions as an ABR, the no-import-route parameter is configured to prevent external routes imported using the import-route command from being advertised to the NSSA.
  • The no-summary parameter is configured on an ABR to reduce the number of LSAs that are transmitted to the NSSA. This implementation prevents the ABR from transmitting Type 3 LSAs to the NSSA.
  • After the set-n-bit parameter is configured, the N-bit is set in the database description (DD) packets during the synchronization between the switch and neighboring switchs.
  • The suppress-forwarding-address parameter sets the forwarding address (FA) of the Type 5 LSAs translated from Type 7 LSAs by the NSSA ABR to 0.0.0.0.
  • If multiple ABRs are deployed in the NSSA, the system automatically selects an ABR (generally the switch with the largest router ID) as a translator to convert Type 7 LSAs into Type 5 LSAs. You can configure the translator-always parameter on an ABR to specify the ABR as an all-the-time translator. To specify two ABRs for load balancing, configure the translator-always parameter on the chosen ABRs to specify the ABRs as all-the-time translators. You can use this command to pre-configure a fixed translator to prevent LSA flooding caused by translator role changes.
  • The translator-interval parameter is used to ensure uninterrupted services when translator roles change. The value of interval-value must be greater than the flooding period.
  • The zero-address-forwarding parameter is used to set the FA of the generated NSSA LSAs to 0.0.0.0 when external routes are imported to the ABR in an NSSA.

Configuration Impact

Configuring or deleting NSSA attributes may trigger routing update in the area. A second configuration of NSSA attributes can be implemented or canceled only after a routing update is complete.

Precautions

It is recommended that a loopback address be configured for an switch in the NSSA so that the loopback address can be automatically selected as the FA. If other switchs have routes of the same cost to the switch in the NSSA, load balancing is performed.

When the last ordinary area (other than a stub area or NSSA) under an OSPF process is deleted, useless Type 5 LSAs originated by the local switch in the area where are flooded will be deleted immediately. The local switch still reserves useless Type 5 LSAs from other switchs. These useless Type 5 LSAs will be deleted only when the aging time reaches 40s.

Example

# Configure area 1 as an NSSA.

<HUAWEI> system-view
[~HUAWEI] ospf 1
[*HUAWEI-ospf-1] area 1
[*HUAWEI-ospf-1-area-0.0.0.1] nssa

opaque-capability enable

Function

The opaque-capability enable command enables the Opaque-LSA capability so that an OSPF process can generate Opaque LSAs, and receive Opaque LSAs from neighbors.

The undo opaque-capability command disables the Opaque-LSA capability.

By default, the Opaque-LSA capability is disabled.

Format

opaque-capability enable

undo opaque-capability

Parameters

None

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Enabling or disabling the Opaque-LSA capability function can delete and reestablish all sessions and instances.

Example

# Enable OSPF Opaque.

<HUAWEI> system-view
[~HUAWEI] ospf
[*HUAWEI-ospf-1] opaque-capability enable
Related Topics

ospf

Function

The ospf command creates and run 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 router-id | vpn-instance vpn-instance-name ] *

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. By default, it is 1.
router-id router-id Specifies a router ID.
NOTE:
The router ID of each OSPF process must be unique on the OSPF network; otherwise, the OSPF neighbor relationship cannot be set up and routing information is incorrect. Configuring a unique router ID for each OSPF process on each OSPF device is recommended to ensure stability.
It is in dotted decimal notation.
vpn-instance vpn-instance-name Specifies the name of a VPN instance. The value is a string of 1 to 31 case-sensitive characters except spaces. When double quotation marks are used to include the string, spaces are allowed in the string. The value _public_ is reserved and cannot be used as the VPN instance name.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

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

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

The ID of an OSPF device can be configured manually. If no ID is specified through a command for an OSPF device, the system automatically selects an IP address of the interface as the router ID. The largest IP address in loopback 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.

In any of the following situations, the router ID is re-selected:
  • The ospf command is used to re-configure an OSPF router ID.
  • The system router ID is re-configured, and then the OSPF process is restarted.
  • The IP address of the original system router ID is deleted, and then the OSPF process is restarted.

Configuration Impact

After an OSPF process is disabled by using undo ospf comand, the receive end still maintains the LSAs generated by this OSPF process. These invalid LSAs occupy the system memory and are deleted only when the LS 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.

Example

# Run an OSPF process.

<HUAWEI> system-view
[~HUAWEI] ospf 100 router-id 10.10.10.1 vpn-instance huawei

ospf authentication-mode

Function

The ospf authentication-mode command sets the authentication mode and password used between neighboring nodes.

The ospf authentication-mode null command configures the null authentication mode on an interface.

The undo ospf authentication-mode command deletes the authentication mode on an interface.

By default, an interface does not authenticate OSPF packets.

Format

ospf authentication-mode { simple [ plain plain-text | [ cipher ] cipher-text ] | null }

ospf authentication-mode { md5 | hmac-md5 | hmac-sha256 } [ key-id { plain plain-text | [ cipher ] cipher-text } ]

ospf authentication-mode keychain keychain-name

undo ospf authentication-mode

Parameters

Parameter Description Value
simple Indicates simple authentication. In simple authentication, the password type is cipher by default.
NOTICE:

Simple authentication carries potential risks. HMAC-SHA256 authentication is recommended.

-
plain Indicates plain authentication.
NOTICE:

If plain is selected, the password is saved in the configuration file in plain text. This carries security risks. It is recommended to select cipher to save the password in cipher text.

When cipher is configured, enter only the password in plain text. Then, the password is displayed in plain text in configuration files. Simple authentication uses the password in plain text by default.
plain-text Specifies a plaintext password. plain-text is a string of 1 to 8 characters without spaces, When double quotation marks are used around the string, spaces are allowed in the string. When simple is configured, and is a string of 1 to 255 characters without spaces when md5, hmac-md5 or hmac-sha256 is configured.
cipher Indicates cipher authentication. When cipher is configured, enter only the password in cipher text. Then, the password is displayed in cipher text in configuration files. MD5 authentication, HMAC-SHA256 authentication or HMAC-MD5 authentication uses the password in cipher text by default.
cipher-text Specifies a ciphertext password. The value is a string of characters without spaces.
  • In simple authentication, a plaintext password is 1 to 8 characters, and a ciphertext password is 24 to 128 characters.
  • In MD5, HMAC-MD5, or HMAC-SHA256 authentication, a plaintext password is a string of 1 to 255 characters, and a ciphertext password is a string of 20 to 432 characters.
NOTE:

The password does not contain the question mark (?) and spaces. However, when the password is enclosed in quotation marks ("), spaces are allowed in the password.

md5 Indicates MD5 authentication.
NOTICE:

MD5 authentication carries potential risks. HMAC-SHA256 authentication is recommended.

Because $@$@ is used to distinguish old and new passwords, an MD5 authentication password that starts and ends with $@$@ is invalid.
hmac-md5 Indicates HMAC-MD5 authentication.
NOTICE:

HMAC-MD5 authentication carries potential risks. HMAC-SHA256 authentication is recommended.

-
hmac-sha256 Indicates HMAC-SHA256 authentication. -
key-id Specifies the authentication key ID of the interface's cipher authentication. The key ID must be consistent with that of the peer. The value is an integer that ranges from 1 to 255.
keychain Indicates keychain authentication.
NOTE:

Before configuring this parameter, run the keychain command to create a keychain. Then, run the key-id, key-string, and algorithm commands to configure a key ID, a password, and an authentication algorithm for this keychain. Otherwise, OSPF authentication will fail.

-
keychain-name Specifies the keychain name. The value is a string of 1 to 47 case-insensitive characters except question marks (?) and spaces. However, when double quotation marks (") are used to include the string, spaces are allowed in the string.
null Indicates null authentication. -

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Due to the defects and non-strict implementation of the TCP/IP protocol suite and increasing attacks on TCP/IP networks, the impact generated by attacks on the network may become more serious. Attacks on network devices may lead to a network crash. To improve OSPF network security, configure authentication.

Configuration Impact

Interface authentication is used to set the authentication mode and password used between neighboring devices. It takes precedence over area authentication.

Precautions

Null authentication is an authentication method. It does not indicate that no authentication is configured.

The authentication mode and password configured for interfaces on the same network segment must be the same.

Example

# Configure OSPF HMAC-SHA256 authentication on VLANIF100.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 100
[*HUAWEI-Vlanif100] ospf authentication-mode hmac-sha256

# Configure OSPF HMAC-SHA256 authentication on 10GE1/0/1.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ospf authentication-mode hmac-sha256

ospf bfd

Function

The ospf bfd command enables the BFD on the specified interface enabled with OSPF, or sets the parameter values of a BFD session.

The undo ospf bfd command deletes the BFD on the specified interface, or restores the default parameter values of a BFD session.

By default, BFD is not enabled or configured at OSPF interface view.

Format

ospf bfd enable [ per-link one-arm-echo ]

undo ospf bfd enable

ospf bfd { min-rx-interval receive-interval | min-tx-interval transmit-interval | detect-multiplier multiplier-value | frr-binding } *

undo ospf bfd { min-rx-interval [ receive-interval ] | min-tx-interval [ transmit-interval ] | detect-multiplier [ multiplier-value ] | frr-binding } *

Parameters

Parameter Description Value
enable Enables BFD. -
per-link Enables BFD session for per link. -
one-arm-echo Enables echo detection mode. -
min-rx-interval receive-interval Indicates the minimum interval at which BFD packets are received from the remote end.

The value is an integer. The value ranges from 3 to 1000 on the CE6880EI and 50 to 1000 on other models. The value is expressed in milliseconds. The default value is 1000 ms.

min-tx-interval transmit-interval Indicates the minimum interval at which BFD packets are sent to the remote end.

The value is an integer. The value ranges from 3 to 1000 on the CE6880EI and 50 to 1000 on other models. The value is expressed in milliseconds. The default value is 1000 ms.

detect-multiplier multiplier-value Specifies the local detection multiplier. The value is an integer ranging from 3 to 50. By default, it is 3.
frr-binding Associates the BFD session status and link status on an interface. That is, when the BFD status goes Down, the link status of the interface also goes Down. This enables traffic to be switched to the backup path. -

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The link failure or the topology change causes devices to re-calculate routes. Therefore, the convergence of routing protocols must be sped up to improve the network performance.

Link faults are unavoidable. Therefore, a feasible solution is required to detect faults faster and notify the faults to routing protocols immediately. If BFD is associated with routing protocols, once a link fault occurs, BFD can speed up the convergence of routing protocols.

Prerequisites

The configured parameters of the BFD session are valid on an interface only when BFD is enabled on the interface.

Procedure

The receive-interval is obtained through the negotiation between the local end and peer end by comparing the values of the local min-rx-interval and the peer min-tx-interval. If the local end fails to receive a BFD packet from the peer end within an interval of receive-interval × multiplier-value, it considers that the neighbor is Down.

Configuration Impact

If global BFD is not enabled, you can enable BFD on an interface but cannot set up BFD sessions. Similarly, if only parameters of a BFD session are set but the ospf bfd enable command is not used, the BFD session cannot be set up.

BFD configured on an interface take precedence over BFD configured in a process. If BFD is enabled on an interface, the BFD parameters on the interface are used to establish BFD sessions.

Precautions

  • After BFD is enabled, BFD sessions can be created only between the two ends that have set up an OSPF neighbor relationship and the relationship is in the Exstart state.

  • The ospf bfd enable command and the ospf bfd block command are mutually exclusive.

  • After BFD is disabled from an interface through the undo ospf bfd enable command, the parameters for setting up BFD sessions remain on this interface but do not take effect.

Example

# Enable BFD on VLANIF100 and specify the minimum interval for receiving BFD packets to 400 ms and the local detection multiplier to 4.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 100
[*HUAWEI-Vlanif100] ospf bfd enable
[*HUAWEI-Vlanif100] ospf bfd min-rx-interval 400 detect-multiplier 4

# Enable BFD on 10GE1/0/1 and specify the minimum interval for receiving BFD packets to 400 ms and the local detection multiplier to 4.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ospf bfd enable
[*HUAWEI-10GE1/0/1] ospf bfd min-rx-interval 400 detect-multiplier 4

ospf bfd block

Function

The ospf bfd block command prevents an interface from dynamically setting up a BFD session.

The undo ospf bfd block command cancels the configuration.

By default, the device does not prevent an interface from dynamically setting up a BFD session.

Format

ospf bfd block

undo ospf bfd block

Parameters

None

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After the bfd all-interfaces enable command is used for an OSPF process, BFD sessions are created on all the OSPF interfaces whose neighbor status is Full. You can run the ospf bfd block command on interfaces where BFD is not required to prevent the interfaces from dynamically setting up BFD sessions.

Prerequisites

BFD is enabled on interfaces.

Precautions

The ospf bfd enable command and the ospf bfd block command are mutually exclusive.

Example

# Prevent VLANIF100 from dynamically setting up a BFD session.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 100
[*HUAWEI-Vlanif100] ospf bfd block

# Prevent 10GE1/0/1 from dynamically setting up a BFD session.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ospf bfd block

ospf cost

Function

The ospf cost command sets the cost of an OSPF on an interface.

The undo ospf cost command restores the default cost for OSPF.

By default, OSPF automatically calculates its cost based on the interface bandwidth.

Format

ospf cost cost

undo ospf cost

Parameters

Parameter Description Value
cost Specifies the cost of an OSPF-enabled interface. The value is an integer ranging from 1 to 65535. By default, it is 1.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

OSPF can automatically calculate the link cost for an interface based on the interface bandwidth. You can also set the link cost for the interface through ospf cost commands.

Load balancing can be performed among several routes with the same protocol, cost, and destination address. According to the actual networking condition, you can determine whether to perform load balancing by changing the cost of the interface.

Configuration Impact

If no cost is set for an OSPF interface through the ospf cost command, OSPF automatically calculates its cost based on the interface bandwidth. The calculation formula is as follows: Cost of the interface = Bandwidth reference value/Interface bandwidth. The integer of the calculated result is the cost of the interface. If the calculated result is smaller than 1, the cost is 1. Changing the bandwidth reference value can change the cost of an interface.

By default, the bandwidth reference value is 100 Mbit/s divided by the interface bandwidth. With the formula 100000000/Bandwidth, the default costs of the Ethernet (100 Mbit/s) interface is 1.

NOTE:
No default cost is configured for trunk interfaces, because a trunk interface has multiple member interfaces that are in contant change.

Precautions

The ospf cost command cannot run on null interfaces.

Example

# Set the cost of VLANIF100 that runs OSPF to 65.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 100
[*HUAWEI-Vlanif100] ospf cost 65

# Set the cost of 10GE1/0/1 that runs OSPF to 65.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ospf cost 65

ospf dr-priority

Function

The ospf dr-priority command sets the priority of the interface that participates in the DR election.

The undo ospf dr-priority command restores the default setting.

By default, the priority is 1.

Format

ospf dr-priority priority

undo ospf dr-priority

Parameters

Parameter Description Value
priority Specifies the priority of the interface that participates in the DR or BDR election. The greater the value, the higher the priority. The value is an integer ranging from 0 to 255.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The DR priority of an interface determines whether it is qualified to be a DR. The interface with the highest DR priority is elected as the DR. If the DR priority of an interface on a device is 0, the device cannot be elected as a DR or a BDR.On a broadcast or NBMA network, you can set the DR priority of an interface to determine whether it is qualified to be a DR or a BDR.

Configuration Impact

When the DR and BDR are elected on a network segment, they send DD packets to all neighboring nodes and set up adjacencies with all neighboring nodes.

Precautions

Restarting or shutting down an interface will interrupt the OSPF adjacency between devices. Therefore, perform the operation with caution.

If the DR priority of a device is re-configured, the DR or BDR on the network will not be re-elected. You can re-elect a DR or a BDR by using either of the following methods. This, however, will interrupt the OSPF adjacency between devices. Therefore, use the following methods with caution.

  • Restart the OSPF processes on all devices.
  • Run the shutdown and then undo shutdown commands on the interfaces where OSPF adjacencies are set up.

In OSPF, the DR priority cannot be configured for null interfaces.

Example

# Set the priority of VLANIF100 that participates in the DR election to 8.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 100
[*HUAWEI-Vlanif100] ospf dr-priority 8

# Set the priority of 10GE1/0/1 that participates in the DR election to 8.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ospf dr-priority 8

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 the 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.
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 belonging 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 10GE1/0/1 in the specified OSPF area.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ospf enable 1 area 0
Related Topics

ospf filter-lsa-out

Function

The ospf filter-lsa-out command configures the specified interface enabled with OSPF to filter outgoing LSAs.

The undo ospf filter-lsa-out command configures a switch not to filter outgoing LSAs.

By default, outgoing LSAs are not filtered.

Format

ospf filter-lsa-out { all | { summary [ acl { acl-number | acl-name } ] | ase [ acl { acl-number | acl-name } ] | nssa [ acl { acl-number | acl-name } ] } * }

undo ospf filter-lsa-out

Parameters

Parameter Description Value
all Filters all outgoing LSAs except grace LSAs. -
summary Filters outgoing network summary LSAs (Type3). -
ase Filters outgoing AS external LSAs (Type5). -
nssa Filters outgoing NSSA LSAs (Type7). -
acl acl-number Specifies the number of the basic ACL. The value is an integer that ranges from 2000 to 2999.
acl acl-name Specifies the name of a Named ACL. The value is a string of 1 to 32 case-sensitive characters except spaces. The value must start with a letter (case-sensitive).

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When multiple links exist between two switchs, based on the filtering policy, the ospf filter-lsa-out command configures the local switch to filter the outgoing LSAs before sending them along specified links. This can reduce the unnecessary retransmission of LSAs and save bandwidth resources.

Configuration Impact

Filtering the outgoing LSAs on the specified OSPF interface can prevent useless LSAs from being sent to neighbors. This can reduce the size of the LSDB of neighbors and speed up the network convergence.

NOTE:

After the command is configured on an interface, the OSPF neighbor relationship of the interface will automatically re-establish.

The command takes effect only on the interfaces on which it is run and must be run on both local and remote interfaces. The LSAs that have been sent are aged in 3600s.

Precautions

When the rule command is used to configure the filtering rules for a named ACL configured using the acl command, only the source address range that is specified by the source parameter and the period of time that is specified by the time-range parameter take effect.

Grace LSAs are used to inform the neighbor of the Graceful Restart (GR) time, cause, and interface instance ID when GR starts and ends. The command is not used to filter the grace LSAs.

Example

# Configure VLANIF100 to filter all outgoing LSAs except grace LSAs.
<HUAWEI> system-view 
[~HUAWEI] interface vlanif 100
[*HUAWEI-Vlanif100] ospf filter-lsa-out all
# Configure 10GE1/0/1 to filter all outgoing LSAs except grace LSAs.
<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ospf filter-lsa-out all

ospf frr block

Function

The ospf frr block, you can block FRR on a specified OSPF interface.

The undo ospf frr block command restores the default configuration.

By default, FRR is not blocked on an interface.

Format

ospf frr block

undo ospf frr block

Parameters

None

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

OSPF IP FRR can be disabled using the ospf frr block command on an interface of a specific device that is running important services and resides on an FRR backup link. This setting prevents the device connected to this interface from being a part of a backup link and being burdened after FRR switches traffic to the backup link.

Precautions

Before configuring OSPF IP FRR, you need to run the ospf frr block command to block FRR on a specified interface. In this manner, the link where the interface resides is not calculated as a backup link during FRR calculation.

Example

# Block OSPF IP FRR on VLANIF100.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 100
[*HUAWEI-Vlanif100] ospf frr block

# Block OSPF IP FRR on 10GE1/0/1

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ospf frr block

ospf maxage-lsa auto-protect disable

Function

The ospf maxage-lsa auto-protect disable command disables master/slave board switching triggered by abnormal OSPF LSA aging.

The undo ospf maxage-lsa auto-protect disable command enables master/slave board switching triggered by abnormal OSPF LSA aging.

By default, master/slave board switching triggered by abnormal OSPF LSA aging is enabled.

Format

ospf maxage-lsa auto-protect disable

undo ospf maxage-lsa auto-protect disable

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

When the local device's aging timer expires, the local device incorrectly clears all Router LSAs from the peer device, which causes route flapping and service interruptions. To resolve this issue, master/slave board switching triggered by abnormal OSPF LSA aging is automatically enabled. Master/Slave board switching is triggered to restore network connections and service traffic when the following condition is met:

(Number of incorrectly cleared Router LSAs/Total number of Router LSAs) x 100% ≥ 80% (Router LSAs are those sent by the peer device to the local device)

By default, master/slave board switching triggered by abnormal OSPF LSA aging is enabled. To disable master/slave board switching triggered by abnormal OSPF LSA aging, run the ospf maxage-lsa auto-protect disable command.

Example

# Disable master/slave board switching triggered by abnormal OSPF LSA aging.

<HUAWEI> system-view
[~HUAWEI] ospf maxage-lsa auto-protect disable

ospf mib-binding

Function

The ospf mib-binding command binds an OSPF process to SNMP and make OSPF respond to SNMP requests.

The undo ospf mib-binding command disables the binding.

Format

ospf mib-binding process-id

undo ospf mib-binding

Parameters

Parameter Description Value
process-id Specifies the OSPF process ID. The value is an integer ranging from 1 to 4294967295.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The OSPF MIB is a virtual database of the device status maintained by the managed devices.

When multiple OSPF processes are started, you can specify which OSPF process is processed by the OSPF MIB. That is, you can bind the OSPF MIB to a specified OSPF process.

Prerequisites

An OSPF process has been created using the ospf command in the system view.

Example

# Bind OSPF process 100 to SNMP.

<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] quit
[*HUAWEI] ospf mib-binding 100

# Disable the binding.

<HUAWEI> system-view
[~HUAWEI] undo ospf mib-binding
Related Topics

ospf mtu-enable

Function

The ospf mtu-enable command enables the interface to fill in the MTU value when sending DD packets.

The undo ospf mtu-enable command restores the default settings.

By default, the MTU value is 0 when the interface sends DD packets. That is, the actual MTU value of the interface is not filled in.

Format

ospf mtu-enable

undo ospf mtu-enable

Parameters

None

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The default MTU value in the DD packet is 0. By using the command, you can manually configure the interface to fill in the MTU value (the actual MTU value), when the interface sends the DD packet.

As different vendors may adopt different default MTU values, to keep consistency, you can configure an interface to use the default value 0 when the interface sends DD packets.

Precautions

OSPF does not support configuration on the Null interface.

After the command is configured, the system automatically restarts the OSPF process.

Example

# Set Vlanif100 to fill in the MTU field when sending DD packets.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 100
[*HUAWEI-Vlanif100] ospf mtu-enable

# Set 10GE1/0/1 to fill in the MTU field when sending DD packets.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ospf mtu-enable

ospf network-type

Function

The ospf network-type command sets the network type of the OSPF interface.

The undo ospf network-type command restores the default network type of the OSPF interface.

By default, the network type of an interface is determined by the physical interface. The network type of Ethernet interface is Broadcast.

Format

ospf network-type { broadcast | nbma | p2mp | p2p [ peer-ip-ignore ] }

undo ospf network-type

Parameters

Parameter Description Value
broadcast Indicates that the network type of the interface is changed to broadcast. -
nbma Indicates that the network type of the interface is changed to NBMA. -
p2mp Indicates that the network type of the interface is changed to point-to-multipoint. -
p2p Indicates that the network type of the interface is changed to point-to-point. -
peer-ip-ignore Disables network segment check when IP address unnumbering is not configured for a P2P interface changed from a broadcast interface and the interface tries to establish an OSPF neighbor relationship. By default, if peer-ip-ignore is not specified in the command, OSPF checks the network segment of the two ends during which an OSPF neighbor relationship is to be established. Specifically, OSPF performs an AND operation on the local subnet mask and the local IP address and on the local subnet mask and the remote IP address. An OSPF neighbor relationship can be established only when the results on the two ends are the same. -

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When link layer protocols remain unchanged, you can change network types and configure OSPF features to flexibly build networks.

  • In the broadcast network, if there is a device that does not support multicast address, you can change the network type of the interface to NBMA.

  • If the network type of the interface is NBMA, when the interface type is changed to broadcast, the neighboring device is not needed.

The condition for changing a NBMA network to broadcast network is that there should be a direct virtual circuit between any two devices. The network should be a full mesh network. If a network does not meet the preceding conditions, you must change the type of network to point-to-multipoint. In this manner, two indirect devices can communicate with the help of one or two direct and reachable devices. Instead of configuring the neighboring device, you can change the network type of the interface to point-to-multipoint.

If there are only two devices that run OSPF in the same network segment, the network type of an interface can be changed to p2p.

Precautions

  • OSPF does not support the configuration on the Null interface.

  • When the network type of an interface is NBMA, or the network type of an interface is changed to NBMA manually, you must run the peer command to configure the neighbor.

  • If the network type of an OSPF interface is NBMA, OSPF does not advertise the interface's information to RSVP-TE, and TE tunnels passing through this interface fail to go Up.

  • Generally, the network types of two OSPF interfaces on the both ends of the link must be identical. Otherwise, the two interfaces cannot set up the neighbor relationship.

Example

# Set network type of VLANIF100 to NBMA.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 100
[*HUAWEI-Vlanif100] ospf network-type nbma

# Set network type of 10GE1/0/1 to NBMA.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ospf network-type nbma

ospf p2mp-mask-ignore

Function

The ospf p2mp-mask-ignore command configures the device not to check the network mask on a Point-to-Multipoint (P2MP) network.

The undo ospf p2mp-mask-ignore command configures the device to check the network mask on a P2MP network.

By default, no device on a P2MP network checks the network mask.

Format

ospf p2mp-mask-ignore

undo ospf p2mp-mask-ignore

Parameters

None

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

OSPF checks the network masks carried in Hello packets. If the network mask carried in a received Hello packet is not the same as the network mask of the local device, the Hello packet is discarded.

On a P2MP network, when the mask lengths of devices are different, you can use the ospf p2mp-mask-ignore command not to check the network mask in Hello packets. In this manner, the OSPF neighbor relationship can be established.

Prerequisites

Because P2MP is not a link layer protocol, each P2MP network is forcibly changed from a network of another type. A common P2MP network is changed from a non-fully connected Non-Broadcast Multi-Access (NBMA) network through the ospf network-type p2mp command.

Example

# Configure the device not to check the network mask on a P2MP network.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 100
[*HUAWEI-Vlanif100] ospf network-type p2mp
[*HUAWEI-Vlanif100] ospf p2mp-mask-ignore

# Configure the device not to check the network mask on a P2MP network.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ospf network-type p2mp
[*HUAWEI-10GE1/0/1] ospf p2mp-mask-ignore
Related Topics

ospf router-id auto-recover disable

Function

Using the ospf router-id auto-recover disable command, you can disable automatic recovery that will take effect after router ID conflict is detected.

Using the undo ospf router-id auto-recover disable command, you can enable automatic recovery that will take effect after router ID conflict is detected.

By default, automatic recovery takes effect after router ID conflict occurs.

Format

ospf router-id auto-recover disable

undo ospf router-id auto-recover disable

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

If router ID conflict occurs in an OSPF area, the system can define a new router ID, preventing route flapping and reducing route calculation operations. Other protocols will not go Down when the CPU usage is controlled.

NOTE:
  • If the automatic recovery function is enabled and a router ID conflict occurs between indirectly connected routers in one OSPF area, the system replaces the conflicted router ID with a newly calculated one. The automatic recovery function takes effect on both configured and automatically generated router IDs.
  • The system can replace a router ID in a maximum of three attempts in case the router ID conflict persists.

Example

# Disable automatic recovery that will take effect after router ID conflict is detected.

<HUAWEI> system-view
[~HUAWEI] ospf router-id auto-recover disable

ospf smart-discover

Function

The ospf smart-discover command enables smart-discover on an interface.

The undo ospf smart-discover command disables smart-discover on an interface.

By default, smart-discover is disabled on interfaces.

Format

ospf smart-discover

undo ospf smart-discover

Parameters

None

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In normal situations, devices periodically send Hello packets through OSPF interfaces. By sending Hello packets, devices set up and maintain neighbor relationships, and elect the DR and BDR on the multi-access network (broadcast or NBMA network). When setting up neighbor relationships or electing the DR and BDR on the multi-access network, interfaces can send Hello packets only when the Hello timer expires. This slows down the establishment of neighbor relationships and election of the DR and BDR.

After smart-discover is configured, when the status of the neighbor relationship changes or the DR and BDR on the multi-access network changes, the device can send Hello packets to its neighbor immediately without waiting for the expiration of the Hello timer.

Procedure

On broadcast and NBMA networks, neighbor relationships can be rapidly set up and a DR and a BDR can be rapidly elected.

  • When the neighbor status becomes 2-way for the first time or returns to Init from the 2-way or higher state, the smart-discover-enabled interface sends Hello packets to a neighbor without waiting for the expiration of the Hello timer when detecting that the neighbor status changes.
  • When the status of the interface functioning as the DR or BDR on the multi-access network changes, the smart-discover-enabled interface actively sends Hello packets on the network segment and then participates in the DR or BDR election.

The principle of setting up adjacencies rapidly on P2P or P2MP networks is the same as that on broadcast and NBMA networks.

Configuration Impact

The interval for sending Hello packets on an interface is determined by the interval for sending Hello packets set on the interface.

Precautions

The default interval for sending Hello packets varies with the network type.

Example

# Enable smart-discover on VLANIF100.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 100
[*HUAWEI-Vlanif100] ospf smart-discover

# Enable smart-discover on 10GE1/0/1.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ospf smart-discover

ospf suppress-flapping peer

Function

The ospf suppress-flapping peer command configures detection parameters for OSPF neighbor relationship flapping suppression.

The undo ospf suppress-flapping peer command restores the default detection parameters.

By default, the detection interval of OSPF neighbor relationship flapping suppression is 60s, the suppression threshold is 10, and the interval for exiting from suppression is 120s.

Format

ospf suppress-flapping peer { detecting-interval detecting-interval | threshold threshold | resume-interval resume-interval } *

undo ospf suppress-flapping peer { detecting-interval detecting-interval | threshold threshold | resume-interval resume-interval } *

Parameters

Parameter Description Value
detecting-interval detecting-interval

Specifies the detection interval of OSPF neighbor relationship flapping suppression.

Each OSPF interface on which OSPF neighbor relationship flapping suppression is enabled starts a flapping counter. If the interval between two successive neighbor status changes from Full to ExStart or Down is shorter than detecting-interval, a valid flapping_event is recorded, and the flapping_count increases by 1.

The value is an integer ranging from 1 to 300, in seconds. The default value is 60s.
threshold threshold

Specifies the threshold of OSPF neighbor relationship flapping suppression.

When the flapping_count reaches or exceeds threshold, flapping suppression takes effect.

The value is an integer ranging from 1 to 1000. The default value is 10.
resume-interval resume-interval
  • Specifies the interval for exiting from OSPF neighbor relationship flapping suppression.

    If the interval between two successive neighbor status changes from Full to ExStart or Down is longer than resume-interval, the flapping_count is reset.

  • If OSPF neighbor relationship flapping suppression works in hold-max-cost mode, resume-interval indicates the duration of this mode.
NOTE:
The value of resume-interval must be greater than that of detecting-interval.
The value is an integer ranging from 2 to 1000, in seconds. The default value is 120s.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To configure detection parameters for OSPF neighbor relationship flapping suppression on an interface, run the ospf suppress-flapping peer command. However, keeping the default configurations is recommended.

Prerequisites

OSPF neighbor relationship flapping suppression must have been enabled globally before you configure detection parameters for it. By default, the function is enabled. If it is disabled, run the undo suppress-flapping peer disable command to enable it before you configure the detection parameters.

Example

# Set the detection interval of OSPF neighbor relationship flapping suppression to 5s, the suppression threshold to 40, and the interval for exiting from suppression to 20s on 10GE 1/0/1.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ospf suppress-flapping peer detecting-interval 5 threshold 40 resume-interval 20

# Set the detection interval of OSPF neighbor relationship flapping suppression to 5s, the suppression threshold to 40, and the interval for exiting from suppression to 20s on VLANIF100.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 100
[~HUAWEI-Vlanif100] ospf suppress-flapping peer detecting-interval 5 threshold 40 resume-interval 20

ospf suppress-flapping peer disable

Function

The ospf suppress-flapping peer disable command disables OSPF neighbor relationship flapping suppression from an interface.

The undo ospf suppress-flapping peer disable command enables OSPF neighbor relationship flapping suppression on an interface.

By default, OSPF neighbor relationship flapping suppression is enabled on all interfaces.

Format

ospf suppress-flapping peer disable

undo ospf suppress-flapping peer disable

Parameters

None

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By default, OSPF neighbor relationship flapping suppression is enabled on all interfaces in the same OSPF process. To disable the function from one of the interfaces, run the ospf suppress-flapping peer disable command.

NOTE:
When an interface enters the flapping suppression state, all neighbor relationships on the interface enter the state accordingly.

Prerequisites

OSPF neighbor relationship flapping suppression must have been enabled globally before you enable the function on an interface using the undo ospf suppress-flapping peer disable command. By default, the function is enabled globally. If it is disabled, run the undo suppress-flapping peer disable command to enable it first.

Example

# Disable OSPF neighbor relationship flapping suppression from 10GE1/0/1.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ospf suppress-flapping peer disable

# Disable OSPF neighbor relationship flapping suppression from VLANIF100.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 100
[~HUAWEI-Vlanif100] ospf suppress-flapping peer disable

ospf suppress-flapping peer hold-down

Function

The ospf suppress-flapping peer hold-down command configures the Hold-down mode and sets duration for this mode.

The undo ospf suppress-flapping peer hold-down command cancels the Hold-down mode.

By default, the Hold-down mode is disabled.

Format

ospf suppress-flapping peer hold-down interval

undo ospf suppress-flapping peer hold-down [ interval ]

Parameters

Parameter Description Value
interval Specifies the duration of the Hold-down mode. The value is an integer ranging from 1 to 600, in seconds.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Flapping suppression works in either Hold-down or Hold-max-cost mode.

  • Hold-down mode: In the case of frequent flooding and topology changes during neighbor relationship establishment, interfaces prevent neighbor relationship reestablishment during Hold-down suppression, which minimizes LSDB synchronization attempts and packet exchanges.
  • Hold-max-cost mode: If the traffic forwarding path changes frequently, interfaces use 65535 as the cost of the flapping link during Hold-max-cost suppression, which prevents traffic from passing through the flapping link.

Flapping suppression can also work first in Hold-down mode and then in Hold-max-cost mode.

By default, the Hold-max-cost mode takes effect. To configure the Hold-down mode and set duration for this mode, run the ospf suppress-flapping peer hold-down interval command.

Prerequisites

OSPF neighbor relationship flapping suppression must have been enabled globally before you configure the Hold-down mode and set duration for this mode. By default, the function is enabled. If it is disabled, run the undo suppress-flapping peer disable command to enable it before you configure the Hold-down mode and set duration for this mode.

Example

# Configure the Hold-down mode and set its duration to 200s on 10GE1/0/1.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ospf suppress-flapping peer hold-down 200

# Configure the Hold-down mode and set its duration to 200s on VLANIF100.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 100
[~HUAWEI-Vlanif100] ospf suppress-flapping peer hold-down 200

ospf suppress-flapping peer hold-max-cost disable

Function

The ospf suppress-flapping peer hold-max-cost disable command disables the Hold-max-cost mode.

The undo ospf suppress-flapping peer hold-max-cost disable command enables the Hold-max-cost mode.

By default, the Hold-max-cost mode is enabled.

Format

ospf suppress-flapping peer hold-max-cost disable

undo ospf suppress-flapping peer hold-max-cost disable

Parameters

None

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Flapping suppression works in either Hold-down or Hold-max-cost mode.

  • Hold-down mode: In the case of frequent flooding and topology changes during neighbor relationship establishment, interfaces prevent neighbor relationship reestablishment during Hold-down suppression, which minimizes LSDB synchronization attempts and packet exchanges.
  • Hold-max-cost mode: If the traffic forwarding path changes frequently, interfaces use 65535 as the cost of the flapping link during Hold-max-cost suppression, which prevents traffic from passing through the flapping link.

Flapping suppression can also work first in Hold-down mode and then in Hold-max-cost mode.

By default, the Hold-max-cost mode takes effect. To configure the Hold-down mode and set duration for this mode, run the ospf suppress-flapping peer hold-down interval command.

Prerequisites

OSPF neighbor relationship flapping suppression must have been enabled globally before you configure duration for the Hold-max-cost mode. By default, the function is enabled. If it is disabled, run the undo suppress-flapping peer disable command to enable it before you configure duration for the Hold-max-cost mode.

Precautions

The Hold-max-cost mode takes effect only unidirectionally. If a remote device does not support OSPF neighbor relationship flapping suppression, bidirectional traffic between the local and remote devices may travel along different paths.

Example

# Disable the Hold-max-cost mode on 10GE1/0/1.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ospf suppress-flapping peer hold-max-cost disable

# Disable the Hold-max-cost mode on VLANIF100.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 100
[~HUAWEI-Vlanif100] ospf suppress-flapping peer hold-max-cost disable

ospf suppress-reachability

Function

ospf suppress-reachability command enables OSPF to suppress the advertisement of interface addresses.

undo ospf suppress-reachability command restores the default setting.

By default, OSPF interface will advertise its addresses.

Format

ospf suppress-reachability [ disable ]

undo ospf suppress-reachability [ disable ]

Parameters

Parameter Description Value
disable Disables OSPF to suppress the advertisement of interface addresses. -

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

ospf suppress-reachability command enables IS-IS to suppress the advertisement of interface addresses to reuse the interface addresses.

Example

# Enable suppress reachability on interface VLANIF100.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 100
[*HUAWEI-Vlanif100] ospf suppress-reachability

ospf timer dead

Function

The ospf timer dead command sets the dead interval of the OSPF neighbor.

The undo ospf timer dead command restores the default dead interval of the neighbor.

By default, for the interface of P2P and Broadcast, the dead interval for the OSPF neighbors is 40 seconds; for that of NBMA and P2MP, it is 120 seconds.

Format

ospf timer dead interval

undo ospf timer dead

Parameters

Parameter Description Value
interval Specifies dead interval of the OSPF neighbors. The value is an integer ranging from 1 to 235926000, in seconds.
NOTE:
Setting the dead interval of an OSPF neighbor to be longer than 10s is recommended. If the dead interval of an OSPF neighbor is shorter than 10s, the session may be closed.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The dead interval of OSPF neighbors refers to that within this interval, if no Hello packet is received from the neighbor, the neighbor is considered as invalid. The dead interval on an OSPF-running interface must be greater than the transmission interval of Hello messages. In addition, the dead intervals of devices on the same network segment must be the same.

By default, the dead interval of OSPF neighbors is four times the transmission interval of Hello messages.

Precautions

OSPF does not support the configuration on a null interface.

If the dead interval of an OSPF neighbor is shorter than 10s, the session may be closed. Therefore, if dead interval is shorter than 10s, the actual dead interval of an OSPF neighbor is not shorter than 10s. If the conservative mode is configured using the ospf timer hello command, the configured dead timer takes effect even when its value is less than 10s.

To speed up OSPF convergence in the case of a link failure, Configuring BFD for OSPF is recommended.

Example

# Set the dead interval on VLANIF100 to 60 seconds.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 100
[*HUAWEI-Vlanif100] ospf timer dead 60

# Set the dead interval on 10GE1/0/1 to 60 seconds.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ospf timer dead 60
Related Topics

ospf timer hello

Function

The ospf timer hello command sets the interval for sending Hello packets on an interface.

The undo ospf timer hello command restores the default value of the interval.

By default, for the interface of P2P and Broadcast type, the interval for sending Hello packets is 10 seconds; for the interface of NBMA and P2MP type, it is 30 seconds.

Format

ospf timer hello interval [ conservative ]

undo ospf timer hello

Parameters

Parameter Description Value
interval Specifies the interval for sending the Hello packet on an interface.

The value is an integer ranging from 1 to 65535, in seconds.

Setting hello interval to be longer than 2s is recommended.

conservative Indicates the conservative mode of the dead timer. If the conservative mode is configured, the value configured for the dead timer using the ospf timer dead command takes effect even when the value is less than 10s. -

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Hello packets are periodically sent on OSPF interfaces to establish and maintain neighbor relationships. A Hello packet contains information about timers, DRs, BDRs, and known neighbors.

The smaller the hello interval is, the faster the changing speed of the network topology is. The cost of routes, however, becomes greater. Ensure that the parameters of this interface and the adjacent routers are consistent.

To speed up OSPF convergence in the case of a link failure, you are advised to configure BFD for OSPF. For details, see Configuring BFD for OSPF. If the remote end does not support BFD for OSPF or you do not want to configure BFD for OSPF, specify conservative when you run the ospf timer hello command. The conservative mode is recommended so that the value of the dead timer configured using the ospf timer dead command takes effect even when the value is less than 10s. Otherwise, if the actual dead timer that takes effect due to the protection mechanism of a device is greater than 10s, services may be affected.

Precautions

OSPF does not support the configuration on a null interface.

If the configured interval (X) at which Hello packets are sent is less than 10s, the valid interval (Y) is calculated using the formula: Y = X/2 + X mod 2, in which mod indicates a modulo operation. The valid interval prevents neighbor flapping and improves network reliability.

If hello interval is set but a dead interval is not set using the ospf timer dead command, the dead interval of an OSPF neighbor is four times the value of hello interval. If the dead interval of an OSPF neighbor is shorter than 10s, the session may be closed. Therefore, if hello interval is shorter than or equal to 2s, the actual dead interval of an OSPF neighbor is not shorter than 10s in this case. If conservative is specified, the dead interval of an OSPF neighbor is four times the value of hello interval in this case.

Example

# Set the interval for sending Hello packets on VLANIF100 to 20 seconds.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 100
[*HUAWEI-Vlanif100] ospf timer hello 20

# Set the interval for sending Hello packets on 10GE1/0/1 to 20 seconds.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ospf timer hello 20
Related Topics

ospf timer poll

Function

The ospf timer poll command sets the poll interval for sending Hello packets on NBMA network.

The undo ospf timer poll command restores the default poll interval.

By default, it is 120 seconds.

Format

ospf timer poll interval

undo ospf timer poll

Parameters

Parameter Description Value
interval Specifies the poll interval for sending Hello packets. The value is an integer ranging from 1 to 3600, in seconds.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On the NBMA network, if a neighbor is invalid, the device periodically sends the Hello packets to the neighbor according to the poll interval set in the ospf timer poll command. The poll interval should be at least 4 times that of the Hello interval.

Precautions

OSPF does not support the configuration on a null interface.

Example

# Set the poll interval for sending Hello packets on VLANIF100 to 130 seconds.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 100
[*HUAWEI-Vlanif100] ospf timer poll 130

# Set the poll interval for sending Hello packets on 10GE1/0/1 to 130 seconds.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ospf timer poll 130

ospf timer retransmit

Function

The ospf timer retransmit command sets the interval for retransmitting LSA on an interface.

The undo ospf timer retransmit command restores the default interval for retransmitting LSA on the interface.

By default, the interval time is 5 seconds.

Format

ospf timer retransmit interval

undo ospf timer retransmit

Parameters

Parameter Description Value
interval Specifies interval for retransmitting LSA on an interface. The value is an integer ranging from 1 to 3600, in seconds.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When a device transmits an LSA to its neighbor, it has to wait for the ACK packet from the neighbor. If no ACK packet is received from the neighbor in the LSA retransmission interval, this LSA is retransmitted.

You should not set too short LSA retransmission intervals between adjacent routers. Otherwise, it leads to unnecessary retransmission.

Precautions

OSPF does not support the configuration on a Null interface.

Example

# Specify the interval for retransmitting LSAs between VLANIF100 and the adjacent device to 8 seconds.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 100
[*HUAWEI-Vlanif100] ospf timer retransmit 8

# Specify the interval for retransmitting LSAs between 10GE1/0/1 and the adjacent device to 8 seconds.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ospf timer retransmit 8

ospf timer wait

Function

The ospf timer wait command sets the wait timer on an OSPF interface.

The undo ospf timer wait command restores the wait timer on an OSPF interface to the default value.

By default, for the interface of Broadcast and P2P, the wait interval is 40 seconds; for that of NBMA, it is 120 seconds.

Format

ospf timer wait interval

undo ospf timer wait

Parameters

Parameter Description Value
interval Specifies the timeout period of the wait timer on an OSPF interface. The value is an integer ranging from 1 to 235926000, in seconds.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the ospf timer wait command to change the timeout period of the wait timer. If no Backup Seen event is received within the timeout period, the designated router (DR) election starts. Setting a proper value for the wait timer can decrease the frequency of changes of the DR and the backup designated router (BDR) on the network, thus reducing network flapping. When setting the wait timer, note the following points:

  • The wait timer takes effect only on broadcast and NBMA interfaces.

  • The value of the wait timer cannot be greater than the value of the dead timer.

Precautions

OSPF does not support the configuration of a null interface.

Example

# Set the wait timer on VLANIF100 to 30 seconds.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 100
[*HUAWEI-Vlanif100] ospf timer wait 30 

# Set the wait timer on 10GE1/0/1 to 30 seconds.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ospf timer wait 30 

ospf trans-delay

Function

The ospf trans-delay command adds an extension period for LSAs that are transmitted on an interface.

The undo ospf trans-delay command restores the default delay on the interface.

By default, the delay is 1 second.

Format

ospf trans-delay interval

undo ospf trans-delay

Parameters

Parameter Description Value
interval Specifies the delay for transmitting LSA on an interface. The value is an integer ranging from 1 to 500, in seconds.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

LSA ages in LSDB (increase by 1 each second), but LSA does not age during transmission in the network. It is therefore necessary to use this command to set a certain delay before the LSA is transmitted. This configuration is important for a low-speed network.

Precautions

OSPF does not support the configuration on the Null interface.

Example

# Specify the delay for transmitting LSA on VLANIF100 to 3 seconds.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 100
[*HUAWEI-Vlanif100] ospf trans-delay 3

# Specify the delay for transmitting LSA on 10GE1/0/1 to 3 seconds.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ospf trans-delay 3

ospf valid-ttl-hops

Function

The ospf valid-ttl-hops command enables OSPF GTSM and set the TTL value to be checked.

The undo ospf valid-ttl-hops command disables OSPF GTSM.

By default, OSPF GTSM is disabled.

Format

ospf valid-ttl-hops hops [ nonstandard-multicast ] [ vpn-instance vpn-instance-name ]

undo ospf valid-ttl-hops [ hops ] [ nonstandard-multicast ] [ vpn-instance vpn-instance-name ]

Parameters

Parameter Description Value
hops Specifies the TTL value to be checked. The value is an integer that ranges from 1 to 255. The default value is 255.
nonstandard-multicast

Specifies the GTSM configuration is also valid for multicast packets.

When the nonstandard-multicast parameter is configured:
  • The TTL values of the multicast packets which will be sent are set as 255.
  • The received multicast packets will be checked for the TTL value 1 or in the range of [ 255-hops+1, 255 ].
-
vpn-instance vpn-instance-name Specifies the name of a VPN instance. If this parameter is specified, it indicates that only the TTL value of the packets in the specified VPN instance needs to be checked. The value is a string of 1 to 31 case-sensitive characters except spaces. When double quotation marks are used to include the string, spaces are allowed in the string. The value _public_ is reserved and cannot be used as the VPN instance name.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In a network demanding higher security, you can enable GTSM to improve the security of the OSPF network. GTSM defends against attacks by checking the TTL value. If an attacker simulates OSPF unicast packets and keeps sending them to a switch, the switch receives the packets and directly sends them to the main control board for OSPF processing, without checking the validity of the packets. In this case, the switch is busy processing these packets, causing high usage of the CPU. GTSM protects the switches and enhances the system security by checking whether the TTL value in the IP packet header is in a pre-defined range.

The ospf valid-ttl-hops command is used to enable OSPF GTSM. The vpn-instance parameter must be specified in the command if you need to check the TTL value of packets that match the GTSM policy.

For example, if running the ospf valid-ttl-hops command enables OSPF GTSM on both the public network and the private network. If running the ospf valid-ttl-hops 5 vpn-instance vpn1 command, in addition to enabling OSPF GTSM on both the public network and the private network, you can detect the TTL value of OSPF packets in the VPN instance named vpn1, configure the default TTL value for packets unmatched with the GTSM policy for the OSPF packets from other instances of the private network and the public nework.

Precautions

  • If a VPN instance is specified in the ospf valid-ttl-hops command and the interface is bound to the VPN instance, all the unicast packets sent to this interface are dropped when the set number of TTL hops is smaller than the actual number of hops on the network.
  • If a virtual link or sham link is configured, the actual TTL value and the configured TTL value must be the same. That means that the number of virtual links or sham links that pass through the switch is calculated. Otherwise, packets sent from neighbors of a virtual link or a sham link will be dropped.

Example

# Enable OSPF GTSM, and set the maximum number of TTL hops to 5 for the packets that can be received from the public network.

<HUAWEI> system-view
[~HUAWEI] ospf valid-ttl-hops 5

peer (OSPF)

Function

The peer command sets the IP addresses and the DR priority for the adjacent switch on an NBMA network.

The undo peer command cancels the IP address of the adjacent switch on an NBMA network.

By default, the IP addresses and the DR priority for the adjacent switch on an NBMA network is not set.

Format

peer ip-address [ dr-priority priority ]

undo peer ip-address

Parameters

Parameter Description Value
ip-address Specifies the IP address for the adjacent devices. The value is in dotted decimal notation.
dr-priority priority Sets the priority for the adjacent devices to select a DR. The value of the priority is an integer that ranges from 0 to 255. By default, it is 1.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In an NBMA network (such as an X.25 or FR network), the entire network can be fully meshed based on the mapping configuration. That means that there is a virtual link between any two devices. In this case, the network running OSPF can be considered as a broadcast network where a DR or a BDR can be selected. You need, however, manually specify the IP address and the DR priority for the adjacent devices using the peer command, because it is impossible to find the adjacent devices dynamically by broadcasting the Hello packet.

Precautions

The DR priorities of the remote device and local device must be consistent.

Example

# Set the IP address of the adjacent switch to 10.1.1.1 in an NBMA network.

<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] peer 10.1.1.1

preference (OSPF)

Function

The preference command sets the preference of an OSPF route.

The undo preference command restores the default preference of the OSPF route.

By default, the preference of the OSPF route is 10. When ASE is specified, the default value is 150.

Format

preference [ ase | inter | intra ] { preference | route-policy route-policy-name } *

undo preference [ ase | inter | intra ]

Parameters

Parameter Description Value
ase Indicates the preference of the AS external route. -
inter Indicates the preference of the Inter-area route. -
intra Indicates the preference of the Intra-area route. -
preference Specifies the preference of the OSPF route.

The smaller the preference value, the higher the preference.

The value of the preference is an integer ranging from 1 to 255.
route-policy route-policy-name Specifies the name of the route policy. The name is a string of 1 to 200 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Multiple dynamic routing protocols can be run on a switch at the same time. In this case, there is a problem of route sharing and selecting among routing protocols. The system sets a default preference for each routing protocol. If different protocols have routes to the same destination, the protocol with the higher preference is selected to forward IP packets. Using this command, you can set the preference of an OSPF route.

You can create a route-policy to set the preference of a specific route by setting the route-policy parameter in the preference command:
  • If the apply preference clause is configured for the route-policy, route preference is determined as follows:
    • Route matching the route-policy: Its preference is determined by the apply clause.

    • Route unmatching the route-policy: Its preference is determined by the preference command.

    In the following example, the preference of the route matching the route-policy abc is set to 50 and the preference of the route unmatching the route-policy is set to 30.

    #
    route-policy abc permit node 1
     if-match cost 20
     apply preference 50
    #
    ospf 1
     preference 30 route-policy abc
  • If the apply preference clause is not included in the route-policy, the preference of routes is set by the preference command.

    In the above example, if the apply preference 50 clause is not included in the policy abc, the preference of all routes is set to 30.

Configuration Impact

When there are routes discovered by multiple routing protocols on the same switch, you can make the switch prefer OSPF routes by setting the OSPF route preference.

Example

# Set the preference of routes in OSPF process 100 to 150.

<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] preference 150

# Set the preference of external routes in OSPF process 200 to 130.

<HUAWEI> system-view
[~HUAWEI] ospf 200
[*HUAWEI-ospf-200] preference ase 130
Related Topics

prefix-priority (OSPF)

Function

The prefix-priority command sets the convergence priority of OSPF routes.

The undo prefix-priority command restores the default convergence priority of OSPF routes.

By default, the convergence priority of public 32-bit host routes is medium, and the convergence of other OSPF routes is low.

Format

prefix-priority { critical | high | medium } ip-prefix ip-prefix-name

undo prefix-priority { critical | high | medium }

Parameters

Parameter Description Value
critical Sets the convergence priority of OSPF routes to critical. -
high Sets the convergence priority of OSPF routes to high. -
medium Sets the convergence priority of OSPF routes to medium. -
ip-prefix ip-prefix-name Specifies the name of an IP prefix list. The name is a string of 1 to 169 case-sensitive characters except spaces. When double quotation marks are used to include the string, spaces are allowed in the string.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The prefix-priority command sets the convergence priority of OSPF routes according to the specified IP prefix list name, and takes effect on the public network only.

After the prefix-priority command is used in the OSPF view, OSPF route calculation, link-state advertisement (LSA) flooding, and LSDB synchronization can be implemented according to the configured priority, which accelerates route convergence.

Prerequisites

An IP prefix list has been created using the ip ip-prefix command in the system view.

Configuration Impact

When an LSA meets multiple priorities, the highest priority takes effect.

With the prefix-priority command, OSPF can calculate and flood LSAs, and synchronize LSDBs according to priorities. This speeds up route convergence. OSPF calculates LSAs in the sequence of intra-area routes, inter-area routes, and AS external routes. This command makes OSPF calculate the three types of routes separately according to the specified route calculation priorities. Convergence priorities are critical, high, medium, and low. To speed up the processing of LSAs with the higher priority, during LSA flooding, the LSAs need to be placed into the corresponding critical, high, medium, and low queues according to priorities.

Precautions

By default, the convergence priorities of public OSPF host routes, direct routes, static routes, and other protocol (such as BGP and RIP) routes are medium, high, medium, and low respectively. In the public network, OSPF 32-bit host routes are uniformly identified as medium.

Example

# Set the convergence priority of OSPF routes of 10.0.0.0/8 to critical.

<HUAWEI> system-view
[~HUAWEI] ip ip-prefix critical-prefix index 10 permit 10.0.0.0 8
[*HUAWEI] ospf 1
[*HUAWEI-ospf-1] prefix-priority critical ip-prefix critical-prefix
Related Topics

reset gtsm statistics

Function

The reset gtsm statistics command clears the GTSM statistics.

Format

reset gtsm statistics { slot-id | all }

Parameters

Parameter Description Value
slot-id Specifies the stack id. -
all Clears the GTSM statistics. -

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Before collecting the GTSM statistic within a certain period, you need to clear the existing statistics.

Example

# Clear the GTSM statistics.

<HUAWEI> reset gtsm statistics all

reset ospf counters

Function

The reset ospf counters command resets the OSPF counter.

Format

reset ospf [ process-id ] counters [ neighbor [ interface-type interface-number ] [ router-id ] ]

Parameters

Parameter Description Value
process-id Indicates the OSPF process ID. If the parameter is not specified, all OSPF processes are restarted. The value is an integer ranging from 1 to 4294967295.
neighbor The statistics of neighbors for the interface. -
interface-type interface-number Specifies the type and the number of the interface. -
router-id The Router ID of the neighbor. The value is in dotted decimal notation.

Views

User view

Default Level

3: Management level

Usage Guidelines

Clearing OSPF statistics does not affect the normal operation of OSPF services.

Once deleted, statistics cannot be restored. Therefore, use caution when deleting statistics.

Example

# Reset the OSPF counters.

<HUAWEI> reset ospf counters

reset ospf counters maxage-lsa

Function

The reset ospf counters maxage-lsa command deletes the statistics about router LSAs that have reached the maximum aging time.

Format

reset ospf [ process-id ] counters maxage-lsa

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process. The value is an integer ranging from 1 to 4294967295.

Views

User view

Default Level

3: Management level

Usage Guidelines

After the statistics about router LSAs that have reached the maximum aging time are deleted, OSPF services are not affected.

Statistics cannot be restored after being deleted. Therefore, exercise caution when running the command.

Example

# Delete the statistics about router LSAs that have reached the maximum aging time.

<HUAWEI> reset ospf counters maxage-lsa

reset ospf frr

Function

The reset ospf frr command starts OSPF IP FRR calculation again.

Format

reset ospf [ process-id ] frr

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process. If this parameter is not specified, FRR calculation is performed in all OSPF processes. The value is an integer ranging from 1 to 4294967295.

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

This command is a maintenance command. It can be used to forcibly perform FRR recalculation without deleting the FRR configuration.

Prerequisites

FRR has been configured in an OSPF process.

Configuration Impact

OSPF IP FRR calculation does not affect the normal running of OSPF.

Example

# Perform FRR calculation again in OSPF process.

<HUAWEI> reset ospf frr

reset ospf peer

Function

The reset ospf peer command restarts OSPF peers.

Format

reset ospf [ process-id ] peer [ interface-type interface-number ] router-id

Parameters

Parameter Description Value
process-id Indicates the OSPF process ID. If the parameter is not specified, all OSPF processes are restarted. The value is an integer ranging from 1 to 4294967295.
interface interface-type interface-number Specifies the interface type and number. -
router-id Specifies the Router ID of a peer in dotted decimal notation. -

Views

User view

Default Level

3: Management level

Usage Guidelines

Once deleted, statistics cannot be restored. Therefore, use caution when deleting statistics.

Example

# Restart OSPF peers.

<HUAWEI> reset ospf peer 10.1.1.1

reset ospf process

Function

The reset ospf process command restarts the OSPF process.

Format

reset ospf [ process-id ] process

Parameters

Parameter Description Value
process-id Indicates the OSPF process ID.

If the parameter is not specified, all OSPF processes are restarted.

The value is an integer ranging from 1 to 4294967295.

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

The reset ospf process command can be used to clear OSPF information to reset the board.

If OSPF connections are reset, OSPF neighbor relationships will be interrupted and the original information cannot be restored. Exercise caution before running the reset ospf process command.

Configuration Impact

After the reset ospf process command is used to restart OSPF, the following situations may occur:

  • If the router ID is changed, a new router ID will take affect after the command is run.

  • Re-elect DR and BDR.

  • OSPF configuration will not be lost after OSPF restarts.

Example

# Restart all OSPF processes.

<HUAWEI> reset ospf process
Warning: The OSPF process will be reset. Continue? [Y/N]: y

reset ospf redistribution

Function

The reset ospf redistribution command resets OSPF route redistribution.

Format

reset ospf [ process-id ] redistribution

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process. If this parameter is not specified, all OSPF processes are restarted. The value is an integer that ranges from 1 to 4294967295.

Views

User view

Default Level

3: Management level

Usage Guidelines

The reset ospf redistribution command resets OSPF route redistribution to generate Type 5 or Type 7 LSA..

Example

# Reset OSPF route redistribution in OSPF process 1.

<HUAWEI> reset ospf 1 redistribution

reset ospf spf

Function

Thereset ospf spf command restarts OSPF SPF calculation.

Format

reset ospf [ process-id ] spf

Parameters

Parameter Description Value
process-id Indicates the OSPF process ID. The value is an integer ranging from 1 to 4294967295.

Views

User view

Default Level

3: Management level

Usage Guidelines

You can run the command reset ospf spf to restart OSPF SPF calculation.

Example

# Restart OSPF SPF calculation.

<HUAWEI> reset ospf spf

reset ospf suppress-flapping peer

Function

The reset ospf suppress-flapping peer command forces an interface to exit from OSPF neighbor relationship flapping suppression.

Format

reset ospf process-id suppress-flapping peer [ interface-type interface-number ] [ notify-peer ]

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process. The value is an integer ranging from 1 to 4294967295.
interface-type interface-number Specifies an interface type and number. -
notify-peer Instructs neighbors to exit from OSPF neighbor relationship flapping suppression too. -

Views

User view

Default Level

3: Management level

Usage Guidelines

Interfaces exit from flapping suppression in the following scenarios:

  • The suppression timer expires.
  • The corresponding OSPF process is reset.
  • The reset ospf suppress-flapping peer command is run.
  • An OSPF neighbor is reset using the reset ospf peer command.
  • OSPF neighbor relationship flapping suppression is disabled globally using the suppress-flapping peer disable (OSPF) command in the OSPF view.

If notify-peer is specified when the reset ospf suppress-flapping peer command is run on a device, the device sends Hello packets in which HelloInterval and RouterDeadInterval are 0s to its neighbors to instruct the neighbors to exit from OSPF neighbor relationship flapping suppression too. If the neighbors fail to receive such Hello packets, the function of notify-peer does not take effect. To force the neighbors to exit from OSPF neighbor relationship flapping suppression, run the reset ospf suppress-flapping peer command on them.

Example

# Force interfaces to exit from OSPF neighbor relationship flapping suppression.

<HUAWEI> reset ospf 1 suppress-flapping peer

retransmission-limit

Function

The retransmission-limit command enables retransmission limit and set the maximum number of retransmissions.

The undo retransmission-limit command disables retransmission limit.

By default, retransmission limit is disabled.

Format

retransmission-limit [ max-number ]

undo retransmission-limit

Parameters

Parameter Description Value
max-number Indicates the maximum number of retransmissions. The value is an integer that ranges from 2 to 255. The default value is 30.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The retransmission-limit command can be used to enable Retransmission Limitation for OSPF (RL-for OSPF) to prevent dead loops caused by repeated transmissions when neighbors cannot receive packets.

Configuration Impact

The OSPF retransmission limit can be used in the following packets:

  • DD packet

  • LSU packet

  • LSR packet

If the three types of packets cannot receive the response packets, enable the retransmission attribute, limit the count of retransmission, and disconnect the neighbor when the retransmission exceeds the specified count.

Example

# Enable OSPf retransmission limit and set the maximum number of retransmissions to 40.

<HUAWEI> system-view
[~HUAWEI] ospf 1
[*HUAWEI-ospf-1] retransmission-limit 40

route-tag

Function

The route-tag command sets the tag value for imported VPN routes.

The undo route-tag command restores the default setting.

By default, the tag value of a VPN route is calculated based on the AS number of BGP. If no BGP is configured, the default tag value is 0.

Format

route-tag { tag | disable }

undo route-tag

Parameters

Parameter