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

AR500, AR510, and AR530 V200R007

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:

Among the AR500 series routes, AR503GW-LM7, AR503GW-LcM7, AR509G-L-D-H, AR509GW-L-D-H, support OSPF.

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 [ [ advertise | not-advertise ] | cost { cost | inherit-minimum } ] *

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

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 industrial switch router 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 industrial switch router 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.

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 ] *

asbr-summary type nssa-trans-type-reference [ cost nssa-trans-cost-reference ]

undo asbr-summary type

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.
type nssa-trans-type-reference Enables OSPF to refer to Type 5 LSAs that have been translated from Type 7 LSAs when it sets types for summary routes on ASBRs. By default, when OSPF sets types for summary routes on ASBRs, OSPF does not refer to Type 5 LSAs that have been translated from Type 7 LSAs. -
cost nssa-trans-cost-reference Enables OSPF to refer to Type 5 LSAs that have been translated from Type 7 LSAs when it sets costs for summary routes on ASBRs. By default, when OSPF sets types and costs for summary routes on ASBRs, OSPF does not refer to Type 5 LSAs that have been translated from Type 7 LSAs. -

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 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> system-view
[Huawei] ospf 100
[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 plain text password. Only a plain text 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.

-
plain-text Sets a plain text password. The value is a string of case-sensitive characters that can be letters or digits without spaces. 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 cipher text password. Either a plain or cipher text password can be entered, and cipher text is displayed when the configuration file is viewed. 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. The value is a string of case-sensitive characters that can be letters or digits without spaces. In simple authentication, the value is a string of 1 to 8 characters in plain text, or a string of 48, 24 or 32 characters in cipher text. In md5, hmac-sha256 or hmac-md5 authentication, the value is a string of 1 to 255 characters in plain text, or a string of 20 to 392 characters in cipher text.
md5 Indicates MD5 authentication using the cipher text password.
NOTICE:

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

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

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

-
hmac-sha256 Indicates HMAC-SHA256 authentication. -
key-id Specifies 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.

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 the question mark (?) and space. However, 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

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 } * 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 } * 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 } *( AR510 series )

undo bfd all-interfaces { min-rx-interval | min-tx-interval | detect-multiplier} *( AR510 series )

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 ranging from 10 to 2000, in milliseconds. The default value is 1000 milliseconds.
min-tx-interval transmit-interval Indicates the minimum interval at which BFD packets are sent to the remote end. The value is an integer ranging from 10 to 2000, in milliseconds. The default value is 1000 milliseconds.
detect-multiplier multiplier-value Indicates the local detection multiplier.
NOTE:

After BFD is enabled, OSPF establishes BFD sessions only with the neighbors in the Full state.

The value is an integer ranging from 3 to 50. By default, it is 3.

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.

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 smaller 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.
  • An OSPF device sets up BFD sessions with only the neighbors in Exstart state. 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.
  • The bfd all-interfaces command and the ospf bfd block command are mutually exclusive.

Example

# Configure BFD in an OSPF process and set the minimum interval for sending BFD packets to 400 ms.

<Huawei> system-view
[Huawei] ospf 
[Huawei-ospf-1] bfd all-interfaces enable
[Huawei-ospf-1] bfd all-interfaces min-tx-interval 400

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 upper limit of the imported external routes is 2147483647; the type of the imported external routes is Type 2; the default tag value is 1.

Format

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

undo default { cost | limit | tag | 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. -
limit limit Specifies the default upper limit of the external routes to be imported within a given period. The value is an integer ranging from 1 to 2147483647.
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 [ match-any ] ] *

default-route-advertise summary cost cost

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 industrial switch router configured with the always parameter does not calculate the default routes from other industrial switch routers.
  • 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 40 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
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. -
match-any Indicates that a device matches the routing entry in the routing table by using a routing policy and then advertises the default route according to the parameters set through the routing policy. -

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)     : 10000
   SPF Intelligent-timer Start-interval(msec)   : 500
   SPF Intelligent-timer Hold-interval(msec)    : 1000
   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
   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 8-24  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.

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 all LPUs.

Format

display gtsm statistics all

Parameters

Parameter Description Value
all Displays GTSM statistics on all LPUs. -

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, BGPv6, LDP, and OSPF packets, the number of packets that have passed, and the number of discarded packets, on all LPUs.

Example

# View GTSM statistics on all LPUs.

<Huawei> display gtsm statistics all
GTSM Statistics Table                                                           
----------------------------------------------------------------                
SlotId  Protocol  Total Counters  Drop Counters  Pass Counters                  
----------------------------------------------------------------                
 0      BGP       0               0              0                              
 0      BGPv6     0               0              0                              
 0      OSPF      0               0              0                              
 0      LDP       0               0              0                              
 0      OSPFv3    0               0              0                              
 0      RIP       0               0              0       
----------------------------------------------------------------                
Table 8-25  Description of the display gtsm statistics command output

Item

Description

SlotId

Slot 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 65535.
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 100.10.10.10                             
                 Routing Table to ABR and ASBR                                  
                                                                                
 RtType      Destination       Area       Cost  Nexthop         Type            
 Intra-area  10.10.10.11       0.0.0.0    1     10.2.0.3        ABR     
Table 8-26  Description of the display ospf abr-asbr command output

Item

Description

RtType

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

NextHop

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

Type

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 65535.
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 (Configured)
 status      : Advertise
 Cost        : 0 (Not Configured)
 delay       : 30 (Configured)
 The Count of Route is : 2
 Destination     Net Mask        Proto      Process   Type     Metric
 10.1.0.0        255.255.0.0     Static     1         2        10
 10.2.0.0        255.255.0.0     Static     1         2        10
Table 8-27  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

Destination

Destination address of the routes that are being summarized

Net Mask

Mask of the routes that are being summarized

Proto

Protocol of the routes that are being summarized

Process

Process ID

Type

Type of the imported AS external route, Type 1 or Type 2

Metric

Metric of the 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 65535.
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.3.3.3
  Area 0.0.0.0 interface 100.1.1.1(GigabitEthernet0/0/1)'s BFD Sessions
 NeighborId:10.2.2.2         AreaId:0.0.0.0          Interface:GigabitEthernet0/0/1
 BFDState:up                 rx    :1000             tx       :1000
 Multiplier:3                BFD Local Dis:8198      LocalIpAdd:10.1.1.1
 RemoteIpAdd:10.1.1.2        Diagnostic Info:No diagnostic information
Table 8-28  Description of the display ospf bfd session all command output

Item

Description

NeighborId

Router ID of the neighbor

AreaId

Area ID

Interface

Interface through which the local device establishes a BFD session with the neighbor

BFDState

BFD status:
  • up
  • down
  • unknown

rx

Negotiated minimum interval for receiving BFD packets

tx

Negotiated minimum interval for sending BFD packets

Multiplier

Remote detection multiplier

BFD Local Dis

Local discriminator dynamically assigned by BFD

LocalIpAdd

Local IP address

RemoteIpAdd

Remote IP address

Diagnostic Info

Diagnostic information:
  • Init: indicates that the BFD session is in the Initiate state.

  • Admin down: indicates that the shutdown command is run on the local BFD session.

  • BFD global disable: indicates that BFD is not enabled globally.

  • BFD session number exceed: indicates that the number of BFD sessions exceeds the limit.

  • Detect down: indicates that the local link becomes Down.

  • Receive admin down: indicates that the remote link becomes Down.

  • BFD is in rearranging: indicates that the board of the BFD session changes, and the data of the BFD session is transferred to another board.

  • No diagnostic information.

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 65535.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

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

  • Configure 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 1 with Router ID 10.137.217.210                           
                 OSPF Protocol Information                                      
                                                                                
 RouterID: 10.137.217.210   Border Router:  AREA                                
 Multi-VPN-Instance is not enabled                                              
 Global DS-TE Mode: Non-Standard IETF Mode                                      
 Graceful-restart capability: disabled                                          
 Helper support capability  : not configured                                    
 Applications Supported: MPLS Traffic-Engineering
 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                                                      
 SPF Computation Count: 1                                                       
 RFC 1583 Compatible                                                            
 Retransmission limitation is disabled                                          
 Area Count: 2   Nssa Area Count: 0                                             
 ExChange/Loading Neighbors: 0 
 Process total up interface count: 1                                            
 Process valid up interface count: 0                                            
                                                                                
 Area: 0.0.0.6          (MPLS TE not enabled)
 Authtype: None   Area flag: Normal
 SPF scheduled Count: 1
 ExChange/Loading Neighbors: 0
 Router ID conflict state: Normal
 Area interface up count: 1 
 Interface: 10.10.1.2 (GigabitEthernet0/0/1)                                                
 Cost: 1       State: DR        Type: Broadcast    MTU: 1500                    
 Timers: Hello 10 , Dead 40 , Poll  120 , Retransmit 5 , Transmit Delay 1                                  
Table 8-29  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.

Multi-VPN-Instance is not enabled

Indicates that the current process does not support multi-VPN-instance.

Applications Supported: MPLS Traffic-Engineering

Indicates that OSPF supports Traffic Engineering (TE).

Graceful-restart capability

Indicates whether graceful restart is enabled:
  • 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.

  • planned and un-planned: indicates that planned-GR and unplanned-GR are 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.

Route Preference

Indicates the preference of the default route

Default ASE parameters

Indicates the default parameters of the external LSA.
  • Metric: Indicates the default metric of the external LSA.
  • Tag: Indicates the default tag of the external LSA.
  • Type: Indicates the default type of the external LSA.

SPF Computation Count

Indicates the number of times that SPF calculation is performed.

RFC 1583 Compatible

Indicates whether RFC 1583 compatibility is enabled.

Retransmission limitation is disabled

Indicates that retransmission limit is disabled.

Area Count

Indicates the number of areas in the current process.

Nssa Area Count

Indicates the number of NSSAs in the current process.

Process total up interface count

Indicates the number of interfaces that is up.

Process valid up interface count

Indicates the number of interfaces that is valid.

Area

Indicates information about each area in the current process, including ID of the current area in dotted decimal notation.

Authtype

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

Area flag

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

SPF scheduled Count

Indicates the number of times that the SPF calculation is performed.

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 DROTHER. DR and BDR DROTHER 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.

Timers

Indicates the interval of the timer.

Hello

Indicates the interval of the Hello timer.

Dead

Indicates the interval of the Dead timer.

Poll

Indicates the interval of the Poll timer.

Retransmit

Indicates the interval of the Retransmit timer.

Transmit Delay

(Optional) Indicates the delay for transmitting LSAs on the interface.

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.

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).

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 65535.

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 10.1.1.1
                  Cumulations

  IO Statistics
             Type        Input     Output
            Hello           26         62
   DB Description            3          2
   Link-State Req            1          1
Link-State Update            5          5
   Link-State Ack            3          3
  ASE: 2  Checksum Sum: 233779
  LSAs originated by this router

  Router: 1
  Network: 0
  Sum-Net: 0
  Sum-Asbr: 0
  External: 3
  NSSA: 0
  Opq-Link: 0
  Opq-Area: 0
  Opq-As: 0
  LSAs Originated: 4  LSAs Received: 14

  Routing Table:
    Intra Area: 2  Inter Area: 0  ASE: 2

  Up Interface Cumulate: 2

      Neighbor Cumulate:
  =======================================================

      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 8-30  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 Req

OSPF Link State Request packet

Link-State Update

OSPF Link State Update packet

Link-State Ack

OSPF Link State Acknowledgement packet

Checksum Sum

Checksum of the AS external LSA

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

Sum-Asbr

Type 4 summary LSA

External

AS external LSA

NSSA

NSSA

Opq-Link

Number of Type 9 Opque LSAs

Opq-Area

Number of Type 10 Opque LSAs

Opq-As

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 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 65535.
lsa Display the OSPF LSA errors. -
interface 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 net segment                0       : Extern option mismatch
 0       : Router id confusion            0       : Bad authentication sequence numb

HELLO packet errors:
 0       : Netmask mismatch               0       : Hello timer mismatch
 0       : Dead timer mismatch            0       : Virtual neighbor unknown
 0       : NBMA neighbor unknown          0       : Invalid Source Address

DD packet errors:
 0       : Neighbor state low             0       : Unknown LSA type
 0       : MTU option mismatch

LS ACK packet errors:
 0       : Neighbor state low             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             0       : Newer self-generate LSA
 0       : LSA checksum bad               0       : Received less recent LSA
 0       : Unknown LSA type

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

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 
Table 8-31  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.

Bad net segment

The source address of received packets is not on the same network segment as the IP address of the interface that receives packets.

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.

Extern option mismatch

Indicates that the extension attributes of the Hello packets on the two ends are inconsistent.

If the value of this field keeps increasing, the area types of the two devices that establish the neighbor relationship are inconsistent (the area type of one device is common area, and the area type of the other device is stub area or NSSA). In this case, configure the same area type for the two devices (in the OSPF area view, the stub command indicates the area type is stub and the stub command indicates the area type is nssa).

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.

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.

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.

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.

# Display OSPF error information about the specified interface.
<Huawei> display ospf error interface gigabitethernet 0/0/1
    OSPF Process 1 with Router ID 20.1.1.1
            OSPF error statistics

 Interface: GigabitEthernet0/0/1 (1.2.0.1)
 General packet errors:
  0     : Bad version                    0     : Bad checksum
  0     : Bad area id                    0     : Bad authentication type
  0     : Bad authentication key         0     : Unknown neighbor
  0     : Bad net segment                0     : Extern option mismatch
  0     : Router id confusion

 HELLO packet errors:
  0     : Netmask mismatch               0     : Hello timer mismatch
  0     : Dead timer mismatch            0     : Invalid Source Address

 DD packet errors:
  0     : MTU option mismatch

 LS REQ packet errors:
  0     : Bad request

 LS UPD packet errors:
  0     : LSA checksum bad

 Receive Grace LSA errors:
  0     : Number of invalid LSAs         0     : Number of policy failed LSAs
  0     : Number of wrong period LSAs

display ospf global-statistics

Function

The display ospf global-statistics command displays global OSPF statistics. If no OSPF process ID is specified, brief information about all the OSPF processes is displayed.

Format

display ospf global-statistics { process process-id | vpn-instance vpn-instance-name | public-instance | timewheel | brief }

Parameters

Parameter Description Value
process process-id Specifies the ID of an OSPF process. The value is an integer ranging from 1 to 65535.
vpn-instance vpn-instance-name Specifies the name of a VPN instance. The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
public-instance Displays the statistics of all the public network instances. -
timewheel Displays the number of updated or aged LSAs in different periods. -
brief Displays brief information. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

None

Example

# Display global OSPF statistics, including statistics of neighbors, processes, and instances.

<Huawei> display ospf global-statistics brief
  Neighbor cumulative data (OSPF total statistics):
  ----------------------------------------------------------
  Down:               0        Init:                  0      Attempt:     0    2-Way:     0
  Exstart:            0        Exchange:              0      Loading:     0    Full:   2400
  Instance Number:     1        Process Number:        2
  HighSocketExpire:   27       HighSocketEmpty:  526275
  Total Neighbor Number:                   0                                    
  Total Press:   LOW 
Table 8-32  Description of the display ospf global-statistics brief command output

Item

Description

Neighbor cumulative data (OSPF total statistics)

Neighbor statistics

Instance Number

Number of instances, including public network instances and VPN instances

Process Number

Number of OSPF processes running on the device

HighSocketExpire

Number of unprocessed messages in high-priority queues

HighSocketEmpty

Number of processed messages in high-priority queues

Total Neighbor Number

Total number of OSPF neighbors

Total Press

Total pressure of the current service

In most cases, the Total Press field is LOW. If the number of retransmission timers or the number of LSAs being flooded in the OSPF processes exceeds a certain value (default 300), or the number of OSPF neighbors exceeds 300, the Total Press field is HIGH. If the number of retransmission timers and the number of LSAs being flooded in the OSPF processes fall below a certain value (default 300), and the number of OSPF neighbors falls below 300, the Total Press field is LOW.

# Display global statistics of OSPF process 1.

<Huawei> display ospf global-statistics process 1
  OSPF 1 statistics data:
  -----------------------------------------
  LSA NUM of Flood cache:          0
  Packet NUM of FloodUpdt Hash:          0
  Packet NUM of Flood Queue:          0
Table 8-33  Description of the display ospf global-statistics process 1 command output

Item

Description

LSA NUM of Flood cache Indicates the number of LSAs being flooded in the OSPF process.
Packet NUM of FloodUpdt Hash Indicates the number of Update packets waiting to be flooded in the OSPF process, and the number does not reach the MTU.
Packet NUM of Flood Queue Indicates the number of Update packets waiting to be flooded in the OSPF process, and the number reaches the MTU.

# Display OSPF time wheel information.

<Huawei> display ospf global-statistics timewheel
 =================== TimeWheel Info Begin ===================
 TimeWheel current index is 2845, datanode count is 8
 Bucket Number: 3596, Expiry time: 1306(s), Datanode Count: 0
 High expiry time: 0, Low expiry time 527742(s)
 Bucket Number: 3597, Expiry time: 1307(s), Datanode Count: 0
 High expiry time: 0, Low expiry time 527743(s)
 Bucket Number: 3598, Expiry time: 1308(s), Datanode Count: 0
Table 8-34  Description of the display ospf global-statistics timewheel command output

Item

Description

TimeWheel current index Indicates the current index of the time wheel.
Datanode Count Indicates the total number of nodes in the time wheel.
Bucket Number Indicates the total number of indexes of the time wheel.
Expiry time Indicates the expiry time of the index.
High expiry time Indicates the high expiry time corresponding to the index in the time wheel after the system starts.
Low expiry time Indicates the low expiry time corresponding to the index in the time wheel after the system starts.

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 65535.
verbose Displays detailed information about OSPF GR. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display ospf graceful-restart command to view details of the GR and the statistics.

Example

# Display OSPF GR information.

<Huawei> display ospf graceful-restart
          OSPF Process 1 with Router ID 10.1.1.1
 Graceful-restart capability     : enabled
 Graceful-restart support        : planned and un-planned, totally
 Helper-policy support           : planned and un-planned, strict lsa check
 Current GR state                : normal
 Graceful-restart period         : 120 seconds

 Number of neighbors under helper:
  Normal neighbors    : 0
  Virtual neighbors   : 0
  Sham-link neighbors : 0
  Total neighbors     : 0

 Number of restarting neighbors : 0

 Last exit reason:
  On graceful restart : successful exit
  On Helper           : none

# Display detailed information about OSPF GR.

<Huawei> display ospf graceful-restart verbose
          OSPF Process 1 with Router ID 10.1.1.1
 Graceful-restart capability     : enabled
 Graceful-restart support        : planned and un-planned, totally
 Helper-policy support           : planned and un-planned, strict lsa check
 Current GR state                : normal
 Graceful-restart period         : 120 seconds

 Number of neighbors under helper:
  Normal neighbors    : 0
  Virtual neighbors   : 0
  Sham-link neighbors : 0
  Total neighbors     : 0
 Number of restarting neighbors : 0

 Last exit reason:
  On graceful restart : successful exit
  On Helper           : none

 All area count      : 1

                 Area ID    : 0.0.0.0

 Authtype       : None     Area flag : Normal

 Normal interface count: 1

 Interface: 10.1.1.1 (GigabitEthernet0/0/1)
 GR state : normal                  State: P-2-P          Type: P2P
 Last Helper Exit reason: none
 Neighbor count of this interface : 1

 Neighbor          IP address        GR state    Last Helper Exit reason
 10.2.2.2          10.1.1.2          Normal      none
Table 8-35  Description of the display ospf graceful-restart command output

Item

Description

Graceful-restart capability

Whether IETF GR is enabled:
  • enabled
  • disabled

Graceful-restart support

IETF GR mode that is supported currently:
  • planned: indicates that only planned-GR is supported.
  • planned and un-planned: indicates that both planned GR and unplanned GR are supported.
  • totally: indicates that totally GR is supported.
  • partial: indicates that partial GR is supported.

Helper-policy support

Policy that supports the Helper:
  • planned: indicates that the Helper supports only planned GR.
  • planned and un-planned: indicates the Helper supports both planned GR and 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.
  • Under GR: indicates that the device enters the Restarter mode.
  • Under Helper: indicates that the device enters the Helper mode.

Graceful-restart period

GR period

Number of neighbors under helper

Number of neighbors in the Helper state:
  • Normal neighbors: indicates the number of normal neighbors.
  • Virtual neighbors: indicates the number of virtual neighbors.
  • Sham-link neighbors: indicates the number of sham link neighbors.
  • Total neighbors: indicates the total number of neighbors.

Number of restarting neighbors

Number of restarted devices displayed on the Helper

Last exit reason

Reason that a device exits from GR last time:
  • On graceful restart: indicates the reason that the Restarter exits from GR.
  • On Helper: indicates the reason that the Helper exits from GR.

On graceful restart

Reason that the Restarter exits from GR:
  • 1-way hello received: indicates that 1-way Hello packets are received.
  • back-link check failed: indicates that the back link check fails.
  • DR election fail: indicates that DR election fails.
  • grace period expired: indicates that the GR period expires.
  • interface state change: indicates that the interface state machine changes.
  • none: indicates that the device never performs GR since startup.
  • successful exit: indicates that the Restarter successfully exits from GR.
  • two Grace-LSAs received: indicates that two Grace LSAs are received.

On Helper

Reason that the Helper exits from GR:
  • flooding change LSA: indicates that the changed LSAs are received.
  • grace period expired: indicates that the GR period expires.
  • graceful restart unconfigured at process level: indicates that the GR function of the OSPF process is disabled.
  • interface state change: indicates that the interface state machine changes.
  • policy check failed for received grace LSA: indicates the policy that mismatches the Helper.
  • received 1-way hello packet: indicates that 1-way Hello packets are received.
  • received flushed grace LSA: indicates that flushed Grace LSAs are received.
  • received multiple grace LSA: indicates that multiple Grace LSAs are received.
  • neighbor reset: indicates that GR is disabled when neighbors are in the Helper mode.
  • none: indicates that the device never enters the Helper mode since startup.
  • successful exit: indicates that the Helper successfully exits from GR.

All area count

Number of areas in the process

Area ID

Area ID

Authtype

Authentication type

Area flag

Area attributes:
  • Normal

  • NSSA

  • Stub

Normal interface count

Number of interfaces in the area

Interface

IP address of the interface

GR state

GR status of the interface:
  • Normal: indicates that the device is in the Normal state.

  • Restarter: indicates that the device enters the Restarter mode.

  • Helper: indicates that the device enters the Helper mode.

State

Interface status:
  • P-2-P

  • DR

  • BDR

  • DROther

  • Waiting

  • Down

Type

Interface type:
  • P2P

  • P2MP

  • NBMA

  • Broadcast

Last Helper Exit reason

Reason that the neighbor exits from the Helper mode the last time:
  • none: indicates that the device never enters the Helper mode since startup.

  • successful exit: indicates that the neighbor successfully exits from the Helper mode.

  • grace period expired: indicates that the GR period expires.

  • received flushed grace LSA: indicates that flushed Grace LSAs are received.

  • flooding change LSA: indicates that the 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 the policy that mismatches the Helper.

  • neighbor reset: indicates that the network topology changes after the reset command is run on the neighbor of the Helper.

  • interface state change: indicates that the interface state machine changes.

  • graceful restart unconfigured at process level: indicates that the neighbor is not configured with the GR function.

Neighbor count of this interface

Total number of neighbors of this interface

Neighbor

Router ID of the neighbor

IP address

IP address of the neighboring interface

GR state

GR status of the neighbor:
  • Normal: indicates that the neighbor is in the Normal state.

  • Restarter: indicates that the neighbor enters the Restarter mode.

  • Helper: indicates that the neighbor enters the Helper mode.

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 ]

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process. The value is an integer ranging from 1 to 65535.
all Displays information about all OSPF interfaces. -
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.1.1
                  Interfaces

 Area: 0.0.0.0        (MPLS TE not enabled)
 IP Address      Type         State    Cost  Pri   DR              BDR
 192.168.1.2     Broadcast    DR       1     1     192.168.1.2     192.168.1.3

 Area: 0.0.0.1        (MPLS TE not enabled)
 IP Address      Type         State    Cost  Pri   DR              BDR
 172.16.0.1      Broadcast    DR       1     1     172.16.0.1      172.16.0.2
# Display information about the specified OSPF interface.
<Huawei> display ospf interface gigabitethernet 0/0/1
          OSPF Process 1 with Router ID 1.1.1.1
                  Interfaces

 Interface: 192.168.1.1 ( gigabitethernet 0/0/1 )
 Cost: 1       State: DR        Type: Broadcast    MTU: 1500 
 Priority: 1                                                                    
 Designated Router: 192.168.1.2                                                 
 Backup Designated Router: 192.168.1.3
 Timers: Hello 10 , Dead 40 , Poll  120 , Retransmit 5 , Transmit Delay 1
  IO Statistics
             Type        Input     Output
            Hello       161367      10436
 DB Description             18         18
 Link-State Req              5          6
 Link-State Update       203780       210
 Link-State Ack          90411        276
 ALLSPF GROUP
 ALLDR GROUP
 OpaqueId: 1   PrevState: BDR
 Effective cost: 1, enabled by OSPF Protocol.
Table 8-36  Description of the display ospf interface command output

Item

Description

Area

ID of the area to which the interface belongs

IP address

IP address of the interface (regardless of whether TE is enabled on the interface)

Type

Interface type: P2P, PTMP, 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.

DR

DR of the network where the interface resides

BDR

BDR of the network where the interface resides

Interface

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

MTU

MTU value of the interface

Priority

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

The value is an integer ranging from 0 to 255.

Designated Router

DR of the network where the interface resides

Backup Designated Router

BDR of the network where the interface resides

Timer Hello

Interval for sending Hello packets

Dead

Dead time of devices

Poll

Interval for sending Poll packets

Retransmit

Interval for retransmitting LSAs

Transmit Delay

Interface transmission delay

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 ] | self-originate ] [ 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 65535.
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.
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.

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 1 with Router ID 10.1.1.1                                 
                  Link State Database                                           
                                                                                
                          Area: 0.0.0.0                                         
 Type      LinkState ID    AdvRouter          Age  Len   Sequence   Metric      
 Router    10.2.2.2        10.2.2.2            98  36    8000000B       1       
 Router    10.1.1.1        10.1.1.1            92  36    80000005       1       
 Network   10.1.1.2        10.2.2.2            98  32    80000004       0       
 Sum-Net   10.1.1.0        10.2.2.2           286  28    80000001       1       
 Sum-Net   10.1.1.0        10.1.1.1           282  28    80000001       1       
 Sum-Asbr  10.2.2.2        10.1.1.1            61  28    80000001       1
Table 8-37  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 10.137.217.208                           
                         Area: 0.0.0.1                                          
                 Link State Database                                            
                                                                                
                                                                                
  Type      : Router                                                            
  Ls id     : 10.137.217.210                                                    
  Adv rtr   : 10.137.217.210                                                    
  Ls age    : 1564                                                              
  Len       : 36                                                                
  Options   :  ABR  E                                                           
  seq#      : 80000003                                                          
  chksum    : 0xeb06                                                            
  Link count: 1                                                                 
   * Link ID: 192.168.4.1                                                       
     Data   : 192.168.4.2                                                       
     Link Type: TransNet                                                        
     Metric : 1                                                                 
                                                                                
  Type      : Router                                                            
  Ls id     : 10.137.217.208                                                    
  Adv rtr   : 10.137.217.208                                                    
  Ls age    : 1556                                                              
  Len       : 36                                                                
  Options   :  E                                                                
  seq#      : 80000005                                                          
  chksum    : 0xf6fe                                                            
  Link count: 1                                                                 
   * Link ID: 192.168.4.1                                                       
     Data   : 192.168.4.1                                                       
     Link Type: TransNet                                                        
     Metric : 1                                                                 
     Priority : Medium                                                                           
Table 8-38  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

  • If the type of link is Point-to-Point, Link ID indicates the router id of neighbor.
  • If the type of link is TransNet, Link ID indicates IP address of DR.
  • If the type of link is Stub, Link ID indicates IP address.
  • If the type of link is Virtual Link, Link ID indicates the router id of neighbor.

Data

Link data of the router LSA

  • If the type of link is Point-to-Point, TransNet, or Virtual Link, Data indicates IP address.
  • If the type of link is Stub, Data indicates mask of IP address.

Link Type

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

Metric

Link metric of the router LSA

Priority

OSPF convergence priority

# Display information about network LSAs in the LSDB.

<Huawei> display ospf 1 lsdb network 10.1.1.1
          OSPF Process 1 with Router ID 10.1.1.1
                          Area: 0.0.0.0
                  Link State Database

  Type      : Network
  Ls id     : 10.1.1.1
  Adv rtr   : 10.1.1.1
  Ls age    : 167
  Len       : 32
  Options   :  E
  seq#      : 80000002
  chksum    : 0x3408
  Net mask  : 255.255.255.0
  Priority  : Low
  Attached Router    10.2.2.2
  Attached Router    10.1.1.1
Table 8-39  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.1.1.1
                    Area: 0.0.0.0
                  Link State Database

  Type      : Sum-Net
  Ls id     : 10.1.1.0
  Adv rtr   : 10.2.2.2
  Ls age    : 419
  Len       : 28
  Options   :  E
  seq#      : 80000001
  chksum    : 0x1d21
  Net mask  : 255.255.255.0
  Tos 0  metric: 1       
  Priority  : Medium
Table 8-40  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 10.2.2.2
          OSPF Process 1 with Router ID 10.1.1.1
                    Area: 0.0.0.2
                  Link State Database

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

  Type      : External
  Ls id     : 10.1.1.0
  Adv rtr   : 10.2.2.2
  Ls age    : 569
  Len       : 36
  Options   :  E
  seq#      : 80000002
  chksum    : 0x90d0
  Net mask  : 255.255.255.0
  TOS 0  Metric: 1
  E type    : 2
  Forwarding Address : 0.0.0.0
  Tag       : 1
  Priority  : Medium
Table 8-41  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
                  Link State Database

  Type      : NSSA
  Ls id     : 10.1.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.1.1.2
  Tag       : 1
  Priority  : Medium

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

<Huawei> display ospf 1 lsdb opaque-link
          OSPF Process 1 with Router ID 10.1.1.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     : 10.0.0.0
  Adv rtr   : 10.2.2.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 8-42  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 industrial switch router

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

<Huawei> display ospf 1 lsdb opaque-area
OSPF Process 1 with Router ID 10.1.1.1
Area: 0.0.0.0                                          
                 Link State Database 
  Type      : Opq-Area
  Ls id     : 10.0.0.1
  Adv rtr   : 10.1.1.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 mesh-group

Function

The display ospf mesh-group command displays brief information about OSPF mesh groups.

Format

display ospf [ process-id ] mesh-group [ brief ]

Parameters

Parameter Description Value
process-id

Specifies the ID of an OSPF process.

If no process ID is specified, brief information about mesh groups in all OSPF processes is displayed.

The value is an integer ranging from 1 to 65535.
brief Displays brief information about mesh groups in each OSPF area. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

When concurrent links exist between a industrial switch router and its neighbor, run the mesh-group enable command to enable the mesh group function and identify the mesh group using the router ID of the industrial switch router. When receiving LSAs, the industrial switch router will select a main link to flood LSAs. The link interface does not flood reversely. This avoid repeated flooding, reducing link load and saving resources.

Running the display ospf mesh-group command can view brief information about mesh groups in a specified process in an OSPF area.

Example

# Display brief information about OSPF mesh groups.

<Huawei> display ospf mesh-group
                                                                                
         OSPF Process 1 with Router ID 1.1.1.1                                  
                 Mesh-Groups                                                    
                                                                                
 Area: 0.0.0.0                                                                  
       Mesh-Group ID: 2.2.2.2                                                   
          Interface                     IP Address/Mask                Nbr State
          GigabitEthernet0/0/1                 192.168.4.1/24                 Full     
                                                                                
       Count of Interface in this Mesh-Group: 1                                 
                                                                                
       Count of Mesh-Group in this Area: 1                                      
                                                                                
Table 8-43  Description of the display ospf mesh-group command output

Item

Description

Area

OSPF area

Mesh-Group ID

Key ID of a mesh group, namely, the router ID of a neighbor

Interface

Interface enabled with the mesh-group feature

IP Address/Mask

IP address and mask of the interface enabled with the mesh-group feature

Nbr State

Neighbor status on the interface enabled with the mesh-group feature

Count of Interface in this Mesh-Group

Number of interfaces in the mesh group

Count of Mesh-Group in this Area

Number of mesh groups in the area

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 65535.

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       GigabitEthernet0/0/1
10.0.0.2         Local     5         10.0.0.1       GigabitEthernet0/0/1
Table 8-44  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 | 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 65535.
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. -

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 10.1.1.2
                 Neighbors

 Area 0.0.0.0 interface 10.1.1.2(GigabitEthernet0/0/1)'s neighbors
 Router ID: 10.1.1.1         Address: 10.1.1.1          GR State: Normal
   State: Full  Mode:Nbr is Slave  Priority: 1
   DR: 10.1.1.2  BDR: 10.1.1.1   MTU: 0
   Dead timer due in 35  sec
   Retrans timer interval: 5
   Neighbor is up for 00:00:05
   Authentication Sequence: [ 0 ]
Table 8-45  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

GR State

GR status after OSPF GR is enabled:
  • Normal: indicates that a industrial switch router is in the Normal state and does not perform GR.

  • Doing GR: indicates that a industrial switch router is performing GR.

  • Complete GR: indicates that a industrial switch router finishes GR.

  • Helper: indicates that the neighbor is the Helper when a industrial switch router is performing GR.

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 35 sec

The dead timer due in 35 seconds

Retrans timer interval

Interval for retransmitting LSAs, in seconds

Neighbor is up for

Time before an OSPF neighbor relationship is established

Authentication Sequence

Authentication sequence number

# Display brief information about OSPF neighbors.

<Huawei> display ospf 1 peer brief
                                                                                
         OSPF Process 1 with Router ID 1.1.1.1                             
                  Peer Statistic Information                                   
 -------------------------------------------------------------------            
 Area Id         Interface                  Neighbor id      State              
 0.0.0.0         GigabitEthernet0/0/1       3.3.3.3          Full                
 -------------------------------------------------------------------  
 Total Peer(s):     1
Table 8-46  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.1.1.1

                         Last Down OSPF Peer

         Neighbor Ip Address : 20.2.1.2
         Neighbor Area Id    : 0.0.0.0
         Neighbor Router Id  : 2.2.2.2
         Interface           : GigabitEthernet0/0/1
         Immediate Reason    : Neighbor Down Due to Kill Neighbor
         Primary Reason      : Logical Interface State Change
         Down Time           : 2012-09-14 17:17:7
Table 8-47  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.
  • 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 exists 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.

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 65535.
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 8-48  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 ] [ low-level-of-retrans-times-range min-time ] [ high-level-of-retrans-times-range max-time ]

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process. The value is an integer ranging from 1 to 65535.
interface-type interface-number Specifies the interface type and number. -
neighbor-id Specifies the neighbor's Router ID. It is in dotted decimal notation.
low-level-of-retrans-times-range min-time Min value of LSA retrans timers range. The value is an integer ranging from 0 to 65535.
high-level-of-retrans-times-range max-time Max value of LSA retrans timers range. The value is an integer ranging from 1 to 65535.

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 10.1.1.1                           
                 OSPF Retransmit List                                           
                                                                                
  The Router's Neighbor is Router ID 10.2.2.2  Address 192.168.0.2        
  Interface 192.168.0.1      Area 0.0.0.0                                       
  Retransmit list:                                                              
       Type       LinkState ID      AdvRouter         Sequence   Age            
       Router     10.1.1.1          10.1.1.1          80000002   533  
Table 8-49  Description of the display ospf retrans-queue command output

Item

Description

The Router's Neighbor

Basic information about the neighboring industrial switch router

Router ID

Router ID of the neighbor

Address

IP address of the neighboring interface

Interface

IP address of the interface

Area

Area ID

Retransmit list

Retransmission 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 routing

Function

The display ospf routing command displays the OSPF routing table.

Format

display ospf [ process-id ] routing router-id [ router-id ]

display ospf [ process-id ] routing [ ip-address [ mask | mask-length ] ] [ interface interface-type interface-number ] [ nexthop nexthop-address ]

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process. The value is an integer ranging from 1 to 65535.
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.

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 10.2.2.9                                
                  Routing Tables                                                
                                                                                
 Routing for Network                                                            
 Destination        Cost  Type       NextHop         AdvRouter       Area       
 10.12.12.0/24      1     Transit    10.12.12.10     10.2.2.9        0.0.0.1    
 10.13.13.0/24      1     Stub       10.13.13.1      10.2.2.9        0.0.0.0    
 10.11.11.0/24      2     Transit    10.12.12.11     10.0.0.1        0.0.0.1    

 Routing for ASEs
 Destination        Cost      Type       Tag      NextHop         AdvRouter
 10.0.0.0/8         1         Type2      1        10.12.12.11     10.0.0.1
 
 Total Nets: 4
 Intra Area: 3  Inter Area: 0  ASE: 1  NSSA: 0
Table 8-50  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.

NextHop

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

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 65535.
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 8-52  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, 0 Modified
           Inter    : 0 Added,0 Deleted, 0 Modified
           External : 10 Added,0 Deleted, 0 Modified
           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 8-53  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, modified and deleted because of route calculation.

Inter

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

External

Number of external routes in the routing table, which are added, modified 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 industrial switch router that generates the LSA that causes route calculation

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 Router-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 8-54  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 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 65535.
originate-router Specifies the link status of the advertising industrial switch router. -
advertising-router-id Specifies the ID of the advertising industrial switch router. 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 process 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 8-55  Description of the display ospf statistics updated-lsa command output

Item

Description

Begin time

Start time of collecting statistics

AdvRouter

Advertising industrial switch router

Total

Total update times of LSAs

Updated at

Latest update time

# Display the LSA updates of the specified advertising industrial switch router.

<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: 2011-04-25 11:37:32

 AdvRouter      : 10.1.1.1
 Total          : 6                 Updated at      : 2011-04-25 11:37:41
 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 8-56  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: 2011-04-25 11:39:32
 End time  : 2011-04-25 11:41:32

 no Record

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

 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 8-57  Description of the display ospf statistics updated-lsa history command output

Item

Description

Record

Record number

End time

End time of collecting statistics

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

1: Monitoring 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 : 22
                                                                
------------------------------------------------------------------------------  
Trap name                             Default switch status   Current switch status   
ospfIfStateChange                           off                     off                     
ospfVirtIfStateChange                       off                     off                     
ospfNbrStateChange                          off                     off                     
ospfVirtNbrStateChange                      off                     off                     
ospfIfAuthFailure                           off                     off                     
ospfVirtIfAuthFailure                       off                     off                     
ospfIfRxBadPacket                           off                     off                     
ospfVirtIfRxBadPacket                       off                     off                     
ospfLsdbOverflow                            off                     off                     
ospfLsdbApproachingOverflow                 off                     off                     
ospfRestartStatusChange                     off                     off                     
ospfNbrRestartHelperStatusChange            off                     off                     
ospfVirtNbrRestartHelperStatusChange        off                     off                     
ospfNssaTranslatorStatusChange              off                     off                     
ospfIfConfigError                           off                     off                     
ospfVirtIfConfigError                       off                     off                     
ospfTxRetransmit                            off                     off                     
ospfVirtIfTxRetransmit                      off                     off                     
ospfOriginateLsa                            off                     off                     
ospfMaxAgeLsa                               off                     off                     
hwOspfv2IntraAreaRouteridConflict           on                      on                      
hwOspfv2IntraAreaDRIpAddressConflict        on                      on 
hwOspfv2IntraAreaRouterIdConflictRecovered  on                      on
hwOspfv2PeerFlappingSuppressStatusChange    off                     off
Table 8-59  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:
  • ospfIfStateChange: It is sent when the interface status changes.
  • ospfVirtIfStateChange: It is sent when the status of the interface on the virtual link changes.
  • ospfNbrStateChange: It is sent when the neighbor status changes.
  • ospfVirtNbrStateChange: It is sent when the status of the neighbor on the virtual link changes.
  • ospfIfAuthFailure: It is sent when interface authentication fails.
  • ospfVirtIfAuthFailure: It is sent when the authentication of the interface on the virtual link fails.
  • ospfIfRxBadPacket: It is sent when a bad packet is received on the interface.
  • ospfVirtIfRxBadPacket: It is sent when a bad packet is received on the interface on the virtual link.
  • ospfLsdbOverflow: It is sent when the LSDB overflows.
  • ospfLsdbApproachingOverflow: It is sent when the LSDB is about to overflow.
  • ospfRestartStatusChange: It is sent when the GR Restarter status changes.
  • ospfNbrRestartHelperStatusChange: It is sent when the GR Helper status changes.
  • ospfVirtNbrRestartHelperStatusChange: It is sent when the GR Helper status of the neighbor on the virtual link changes.
  • ospfNssaTranslatorStatusChange: It is sent when the status of the NSSA device that translates Type 7 LSAs into Type 5 LSAs changes.
  • ospfIfConfigError: It is sent when the interface configuration is incorrect.
  • ospfVirtIfConfigError: It is sent when the configuration of the interface on the virtual link is incorrect.
  • ospfTxRetransmit: It is sent when packets are retransmitted.
  • ospfVirtIfTxRetransmit: It is sent when packets are retransmitted on the interface on the virtual link.
  • ospfOriginateLsa: It is sent when local LSAs are generated.
  • ospfMaxAgeLsa: It is sent when Max Age LSAs are generated.
  • hwOspfv2IntraAreaDRIpAddressConflict: It is sent when IP addresses of DRs in an OSPF area conflict.
  • hwOspfv2IntraAreaRouteridConflict: It is sent when router ID conflict was detected in an OSPF area.
  • hwOspfv2IntraAreaRouterIdConflictRecovered: It is sent when the router ID conflict was resolved in an OSPF area.
  • hwOspfv2PeerFlappingSuppressStatusChange: It is sent when OSPF neighbor flapping suppression status changed.

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 industrial switch router 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.

NOTE:
OSPF direct routes to the PE do not carry the domain ID, while BGP direct routes to the PE carry the domain ID.

Configuration Impact

Before sending routes to a remote CE industrial switch router, a PE industrial switch router 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 industrial switch router supporting RFC 4577, you can set the route type of the extended community attribute of OSPF VPN to 0x0306 and configure the industrial switch router to identify both 0x0306 and 0x8000 route types.
  • For the industrial switch router 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 industrial switch router to identify only the 0x8000 route type.

By running the eca-route-type compatible command enables different industrial switch routers 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

enable log

Function

The enable log command enables log.

The undo enable log command disables log.

By default, log is disabled.

Format

enable log [ config | error | state | snmp-trap ]

undo enable log [ config | error | state | snmp-trap ]

Parameters

Parameter Description Value
config Enables the configuration log. -
state Enables the state log. -
error Enables the error log. -
snmp-trap Enables the SNMP trap log. -

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Running the enable log command can enable the logging function. You can view running status of devices based on logs, facilitating device maintenance.

If the undo enable log command is executed, the logging function will be disabled. Then, running status of devices will be not displayed. This is inconvenient for network maintenance.

Precautions

Configuring different parameters in the enable log command can display different log information. If no parameter is not specified, the command output displays all log information.

Example

# Enable the OSPF log.

<Huawei> system-view
[Huawei] ospf 1
[Huawei-ospf-1] enable log 

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 ACL. The value is a string of 1 to 32 case-sensitive characters without spaces. The value must start with a letter (a to z or A to Z, 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, with spaces not supported. When double quotation marks are used around 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 40 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.
  • For a named ACL configured using the acl name command, when the rule 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.
  • 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

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 an ACL. The value is a string of 1 to 32 case-sensitive characters without spaces. The value must start with a letter (a to z or A to Z, 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, with spaces not supported. When double quotation marks are used around 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 40 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

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.
  • For a named ACL , when the rule 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.
  • 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 industrial switch router 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 without spaces. The value must start with a letter (a to z or A to Z, 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 industrial switch router 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 | route-policy route-policy-name } export [ protocol [ process-id ] ]

undo filter-policy [ acl-number | acl-name acl-name | ip-prefix ip-prefix-name | route-policy route-policy-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 without spaces. The value must start with a letter (a to z or A to Z, 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, with spaces not supported. When double quotation marks are used around 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 40 case-sensitive characters, with spaces not supported. When double quotation marks are used around 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, unr, 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 65535. 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.

  • For a named ACL, when the rule 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

# 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

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 without spaces. The value must start with a letter (a to z or A to Z, 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, with spaces not supported. When double quotation marks are used around 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 40 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 command, when the rule 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

flooding-control

Function

The flooding-control command restricts the flooding of update LSAs.

The undo flooding-control command cancels the restriction on the flooding of update LSAs.

By default, this function is enabled when the number of neighbors exceeds 256.

Format

flooding-control [ number transmit-number | timer-interval transmit-interval ] *

undo flooding-control [ number | timer-interval ] *

Parameters

Parameter Description Value
number transmit-number Sets the number of update LSAs to be flooded each time. The value is an integer ranging from 1 to 1000. By default, the value is 50.
timer-interval transmit-interval Sets the interval for flooding update LSAs. The value is an integer that ranges from 30 to 100000, in milliseconds. By default, the value is 30.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When multiple neighbors are configured or a large number of update LSAs are flooded, a industrial switch router may receive a large number of update LSAs in a short period. If the industrial switch router is busy processing these Update packets and discards the Hello packets that maintain neighbor relationships, neighbor relationships may be interrupted. During the reestablishment of neighbor relationships, more packets need to be exchanged, which deteriorates the processing of packets.

To avoid the preceding problem, you can run the flooding-control command to restrict the flooding of update LSAs to keep stable neighbor relationships.

Configuration Impact

After the flooding-control command is run, the flooding of update LSAs is immediately restricted.

Precautions

By default, a industrial switch router spends 50 ms in flooding update LSAs each time. If not all the update LSAs are flooded within 50 ms, the industrial switch router floods the remaining LSAs after the time specified by transmit-interval.

Example

# Set the number of update LSAs to be flooded each time to 100.

<Huawei> system-view 
[Huawei] ospf 1 
[Huawei-ospf-1] flooding-control number 100

graceful-restart (OSPF)

Function

The graceful-restart command enables the GR function.

The undo graceful-restart command disables GR function.

By default, OSPF GR is disabled.

Format

graceful-restart [ period period | planned-only | partial ] *

undo graceful-restart [ period | planned-only | partial ] *

Parameters

Parameter Description Value
period period Specifies the duration of GR. It is an integer ranging from 1s to 1800s. The default value is 120s.
planned-only Indicates that the industrial switch router supports only the planned GR. By default, the industrial switch router supports both the planned GR and unplanned GR. -
partial Indicates that the industrial switch router partially supports the GR. By default, the industrial switch router totally supports the GR. -
NOTE:

Planned GR: indicates that a device manually restarts or performs a master/slave MPU switchover by using the command. Before the device restarts or performs a master/slave MPU switchover, Restarter will send a grace LSA.

Unplanned GR: indicates that a device restarts or performs a master/slave MPU switchover because of faults. A device directly performs a master/slave MPU switchover without sending a grace LSA, and then enters GR after the slave MPU goes Up. It is different from the planned GR.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The graceful-restart command enables OSPF GR to avoid the route flapping due to the traffic interruption or master/slave MPU switchover.After the graceful-restart command is run to enable GR for a industrial switch router, the Helper function is also enabled.

Prerequisites

Opaque LSAs provide a generic mechanism for OSPF extension:

  • OSPF supports GR using Type 9 LSAs.
  • OSPF supports TE using Type 10 LSAs.

Before configuring OSPF GR, you must enable opaque LSA capability running the opaque-capability enable command.

Configuration Impact

After an OSPF process is restarted using GR, the Restarter industrial switch router and the Helper industrial switch router reestablish the neighbor relationship, exchange routing information, synchronize the LSDB, and update the routing table and forwarding table. This implements OSPF fast convergence, prevents traffic interruption, and stabilizes the network topology.

Precautions

If there are special requirements on the GR Helper, run the graceful-restart helper-role command to configure the requirements.

Example

# Enable OSPF GR and the GR period is set to 200s.

<Huawei> system-view
[Huawei] ospf 1
[Huawei-ospf-1] opaque-capability enable
[Huawei-ospf-1] graceful-restart period 200

graceful-restart helper-role (OSPF)

Function

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

The undo graceful-restart helper-role command cancels the configuration.

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

Format

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

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

Parameters

Parameter Description Value
period period Specifies the duration of GR. The value is an integer that ranges from 1 to 1800, in seconds. The default value is 120.
planned-only Configures the device to support only planned GR. By default, the device supports both the planned GR and unplanned GR. -
partial Configures the device to support partial GR. By default, the device supports totally GR. -
ip-prefix ip-prefix-name Specifies the name of the address prefix list. The name is a string. The name is a string of 1 to 169 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
acl-number acl-number Specifies the basic ACL number. 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 without spaces. The value must start with a letter (a to z or A to Z, case sensitive).
ignore-external-lsa Indicates that the device does not check 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 device 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, only the restarter and the helper reestablish the neighbor relationship, then stabilizes the network topology.

Prerequisites

Before configuring GR of the device, you need to enable Opaque LSA by running the opaque-capability enable command.

Example

# Configure a device as an OSPF GR helper and configure the helper to support onlyPlanned-GR.

<Huawei> system-view
[Huawei] ospf 1
[Huawei-ospf-1] graceful-restart helper-role planned-only

gtsm default-action

Function

The gtsm default-action command sets the default action that is performed on the packets that do not match the GTSM policies.

The undo gtsm default-action drop command cancels the setting that the packets that do not match the GTSM policy can not pass the filtering.

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

Format

gtsm default-action { drop | pass }

undo gtsm default-action drop

Parameters

Parameter Description Value
drop Indicates that the packets that do not match the GTSM policies cannot pass the filtering. The packets 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

For a network demanding high security, you can configure Generalized TTL Security Mechanism (GTSM) to improve the security of the OSPF network. GTSM defends against attacks by checking the Time-to-Live (TTL) value. If an attacker simulates real OSPF packets and keeps sending them to a industrial switch router, an interface board on the industrial switch router 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 industrial switch router is busy in processing these packets, causing high usage of the CPU. GTSM function protects the industrial switch router by checking whether the TTL value in the IP packet header is in a pre-defined range to improve the system security.

GTSM only checks the TTL values of the packets that match the GTSM policy. The packets that do not match the GTSM policy can pass the filtering using the undo gtsm default-action dropcommand or using the gtsm default-action command to set the pass parameter, or be dropped after the gtsm default-action command is run to set the drop parameter.

Configuration Impact

If the default action to be taken on GTSM packets is drop, the connection cannot be established by the industrial switch router. Therefore, GTSM ensures better security but reduces the ease of use.

Precautions

You can enable the log function by using the gtsm log drop-packet command to record the information about dropped packets for further fault location.

If you configure the default action by using the gtsm default-action command but not configure GTSM policy (the drop or pass parameter), GTSM does not take effect.

Example

# Set the default action performed on the packets that do not match the GTSM policies as "drop".

<Huawei> system-view
[Huawei] gtsm default-action drop

# Set the default action performed on the packets that do not match the GTSM policy as pass the filtering.

<Huawei> system-view
[Huawei] undo gtsm default-action drop 

gtsm log drop-packet

Function

The gtsm log drop-packet command enables the log function on the slot. The information that GTSM drops packets is recorded in the log.

The undo gtsm log drop-packet command disables the log function on the slot.

By default, the information that GTSM drops packets is not recorded in the log.

Format

gtsm log drop-packet all

undo gtsm log drop-packet all

Parameters

Parameter Description Value
all Indicates all the slots. -

Views

System view

Default Level

2: Configuration level

Usage Guidelines

NOTE:

On the AR500&AR510&AR530, the gtsm log drop-packet command can enable the log function only on the MPU, but not on LPUs.

Usage Scenario

For a network demanding higher security, you can configure Generalized TTL Security Mechanism (GTSM) to improve the security of the OSPF network. GTSM defends against attacks by checking the Time-to-Live (TTL) value. If an attacker simulates real OSPF packets and keeps sending them to a device, an interface board on the device 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 device is busy in processing these packets, causing high usage of the CPU. GTSM function protects the device by checking whether the TTL value in the IP packet header is in a pre-defined range to improve the system security.

GTSM only checks the TTL values of the packets that match the GTSM policy. The packets that do not match the GTSM policy can be allowed or dropped by using the gtsm default-action command.

You can also enable the log function by using the gtsm log drop-packet command to record the information about dropped packets for further fault location.

Prerequisites

Run the gtsm default-action drop command to drop packets before the log function is enabled.

Example

# Enable the GTSM log function on all the slots.

<Huawei> system-view
[Huawei] gtsm default-action drop
[Huawei] gtsm log drop-packet all
Related Topics

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 { limit limit-number | { bgp [ permit-ibgp ] | direct | unr | rip [ process-id-rip ] | static | isis [ process-id-isis ] | ospf [ process-id-ospf ] } [ cost cost | type type | tag tag | route-policy route-policy-name ] * }

undo import-route { limit | bgp | direct | unr | 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. -
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.
NOTICE:

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. -
unr Specifies the imported source routing protocol as unr.

User Network Route (UNR) is allocated if dynamic routing protocols cannot be used when users are getting online.

-
rip Specifies the imported source routing protocol as rip. -
process-id-rip Specifies the process ID of the imported RIP routing protocol. The value is an integer ranging from 1 to 65535. The default value is 1.
static Specifies the imported source routing protocol as static.
NOTE:

The parameter can only active static routes are imported.

-
isis Specifies the imported source routing protocol as isis. -
process-id-isis Specifies the process ID of the imported IS-IS routing protocol. The value is an integer ranging from 1 to 65535. The default value is 1.
ospf Specifies the imported source routing protocol as ospf. -
process-id-ospf Specifies the process ID of the imported OSPF routing protocol. The value is an integer ranging from 1 to 65535. The default value is 1.
limit limit-number The maximum number of external routes that can be imported into an OSPF process. The value is an integer that ranges from 1 to 4294967295.
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 40 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.

When OSPF imports external routes, you can set default values for some additional parameters using the import-route command, such as metric, route tag, and route type. A route tag is used to identify protocol-related information. For example, it can be used to differentiate AS numbers carried in BGP routes imported by OSPF.

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

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

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 [ threshold threshold ]

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 10000, 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 1000, 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 5000, in ms. The default value is 500.
suppress-flapping 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 receiving LSAs is specified by start-interval.
  2. The interval for receiving LSAs for the nth (n≥2) time is equal to hold-interval x 2(n-2).
  3. When the interval specified by hold-interval x 2(n-2) reaches the maximum interval specified by max-interval, OSPF receives LSAs at the maximum interval for three consecutive times. Then, Step 1 is repeated, that is, OSPF receives LSAs at the initial interval specified by start-interval.

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
# Set the maximum LSA suppression period to 200s.
<Huawei> system-view 
[Huawei] ospf 1
[Huawei-ospf-1] lsa-arrival-interval suppress-flapping 200

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

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 router LSAs and network LSAs. -
max-interval Specifies the maximum interval for updating OSPF LSAs. The value is an integer ranging from 1 to 10000, 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 1000, 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 5000, in ms. The default value is 1000.
other-type Sets the interval for updating the LSAs other than the OSPF router LSAs and network LSAs. -
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 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.

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 updating LSAs is specified by start-interval.
  2. The interval for updating LSAs for the nth (n≥2) time is equal to hold-interval x 2(n-2).
  3. When the interval specified by hold-interval x 2(n-2) reaches the maximum interval specified by max-interval, OSPF updates LSAs at the maximum interval for three consecutive times. Then, Step 1 is repeated, that is, OSPF updates LSAs at the initial interval specified by start-interval.

Precautions

It is recommended to set the receiving 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
# Set the maximum LSA suppression period to 200s.
<Huawei> system-view 
[Huawei] ospf 1
[Huawei-ospf-1] lsa-originate-interval suppress-flapping 200 
Related Topics

lsdb-overflow-limit

Function

The lsdb-overflow-limit command sets the maximum number of external LSAs in OSPF LSDB.

The undo lsdb-overflow-limit command removes the maximum number of external LSAs.

By default, the maximum number of external LSAs is not set.

Format

lsdb-overflow-limit number

undo lsdb-overflow-limit

Parameters

Parameter Description Value
number Specifies the maximum number of external LSAs in LSDB. The value is an integer ranging from 1 to 1000000.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When the number of external LSAs (Type 5 and Type 7 LSAs) imported by OSPF exceeds the limit, the excessive external LSAs cannot be processed properly and are discarded.

To avoid the preceding problem, you can set the maximum number of external LSAs in the LSDB to adjust and optimize OSPF networks.

Prerequisites

Running the display ospf lsdb brief command, you can see OSPF is in LSDB overflow status in the command output. Then, run the lsdb-overflow-limit command to set the maximum number of external LSAs imported by OSPF.

Precautions

The configuration of this command must be consistent in the entire AS.

Example

# Set the maximum number 400000 of external LSA in LSDB.

<Huawei> system-view
[Huawei] ospf 100
[Huawei-ospf-100] lsdb-overflow-limit 400000
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

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.

By default, the maximum number of equal-cost routes supported by the device is 4.

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 4.

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

maximum-routes

Function

The maximum-routes command sets the maximum number of routes of different types that OSPF supports.

The undo maximum-routes command restores the default maximum number of routes of different types that OSPF supports.

By default, OSPF supports a maximum number of 5000000 external routes, 1000000 inter-area routes, and 100000 intra-area routes.

Format

maximum-routes { external | inter | intra } number

undo maximum-routes { external | inter | intra }

Parameters

Parameter Description Value
external Indicates the maximum number of AS external routes that OSPF supports. -
inter Indicates the maximum number of inter-area routes that OSPF supports. -
intra Indicates the maximum number of intra-area routes that OSPF supports. -
number Specifies the maximum number of routes of different types.

The value is an integer.

  • When configuring the external parameter, the value of number is an integer ranging from 100 to 5000000. The defaulf value is 5000000.
  • When configuring the inter parameter, the value of number is an integer ranging from 100 to 1000000. By default, the value is 1000000.
  • When configuring the intra parameter, the value of number is an integer ranging from 100 to 100000. By default, the value is 100000.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Based on the real world situation of a network such as the convergence speed, the maximum-routes command configures the maximun number of routes of different types to make full use of network resources and improve network performance.

Precautions

The maximum number of routes supported by OSPF cannot exceed the maximum number of all routes supported by the industrial switch router.

The maximum number of routes configured by the maximum-routes command is the maximum number of routes sent by the industrial switch router. Therefore, the number of LSAs received by the industrial switch router will not be effected.

Example

# Set the maximum number of routes that OSPF supports.

<Huawei> system-view
[Huawei] ospf 100
[Huawei-ospf-100] maximum-routes intra 500

mesh-group enable

Function

The mesh-group enable command enables the mesh-group function.

The undo mesh-group enable command disables the mesh-group function.

By default, the mesh-group function is disabled.

Format

mesh-group enable

undo mesh-group enable

Parameters

None

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When concurrent links exist between the device and its neighbor, the mesh-group enable command enables the mesh-group function. The router ID of a neighboring device uniquely identifies a mesh group. After LSAs are received, the device selects a primary link to flood the received LSAs, without performing reverse flooding. This prevents repeated flooding, reduce the load on the links, and save system resources.

device interfaces that meet the following conditions can form a mesh group:

  • The interfaces belong to the same area and OSPF process.
  • The neighbor status is Exchange or Full.
  • Each interface is connected only to one neighbor.

Precautions

After the device is enabled with the mesh-group function, if the router IDs of the directly connected neighbor are the same, the LSDBs of the entire network cannot be synchronized and routes cannot be calculated correctly. In this case, you need to reconfigure the router ID of the neighbor, and then restart the neighbor to validate the configured router ID.

Example

# Enable the mesh-group function on the industrial switch router.

<Huawei> system-view
[Huawei] ospf 100
[Huawei-ospf-100] mesh-group enable

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 255.255.255.255 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.

  • When an OSPF sham link is configured, the local address cannot be advertised through the OSPF process of a private network.
  • Two areas that overlap cannot be configured between different processes in the same instance, or between different areas in the same process.
  • The ospf enable command configuration takes precedence over the network command configuration.

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 ] | suppress-default-route } | flush-waiting-timer interval-value | no-import-route | no-summary | set-n-bit | suppress-forwarding-address | translator-always | translator-interval interval-value | zero-address-forwarding | translator-strict ] *

undo nssa [ flush-waiting-timer interval-value ]

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. -
suppress-default-route Generates default Type-7 LSAs on the ASBR or ABR and then not advertises them to the NSSA. -
flush-waiting-timer interval-value Indicates the interval for an ASBR to send aged Type 5 LSAs. The parameter takes effect only when it is set. The value is an integer that ranges from 1 to 40, in seconds.
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. -
translator-strict Configures the translator to perform strict check on the P-bit flag. The translator determines whether to translate Type 7 LSAs into Type 5 LSAs based on the P-bit flag. -

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 industrial switch routers 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.

  • When the area to which the ASBR belongs is configured as an NSSA, invalid Type 5 LSAs from other industrial switch routers in the area where LSAs are flooded will be reserved. These LSAs will be deleted only when the aging time reaches 40s. The industrial switch router performance is affected because the forwarding of a large number of LSAs consumes the memory resources. To resolve such a problem, you can set the parameter flush-waiting-timer to the maximum value 40s for Type 5 LSAs so that the invalid Type 5 LSAs from other industrial switch routers can be deleted in time.

    NOTE:
    • When the LS age field value (aging time) in the header of an LSA reaches 40s, the LSA is deleted.

    • If an ASBR also functions as an ABR, flush-waiting-timer does not take effect. This prevents Type 5 LSAs in the non-NSSAs from being deleted.

  • 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.
    NOTE:

    After the nssa default-route-advertise backbone-peer-ignore no-summary command is run, the ABR generates default Type 7 and Type 3 LSAs as long as an interface that is Up exist in the backbone area. The default Type 3 LSAs preferentially take effect.

  • After the set-n-bit parameter is configured, the N-bit is set in the database description (DD) packets during the synchronization between the industrial switch router and neighboring industrial switch routers.
  • If multiple ABRs are deployed in the NSSA, the system automatically selects an ABR (generally the industrial switch router 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.

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 industrial switch router in the NSSA so that the loopback address can be automatically selected as the FA. If other industrial switch routers have routes of the same cost to the industrial switch router 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 industrial switch router in the area where are flooded will be deleted immediately. The local industrial switch router still reserves useless Type 5 LSAs from other industrial switch routers. 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 [ flush-waiting-timer time ]

Parameters

Parameter Description Value
process-id Specifies the ID of an OSPF process. The value is an integer ranging from 1 to 65535. By default, it is 1.
router-id router-id Specifies a router ID. 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, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
flush-waiting-timer time Indicates the interval for generating aged LSAs. The parameter takes effect only when it is set. The value is an integer that ranges from 1 to 40, in seconds.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

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, and then the OSPF process is restarted.
  • 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. When the undo ospf process-id flush-waiting-timer time command is used to stop an OSPF process, the industrial switch router regenerates an LSA in the set time and sets the LS age field to 3600 seconds. After other industrial switch routers receive the LSA with the LS age field as 3600 seconds, they delete the LSA immediately. If the host does not send all the LSAs in the set time, other industrial switch routers still reserve invalid LSAs.

NOTE:

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

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.

NOTE:

The router ID of each OSPF process must be unique on the entire 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.

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. Only plain text can be entered, and only plain text is displayed when the configuration file is viewed.
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 plain text password. plain-text is a string of 1 to 8 characters without spaces 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. Either plain text or cipher text can be entered, and cipher text is displayed when the configuration file is viewed. 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 cipher text password. The value is a string of characters without spaces. In simple authentication, a plain text password is a string of 1 to 8 characters and a cipher text password is a string of 48, 24 or 32 characters. In MD5 authentication, HMAC-SHA256 authentication or HMAC-MD5 authentication, a plain text password is a string of 1 to 255 characters and a cipher text password is a string of 20 to 392 characters.
md5 Indicates MD5 authentication.
NOTICE:

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

-
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 the question mark (?) and space. However, when double quotation marks (") are used around 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.

OSPF does not support the configuration on the null interface.

An authentication password does not contain spaces.

Example

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

<Huawei> system-view
[Huawei] interface gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/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

undo ospf bfd enable

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

undo ospf bfd { min-rx-interval | min-tx-interval | detect-multiplier } *

Parameters

Parameter Description Value
enable Enables BFD. -
min-rx-interval receive-interval Indicates the minimum interval at which BFD packets are received from the remote end. The value is an integer ranging from 10 to 2000, in milliseconds. The default value is 1000 milliseconds.
min-tx-interval transmit-interval Indicates the minimum interval at which BFD packets are sent to the remote end. The value is an integer ranging from 10 to 2000, in milliseconds. The default value is 1000 milliseconds.
detect-multiplier multiplier-value Specifies the local detection multiplier.
NOTE:

After BFD is enabled, OSPF establishes BFD sessions only with neighbors in the Full state.

The value is an integer ranging from 3 to 50. By default, it is 3.

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 GE0/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 gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/0/1] ospf bfd enable
[Huawei-GigabitEthernet0/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 GE0/0/1 from dynamically setting up a BFD session.

<Huawei> system-view
[Huawei] interface gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/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.

With the formula 100000000/Bandwidth, the default costs of various types of interfaces are as follows:
  • 56 kbit/s Serial port: 1785

  • 64 kbit/s Serial port: 1562

  • E1 (2.048 Mbit/s): 48

  • Ethernet (100 Mbit/s): 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 GE0/0/1 that runs OSPF to 65.

<Huawei> system-view
[Huawei] interface gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/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 GE0/0/1 that participates in the DR election to 8.

<Huawei> system-view
[Huawei] interface gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/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. The default value is 1.
area area-id Specifies an area ID. The value can be a decimal integer or an IP address. When the value is an integer, the value ranges from 0 to 4294967295.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The ospf enable command configuration takes precedence over the network command configuration.

After the undo ospf enable command is run to disable OSPF on an interface, the network configuration takes effect on the interface automatically.

Configuration Impact

The interface will alternate between up and down when the ospf enable command and the network command are run on the interface repeatedly.

Precautions

An interface can be configured with only one OSPF process.

The configured interface and the OSPF process must be in the same VPN.

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

Example

# Enable GE0/0/1 in the specified OSPF area.

<Huawei> system-view
[Huawei] interface gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/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 industrial switch router 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 (Type 3). -
ase Filters outgoing AS external LSAs (Type 5). -
nssa Filters outgoing NSSA LSAs (Type 7). -
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 without spaces. The value must start with a letter (a to z or A to Z, case sensitive).

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When multiple links exist between two industrial switch routers, based on the filtering policy, the ospf filter-lsa-out command configures the local industrial switch router 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 GE0/0/1 to filter all outgoing LSAs except grace LSAs.
<Huawei> system-view 
[Huawei] interface gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/0/1] ospf filter-lsa-out all

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.

By default, OSPF processes are not bound to SNMP.

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 65535.

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 GigabitEthernet0/0/1 to fill in the MTU field when sending DD packets.

<Huawei> system-view
[Huawei] interface gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/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, that of the serial interface (encapsulated with PPP or HDLC) is p2p, and that of ATM interface and Frame-relay interface is nbma.

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.

  • 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.

  • When the network type of one OSPF interface is broadcast and the network type of the other OSPF interface is P2P, the two interfaces can still set up the neighbor relationship, but cannot learn the OSPF routing information each other.

Example

# Set network type of GE0/0/1 to NBMA.

<Huawei> system-view
[Huawei] interface gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/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 gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/0/1] ospf network-type p2mp
[Huawei-GigabitEthernet0/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 GE0/0/1.

<Huawei> system-view
[Huawei] interface gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/0/1] ospf smart-discover

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 20s is recommended.

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 20s, the session may be closed. Therefore, if dead interval is shorter than 20s, the actual dead interval of an OSPF neighbor is not shorter than 20s.

To speed up OSPF convergence in the case of a link failure, configuring Configuring BFD for OSPF is recommended.

Example

# Set the dead interval on GE0/0/1 to 60 seconds.

<Huawei> system-view
[Huawei] interface gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/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

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 or equal to 5s is recommended.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Hello packets are 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.

Precautions

OSPF does not support the configuration on a null interface.

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 20s, the session may be closed. Therefore, if hello interval is shorter than 5s, the actual dead interval of an OSPF neighbor is not shorter than 20s.

To speed up OSPF convergence in the case of a link failure, configuring Configuring BFD for OSPF is recommended.

Example

# Set the interval for sending Hello packets on GE0/0/1 to 20 seconds.

<Huawei> system-view
[Huawei] interface gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/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 GE0/0/1 to 130 seconds.

<Huawei> system-view
[Huawei] interface gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/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 GE0/0/1 and the adjacent device to 8 seconds.

<Huawei> system-view
[Huawei] interface gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/0/1] ospf timer retransmit 8

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 GE0/0/1 to 3 seconds.

<Huawei> system-view
[Huawei] interface gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/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, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

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 industrial switch router, the industrial switch router 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 industrial switch router is busy processing these packets, causing high usage of the CPU. GTSM protects the industrial switch routers 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 industrial switch router is calculated. Otherwise, packets sent from neighbors of a virtual link or a sham link will be dropped.
  • GTSM only checks the TTL values of the packets that match the GTSM policy. If the packets do not match the GTSM policy, you can set the pass parameter or drop parameter in the gtsm default-action command to pass or drop these packets.

  • If only a private or public network policy is configured, run the gtsm default-action command to set the default behavior for processing the packets unmatched with the GTSM policy to pass to prevent the OSPF packets of other instances from being discarded.

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 industrial switch router on an NBMA network.

The undo peer command cancels the IP address of the adjacent industrial switch router on an NBMA network.

By default, the IP addresses and the DR priority for the adjacent industrial switch router 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

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.

Example

# Set the IP address of the adjacent industrial switch router 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 ] { preference | route-policy route-policy-name } *

undo preference [ ase ]

Parameters

Parameter Description Value
ase Indicates the preference of the AS external 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 40 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 industrial switch router 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 industrial switch router, you can make the industrial switch router 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, 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

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 all

Parameters

Parameter Description Value
all Clears the GTSM statistics on LPUs in all slots. -

Views

User view

Default Level

3: Management level

Usage Guidelines

Before collecting the GTSM statistic within a certain period, you need to clear the existing statistics.

NOTE:

On the industrial switch router, the reset gtsm statistics command can clear the GTSM statistics only on the MPU, but not on LPUs.

Example

# Clear the GTSM statistics on all boards.

<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 65535.
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

When the industrial switch router restarts an OSPF process, the neighboring industrial switch router always reserves invalid LSAs. This occupies the memory of the system. These LSAs are deleted only when they expire, that is, when the LS age field in the LSA reaches 3600 seconds. After the reset ospf is used to restart an OSPF process and only when the router ID is changed, the industrial switch router generates an LSA in the set time and sets the LS age field to 3600 seconds. After receiving the LSA, other industrial switch routers delete the LSA immediately from their LSDBs. If a device does not send all the LSAs within the set time, other neighboring industrial switch routers still store some invalid LSAs.

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 65535.

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, but the statistics about router LSAs that have reached the maximum aging time will not be 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 process

Function

The reset ospf process command restarts the OSPF process.

Format

reset ospf [ process-id ] process [ flush-waiting-timer time | graceful-restart ]

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 65535.
flush-waiting-timer time Specified the time when the LSA is generated. The parameter takes effect only when it is set. The value is an integer that ranges from 1 to 40, in seconds.
graceful-restart Indicates that graceful restart is enabled. -

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.

Precautions

Configuring the flush-waiting-timer parameter when OSPF starts, you can clear invalid LSAs within the set time before LSAs time out.

Whether all invalid LSAs on other industrial switch routers can be deleted is related to the set time.

When the industrial switch router restarts an OSPF process, the neighboring industrial switch router always reserves invalid LSAs. This occupies the memory of the system. These LSAs are deleted only when they expire, that is, when the LS age field in the LSA reaches 3600 seconds. After the reset ospf is used to restart an OSPF process and only when the router ID is changed, the industrial switch router generates an LSA in the set time and sets the LS age field to 3600 seconds. After receiving the LSA, other industrial switch routers delete the LSA immediately from their LSDBs. If a device does not send all the LSAs within the set time, other neighboring industrial switch routers still store some invalid LSAs.

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 65535.

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

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 Description Value
tag Specifies the tag value of the imported VPN routes. The value is an integer ranging from 0 to 4294967295.
disable Forbids the using of the tag to detect the loop. -

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The route-tag command can only be used in VPN scenarios to prevent loops on As-external-LSAs when a CE is dual-homed to two PEs.

In a networking where a CE is dual-homed to two PEs, PE1 generates As-external-LSAs based on the imported BGP routes and sends the LSAs to the CE, then to PE2. Because OSPF routes have higher priorities over BGP routes, the former will replace the latter on PE2, causing loops. After the route-tag command is run, if the tag value of the PE and an LSA are the same, the PE will neglect the LSA and a loop is prevented.

By default, the first two bytes of the tag value is fixed as 0xD000, while the last two bytes is the AS number of the local BGP.

Configuration Impact

The route tags of a VPN can be configured only and takes effect on the PEs where BGP routes and received and OSPF LSAs are generated.

Precautions

  • Configuring the same VPN route tag on the PEs within the same area is recommended.
  • Different OSPF processes can be configured with the same VPN route tag.

The tags set by the route-tag command or other commands are different only in preference.

  1. The preference of the tag configured using the import-route command is the highest.
  2. The preference of the tag configured using the route-tag command is medium.
  3. The preference of the tag configured using the default tag command is the lowest.

Example

# Set the route tag for OSPF process 100 to 100 in a VPN instance named huawei.

<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] route-tag 100

rfc1583 compatible

Function

The rfc1583 compatible command converts rules defined in RFC 2328 into rules defined in RFC 1583.

The undo rfc1583 compatible command converts rules defined in RFC 1583 into rules defined in RFC 2328.

By default, OSPF supports the routing rule of RFC 1583.

Format

rfc1583 compatible

undo rfc1583 compatible

Parameters

None

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

RFC 2328 and RFC 1583 define different OSPF route selection rules. When enabling OSPF, configure the same route selection rules on all devices in the same OSPF area. For example, an OSPF device supports route selection rules defined in RFC 1583 by default. If the other industrial switch routers in the same OSPF area support route selection rules defined in RFC 2328, you need to run the undo rfc1583 compatible

Example

# Converts rules defined in RFC 1583 into rules defined in RFC 2328.

<Huawei> system-view
[Huawei] ospf 1
[Huawei-ospf-1] undo rfc1583 compatible

sham-hello enable (OSPF)

Function

The sham-hello enable command enables the sham-hello function of OSPF.

The undo sham-hello command disables the sham-hello feature.

By default, the sham-hello feature is disabled.

Format

sham-hello enable

undo sham-hello

Parameters

None

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

After this command is executed, the device maintains neighbors through not only the Hello packet but also all OSPF protocol packets, so as to sensitively sense the existence of OSPF neighbors and stabilize neighboring relations.

Example

# Enable the sham-hello feature.

<Huawei> system-view
[Huawei] ospf 100
[Huawei-ospf-100] sham-hello enable

silent-interface (OSPF)

Function

The silent-interface command disables an interface from receiving and sending OSPF packets.

The undo silent-interface command restores the default setting.

By default, the interface is permitted to receive or send OSPF packet.

Format

silent-interface { all | interface-type interface-number }

undo silent-interface { all | interface-type [ interface-number ] }

Parameters

Parameter Description Value
all Indicates all interfaces in a specified process. -
interface-type interface-number Specifies the interface type and the interface number. -

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To ensure that OSPF routing information cannot be obtained by the devices of a certain network and the local device does not receive routing update information advertised by other devices, you can run the silent-interface command to disable an interface from receiving and sending OSPF packets.

Disabling interfaces from receiving or sending OSPF packets is a solution to routing loops.

Configuration Impact

After an OSPF interface is set to be in the silent state, the interface can still advertise its direct routes. Hello packets on the interface, however, will be blocked and no neighbor relationship can be established on the interface. This can enhance the networking adaptability of OSPF and reduce the consumption of system resources.

Example

# Disable VLANIF200 from sending or receiving OSPF packets.

<Huawei> system-view
[Huawei] ospf 100
[Huawei-ospf-100] silent-interface vlanif 200

snmp-agent trap enable feature-name ospf

Function

The snmp-agent trap enable feature-name ospf command enables the trap function for the OSPF module.

The undo snmp-agent trap enable feature-name ospf command disables the trap function for the OSPF module.

By default, the trap function is disabled for the OSPF module.

Format

snmp-agent trap enable feature-name ospf trap-name { ospfifauthfailure | ospfifconfigerror | ospfifrxbadpacket | ospfifstatechange | ospflsdbapproachingoverflow | ospflsdboverflow | ospfmaxagelsa | ospfnbrrestarthelperstatuschange | ospfnbrstatechange | ospfnssatranslatorstatuschange | ospforiginatelsa | ospfrestartstatuschange | ospftxretransmit | ospfvirtifauthfailure | ospfvirtifconfigerror | ospfvirtifrxbadpacket | ospfvirtifstatechange | ospfvirtiftxretransmit | ospfvirtnbrrestarthelperstatuschange | ospfvirtnbrstatechange | hwospfv2intraareadripaddressconflict | hwospfv2intraarearouteridconflict }

undo snmp-agent trap enable feature-name ospf trap-name { ospfifauthfailure | ospfifconfigerror | ospfifrxbadpacket | ospfifstatechange | ospflsdbapproachingoverflow | ospflsdboverflow | ospfmaxagelsa | ospfnbrrestarthelperstatuschange | ospfnbrstatechange| ospfnssatranslatorstatuschange | ospforiginatelsa | ospfrestartstatuschange | ospftxretransmit | ospfvirtifauthfailure | ospfvirtifconfigerror | ospfvirtifrxbadpacket | ospfvirtifstatechange | ospfvirtiftxretransmit | ospfvirtnbrrestarthelperstatuschange | ospfvirtnbrstatechange | hwospfv2intraareadripaddressconflict | hwospfv2intraarearouteridconflict }

Parameters

Parameter Description Value
trap-name Enables the traps of OSPF events of specified types. -
hwospfv2intraareadripaddressconflict Enables the traps of the ip addresses conflict of DRs in an intra area. By default, this trap is disabled.
hwospfv2intraarearouteridconflict Enables the traps of the router IDs conflict in an intra area. By default, this trap is disabled.
ospfifauthfailure Enables the traps of the failure of the interface authentication. By default, this trap is disabled.
ospfifconfigerror Enables the traps of errors of the interface configuration. By default, this trap is disabled.
ospfifrxbadpacket Enables the traps of received bad packets. By default, this trap is disabled.
ospfifstatechange Enables the traps of changes of the interface state. By default, this trap is disabled.
ospflsdbapproachingoverflow Enables the traps of LSDB is approaching Overflow. By default, this trap is disabled.
ospflsdboverflow Enables the traps of LSDB overflow. By default, this trap is disabled.
ospfmaxagelsa Enables the traps of Max Age of LSA. By default, this trap is disabled.
ospfnbrrestarthelperstatuschange Enables the traps of changes of the neighbor state. By default, this trap is disabled.
ospfnbrstatechange Enables the traps of changes of the state of the helper during GR. By default, this trap is disabled.
ospfnssatranslatorstatuschange Enables the traps of the status change of the NSSA industrial switch router converting Type7 LSAs to Type5 LSAs. By default, this trap is disabled.
ospforiginatelsa Enables the traps of LSAs that are locally generated. By default, this trap is disabled.
ospfrestartstatuschange Enables the traps of changes of the state of the restarter during GR. By default, this trap is disabled.
ospftxretransmit Enables the traps of the receiving and sending of packets on the interface. By default, this trap is disabled.
ospfvirtifauthfailure Enables the traps of failure of the virtual interface authentication. By default, this trap is disabled.
ospfvirtifconfigerror Enables the traps of error of the virtual interface configuration. By default, this trap is disabled.
ospfvirtifrxbadpacket Enables the traps of the bad packet that is received on the virtual interface. By default, this trap is disabled.
ospfvirtifstatechange Enables the traps of changes of the virtual interface state. By default, this trap is disabled.
ospfvirtiftxretransmit Enables the traps of sending and receiving of packets on the virtual interface. By default, this trap is disabled.
ospfvirtnbrrestarthelperstatuschange Enables the traps of changes of the GR helper state of neighboring nodes on the virtual link. By default, this trap is disabled.
ospfvirtnbrstatechange Enables the traps of changes of the state for the neighbor of the virtual-link. By default, this trap is disabled.

Views

System view

Default Level

3: Management level

Usage Guidelines

To enable the traps of one or more events, you can specify trap-name.

NOTE:
  • The non-excessive traps of OSPF module includes:
    • ospfIfStateChange
    • ospfVirtIfStateChange
    • ospfNbrStateChange
    • ospfVirtNbrStateChange
    • ospfIfAuthFailure
    • ospfVirtIfAuthFailure
    • ospfIfRxBadPacket
    • ospfVirtIfRxBadPacket
    • ospfLsdbOverflow
    • ospfLsdbApproachingOverflow
    • ospfRestartStatusChange
    • ospfNbrRestartHelperStatusChange
    • ospfVirtNbrRestartHelperStatusChange
    • ospfNssaTranslatorStatusChange
    • hwOspfv2IntraAreaRouteridConflict
    • hwospfv2intraareadripaddressconflict
  • The excessive traps of OSPF module includes:
    • ospfIfConfigError
    • ospfVirtIfConfigError
    • ospfTxRetransmit
    • ospfVirtIfTxRetransmit
    • ospfOriginateLsa
    • ospfMaxAgeLsa

Example

# Enable the trap of the status change of OSPF neighbors on the virtual link.

<Huawei> system-view
[Huawei] snmp-agent trap enable feature-name ospf trap-name ospfvirtnbrstatechange

spf-schedule-interval

Function

The spf-schedule-interval command sets the interval for OSPF to calculate routes.

The undo spf-schedule-interval command restores the default setting.

By default, the intelligent timer is enabled. The interval for the SPF calculation is expressed in milliseconds. The maximum interval for the SPF calculation is 10000 ms, the initial interval is 500 ms, and the Holdtime interval is 1000 ms.

Format

spf-schedule-interval { interval1 | intelligent-timer max-interval start-interval hold-interval | millisecond interval2 }

undo spf-schedule-interval

Parameters

Parameter Description Value
interval1 Specifies the interval for OSPF to perform the SPF calculation. The value is an integer ranging from 1 to 10, in seconds.
intelligent-timer Sets the interval for the SPF calculation of OSPF through an intelligent timer. -
max-interval Specifies the maximum interval for OSPF to perform the SPF calculation. The value is an integer ranging from 1 to 20000, in milliseconds. The default value is 10000.
start-interval Specifies the initial interval for OSPF to perform the SPF calculation. The value is an integer ranging from 1 to 1000, in milliseconds. The default value is 500.
hold-interval Specifies the Holdtime interval for OSPF to perform the SPF calculation. The value is an integer ranging from 1 to 5000, in milliseconds. The default value is 1000.
millisecond interval2 Specifies the interval for OSPF to perform the SPF calculation. The value is an integer ranging from 1 to 10000, in milliseconds.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Based on the LSDB, the device that runs OSPF calculates the SPT with itself as the root based on the SPF arithmetic, and determines the next hop to the destination network according to the SPT. When the OSPF LSDB changes, the shortest path needs to be recalculated. Frequent network changes and continual calculation of the shortest path consume many system resources and affect the efficiency of the devices. You can configure an intelligent timer and set a proper interval for the SPF calculation to prevent excessive device memory and bandwidth resources from being consumed.

In a networking environment, in which the convergence time of routes is required to be shorter, you can set millisecond as the unit of interval to increase the frequency of calculating routes. Route convergence therefore speeds up. In other networking environments, the default value is recommended.

Configuration Impact

After this command is configured, the interval for the SPF calculation is as follows:

  1. The initial interval for the SPF calculation is specified by the parameter 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 by hold-interval×2(n-2) reaches the maximum interval specified by max-interval, OSPF performs the SPF calculation at the maximum interval for three consecutive times. Then, go back to Step 1, and OSPF performs the SPF calculation at the initial interval specified by start-interval.

Example

# Set the interval for OSPF to calculate routes to 6 seconds.

<Huawei> system-view
[Huawei] ospf 100
[Huawei-ospf-100] spf-schedule-interval 6

stub (OSPF Area)

Function

The stub command sets an area to the stub area.

The undo stub command cancels the settings.

By default, no area is set to the stub area.

Format

stub [ no-summary | default-route-advertise backbone-peer-ignore ] *

undo stub

Parameters

Parameter Description Value
no-summary Forbids the ABR to send Summary LSAs to the stub area. -
default-route-advertise Enables the ABR to generate default Type 3 LSAs and advertise them to the stub area. -
backbone-peer-ignore Prevents the ABR from checking the neighbor status when the ABR generates default Type 3 LSAs and advertises them to the stub area. Specifically, the ABR generates default Type 3 LSAs and advertises them to the stub area as long as an interface that is Up exist in the backbone area. -

Views

OSPF area view

Default Level

2: Configuration level

Usage Guidelines

There are two configuration commands for stub area: stub and default-cost (OSPF Aera) If you want to configure one area as the stub area, you must configure all devices in the area by the stub command.

The default-cost (OSPF Aera) command takes effect only when it is configured on an ABR. The command is used to specify the cost of the default summary route transmitted by the ABR to the stub area.

On an ABR, you can configure the no-summary of the stub command to prevent Type 3 LSA from entering the stub area that the ABR connects to.

The backbone area cannot be configured as a stub area.

Example

# Set the OSPF area 1 as the stub area.

<Huawei> system-view
[Huawei] ospf 100
[Huawei-ospf-100] area 1
[Huawei-ospf-100-area-0.0.0.1] stub

stub-router (OSPF)

Function

The stub-router command configures the stub router.

The undo stub-router command restores the default configuration.

By default, no device is configured as a stub router.

Format

stub-router [ on-startup [ interval ] ]

undo stub-router

Parameters

Parameter Description Value
on-startup [ interval ] Specifies the interval during which a device acts as a stub router when the device is restarted or faulty.
  • If on-startup is not specified, the device is always a stub router, even if the cost of all routes advertised by the device is 65535.
  • If on-startup is specified, the device works as a stub router only when it restarts or is faulty. The hold time of the stub router state is determined by interval parameter. If the interval parameter is not configured, the default interval (500 seconds) is used.
The value is an integer that ranges from 5 to 65535, in seconds. By default, the value is 500 seconds.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After the stub router command is configured on a device, the device informs other devices not to use this stub router to forward data by increasing the metric (65535) of the links in the LSA that is generated by the device. The metric is not infinite. Thus, the routes to this stub router still exist. The metric of the LSA links that is generated by the stub router is very high.

Precautions
  • If you run the stub-router command on a device without specifying on-startup, the router always functions as a stub device, and the cost of the routes from this device stays at 65535.
  • If you run the stub-router on-startup command on a device, the device becomes a stub router after it restarts or a master/slave main control board switchover is performed and stays as a stub device for a period specified by interval. If interval is not specified, the default value (500s) takes effect.

Exam