06-Layer 3—IP Routing Command Reference

HomeSupportRoutersCR16000-M SeriesReference GuidesCommand ReferencesH3C CR16000-M Routers Command Reference-R838x-6W10106-Layer 3—IP Routing Command Reference
04-OSPF commands
Title Size Download
04-OSPF commands 1.26 MB

Contents

OSPF commands· 1

abr-summary· 1

area· 1

asbr-summary· 2

authentication-mode· 3

bandwidth-reference· 5

database-filter peer 6

default 7

default-cost 8

default-route-advertise· 9

description· 10

discard-route· 11

display ospf 11

display ospf abr-asbr 20

display ospf abr-summary· 22

display ospf asbr-summary· 24

display ospf event-log· 26

display ospf event-log hello· 31

display ospf fast-reroute lfa-candidate· 36

display ospf global-statistics· 37

display ospf graceful-restart 39

display ospf hostname-table· 42

display ospf interface· 42

display ospf interface hello· 48

display ospf lsdb· 49

display ospf nexthop· 62

display ospf non-stop-routing status· 63

display ospf peer 64

display ospf peer statistics· 70

display ospf request-queue· 71

display ospf retrans-queue· 72

display ospf routing· 73

display ospf spf-tree· 78

display ospf statistics· 82

display ospf troubleshooting· 87

display ospf vlink· 90

display router id· 92

distribute bgp-ls· 92

dscp· 93

enable link-local-signaling· 94

enable out-of-band-resynchronization· 94

event-log· 95

fast-reroute· 96

fast-reroute remote-lfa maximum-cost 97

fast-reroute remote-lfa prefix-list 97

fast-reroute remote-lfa tunnel ldp· 98

fast-reroute tiebreaker 99

filter 100

filter-policy export 101

filter-policy import 103

graceful-restart 104

graceful-restart helper enable· 106

graceful-restart helper strict-lsa-checking· 106

graceful-restart interval 107

host-advertise· 107

hostname· 108

import-route· 109

isolate enable· 111

ispf enable· 112

log-peer-change· 113

lsa-arrival-interval 113

lsa-arrival-interval suppress-flapping· 114

lsa-generation-interval 115

lsa-generation-interval suppress-flapping· 116

lsdb-overflow-interval 117

lsdb-overflow-limit 117

maxage-lsa route-calculate-delay· 118

maximum load-balancing· 119

metric-bandwidth advertisement enable· 119

metric-bandwidth suppression· 120

metric-delay advertisement enable· 121

metric-delay suppression· 121

network· 123

nssa· 123

opaque-capability enable· 125

ospf 125

ospf area· 127

ospf authentication-mode· 127

ospf bfd adjust-cost 130

ospf bfd adjust-cost suppress-flapping· 131

ospf bfd enable· 132

ospf cost 133

ospf cost-fallback· 133

ospf database-filter 134

ospf dr-priority· 135

ospf fast-reroute lfa-backup· 136

ospf fast-reroute remote-lfa disable· 137

ospf link-delay· 137

ospf link-quality adjust-cost 138

ospf mib-binding· 139

ospf mtu-enable· 140

ospf network-type· 140

ospf packet-size· 142

ospf peer hold-max-cost duration· 142

ospf peer suppress-flapping· 143

ospf peer suppress-flapping hold-down· 144

ospf peer suppress-flapping hold-max-cost 145

ospf prefix-suppression· 146

ospf primary-path-detect bfd· 147

ospf silent 148

ospf timer dead· 149

ospf timer hello· 149

ospf timer poll 150

ospf timer retransmit 151

ospf trans-delay· 151

ospf troubleshooting max-number 152

ospf ttl-security· 153

peer 154

pic· 155

preference· 155

prefix-priority· 156

prefix-suppression· 157

reset ospf event-log· 158

reset ospf event-log hello· 159

reset ospf process· 159

reset ospf redistribution· 160

reset ospf statistics· 160

reset ospf troubleshooting· 161

rfc1583 compatible· 161

router id· 162

shutdown process· 163

silent-interface· 163

snmp trap rate-limit 164

snmp-agent trap enable ospf 165

snmp-agent trap ospf neighbor-state-change extended· 167

spf-schedule-interval 167

stub· 168

stub-router 169

transmit-pacing· 170

ttl-security· 171

vlink-peer 172

 


OSPF commands

abr-summary

Use abr-summary to configure route summarization on an ABR.

Use undo abr-summary to remove the configuration.

Syntax

abr-summary ip-address { mask-length | mask } [ advertise | not-advertise ] [ cost cost-value ]

undo abr-summary ip-address { mask-length | mask }

Default

Route summarization is not configured on an ABR.

Views

OSPF area view

Predefined user roles

network-admin

Parameters

ip-address: Specifies the destination IP address of the summary route in dotted decimal notation.

mask-length: Specifies the mask length in the range of 1 to 32.

mask: Specifies the mask of the IP address, in dotted decimal notation.

advertise | not-advertise: Advertises the summary route or not. By default, the command advertises the summary route.

cost cost-value: Specifies the cost of the summary route, in the range of 1 to 16777215. The default cost is the largest cost value among routes that are summarized.

Usage guidelines

This command applies only to an ABR to summarize multiple contiguous networks into one network.

To enable ABR to advertise specific routes that have been summarized, use the undo abr-summary command.

Examples

# Summarize networks 36.42.10.0/24 and 36.42.110.0/24 in Area 1 into 36.42.0.0/16.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] area 1

[Sysname-ospf-100-area-0.0.0.1] network 36.42.10.0 0.0.0.255

[Sysname-ospf-100-area-0.0.0.1] network 36.42.110.0 0.0.0.255

[Sysname-ospf-100-area-0.0.0.1] abr-summary 36.42.0.0 255.255.0.0

area

Use area to create an OSPF area and enter OSPF area view.

Use undo area to remove an OSPF area.

Syntax

area area-id

undo area area-id

Default

No OSPF areas exist.

Views

OSPF view

Predefined user roles

network-admin

Parameters

area-id: Specifies an area by its ID, an IP address or a decimal integer in the range of 0 to 4294967295 that is translated into the IP address format.

Examples

# Create Area 0 and enter Area 0 view.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] area 0

[Sysname-ospf-100-area-0.0.0.0]

asbr-summary

Use asbr-summary to configure route summarization on an ASBR.

Use undo asbr-summary to remove the configuration.

Syntax

asbr-summary ip-address { mask-length | mask } [ cost cost-value | not-advertise | nssa-only | tag tag ] *

undo asbr-summary ip-address { mask-length | mask }

Default

Route summarization is not configured on an ASBR.

Views

OSPF view

Predefined user roles

network-admin

Parameters

ip-address: Specifies the destination IP address of the summary route.

mask-length: Specifies the mask length in the range of 1 to 32.

mask: Specifies the mask in dotted decimal notation.

cost cost-value: Specifies the cost of the summary route, in the range of 1 to 16777214. If you do not specify this option, the largest cost among the summarized routes applies. If the routes in Type-5 LSAs translated from Type-7 LSAs are Type-2 external routes, the largest cost among the summarized routes plus 1 applies.

not-advertise: Disables advertising the summary route. If you do not specify this keyword, the command advertises the route.

nssa-only: Limits the route advertisement to the NSSA area by setting the P-bit of Type-7 LSAs to 0. By default, the P-bit of Type-7 LSAs is set to 1. If the ASBR is also an ABR and FULL state neighbors exist in the backbone area, the P-bit of Type-7 LSAs originated by the ASBR is set to 0. This keyword applies to the NSSA ASBR.

tag tag: Specifies a tag for the summary route, in the range of 0 to 4294967295. The default is 1. The tag can be used by a routing policy to control summary route advertisement.

Usage guidelines

An ASBR can summarize routes in the following LSAs:

·     Type-5 LSAs.

·     Type-7 LSAs in an NSSA area.

·     Type-5 LSAs translated by the ASBR (also an ABR) from Type-7 LSAs in an NSSA area.

If the ASBR (ABR) is not a translator, it cannot summarize routes in Type-5 LSAs translated from Type-7 LSAs.

To enable ASBR to advertise specific routes that have been summarized, use the undo asbr-summary command.

Examples

# Summarize redistributed static routes into a single route, and specify a tag value of 2 and a cost of 100 for the summary route.

<Sysname> system-view

[Sysname] ip route-static 10.2.1.0 24 null 0

[Sysname] ip route-static 10.2.2.0 24 null 0

[Sysname] ospf 100

[Sysname-ospf-100] import-route static

[Sysname-ospf-100] asbr-summary 10.2.0.0 255.255.0.0 tag 2 cost 100

authentication-mode

Use authentication-mode to specify an authentication mode for an OSPF area.

Use undo authentication-mode to remove the configuration.

Syntax

For MD5/HMAC-MD5/HMAC-SHA-256 authentication:

authentication-mode { hmac-md5 | hmac-sha-256 | md5 } key-id { cipher | plain } string

undo authentication-mode [ { hmac-md5 | hmac-sha-256 | md5 } key-id ]

For simple authentication:

authentication-mode simple { cipher | plain } string

undo authentication-mode

For keychain authentication:

authentication-mode keychain keychain-name

undo authentication-mode

Default

No authentication is performed for an area.

Views

OSPF area view

Predefined user roles

network-admin

Parameters

hmac-md5: Specifies the HMAC-MD5 authentication mode.

hmac-sha-256: Specifies the HMAC-SHA-256 authentication mode.

md5: Specifies the MD5 authentication mode.

simple: Specifies the simple authentication mode.

key-id: Specifies a key by its ID in the range of 0 to 255.

cipher: Specifies a key in encrypted form.

plain: Specifies a key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the key. This argument is case sensitive.

·     In simple authentication mode, the plaintext form of the key is a string of 1 to 8 characters. The encrypted form of the key is a string of 33 to 41 characters.

·     In MD5/HMAC-MD5 authentication mode, the plaintext form of the key is a string of 1 to 16 characters. The encrypted form of the key is a string of 33 to 53 characters.

·     In HMAC-SHA-256 authentication mode, the plaintext form of the key is a string of 1 to 255 characters. The encrypted form of the key is a string of 33 to 373 characters.

keychain: Specifies the keychain authentication mode.

keychain-name: Specifies a keychain by its name, a case-sensitive string of 1 to 63 characters.

Usage guidelines

To establish or maintain adjacencies, routers in the same area must have the same authentication mode and key.

If MD5, HMAC-MD5, or HMAC-SHA-256 authentication is configured, you can configure multiple keys, each having a unique key ID and key string. As a best practice to minimize the risk of key compromise, use only one key for an area and delete the old key after key replacement.

To replace the key used for MD5, HMAC-MD5, or HMAC-SHA-256 authentication in an area, you must configure the new key before removing the old key from each router. OSPF uses the key rollover mechanism to ensure that the routers can pass authentication before the replacement is complete across the area. After you configure a new key on a router, the router sends copies of the same packet, each authenticated by a different key, including the new key and the keys in use. This practice continues until the router detects that all its neighbors have the new key.

When keychain authentication is configured for an OSPF area, OSPF performs the following operations before sending a packet:

1.     Obtains a valid send key from the keychain.

OSPF does not send the packet if it fails to obtain a valid send key.

2.     Uses the key ID, authentication algorithm, and key string to authenticate the packet.

If the key ID is greater than 255, OSPF does not send the packet.

When keychain authentication is configured for an OSPF area, OSPF performs the following operations after receiving a packet:

1.     Uses the key ID carried in the packet to obtain a valid accept key from the keychain.

OSPF discards the packet if it fails to obtain a valid accept key.

2.     Uses the authentication algorithm and key string for the valid accept key to authenticate the packet.

If the authentication fails, OSPF discards the packet.

The authentication algorithm can be MD5, HMAC-MD5, HMAC-SHA-256, or HMAC-SM3 and the ID of keys used for authentication can only be in the range of 0 to 255.

For more information about keychains, see keychain commands in Security Command Reference.

Examples

# Configure OSPF Area 0 to use the MD5 authentication mode, and set the key ID to 15 and the key to abc in plaintext form.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] area 0

[Sysname-ospf-100-area-0.0.0.0] authentication-mode md5 15 plain abc

# Configure OSPF area 0 to use the keychain authentication mode.

<Sysname> system-view

[Sysname] keychain abc mode absolute

[Sysname-keychain-abc] key 1

[Sysname-keychain-abc-key-1] authentication-algorithm md5

[Sysname-keychain-abc-key-1] key-string plain hello12345

[Sysname-keychain-abc-key-1] send-lifetime utc 10:00:00 2023/03/02 to 11:00:00 2023/03/02

[Sysname-keychain-abc-key-1] accept-lifetime utc 10:00:00 2023/03/02 to 11:00:00 2023/03/02

[Sysname-keychain-abc-key-1] quit

[Sysname-keychain-abc] quit

[Sysname] ospf 100

[Sysname-ospf-100] area 0

[Sysname-ospf-100-area-0.0.0.0] authentication-mode keychain abc

Related commands

ospf authentication-mode

bandwidth-reference

Use bandwidth-reference to set a reference bandwidth value for link cost calculation.

Use undo bandwidth-reference to restore the default value.

Syntax

bandwidth-reference value

undo bandwidth-reference

Default

The reference bandwidth value is 100 Mbps for link cost calculation.

Views

OSPF view

Predefined user roles

network-admin

Parameters

value: Specifies the reference bandwidth value for link cost calculation, in the range of 1 to 4294967 Mbps.

Usage guidelines

If no cost values are configured for links, OSPF calculates their cost values by using the following formula: Cost = Reference bandwidth value / Expected interface bandwidth. The expected bandwidth of an interface is configured with the bandwidth command (see Interface Command Reference). If the calculated cost is greater than 65535, the value of 65535 is used. If the calculated cost is less than 1, the value of 1 is used.

Examples

# Set the reference bandwidth value to 1000 Mbps.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] bandwidth-reference 1000

Related commands

ospf cost

database-filter peer

Use database-filter peer to filter LSAs for the specified P2MP neighbor.

Use undo database-filter peer to restore the default.

Syntax

database-filter peer ip-address { all | { ase [ acl ipv4-acl-number ] | nssa [ acl ipv4-acl-number ] | summary [ acl ipv4-acl-number ] } * }

undo database-filter peer ip-address

Default

The LSAs for the specified P2MP neighbor are not filtered.

Views

OSPF view

Predefined user roles

network-admin

Parameters

ip-address: Specifies a P2MP neighbor by its IP address.

all: Filters all LSAs except the Grace LSAs.

ase: Filters Type-5 LSAs.

nssa: Filters Type-7 LSAs.

summary: Filters Type-3 LSAs.

acl ipv4-acl-number: Specifies an IPv4 ACL by its number in the range of 2000 to 3999.

Usage guidelines

On a P2MP network, a router might have multiple OSPF neighbors with the P2MP type. Use this command to prevent the router from sending LSAs to the specified neighbor.

When you specify an ACL, follow these guidelines:

·     If the ACL does not exist or does not have any rules, OSPF does not filter the LSAs sent to the specified neighbor.

·     If a rule in the ACL is applied to a VPN instance, the rule will deny all of the LSAs sent to the specified neighbor.

To use an advanced ACL (with a number from 3000 to 3999) in the command, configure the ACL using one of the following methods:

·     To deny or permit LSAs with the specified link state ID, use the rule [ rule-id ] { deny | permit } ip source sour-addr sour-wildcard command.

·     To deny or permit LSAs with the specified link state ID and mask, use the rule [ rule-id ] { deny | permit } ip source sour-addr sour-wildcard destination dest-addr dest-wildcard command.

The source keyword specifies the link state ID of an LSA and the destination keyword specifies the subnet mask of the LSA. For the mask configuration to take effect, specify a contiguous subnet mask.

If the specified neighbor has already received an LSA, the LSA still exists in the LSDB of the neighbor after you execute the command.

Examples

# Filter all LSAs (except the Grace LSAs) for the P2MP neighbor with the IP address 121.20.20.121.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] database-filter peer 121.20.20.121 all

# Configure advanced ACL 3000 to filter Type-3 LSAs for the P2MP neighbor with the IP address 121.20.20.121.

<Sysname> system-view

[Sysname] acl advanced 3000

[Sysname-acl-ipv4-adv-3000] rule 10 deny ip source 121.20.0.0 0 destination 255.255.0.0 0

[Sysname-acl-ipv4-adv-3000] rule 100 permit ip

[Sysname-acl-ipv4-adv-3000] quit

[Sysname] ospf 1

[Sysname-ospf-1] database-filter peer 121.20.20.121 summary acl 3000

Related commands

ospf database-filter

default

Use default to configure default parameters for redistributed routes.

Use undo default to remove the configuration.

Syntax

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

undo default { cost | tag | type } *

Default

The cost is 1, the tag is 1, and the route type is 2.

Views

OSPF view

Predefined user roles

network-admin

Parameters

cost cost-value: Specifies a default cost for redistributed routes, in the range of 0 to 16777214.

tag tag: Specifies a tag for redistributed routes, in the range of 0 to 4294967295.

type type: Specifies a type for redistributed routes: 1 or 2.

Examples

# Set the default cost, tag, and type to 10, 100, and 2 for redistributed external routes.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] default cost 10 tag 100 type 2

Related commands

import-route

default-cost

Use default-cost to set a cost for the default route advertised to the stub or NSSA area.

Use undo default-cost to restore the default value.

Syntax

default-cost cost-value

undo default-cost

Default

The cost is 1.

Views

OSPF area view

Predefined user roles

network-admin

Parameters

cost-value: Specifies a cost for the default route advertised to the Stub or NSSA area, in the range of 0 to 16777214.

Usage guidelines

This command takes effect only on the ABR of a stub area or the ABR or ASBR of an NSSA area.

Examples

# Configure Area 1 as a stub area, and set the cost of the default route advertised to the stub area to 20.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] area 1

[Sysname-ospf-100-area-0.0.0.1] stub

[Sysname-ospf-100-area-0.0.0.1] default-cost 20

Related commands

nssa

stub

default-route-advertise

Use default-route-advertise to redistribute a default route into the OSPF routing domain.

Use undo default-route-advertise to restore the default.

Syntax

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

default-route-advertise [ summary cost cost-value ]

undo default-route-advertise

Default

No default route is redistributed into the OSPF routing domain.

Views

OSPF view

Predefined user roles

network-admin

Parameters

always: Redistributes a default route in a Type-5 LSA into the OSPF routing domain regardless of whether a default route exists in the routing table. If you do not specify this keyword, the router redistributes a default route only when an active default route that does not belong to the current OSPF process exists in the IP routing table.

permit-calculate-other: Enables OSPF to calculate default routes received from other routers. If you do not specify this keyword, OSPF does not calculate default routes from other routers. If the router does not redistribute any default route in a Type-5 LSA into the OSPF routing domain, the router calculates default routes from other routers. It calculates these routes regardless of whether this keyword is specified.

cost cost-value: Specifies a cost for the default route, in the range of 0 to 16777214. If you do not specify this option, the default cost specified by the default-cost command applies.

route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters. When the routing policy is matched and one of the following conditions is met, the command redistributes a default route in a Type-5 LSA into the OSPF routing domain:

·     A default route exists in the routing table.

·     The always keyword is specified.

The routing policy modifies values in the Type-5 LSA.

type type: Specifies a type for the Type-5 LSA: 1 or 2. If you do not specify this option, the default type for the Type-5 LSA specified by the default type command applies.

summary: Advertises the specified default route in a Type-3 LSA. This keyword is available only for VPNs.

Usage guidelines

This command redistributes a default route in a Type-5 LSA, which cannot be redistributed with the import-route command. If the local routing table has no default route, you must specify the always keyword for the command.

The default-route-advertise summary cost command is applicable only to VPNs. It enables a PE router to redistribute a default external route in a Type-3 LSA to CE routers.

Examples

# Redistribute a default route into the OSPF routing domain, regardless of whether the default route exists in the local routing table.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] default-route-advertise always

Related commands

default

import-route

description

Use description to configure a description for an OSPF process or area.

Use undo description to restore the default.

Syntax

description text

undo description

Default

No description is configured for an OSPF process or area.

Views

OSPF view

OSPF area view

Predefined user roles

network-admin

Parameters

text: Specifies a description, a case-sensitive string of 1 to 80 characters.

Usage guidelines

The description specified by this command is used to identify an OSPF process or area.

Examples

# Describe OSPF process 100 as abc.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] description abc

# Describe OSPF Area 0 as bone area.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] area 0

[Sysname-ospf-100-area-0.0.0.0] description bone area

discard-route

Use discard-route to configure discard routes for summary networks.

Use undo discard-route to restore the default.

Syntax

discard-route { external { preference | suppression } | internal { preference | suppression } } *

undo discard-route [ external | internal ] *

Default

A device generates discard routes with preference 255 for summary networks.

Views

OSPF view

Predefined user roles

network-admin

Parameters

external: Specifies discard routes for redistributed summary networks on the ASBR. These discard routes are external discard routes.

preference: Specifies a preference for external discard routes, in the range of 1 to 255.

suppression: Disables the ASBR from generating external discard routes for summary networks.

internal: Specifies discard routes for summary networks on the ABR. These discard routes are internal discard routes.

preference: Specifies a preference for internal discard routes, in the range of 1 to 255.

suppression: Disables the ABR from generating internal discard routes for summary networks.

Examples

# Generate external and internal discard routes with preference 100 and 200, respectively.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] discard-route external 100 internal 200

display ospf

Use display ospf to display OSPF process information.

Syntax

display ospf [ process-id ] [ verbose ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify this argument, the command displays information about all OSPF processes.

verbose: Displays detailed OSPF process information. If you do not specify this keyword, the command displays brief OSPF process information.

Examples

# Display detailed OSPF process information.

<Sysname> display ospf verbose

 

          OSPF Process 1 with Router ID 192.168.1.2

                  OSPF Protocol Information

 

 RouterID: 192.168.1.2      Router type:  NSSA

 Route tag: 0

 Multi-VPN-Instance is not enabled

 Ext-community type: Domain ID 0x105, Route Type 0x8000, Router ID 0x8001

 Domain ID: 0.0.0.0:23

 Opaque capable

 Isolation: Enabled

 Originating router-LSAs with maximum metric

    Condition: On startup while BGP is converging, State: Inactive

    Advertise stub links with maximum metric in router-LSAs

    Advertise summary-LSAs with metric 16711680

    Advertise external-LSAs with metric 16711680

 ISPF is enabled

 SPF-schedule-interval: 50 (in milliseconds)

 LSA generation interval: 5

 LSA arrival interval: 1000

 Transmit pacing: Interval: 20 Count: 3

 Default ASE parameters: Metric: 1 Tag: 1 Type: 2

 Route preference: 10

 ASE route preference: 150

 SPF computation count: 22

 RFC 1583 compatible

 Fast-reroute: LFA

 Fast-reroute: remote-LFA Enable

   Maximum cost: 4294967295

 Node-Protecting Preference: 40

 Lowest-cost Preference: 20

 SRLG Preference: 10

 Fast-reroute: TI-LFA

 Microloop-avoidance: Enabled

 Microloop-avoidance RIB-update-delay: 20000 ms

 Graceful restart interval: 120

 SNMP trap rate limit interval: 2  Count: 300

 This process is currently bound to MIB

 Area count: 1   NSSA area count: 1

 Normal areas with up interfaces: 0

 NSSA areas with up interfaces: 1

 Up interfaces: 1

 ExChange/Loading neighbors: 0

 Full neighbors:3

 Area0 full neighbors: 1

 Calculation trigger type: Full

 Current calculation type: SPF calculation

 Current calculation phase: Calculation area topology

 Process reset state: N/A

 Current reset type: N/A

 Next reset type: N/A

 Reset prepare message replied: -/-/-/-

 Reset process message replied: -/-/-/-

 Reset phase of module:

   M-N/A, P-N/A, L-N/A, C-N/A, R-N/A

 MPLS segment routing: Disabled

   Segment routing adjacency   : Disabled

   Effective SRGB              : 16000  24000

   Segment routing local block : 15000  15999

   Segment routing tunnel count: 0

   SR microloop-avoidance      : Enabled

   SR microloop-avoidance RIB-update-delay: 6 ms

   SR adjacency label deletion delay

       State                   : Enabled

       Delay time              : 1900 sec

 Metric-delay advertisement: Disabled

 Metric-delay advertisement suppression

   Timer                :120

   Percent Threshold    :10

   Absolute Threshold   :1000

 Metric-bandwidth advertisement: Disabled

 Metric-bandwidth advertisement suppression: 120

 

 Area: 0.0.0.1          (MPLS TE  not enabled)

 Authentication type: None    Area flag: NSSA

 7/5 translator state: Disabled

 7/5 translate stability timer interval: 0

 SPF scheduled count: 5

 ExChange/Loading neighbors: 0

 Up interfaces: 1

 

 Interface: 192.168.1.2 (Ten-GigabitEthernet3/0/1)

 Cost: 1       State: DR        Type: Broadcast    MTU: 1500

 Cost source: Default

 Priority: 1

 Designated router: 192.168.1.2

 Backup designated router: 192.168.1.1

 Timers: Hello 10 , Dead 40 , Poll  40 , Retransmit 5 , Transmit Delay 1

 FRR backup: Enabled

 FRR remote-LFA: Enabled

 FRR TI-LFA: Enabled

 Microloop-avoidance: Enabled

 Microloop-avoidance RIB-update-delay: 20000 ms

 Enabled by network configuration

 Peer flapping suppression:

  Flapping count: 0

  Threshold: 10

 Packet size: 1000

 Prefix-SID type: Index

   Value: 101

   Process ID: ospf 1

   Prefix-SID validity: Invalid

 

 Interface: 12.1.1.1 (Ten-GigabitEthernet3/0/2)

 Cost: 65535   State: Down      Type: Broadcast    MTU: 1500

 Cost source: Flapping

 Priority: 1

 Designated router: 0.0.0.0

 Backup designated router: 0.0.0.0

 Timers: Hello 10, Dead 40, Poll 40, Retransmit 5, Transmit Delay 1

 FRR backup: Enabled

 FRR TI-LFA: Enabled

 FRR remote-lfa: Enabled

 Enabled by network configuration

 Peer flapping suppression:

  Mode: Hold-max-cost

  Remaining interval: 488 s

Table 1 Command output

Field

Description

OSPF Process 1 with Router ID 192.168.1.2

OSPF process ID and OSPF router ID.

RouterID

Router ID.

Router type

Router type:

·     ABR.

·     ASBR.

·     NSSA.

·     Null.

Process state

OSPF process state. If you shut down the process by using the shutdown process command, this field displays Admin-down. If the process is not shut down, this field is not displayed.

Route tag

Tag of redistributed routes.

Multi-VPN-Instance is not enabled

The OSPF process does not support multi-VPN-instance.

Ext-community type

OSPF extended community attribute type codes:

·     Domain ID—Domain ID code.

·     Route Type—Route type code.

·     Router ID—Router ID code.

Domain ID

OSPF domain ID (primary ID).

Opaque capable

Opaque LSA advertisement and reception capability is enabled.

Isolation

Whether OSPF isolation is enabled.

Originating router-LSAs with maximum metric

The maximum cost value for router LSAs (excluding stub links) is used.

Condition

Status of the stub router:

·     Always.

·     On startup while BGP is converging.

·     On startup while BGP is converging for xxx seconds, where xxx is specified by the user.

·     On startup for xxx seconds, where xxx is specified by the user.

State

Whether the stub router is active.

SPF-schedule-interval

Interval for SPF calculations. If the SPF calculation interval is fixed, this field also displays in milliseconds enclosed with brackets.

LSA generation interval

LSA generation interval.

LSA arrival interval

LSA arrival interval.

Transmit pacing

LSU packet transmit rate of the interface:

·     Interval—LSU transmit interval of the interface.

·     Count—Maximum number of LSU packets sent at each interval.

Default ASE parameters

Default ASE parameters: Metric, Tag, and Type.

Route preference

Internal route preference.

ASE route preference

External route preference.

SPF computation count

SPF computation count of the OSPF process.

RFC1583 compatible

Compatible with RFC 1583.

Fast-reroute

FRR type:

·     LFA—LFA is enabled.

·     LFA ECMP-shared—LFA is enabled. OSPF FRR automatically calculates a backup next hop for all routes, including ECMP routes. ECMP routes share one backup next hop.

·     Remote-LFA Disabled—Remote LFA is not enabled.

·     Remote-LFA Enabled—Remote LFA is enabled.

·     TI-LFA—TI-LFA is enabled.

Maximum-cost

Maximum cost from the source node of a protected link to a PQ node.

Node-protecting preference

Priority of the node-protection backup path selection policy.

Lowest-cost preference

Priority of the lowest-cost backup path selection policy.

SRLG preference

Priority of the shared risk link group (SRLG)-disjoint backup path selection policy.

Microloop-avoidance

Microloop avoidance status: Disabled or Enabled.

Microloop-avoidance RIB-update-delay

Microloop avoidance delay timer in milliseconds.

SNMP trap rate limit interval

SNMP notification sending interval.

Count

Number of sent SNMP notifications.

ExChange/Loading neighbors

Neighbors in ExChange/Loading state.

Full neighbors

Neighbors in Full state.

Area0 full neighbors

Neighbors in Full state in the backbone area.

Calculation trigger type

Route calculation trigger type:

·     Full—Calculation of all routes is triggered.

·     Area topology change—Topology change in an area.

·     Intra router change—Incremental intra-area route change.

·     ASBR change—Incremental ASBR route change.

·     7to5 translator—Type-7-to-Type-5 LSA translator role change.

·     Full IP prefix—Calculation of all IP prefixes is triggered.

·     Full intra AS—Calculation of all intra-AS prefixes is triggered.

·     Inc intra AS—Calculation of incremental intra-AS prefixes is triggered.

·     Full inter AS—Calculation of all AS-external prefixes is triggered.

·     Inc inter AS—Calculation of incremental AS-external prefixes is triggered.

·     N/A—Route calculation is not triggered.

Current calculation type

Current route calculation type:

·     SPF calculation.

·     Intra router calculation—Intra-area route calculation.

·     ASBR calculation—Inter-area ASBR route calculation.

·     Inc intra router—Incremental intra-area route calculation.

·     Inc ASBR calculation—Incremental inter-area ASBR route calculation.

·     7to5 translator—Type-7-to-Type-5 LSA calculation.

·     Full intra AS—Calculation of all intra-AS prefixes.

·     Inc intra AS—Calculation of incremental intra-AS prefixes.

·     Full inter AS—Calculation of all AS-external prefixes.

·     Inc inter AS—Calculation of incremental AS-external prefixes.

·     Forward address—Forwarding address calculation.

·     N/A—Route calculation is not triggered.

Current calculation phase

Current route calculation phase:

·     Calculation area topology—Calculating area topology.

·     Calculation router—Calculating routes on routers.

·     Calculation intra AS—Calculating intra-AS routes.

·     7to5 translator—Calculating Type-7-to-Type-5 LSAs.

·     Forward address—Calculating forwarding addresses.

·     Calculation inter AS—Calculating AS-external routes.

·     Calculation end—Ending phase of calculation.

·     N/A—Route calculation is not triggered.

Process reset state

Process reset state:

·     N/A—The process is not reset.

·     Under reset—The process is in the reset progress.

·     Under RIB smooth—The process is synchronizing the RIB.

Current reset type

Current process reset type:

·     N/A—The process is not reset.

·     Normal—Normal reset.

·     GR quit—Normal reset when GR quits abnormally.

·     Delete—Delete OSPF process.

·     VPN delete—Delete VPN.

Next reset type

Next process reset type:

·     N/A—The process is not reset.

·     Normal—Normal reset.

·     GR quit—Normal reset when GR quits abnormally.

·     Delete—Delete OSPF process.

·     VPN delete—Delete VPN.

Reset prepare message replied

Modules that reply reset prepare messages:

·     P—Neighbor maintenance module.

·     L—LSDB synchronization module.

·     C—Route calculation module.

·     R—Route redistribution module.

Reset process message replied

Modules that reply reset process messages:

·     P—Neighbor maintenance module.

·     L—LSDB synchronization module.

·     C—Route calculation module.

·     R—Route redistribution module.

Reset phase of module

Reset phase of each module:

·     Main control module:

¡     N/ANot reset.

¡     Delete area.

¡     Delete process.

·     Neighbor maintenance (P) module:

¡     N/A—Not reset.

¡     Delete neighbor.

¡     Delete interface.

¡     Delete vlink—Delete virtual link.

¡     Delete shamlink—Delete sham link.

·     LSDB synchronization (L) module:

¡     N/A—Not reset.

¡     Stop timer.

¡     Delete ASE—Delete all ASE LSAs.

¡     Delete ASE maps—Delete ASE LSA maps.

¡     Clear process data.

¡     Delete area LSA—Delete LSAs and maps from an area.

¡     Delete area interface—Delete interfaces from an area.

¡     Delete process—Delete process-related resources.

¡     Restart—Restart process-related resources.

·     Route calculation (C) module:

¡     N/A—Not reset.

¡     Delete topology—Delete area topology.

¡     Delete router—Delete routes of routers.

¡     Delete intra AS—Delete intra-AS routes

¡     Delete inter AS—Delete AS-external routes.

¡     Delete forward address—Delete forwarding address list.

¡     Delete advertise—Delete advertising router list.

·     Route redistribution (R) module:

¡     N/A—Not reset.

¡     Delete ABR summary—Delete summary routes of the ABR.

¡     Delete ASBR summary—Delete summary routes of the ASBR.

¡     Delete import—Delete redistributed routes.

MPLS segment routing

SR-MPLS status: Disabled or Enabled.

Segment routing adjacency

Adjacency label allocation status: Disabled or Enabled.

Configured SRGB

Configured SRGB range. This field is displayed when SRGB is configured.

Effective SRGB

SRGB range that takes effect.

Segment routing global block

SRGB range.

Segment routing local block

SRLB range.

SR microloop-avoidance

SR microloop avoidance status: Disabled or Enabled.

SR microloop-avoidance RIB-update-delay

SR microloop avoidance RIB-update-delay timer in milliseconds.

SR adjacency label deletion delay

SR adjacency label deletion delay:

·     The State field indicates the enabling status of the SR adjacency label deletion delay function. Options are:

¡     Enabled.

¡     Disabled.

The Delay time field indicates the SR adjacency label deletion delay timer in seconds.

Metric-delay advertisement

Link delay advertisement status: Disabled or Enabled.

Metric-delay advertisement suppression

Information about link delay advertisement suppression:

·     Timer—Link delay advertisement suppression timer in seconds.

·     Percent threshold—Suppression threshold for the delay variation ratio in percentage.

·     Absolute threshold—Suppression threshold for the absolute value of the delay variation in microseconds.

Metric-bandwidth advertisement

Link bandwidth advertisement status: Disabled or Enabled.

Metric-bandwidth advertisement suppression

Link bandwidth advertisement suppression timer in seconds.

Area

Area ID in the IP address format.

MPLS TE not enabled

MPLS TE status:

·     MPLS TE not enabled.

·     MPLS TE enabled.

Authentication type

Authentication type of the area:

·     None—No authentication.

·     Simple—Simple authentication.

·     Cryptographic—MD5, HMAC-MD5, or HMAC-SHA-256 authentication.

·     Keychain—Keychain authentication.

Area flag

Type of the area:

·     Normal.

·     Stub.

·     StubNoSummary (totally stub area).

·     NSSA.

·     NSSANoSummary (totally NSSA area).

7/5 translator state

State of the translator that translates Type-7 LSAs to Type-5 LSAs:

·     Enabled—The translator is specified through commands.

·     Elected—The translator is designated through election.

·     Disabled—The device is not a translator.

7/5 translate stability timer interval

Stability interval for Type-7 LSA-to-Type-5 LSA translation.

SPF scheduled Count

SPF calculation count in the OSPF area.

Interface

Interface in the area.

Cost

Interface cost.

State

Interface state.

Type

Interface network type.

MTU

Interface MTU.

Cost source

Link cost source of the interface:

·     Default—Default link cost.

·     Manual—Manually specified link cost.

·     IGP_LDP—Link cost advertised by LDP IGP.

·     LOW—Link cost applied when the link quality of the interface becomes LOW.

·     Fallback—Link cost applied when the bandwidth of the Layer 3 aggregate interface falls below the threshold.

·     Flapping—Link cost applied upon neighbor flapping suppression.

·     BFD—Link cost applied when the BFD session goes down.

Priority

Router priority.

Timers

OSPF timers:

·     Hello—Interval for sending hello packets.

·     Dead—Interval within which the neighbor is down.

·     Poll—Interval for sending hello packets.

·     Retransmit—Interval for retransmitting LSAs.

FRR backup

Whether Loop Free Alternate (LFA) calculation is enabled on an interface.

FRR TI-LFA

Whether TI-LFA calculation is enabled on an interface.

Enabled by interface configuration (including secondary IP addresses)

OSPF is enabled on the interface. including secondary IP addresses indicates that OSPF advertises the direct routes to the primary and secondary addresses of the interface.

Peer flapping suppression

Neighbor flapping suppression information:

·     Flapping count—Number of flappings that have occurred.

·     Threshold—Threshold that triggers flapping suppression.

·     Mode—Flapping suppression mode. Supported modes are Hold-down and Hold-max-cost.

·     Remaining interval—Remaining time in seconds before the flapping suppression ends.

Packet size

The maximum length of OSPF packets that can be sent by an interface.

Prefix-SID type

Prefix SID type:

·     Absolute—Absolute value of the prefix SID.

·     Index—Index value of the prefix SID.

Value

Prefix SID value.

Prefix-SID validity

Whether the prefix SID is valid:

·     Invalid—The prefix SID is invalid. Possible reasons include:

¡     The prefix SID is out of the SRGB range.

¡     The OSPF process ID configured on the loopback interface is different from the OSPF process ID specified during prefix SID configuration.

·     Valid—The prefix SID is valid.

display ospf abr-asbr

Use display ospf abr-asbr to display routes to the ABR or ASBR.

Syntax

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

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify this argument, the command displays routes to the ABR and ASBR for all OSPF processes.

verbose: Displays detailed information. If you do not specify this keyword, the command displays brief information.

Usage guidelines

If you use this command on routers in a stub area, the commands displays no ASBR information.

Examples

# Display brief information about routes to the ABR or ASBR.

<Sysname> display ospf abr-asbr

 

          OSPF Process 1 with Router ID 192.168.1.2

                  Routing Table to ABR and ASBR

 

 

                Topology base (MTID 0)

 Type        Destination       Area       Cost  Nexthop         RtType

 Inter       3.3.3.3           0.0.0.0    3124  10.1.1.2        ASBR

 Intra       2.2.2.2           0.0.0.0    1562  10.1.1.2        ABR

# Display detailed information about routes to the ABR or ASBR.

<Sysname> display ospf abr-asbr verbose

 

          OSPF Process 10 with Router ID 101.1.1.11

                  Routing Table to ABR and ASBR

 

                Topology base (MTID 0)

 

 Destination: 1.1.1.1             RtType     : ASBR

 Area       : 0.0.0.1             Type       : Intra

 Nexthop    : 150.0.1.12          BkNexthop  : 0.0.0.0

 Interface  : XGE3/0/1            BkInterface: N/A

 Cost       : 1000

 Remote-LFA Info:

    PQPrefix: 5.5.5.5                PQAdvID : 5.5.5.5

     LsIndex: 2

  LabelStack: {2301}

 TI-LFA backup info:

 PNodePrefix: 5.5.5.5             QNodeAdvID : 5.5.5.5

 BkInterface:XGE3/0/1            BkNexthop  : 1.4.0.4

     LsIndex: 5

  LabelStack: {16005}

Table 2 Command output

Field

Description

Type

Type of the route to the ABR or ASBR:

·     Intra—Intra-area route.

·     Inter—Inter-area route.

Topology

This field is not supported in the current software version.

Topology name. If this field displays base, the topology is the base topology. If this field displays other values, the topology is a subtopology.

MTID

This field is not supported in the current software version.

Topology ID. If this field displays 0, the topology is the base topology. If this field displays other values, the topology is a subtopology.

Destination

Router ID of an ABR or ASBR.

Area

ID of the area of the next hop.

Cost

Cost from the router to the ABR or ASBR.

MALsIndex

SR microloop avoidance label stack index.

MALabelStack

SR microloop avoidance label stack (from top to bottom).

Nexthop

Next hop address.

BkNexthop

Backup next hop address.

RtType

Router type: ABR or ASBR.

Interface

Output interface.

BkInterface

Backup output interface.

Remote-LFA back Info

Remote LFA backup information.

PQPrefix

PQ node prefix.

PQAdvID

Router ID of the PQ node.

TI-LFA backup Info

TI-LFA backup information.

PNodePrefix

P node prefix.

QNodeAdvID

Router ID of the Q node.

LsIndex

Label stack index.

LabelStack

Label stack.

display ospf abr-summary

Use display ospf abr-summary to display ABR summary route information.

Syntax

display ospf [ process-id ] [ area area-id ] abr-summary [ ip-address { mask-length | mask } ] [ verbose ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify this argument, the command displays information about ABR summary routes for all OSPF processes.

area area-id: Specifies an OSPF area by its ID. The area ID is an IP address or a decimal integer in the range of 0 to 4294967295 that is translated into the IP address format. If you do not specify this option, the command displays information about ABR summary routes for all OSPF areas.

ip-address: Specifies a summary route by its IP address.

mask-length: Specifies the mask length in the range of 1 to 32.

mask: Specifies the mask in dotted decimal notation.

verbose: Displays detailed ABR summary route information. If you do not specify this keyword, the command displays brief ABR summary route information.

Usage guidelines

If you do not specify an IP address, this command displays information about all summary routes on the ABR.

Examples

# Display brief information about summary routes on the ABR.

<Sysname> display ospf abr-summary

 

          OSPF Process 1 with Router ID 2.2.2.2

                  ABR Summary Addresses

 

                Topology base (MTID 0)

                         Area: 0.0.0.1

 Total summary address count: 1

 Net             Mask            Status        Count      Cost

 100.0.0.0       255.0.0.0       Advertise     1          (Not Configured)

Table 3 Command output

Field

Description

Topology

This field is not supported in the current software version.

Topology name. If this field displays base, the topology is the base topology. If this field displays other values, the topology is a subtopology.

MTID

This field is not supported in the current software version.

Topology ID. If this field displays 0, the topology is the base topology. If this field displays other values, the topology is a subtopology.

Area

Area to which the summary routes belong.

Total summary address count

Total number of summary routes.

Net

Address of the summary route.

Mask

Mask of the summary route address.

Status

Advertisement status of the summary route: Advertise or Non-Advertise.

Count

Number of summarized routes.

Cost

Cost of the summary route.

# Display detailed information about summary routes on the ABR.

<Sysname> display ospf abr-summary verbose

 

          OSPF Process 1 with Router ID 2.2.2.2

                  ABR Summary Addresses

 

                Topology base (MTID 0)

                         Area: 0.0.0.1

 Total summary address count: 1

 

 Net         : 100.0.0.0

 Mask        : 255.0.0.0

 Status      : Advertise

 Cost        : (Not Configured)

 Routes count: 1

   Destination            NetMask                 Metric

   100.1.1.0              255.255.255.0           1000

Table 4 Command output

Field

Description

Topology

This field is not supported in the current software version.

Topology name. If this field displays base, the topology is the base topology. If this field displays other values, the topology is a subtopology.

MTID

This field is not supported in the current software version.

Topology ID. If this field displays 0, the topology is the base topology. If this field displays other values, the topology is a subtopology.

Destination

Destination address of a summarized route.

NetMask

Network mask of a summarized route.

Metric

Metric of a summarized route.

display ospf asbr-summary

Use display ospf asbr-summary to display ASBR summary route information.

Syntax

display ospf [ process-id ] asbr-summary [ ip-address { mask-length | mask } ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify this argument, the command displays information about ASBR summary routes for all OSPF processes.

ip-address: Specifies an IP address in dotted decimal notation.

mask-length: Specifies the mask length in the range of 1 to 32.

mask: Specifies the mask in dotted decimal notation.

Usage guidelines

If you do not specify an IP address, this command displays information about all ASBR summary routes.

Examples

# Display ASBR summary route information in OSPF process 1.

<Sysname> display ospf 1 asbr-summary

 

          OSPF Process 1 with Router ID 2.2.2.2

                  Summary Addresses

 

 

                Topology base (MTID 0)

 Total summary address count: 1

 

                  Summary Address

 

 Net         : 30.1.0.0

 Mask        : 255.255.0.0

 Tag         : 20

 Status      : Advertise

 Cost        : 10 (Configured)

 Route count : 2

 

 Destination     Net mask        Proto      Process   Type     Metric

 

 30.1.2.0        255.255.255.0   OSPF       2         2        1

 30.1.1.0        255.255.255.0   OSPF       2         2        1

Table 5 Command output

Field

Description

Topology

This field is not supported in the current software version.

Topology name. If this field displays base, the topology is the base topology. If this field displays other values, the topology is a subtopology.

MTID

This field is not supported in the current software version.

Topology ID. If this field displays 0, the topology is the base topology. If this field displays other values, the topology is a subtopology.

Total summary address count

Total number of summary routes.

Net

Address of the summary route.

Mask

Mask of the summary route address.

Tag

Tag of the summary route.

Status

Advertisement status of the summary route.

Cost

Cost of the summary route.

Route count

Number of summarized routes.

Destination

Destination address of a summarized route.

Net mask

Network mask of a summarized route.

Proto

Routing protocol from which the route was redistributed.

Process

Process ID of the routing protocol from which the route was redistributed.

Type

Type of a summarized route.

Metric

Metric of a summarized route.

display ospf event-log

Use display ospf event-log to display OSPF log information.

Syntax

display ospf [ process-id ] event-log { lsa-flush | lsa-history [ verbose ] | peer [ neighbor-id ] [ slot slot-number ] | route | spf }

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify this argument, the command displays OSPF log information for all processes.

lsa-flush: Specifies LSA aging log information.

lsa-history: Specifies self-originated and received LSA log information.

verbose: Displays detailed self-originated and received LSA log information. If you do not specify this keyword, the command displays brief self-originated and received LSA log information.

peer: Specifies neighbor state change log information.

neighbor-id: Specifies a neighbor by its router ID. If you do not specify this argument, the command displays state change log information for all neighbors.

slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command displays neighbor state change log information on the card where the active process resides.

route: Specifies OSPF route log information.

spf: Specifies route calculation log information.

Usage guidelines

Route calculation logs show the number of routes newly installed in the IP routing table.

Neighbor logs include information about the following events:

·     The OSPF neighbor state goes down.

·     The OSPF neighbor state goes backward because the local end receives BadLSReq, SeqNumberMismatch, and 1-Way events.

Examples

# Display OSPF LSA aging log information for all processes.

<Sysname> display ospf event-log lsa-flush

 

          OSPF Process 1 with Router ID 1.1.1.1

                  LSA Flush Log

 

 Date: 2013-09-22 Time: 14:47:33 Received MaxAge LSA from 10.1.1.1

 Type: 1   LS ID: 2.2.2.2         AdvRtr: 2.2.2.2           Seq#: 80000001

 

 Date: 2013-09-22 Time: 14:47:33 Flushed MaxAge LSA by the self

 Type: 1   LS ID: 1.1.1.1         AdvRtr: 1.1.1.1           Seq#: 80000001

 

 Date: 2013-09-22 Time: 14:47:33 Received MaxAge LSA from 10.1.2.2

 Type: 1   LS ID: 2.2.2.2         AdvRtr: 2.2.2.2           Seq#: 80000001

 

 Date: 2013-09-22 Time: 14:47:33 Flushed MaxAge LSA by the self

 Type: 1   LS ID: 1.1.1.1         AdvRtr: 1.1.1.1           Seq#: 80000001

Table 6 Command output

Field

Description

Date/Time

Time when the device receives an LSA that has reached the maximum age.

Received MaxAge LSA from X.X.X.X

The device received an LSA that has reached the maximum age from X.X.X.X.

Flushed MaxAge LSA by the self

The device flushed the LSA that has reached the maximum age.

Type

LSA type.

LS ID

LSA link state ID.

AdvRtr

Advertising router.

Seq#

LSA sequence number.

# Display OSPF LSA log information for process 1.

<Sysname> display ospf event-log lsa-history

 

          OSPF Process 1 with Router ID 1.1.1.1

                  LSA Log

 

Date:2016-06-06 Time:10:47:44:007923 Area 0.0.0.2  LSAs received from interface XGE3/0/1 10.5.1.5

 

Type      LinkState ID     AdvRtr       Age  Length   Sequence

1         10.1.1.5         10.1.1.5     1    36       80000002

Table 7 Command output

Field

Description

Date/Time

Time when the device generated or received the LSA, which is accurate to microseconds.

LSAs received from interface XXX X.X.X.X

The device received an LSA from interface XXX with IP address X.X.X.X.

Self-originated or self-aged LSAs

The LSA is self-originated or self-aged.

Type

LSA type.

LinkState ID

LSA link state ID.

AdvRtr

Advertising router.

Sequence

LSA sequence number.

# Display OSPF route log information for process 1.

<Sysname> display ospf event-log route

 

         OSPF Process 1 with Router ID 1.1.1.1

                  Route Log

 

            Topology base (MTID 0)

 

Date: 2013-09-22 Time: 14:47:33:070853  Modified 2.1.1.1/32,

Type:Stub

Interface: XGE3/0/2, Nexthop:10.5.1.1, Rely NbrID:0x13000004, Flag:0x01

Table 8 Command output

Field

Description

Date/Time

Route calculation time, which is accurate to microseconds.

Added/Deleted/Modified

The route was newly added, deleted, or modified.

Type

Route type, which can be Transit, Stub, Inter, Type1, or Type2.

Interface

Output interface of the route.

Nexthop

Next hop of the route.

Rely NbrID

Recursive neighbor router ID. If Rely is not displayed, the neighbor router is a non-recursive neighbor.

Flag

Route attribute flag.

# Display OSPF route calculation log information for all processes.

<Sysname> display ospf event-log spf

 

          OSPF Process 1 with Router ID 1.1.1.2

                  SPF Log

 

                Topology base (MTID 0)

 

Date       Time     Duration   Intra Inter External Reason

2012-06-27 15:28:26 0.95       1     1     10000    Intra-area LSA

2012-06-27 15:28:23 0.2        0     0     0        Area 0 full neighbor

2012-06-27 15:28:19 0          0     0     0        Intra-area LSA

2012-06-27 15:28:19 0          0     0     0        external LSA

2012-06-27 15:28:19 0.3        0     0     0        Intra-area LSA

2012-06-27 15:28:12 0          1     0     0        Intra-area LSA

2012-06-27 15:28:11 0          0     0     0        Routing policy

2012-06-27 15:28:11 0          0     0     0        Intra-area LSA

Table 9 Command output

Field

Description

Topology

This field is not supported in the current software version.

Topology name. If this field displays base, the topology is the base topology. If this field displays other values, the topology is a subtopology.

MTID

This field is not supported in the current software version.

Topology ID. If this field displays 0, the topology is the base topology. If this field displays other values, the topology is a subtopology.

Date/Time

Time when the route calculation starts.

Duration

Duration of the route calculation, in seconds.

Intra

Number of intra-area routes newly installed in the IP routing table.

Inter

Number of inter-area routes newly installed in the IP routing table.

External

Number of external routes newly installed in the IP routing table.

Reason

Reasons why the route calculation is performed:

·     Intra-area LSA—Intra-area LSA changes.

·     Inter-area LSA—Inter-area LSA changes.

·     External LSA—External LSA changes.

·     Configuration—Configuration changes.

·     Area 0 full neighbor—Number of FULL-state neighbors in Area 0 changes.

·     Area 0 up interface—Number of interfaces in up state in Area 0 changes.

·     LSDB overflow state—Overflow status changes.

·     AS number—AS number changes.

·     ABR summarization—ABR summarization changes.

·     GR end—GR ends.

·     Routing policy—Routing policy changes.

·     Intra-area tunnel—Intra-area tunnel changes.

·     Others—Other reasons.

# Display OSPF neighbor log information for OSPF process 1.

<Sysname> display ospf 1 event-log peer

 

          OSPF Process 1 with Router ID 1.1.1.1

                  Neighbors Log

 

Date       Time     Local Address   Remote Address  Router ID       Reason

2012-12-31 12:35:45 197.168.1.1     197.168.1.2     2.2.2.2         IntPhyChange

2012-12-31 12:35:19 197.168.1.1     197.168.1.2     2.2.2.2         ConfNssaArea

2012-12-31 12:34:59 197.168.1.1     197.168.1.2     2.2.2.2         SilentInt

Table 10 Command output

Field

Description

Date/Time

Time when the neighbor state changes.

Local Address

Local address of the neighbor relationship.

Remote Address

Peer address of the neighbor relationship.

Router ID

Neighbor router ID.

Reason

Reasons for neighbor state changes:

·     ResetConnect—The connection is lost due to insufficient memory.

·     IntChange—The interface parameter has changed.

·     VlinkChange—The virtual link parameter has changed.

·     ShamlinkChange—The sham link parameter has changed.

·     ResetOspf—The OSPF process is reset.

·     UndoOspf—The OSPF process is deleted.

·     UndoArea—The OSPF area is deleted.

·     UndoNetwork—The interface is disabled.

·     SilentInt—The interface is configured as a silent interface.

·     IntLogChange—The logical attribute of the interface has changed.

·     IntPhyChange—The physical attribute of the interface has changed.

·     IntVliChange—The virtual link attribute of the interface has changed.

·     VlinkDown—The virtual link goes down.

·     ShamlinkDown—The sham link goes down.

·     DeadExpired—The dead timer expires.

·     ConfStubArea—The interface is configured with stub area parameters.

·     ConfNssaArea—The interface is configured with NSSA area parameters.

·     AuthChange—The authentication type has changed.

·     OpaqueChange—The Opaque capability has changed.

·     Retrans—Excessive retransmissions.

·     LLSChange—The LLS capability has changed.

·     OOBChange—The OOB capability has changed.

·     GRChange—The GR capability has changed.

·     BFDDown—The interface is shut down by BFD.

·     BadLSReq—The interface receives BadLSReq events.

·     SeqMismatch—The interface receives SeqNumberMismatch events.

·     1-Way—The interface receives 1-Way events.

·     FilterLSA—Peer disconnection occurs because LSA filter settings have changed or the ACL used by the LSA filter has changed.

·     LocalNoLSA—The requested LSA does not exist.

·     SameLSAReq—The received LSA is in the local request queue.

·     OldLSAReq—The received LSA has a larger aging time than the requested LSA in the local request queue.

·     DdTimerOut—Receives a DD packet after the dead timer expires.

·     EAChange—The External Attribute bit has changed.

·     MTChange—The Multi-Topology bit has changed.

·     RecvNoDupPkt—Receives a non-duplicate DD packet in loading or full status.

·     EbitChange—The E bit has changed.

·     MSbitChange—The MS bit has changed.

·     IbitChange—The I bit has changed.

·     MSeqNumError—The primary router receives an unexpected serial number from the secondary router.

·     SSeqNumError—The secondary router receives an unexpected serial number from the primary router.

·     RecvOpqIntf—A DD packet that contains a type 9 LSA is received when the opaque LSA reception and advertisement capability is disabled.

·     RecvOpqArea—A DD packet that contains a type 10 LSA is received when the opaque LSA reception and advertisement capability is disabled.

·     RecvOpqAs—A DD packet that contains a type 11 LSA is received when the opaque LSA reception and advertisement capability is disabled.

·     RecvNSSA—A DD packet that contains a type 7 LSA is received in a non-NSSA area.

·     InvalidLSA—A DD packet that contains an invalid LSA is received.

·     RecvASE—A DD packet that contains a type 5 LSA is received on a virtual link or in a stub area.

·     shutdown—The shutdown process command is executed.

Related commands

reset ospf event-log

display ospf event-log hello

Use display ospf event-log hello to display OSPF log information about received or sent hello packets.

Syntax

display ospf [ process-id ] event-log hello { received [ abnormal | dropped ] | sent [ abnormal | failed ] } [ neighbor-id ] [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify this argument, the command displays OSPF log information for all processes.

received: Specifies log information for received hello packets.

sent: Specifies log information for sent hello packets.

abnormal: Specifies log information for abnormal hello packets received or sent at intervals greater than or equal to 1.5 times the hello interval.

dropped: Specifies log information for received hello packets that were dropped.

failed: Specifies log information for hello packets that failed to be sent.

neighbor-address: Specifies a neighbor by its IP address. If you do not specify this argument, the command displays received or sent hello packet log information for all neighbors.

slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command displays received or sent hello packet log information on the card where the active process resides.

Examples

# Display log information for sent hello packets.

<Sysname> display ospf event-log hello sent

 

         OSPF Process 1 with Router ID 5.5.5.5

                 Hello Log

 

Interface: XGE3/0/1

Neighbor address: 10.1.1.2, NbrID: 1.0.0.2

First 4 hello packets sent:

  2019-09-05 20:10:10:121, failed, errno: 132

  2019-09-05 20:10:20:121, succeeded

  2019-09-05 20:10:30:121, succeeded

  2019-09-05 20:10:40:121, succeeded

Last 4 hello packets sent before Full->Down at 2019-09-06 14:52:10:121

  2019-09-06 14:51:40:021, succeeded

  2019-09-06 14:51:50:021, succeeded

  2019-09-06 14:52:00:021, failed, errno: 132

  2019-09-06 14:52:10:010, failed, errno: 132

 

Interface: XGE3/0/1

Neighbor address: 10.1.1.2, NbrID: 1.0.0.2

First 4 hello packets sent:

  2019-09-05 20:10:10:121, failed, errno: 132

  2019-09-05 20:10:20:121, succeeded

  2019-09-05 20:10:30:121, succeeded

  2019-09-05 20:10:40:121, succeeded

Last 4 hello packets sent before Full->Init at 2019-09-06 11:16:20:171

  2019-09-06 11:15:20:121, succeeded

  2019-09-06 11:15:30:121, succeeded

  2019-09-06 11:15:40:121, succeeded

  2019-09-06 11:15:50:121, succeeded

Table 11 Command output

Field

Description

Interface

Interface that sends the hello packets.

Neighbor address

IP address of the neighbor.

NbrID

Router ID of the neighbor.

First 4 hello packets sent

Time and result (succeeded or failed) for sending the first four hello packets. For a packet failed to be sent, an error code is displayed in the errno field.

Last 4 hello packets sent before Full->Down at 2018-01-06 14:52:10:121

Time and result (succeeded or failed) for sending the last four hello packets before neighbor state change. For a packet failed to be sent, an error code is displayed in the errno field.

# Display log information for hello packets that failed to be sent.

<Sysname> display ospf event-log hello sent failed

 

         OSPF Process 1 with Router ID 5.5.5.5

                 Hello Log

 

Date: 2019-09-06 Time: 14:51:20:121 Interface: XGE3/0/1

Destination address: 224.0.0.5, sent failed, errno: 132

 

Date: 2019-09-06 Time: 11:20:20:116 Interface: XGE3/0/2

Destination address: 10.1.1.2, sent failed, errno: 132

Table 12 Command output

Field

Description

Date

Date for the hello packet sending failure, in the format of YYYY-MM-DD. YYYY represents the year, MM represents the month, and DD represents the day.

Time

Time for the hello packet sending failure, in the format of hh:mm:ss:xxx. hh represents the hours, mm represents the minutes, and ss represents the seconds, and xxx represents the milliseconds.

Interface

Interface that sends the hello packet.

Destination address

Destination IP address of the hello packet.

errno

Error code for the hello packet sending failure.

# Display log information for abnormal hello packets sent.

<Sysname> display ospf event-log hello sent abnormal

 

         OSPF Process 1 with Router ID 5.5.5.5

                 Hello Log

 

Date: 2019-09-06 Time: 11:21:12:121 Interface: XGE3/0/2

Destination address: 224.0.0.5, last one sent: 2019-09-06 11:20:51:916

 

Date: 2019-09-06 Time: 11:56:21:312 Interface: XGE3/0/2

Destination address: 10.1.1.2, last one sent: 2019-09-06 11:56:02:691

Table 13 Command output

Field

Description

Date

Date for sending the abnormal hello packet, in the format of YYYY-MM-DD. YYYY represents the year, MM represents the month, and DD represents the day.

Time

Time for sending the abnormal hello packet, in the format of hh:mm:ss:xxx. hh represents the hours, mm represents the minutes, and ss represents the seconds, and xxx represents the milliseconds.

Interface

Interface that sends the abnormal hello packet.

Destination address

Destination IP address of the abnormal hello packet.

last one sent

Time for sending the last hello packet before sending the abnormal hello packet.

# Display log information for received hello packets.

<Sysname> display ospf event-log hello received

 

         OSPF Process 1 with Router ID 5.5.5.5

                 Hello Log

 

Interface: XGE3/0/1

Neighbor address: 10.1.1.2, NbrID: 1.0.0.2

First 4 hello packets received:

  2019-09-05 20:11:10:121

  2019-09-05 20:11:20:121

  2019-09-05 20:11:30:121

  2019-09-05 20:11:40:121

Last 4 hello packets received before Exchange->Down at 2019-09-06 14:52:10:121

  2019-09-06 14:51:10:121

  2019-09-06 14:51:20:121

  2019-09-06 14:51:30:121

  2019-09-06 14:51:40:121

 

Interface: XGE3/0/1

Neighbor address: 10.1.1.1, NbrID: 1.0.0.1

First 4 hello packets received:

  2019-09-06 19:11:15:121

  2019-09-06 19:11:25:121

  2019-09-06 19:11:35:121

  2019-09-06 19:11:45:121

Last 4 hello packets received before Full->Init at 2019-09-06 21:16:20:171

  2019-09-06 21:15:45:121

  2019-09-06 21:15:55:121

  2019-09-06 21:16:05:121

  2019-09-06 21:16:15:121

Table 14 Command output

Field

Description

Interface

Interface that receives the hello packets.

Neighbor address

IP address of the neighbor.

NbrID

Router ID of the neighbor.

First 4 hello packets received

Time for receiving the first four hello packets.

Last 4 hello packets received before Full->Init at 2019-09-06 21:16:20:171

Time for receiving the last four hello packets before neighbor state change, in the format of YYYY-MM-DD hh:mm:ss:xxx. YYYY represents the year, MM represents the month, and DD represents the day. hh represents the hours, mm represents the minutes, and ss represents the seconds, and xxx represents the milliseconds.

# Display log information for received hello packets that were dropped.

<Sysname> display ospf event-log hello received dropped

 

         OSPF Process 1 with Router ID 5.5.5.5

                 Hello Log

 

Date: 2019-09-06 Time: 14:51:22:791 Interface: XGE3/0/1

Source address: 10.1.1.1, NbrID: 1.0.0.1, area: 0.0.0.1

Drop reason: Hello-time mismatch

 

Date: 2019-09-06 Time: 14:51:20:121 Interface: XGE3/0/1

Source address: 10.1.1.2, NbrID: 1.0.0.2, area: 0.0.0.1

Drop reason: NP-bit mismatch

Table 15 Command output

Field

Description

Date

Date for dropping the received hello packet, in the format of YYYY-MM-DD. YYYY represents the year, MM represents the month, and DD represents the day.

Time

Time for dropping the received hello packet, in the format of hh:mm:ss:xxx. hh represents the hours, mm represents the minutes, and ss represents the seconds, and xxx represents the milliseconds.

Interface

Interface that receives the hello packet.

Source address

Source IP address of the received hello packet.

NbrID

Router ID of the neighbor.

area

Area to which the neighbor interface belongs.

Drop reason

Reason for dropping the hello packet:

·     Area under reset—The area is in the reset progress.

·     Router ID conflict—Route ID conflict.

·     Area mismatch—Area ID mismatch.

·     Unknown virtual link—The hello packet is from an unknown virtual link.

·     Authentication failure—Authentication check failure.

·     Peer address check failure—Neighbor address check failure.

·     Not DR or BDR—The destination IP address of the hello packet is 224.0.0.6, but the interface is not a DR or BDR.

·     Unknown unicast peer—The hello packet is from an unknown unicast neighbor.

·     Option mismatch—Option mismatch.

·     Subnet mask mismatch—Subnet mask mismatch.

·     Address mismatch—Address range mismatch.

·     Hello timer mismatch—Hello timer mismatch.

·     Dead timer mismatch—Dead timer mismatch.

·     Peer change—The source IP address or router ID has changed.

·     FilterLSA—Peer disconnection occurs because LSA filter settings have changed or the ACL used by the LSA filter has changed.

# Display log information for abnormal hello packets received.

<Sysname> display ospf event-log hello received abnormal

 

         OSPF Process 1 with Router ID 5.5.5.5

                 Hello Log

 

Date: 2019-09-06 Time: 10:12:22:121 Interface: XGE3/0/1

Source address: 10.1.1.2, NbrID: 1.0.0.2, area: 0.0.0.1

Last one received: 2019-09-06 10:12:04:212

 

Date: 2019-09-06 Time: 14:51:20:121 Interface: XGE3/0/1

Source address: 10.1.1.2, NbrID: 1.0.0.2, area: 0.0.0.1

Last one received: 2019-09-06 14:51:05:113

Table 16 Command output

Field

Description

Date&Tme

Date for receiving the abnormal hello packet, in the format of YYYY-MM-DD. YYYY represents the year, MM represents the month, and DD represents the day.

Time

Time for receiving the abnormal hello packet, in the format of hh:mm:ss:xxx. hh represents the hours, mm represents the minutes, and ss represents the seconds, and xxx represents the milliseconds.

Interface

Interface that receives the abnormal hello packet.

Source address

Source IP address of the received abnormal hello packet.

NbrID

Router ID of the neighbor.

area

Area to which the neighbor interface belongs.

Last one received

Time for receiving the last hello packet before receiving the abnormal hello packet.

Related commands

reset ospf event-log hello

display ospf fast-reroute lfa-candidate

Use display ospf fast-reroute lfa-candidate to display OSPF FRR backup next hop information.

Syntax

display ospf [ process-id ] [ area area-id ] fast-reroute lfa-candidate

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify this argument, the command displays FRR backup next hop information for all processes.

area area-id: Specifies an OSPF area by its ID. The area ID is an IP address or a decimal integer in the range of 0 to 4294967295 that is translated into the IP address format. If you do not specify this option, the command displays FRR backup next hop information for all OSPF areas.

Examples

# Display OSPF FRR backup next hop information.

<Sysname> display ospf 1 area 0 fast-reroute lfa-candidate

 

          OSPF Process 1 with Router ID 2.2.2.2

                  LFA Candidate List

 

                Topology base (MTID 0)

 

 Area: 0.0.0.0

 Candidate nexthop count: 2

 NextHop          IntIP            Interface

 10.0.1.1         10.0.1.2         XGE3/0/2

 10.0.11.1        10.0.11.2        XGE3/0/3

Table 17 Command output

Field

Description

Topology

This field is not supported in the current software version.

Topology name. If this field displays base, the topology is the base topology. If this field displays other values, the topology is a subtopology.

MTID

This field is not supported in the current software version.

Topology ID. If this field displays 0, the topology is the base topology. If this field displays other values, the topology is a subtopology.

Area

Area to which the backup next hops belong.

Candidate nexthop count

Number of backup next hops.

NextHop

Backup next hop address.

IntIP

IP address of the output interface.

Interface

Output interface.

display ospf global-statistics

Use display ospf global-statistics to display global OSPF statistics.

Syntax

display ospf global-statistics [ public | vpn-instance vpn-instance-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

public: Specifies the public network.

vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters.

Usage guidelines

If you do not specify the public keyword or the vpn-instance vpn-instance-name option, this command displays global OSPF statistics for the public network and all VPN instances.

Examples

# Display global OSPF statistics.

<Sysname> display ospf global-statistics

  OSPF global statistics

   Instance count   : 1

   Process count    : 1

   Interface information

    Down            : 0

    Up              : 1

   Neighbor information

    Down            : 0

    Init            : 0

    Attempt         : 0

    2-Way           : 0

    ExStart         : 0

    Exchange        : 0

    Loading         : 0

    Full            : 1

   Packets sent     : 26

   Packets received : 27

   LSA count        : 6

   Route count      : 2

Table 18 Command output

Field

Description

Instance count

This field displays the number of VPN instances and public network that are configured with OSPF.

·     If OSPF is configured only for the public network, the value is fixed at 1.

·     If OSPF is configured only for VPN instances, the value equals the number of the VPN instances.

·     If OSPF is configured for both the public network and VPN instances, the value equals the number of VPN instances plus 1.

Process count

Number of OSPF processes.

Interface information

Statistics about interface status.

Down

Number of interfaces in Down status.

Up

Number of interfaces in Up status.

Neighbor information

Statistics about neighbor status.

Down

Number of neighbor routers in Down status.

Attempt

Number of neighbor routers in Up status.

Init

Number of neighbor routers in Init status.

2-Way

Number of neighbor routers in 2-Way status.

ExStart

Number of neighbor routers in ExStart status.

Exchange

Number of neighbor routers in Exchange status.

Loading

Number of neighbor routers in Loading status.

Full

Number of neighbor routers in Full status.

Packets sent

Number of OSPF packets sent.

Packets received

Number of OSPF packets received.

LSA count

Total number of LSAs in the LSDB.

Route count

Total number of OSPF routes.

display ospf graceful-restart

Use display ospf graceful-restart to display GR information.

Syntax

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

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify this argument, the command displays GR information for all processes.

verbose: Displays detailed GR information. If you do not specify this keyword, the command displays brief GR information.

Examples

# Display detailed GR information.

<Sysname> display ospf graceful-restart verbose

 

          OSPF Process 1 with Router ID 1.1.1.1

              Graceful Restart information

 

Graceful Restart capability     : Enable(IETF)

Graceful Restart support        : Planned and unplanned,Partial

Helper capability               : Enable(IETF)

Helper support                  : Planned and unplanned(IETF),Strict LSA check

Current GR state                : Normal

Graceful Restart period         : 40 seconds

Number of neighbors under Helper: 0

Number of restarting neighbors  : 0

Last exit reason:

  Restarter  : None

  Helper     : None

 

Area: 0.0.0.0

Authentication type: None Area flag: Normal

Area up Interface count: 2

 

Interface: 40.4.0.1 (Ten-GigabitEthernet3/0/2)

Restarter state: Normal  State: P-2-P     Type: PTP

Last exit reason:

  Restarter  : None

  Helper     : None

Neighbor count of this interface: 1

Number of neighbors under Helper: 0

Neighbor        IP address      GR state     Last Helper exit reason

3.3.3.3         40.4.0.3        Normal       None

 

Virtual-link Neighbor-ID  -> 4.4.4.4, Neighbor-State: Full

Restarter state: Normal

Interface: 20.2.0.1 (Vlink)

Transit Area: 0.0.0.1

Last exit reason:

  Restarter  : None

  Helper     : None

Neighbor        IP address      GR state     Last Helper exit reason

4.4.4.4         20.2.0.4        Normal       Reset neighbor

Table 19 Command output

Field

Description

OSPF Process 1 with Router ID 1.1.1.1

Graceful Restart information

GR information for OSPF process 1 with router ID 1.1.1.1.

Graceful Restart capability

Whether GR is enabled:

·     Enable(IETF)—IETF GR is enabled.

·     Enable(Nonstandard)—Non-IETF GR is enabled.

·     Disable—GR is disabled.

Graceful Restart support

GR modes that the process supports (displayed only when GR is enabled):

·     Planned and unplanned—Supports both planned and unplanned GR.

·     Planned only—Supports only planned GR.

·     Partial—Supports partial GR.

·     Global—Supports global GR.

Helper capability

Helper capability that the process supports:

·     Enable(IETF)—Supports IETF GR helper capability.

·     Enable(Nonstandard)—Supports non-IETF GR helper capability.

·     Enable(IETF and nonstandard)—Supports both IETF GR helper capability and non-IETF GR helper capability.

·     Disable—Does not support GR helper capability.

Helper support

This field is available only when the helper capability is enabled.

Policies that the helper supports:

·     Strict lsa check—The helper supports strict LSA checking.

·     Planned and unplanned—The helper supports planned and unplanned GR.

·     Planned only—The helper supports only planned GR.

Current GR state

GR state:

·     Normal—GR is not in progress or has completed.

·     Under GR—GR is in process.

·     Under Helper—The process is acting as GR helper.

Last exit reason

Last exit reason:

·     Restarter—Reason that the restarter exited most recently.

·     Helper—Reason that the helper exited most recently.

Area

Area ID in IP address format.

Authentication type

Authentication type of the area:

·     None—No authentication.

·     Simple—Simple authentication.

·     Cryptographic—MD5, HMAC-MD5, or HMAC-SHA-256 authentication.

·     Keychain—Keychain authentication.

Area flag

Type of the area:

·     Normal.

·     Stub.

·     StubNoSummary (totally stub area).

·     NSSA.

·     NSSANoSummary (totally NSSA area).

Area up Interface count

Number of up interfaces in the area.

Interface

Interface in the area.

Restarter state

Restarter state on the interface.

State

Interface state.

Type

Interface network type.

Neighbor count of this interface

Neighbors of an interface.

Neighbor

Neighbor router ID.

IP address

Neighbor IP address.

GR state

Neighbor GR state:

·     Normal—GR is not in progress or has completed.

·     Under GR—GR is in process.

·     Under Helper—The process is acting as GR helper.

Last Helper exit reason

Reason that the helper exited most recently.

Virtual-link Neighbor-ID

Router ID of the virtual link's neighbor.

Neighbor-State

Neighbor state: Down, Init, 2-Way, ExStart, Exchange, Loading, and Full.

Interface

Output interface of the virtual link.

display ospf hostname-table

Use display ospf hostname-table to display the router ID-to-host name mapping table.

Syntax

display ospf [ process-id ] hostname-table

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify an OSPF process, this command displays the router ID-to-host name mapping tables for all OSPF processes.

Examples

# Display the router ID-to-host name mapping tables for all OSPF processes.

<RouterA> display ospf hostname-table

 

         OSPF Process 1 with Router ID 192.168.56.21

                 Hostname Table Information

 

                         Area: 0.0.0.1

Router ID            Hostname

192.168.56.21        RouterA

display ospf interface

Use display ospf interface to display OSPF interface information.

Syntax

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

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

process-id: Specifies an OSPF process ID in the range of 1 to 65535. If you do not specify this argument, the command displays the OSPF interface information for all OSPF processes.

interface-type interface-number: Specifies an interface by its type and number.

verbose: Displays detailed OSPF information for all interfaces.

Usage guidelines

If you do not specify the interface-type interface-number argument or the verbose keyword, this command displays OSPF brief information for all interfaces.

Examples

# Display all OSPF interface brief information.

<Sysname> display ospf interface

 

          OSPF Process 1 with Router ID 192.168.1.1

                  Interfaces

 

 Area: 0.0.0.0

 IP Address      Type         State    Cost  Pri   DR              BDR

 192.168.1.1     PTP          P-2-P    1562  1     0.0.0.0         0.0.0.0

 

 Area: 0.0.0.1

 IP Address      Type         State    Cost  Pri   DR              BDR

 172.16.0.1      Broadcast    DR       1     1     172.16.0.1      0.0.0.0

Table 20 Command output

Field

Description

Area

Area ID of the interface.

IP Address

Interface IP address (regardless of whether TE is enabled or not).

Type

Interface network type:

·     PTP (P2P).

·     PTMP (P2MP).

·     Broadcast.

·     NBMA.

State

Interface state:

·     Down—No protocol traffic can be sent or received on the interface.

·     Loopback—The interface is in loopback state and it cannot forward traffic.

·     Waiting—The interface starts sending and receiving Hello packets. The router is trying to determine the identity of the (Backup) designated router for the network.

·     P-2-P—The interface will send Hello packets at the hello interval, and try to establish an adjacency with the neighbor.

·     DR—The router is the designated router on the network.

·     BDR—The router is the backup designated router on the network.

·     DROther—The router is a DR Other router on the attached network.

Cost

Interface cost.

Pri

Router priority.

DR

DR on the interface's network segment.

BDR

BDR on the interface's network segment.

# Display detailed information about Ten-GigabitEthernet 3/0/1.

<Sysname> display ospf interface verbose

 

 

          OSPF Process 1 with Router ID 192.168.1.1

                  Interfaces

 

 Area: 0.0.0.0

 

 Interface: 172.16.0.1 (Ten-GigabitEthernet3/0/1)

 Cost: 1       State: DR        Type: Broadcast    MTU: 1500

 Cost source: Default

 Priority: 1

 Designated router: 172.16.0.1

 Backup designated router: 0.0.0.0

 Timers: Hello 10, Dead 40, Poll  40, Retransmit 5, Transmit Delay 1

 FRR backup: Enabled

 FRR remote-LFA: Enabled

 FRR TI-LFA: Enabled

 Primary path detection mode: BFD ctrl

 Enabled by interface configuration (including secondary IP addresses)

 Peer flapping suppression:

  Flapping count: 0

  Threshold: 10

 BFD: echo

 BFD: control

 BFD adjust cost: 1000

 BFD suppress flapping: Detect interval 30s

                        Threshold 2

                        Resume interval 10s

 Cryptographic authentication: Enabled, inherited

    The last key is 3.

    The rollover is in progress, 2 neighbor(s) left.

 LDP state: No-LDP

 LDP sync state: Achieved

 Link quality: GOOD, cost adjusted at low quality: 50

 Packet size: 1000

 Prefix-SID type: Index

   Value: 876, Explicit-null, N-flag-clear

   Process ID: ospf 1

   Prefix-SID validity: Invalid

   Static adjacency SID:

    Nexthop          Adjacency-SID     Type      Result

    100.100.100.100  15555             Absolute  Succeeded

    8.8.8.8          1000              Index     Conflicting

 Average delay  : 0 us

 Min delay      : 0 us

 Max delay      : 0 us

 Delay variation: 0 us

 

 MTID    Cost      Disabled    Topology name

 0       1         No          base

 

 Interface: 12.1.1.1 (Ten-GigabitEthernet3/0/2)

 Cost: 65535   State: Down      Type: Broadcast    MTU: 1500

 Cost source: Flapping

 Priority: 1

 Designated router: 0.0.0.0

 Backup designated router: 0.0.0.0

 Timers: Hello 10, Dead 40, Poll 40, Retransmit 5, Transmit Delay 1

 FRR backup: Enabled

 FRR TI-LFA: Enabled

 FRR remote-lfa: Enabled

 Enabled by network configuration

 Virtual system: Enabled

 Virtual Router ID: 3.3.3.3

 Peer flapping suppression:

  Mode: Hold-max-cost

  Remaining interval: 420 s

 Average delay  : 0 us

 Min delay      : 0 us

 Max delay      : 0 us

 Delay variation: 0 us

 

 MTID    Cost      Disabled    Topology name

 0       65535     No          base

Table 21 Command output

Field

Description

Interface

Information about the interface, such as the IP address.

Cost source

Link cost source of the interface:

·     Default—Default link cost.

·     Manual—Manually specified link cost.

·     IGP_LDP—Link cost advertised by LDP IGP.

·     LOW—Link cost applied when the link quality of the interface becomes LOW.

·     Fallback—Link cost applied when the bandwidth of the Layer 3 aggregate interface falls below the threshold.

·     Flapping—Link cost applied upon neighbor flapping suppression.

·     BFD—Link cost applied when the BFD session goes down.

Priority

Router priority.

Designated router

Designated router in the network to which the interface belongs.

Backup designated router

Backup designated router in the network to which the interface belongs.

Timers

OSPF timers (in seconds): Hello, Dead, Poll, and Retransmit.

Transmit Delay

LSA transmission delay on the interface, in seconds.

FRR backup

Whether LFA calculation is enabled on an interface.

FRR remote-LFA

Whether remote LFA calculation is enabled on an interface.

FRR TI-LFA

Whether TI-LFA calculation is enabled on an interface.

Primary path detection mode

Primary link detection mode:

·     BFD ctrl—BFD control packet mode.

·     BFD echo—BFD echo packet mode.

Enabled by interface configuration (including secondary IP addresses)

OSPF is enabled on the interface (including secondary IP addresses).

Virtual system

Whether the virtual system feature is enabled on the OSPF interface. If this feature is enabled, the interface can use a virtual OSPF node for neighbor relationship establishment.

Virtual Router ID

Router ID of the virtual OSPF node configured on the interface.

Peer flapping suppression

Neighbor flapping suppression information:

·     Flapping count—Number of flappings that have occurred.

·     Threshold—Threshold that triggers flapping suppression.

·     Mode—Flapping suppression mode. Supported modes are Hold-down and Hold-max-cost.

·     Remaining interval—Remaining time in seconds before the flapping suppression ends.

BFD

BFD session mode enabled on the interface:

·     ctrl—BFD control packet mode.

·     echo—BFD echo packet mode.

BFD adjust cost

Whether OSPF is enabled to adjust the interface cost according to the BFD session state:

·     Disabled.

·     A value in the 1 to 65534 indicates the value to be added to the interface cost.

·     Maximum—Sets the interface cost to the maximum value 65534.

This information is displayed only when the ospf bfd adjust-cost command is configured for the interface.

BFD suppress flapping

Suppress adjustment of the interface cost according to the BFD session state upon BFD session flapping:

·     Detect interval—Interval at which OSPF detects BFD session state changes, in seconds.

·     Threshold—Maximum number of BFD session down events. The number of BFD session down events is also displayed (in the BFD down times field) if it is smaller than the threshold within the specified detection interval.

·     Resume interval—Delay timer before OSPF resumes the original interface cost, in seconds. The remain field indicates the remaining time of the timer.

This information is displayed only when the ospf bfd adjust-cost suppress-flapping command is configured for the interface.

Simple authentication: Enabled, inherited

Simple authentication is enabled. The inherited attribute indicates that the interface uses the simple authentication mode specified for the area to which the interface belongs.

Cryptographic authentication: Enabled, inherited

MD5, HMAC-MD5, or HMAC-SHA-256 authentication is enabled. The inherited attribute indicates that the interface uses the authentication mode specified for the area to which the interface belongs.

The last key

Most recent MD5, HMAC-MD5, or HMAC-SHA-256 authentication key ID.

The rollover is in progress, 2 neighbor(s) left

Key rollover for MD5, HMAC-MD5, or HMAC-SHA-256 authentication is in progress, and two neighbors have not completed the key rollover.

Keychain authentication: Enabled (xxx), inherited

Keychain authentication is enabled. The name of the keychain is xxx. The inherited attribute indicates that the interface uses the authentication mode specified for the area to which the interface belongs.

LDP state

LDP state:

·     Init—Initialization state. LDP has not been delivered.

·     No-LDP—LDP is not configured.

·     Not ready—LDP sessions have not been established.

·     Ready—LDP sessions have been established.

LDP sync state

LDP IGP synchronization state:

·     Init—Initialization state.

·     Achieved—LDP has been synchronized.

·     Max cost—OSPF advertises the maximum cost in LSAs.

Link quality

Link quality:

·     GOOD—The bit error ratio is below the upper threshold or drops below the lower threshold.

·     LOW—The bit error ratio exceeds the upper threshold.

This field is displayed only when the interface is configured with the ospf link-quality adjust-cost command.

cost adjusted at low quality

Interface cost adjustment parameters:

·     xx—Value added to the interface cost. When the link quality is LOW, the interface cost is xx plus the original interface cost.

·     Maximum—Sets the maximum interface cost when the link quality is LOW.

This field is displayed only when the interface is configured with the ospf link-quality adjust-cost command.

Packet size

The maximum length of OSPF packets that can be sent by an interface.

Prefix-SID type

Prefix SID type:

·     Absolute—Absolute value of the prefix SID.

·     Index—Index value of the prefix SID.

Nexthop

Next hop address. This field displays 0.0.0.0 for a P2P network.

Type

Adjacency SID type:

·     Absolute—Absolute value of the adjacency SID.

·     Index—Index value of the adjacency SID.

Result

Adjacency SID application result:

·     Succeeded—Applied for adjacency SID successfully.

·     Conflicting—Adjacency SID conflict occurred.

·     Init—Adjacency SID application is in progress or adjacency SID assignment is not enabled.

Value

Prefix SID value and flag information:

·     Explicit-null—The upstream neighbor uses an explicit null flag to replace the prefix SID.

·     N-flag-clear—The prefix SID is the SID to a group of SR nodes.

Prefix-SID validity

Whether the prefix SID is valid:

·     Invalid—The prefix SID is invalid. Possible reasons include:

¡     The prefix SID is out of the SRGB range.

¡     The OSPF process ID configured on the loopback interface is different from the OSPF process ID specified during prefix SID configuration.

·     Valid—The prefix SID is valid.

Average delay

Average link delay in microseconds.

Max delay

Maximum link delay in microseconds.

Min delay

Minimum link delay in microseconds.

Delay variation

Acceptable link delay variation in microseconds.

MTID

This field is not supported in the current software version.

Topology ID. If this field displays 0, the topology is the base topology. If this field displays other values, the topology is a subtopology.

Cost

Cost of the interface route in the topology.

Disabled

Whether OSPF is disabled from advertising the topology for the interface: Yes or No.

Topology name

This field is not supported in the current software version.

Topology name. If this field displays base, the topology is the base topology. If this field displays other values, the topology is a subtopology.

display ospf interface hello

Use display ospf interface hello to display information about hello packets sent by OSPF interfaces.

Syntax

display ospf [ process-id ] interface [ interface-type interface-number ] hello

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

process-id: Specifies an OSPF process ID in the range of 1 to 65535. If you do not specify this argument, the command displays hello packet information for all OSPF processes.

interface-type interface-number: Specifies an interface by its type and number. If you do not specify this argument, the command displays information about the hello packets sent by all OSPF interfaces.

Usage guidelines

This command displays information for only the hello packets sent in multicast.

Examples

# Display information about hello packets sent by all OSPF interfaces.

<Sysname> display ospf interface hello

 

 

          OSPF Process 1 with Router ID 192.168.1.1

                  Interfaces

 

 Area: 0.0.0.0

 

 Interface: 172.16.0.1 (Ten-GigabitEthernet3/0/1)

 First 4 hello packets sent:

   2019-09-05 11:05:10:121, succeeded

   2019-09-05 11:05:20:121, succeeded

   2019-09-05 11:05:30:121, succeeded

   2019-09-05 11:05:40:121, succeeded

 Last 4 hello packets sent:

   2019-09-06 11:15:10:121, succeeded

   2019-09-06 11:15:20:121, succeeded

   2019-09-06 11:15:30:121, succeeded

   2019-09-06 11:15:40:121, succeeded

Table 22 Command output

Field

Description

Area

Area to which the interface belongs.

Interface

IP address of the interface.

First 4 hello packets sent

Time and result (succeeded or failed) for sending the first four hello packets.

Last 4 hello packets sent

Time and result (succeeded or failed) for sending the last four hello packets when the command is executed.

display ospf lsdb

Use display ospf lsdb to display OSPF LSDB information.

Syntax

display ospf [ process-id ] lsdb [ brief | originate-router advertising-router-id | self-originate ] [ age { max-value max-age-value | min-value min-age-value } * ] [ resolve-hostname ]

display ospf [ process-id ] lsdb hostname host-name [ age { max-value max-age-value | min-value min-age-value } * ]

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

display ospf [ process-id ] lsdb opaque-as [ link-state-id ] hostname host-name [ age { max-value max-age-value | min-value min-age-value } * ]

display ospf [ process-id ] lsdb ase [ link-state-id ] [ originate-router advertising-router-id | self-originate ] [ age { max-value max-age-value | min-value min-age-value } * ] [ resolve-hostname ]

display ospf [ process-id ] lsdb ase [ link-state-id ] hostname host-name [ age { max-value max-age-value | min-value min-age-value } * ]

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

display ospf [ process-id ] [ area area-id ] lsdb { network | opaque-area | opaque-link } [ link-state-id ] hostname host-name [ age { max-value max-age-value | min-value min-age-value } * ]

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

display ospf [ process-id ] [ area area-id ] lsdb { asbr | nssa | router | summary } [ link-state-id ] hostname host-name [ age { max-value max-age-value | min-value min-age-value } * ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify this argument, the command displays LSDB information for all OSPF processes.

age: Displays LSAs whose ages are in the specified range. If you do not specify this keyword, the command displays all LSAs in the LSDB.

max-value max-age-value: Specifies the maximum age of LSAs, in the range of 0 to 3600 seconds. The default value is 3600.

min-value min-age-value: Specifies the minimum age of LSAs, in the range of 0 to 3600 seconds. The default value is 0. The min-age-value cannot be greater than the max-age-value.

area area-id: Specifies an OSPF area by its ID. The area ID is an IP address or a decimal integer in the range of 0 to 4294967295 that is translated into the IP address format. If you do not specify this option, the command displays LSDB information for all OSPF areas.

brief: Displays brief LSDB information.

asbr: Displays Type-4 LSA (ASBR Summary LSA) information in the LSDB.

ase: Displays Type-5 LSA (AS External LSA) information in the LSDB.

network: Displays Type-2 LSA (Network LSA) information in the LSDB.

nssa: Displays Type-7 LSA (NSSA External LSA) information in the LSDB.

opaque-area: Displays Type-10 LSA (Opaque-area LSA) information in the LSDB.

opaque-as: Displays Type-11 LSA (Opaque-AS LSA) information in the LSDB.

opaque-link: Displays Type-9 LSA (Opaque-link LSA) information in the LSDB.

router: Displays Type-1 LSA (Router LSA) information in the LSDB.

summary: Displays Type-3 LSA (Network Summary LSA) information in the LSDB.

link-state-id: Specifies a link state ID in the IP address format.

originate-router advertising-router-id: Specifies an advertising router by its ID.

self-originate: Displays information about self-originated LSAs.

hostname host-name: Displays LSAs advertised by the router with the specified host name. If you do not specify this option, the command displays all LSAs in the OSPF LSDB.

resolve-hostname: Displays host names in OSPF LSDB information. If you do not specify this keyword, the OSPF LSDB information does not include host names.

Examples

# Display OSPF LSDB information.

<Sysname> display ospf lsdb

         OSPF Process 1 with Router ID 192.168.0.1

                 Link State Database

 

                         Area: 0.0.0.0

 Type      LinkState ID    AdvRouter          Age  Len   Sequence   Metric

 Router    192.168.0.2     192.168.0.2        474  36    80000004   0

 Router    192.168.0.1     192.168.0.1        21   36    80000009   0

 Network   192.168.0.1     192.168.0.1        321  32    80000003   0

 Sum-Net   192.168.1.0     192.168.0.1        321  28    80000002   1

 Sum-Net   192.168.2.0     192.168.0.2        474  28    80000002   1

                         Area: 0.0.0.1

 Type      LinkState ID    AdvRouter          Age  Len   Sequence   Metric

 Router    192.168.0.1     192.168.0.1        21   36    80000005   0

 Sum-Net   192.168.2.0     192.168.0.1        321  28    80000002   2

 Sum-Net   192.168.0.0     192.168.0.1        321  28    80000002   1

                         Type 9 Opaque (Link-Local Scope) Database

 Flags: * -Vlink interface LSA

 Type      LinkState ID    AdvRouter          Age  Len   Sequence   Interfaces

*Opq-Link  3.0.0.0         7.2.2.1            8    14    80000001   10.1.1.2

*Opq-Link  3.0.0.0         7.2.2.2            8    14    80000001   20.1.1.2

# Display OSPF LSDB information, including the host names of the advertising routers.

<Sysname> display ospf lsdb resolve-hostname

 

         OSPF Process 1 with Router ID 2.2.2.2

                 Link State Database

 

                         Area: 0.0.0.0

 Type      LinkState ID    AdvRouter       Age  Len   Sequence  Metric

 Router    1.1.1.1         1.1.1.1         1419 36    80000004  0

 Router    2.2.2.2         RouterB         1420 36    80000004  0

 Network   192.168.12.2    RouterB         1420 32    80000001  0

 Sum-Net   192.168.13.0    1.1.1.1         1456 28    80000001  1

 

                         Area: 0.0.0.1

 Type      LinkState ID    AdvRouter       Age  Len   Sequence  Metric

 Router    3.3.3.3         3.3.3.3         1416 36    80000003  0

 Router    1.1.1.1         1.1.1.1         1415 36    80000003  0

 Network   192.168.13.2    3.3.3.3         1416 32    80000001  0

 Sum-Net   192.168.12.0    1.1.1.1         1456 28    80000001  1

 

                 Type 10 Opaque (Area-Local Scope) Database

 Type      LinkState ID    AdvRouter       Age  Len   Sequence  Area

 Opq-Area  4.0.0.0         RouterB         470  32    80000001  0.0.0.0

Table 23 Command output

Field

Description

Area

LSDB information for the area.

Type

LSA type.

LinkState ID

Link state ID.

AdvRouter

Advertising router or its host name.

Age

Age of the LSA.

Len

Length of the LSA.

Sequence

Sequence number of the LSA.

Metric

Cost of the LSA.

*Opq-Link

Opaque LSA generated by a virtual link.

Opq-Area

Received Type-10 LSA.

# Display OSPF brief LSDB information.

<Sysname> display ospf lsdb brief

 

         OSPF Process 1 with Router ID 1.1.1.1

                 LS Database Statistics

 

 Area ID         Router   Network  S-Net    S-ASBR   Type-7   | SubTotal

 0.0.0.0         2        1        0        0        0        | 3

 0.0.0.1         0        0        0        0        0        | 0

 Total           2        1        0        0        0        |

 -------------------------------------------------------------+---------

 Area ID         Opq-9    Opq-10                              | SubTotal

 0.0.0.0         0        9                                   | 9

 0.0.0.1         0        1                                   | 1

 Total           0        10                                  |

 -------------------------------------------------------------+---------

                 ASE      Opq-11                              | SubTotal

 Total           0        0                                   | 0

 -------------------------------------------------------------+---------

                                                              | Total

                                                              | 13

Table 24 Command output

Field

Description

Router

Number of Type-1 LSAs.

Network

Number of Type-2 LSAs.

S-Net

Number of Type-3 LSAs.

S-ASBR

Number of Type-4 LSAs.

Type-7

Number of Type-7 LSAs.

Opq-9

Number of Type-9 LSAs.

Opq-10

Number of Type-10 LSAs.

ASE

Number of Type-5 LSAs.

Opq-11

Number of Type-11 LSAs.

SubTotal

Total number of LSAs in the same area.

Total

Total number of LSAs that are of the same type, or total number of LSAs.

# Display Type-2 LSA (Network LSA) information in the LSDB.

<Sysname> display ospf 1 lsdb network

 

          OSPF Process 1 with Router ID 192.168.1.1

                  Link State Database

 

                          Area: 0.0.0.0

 

    Type      : Network

    LS ID     : 192.168.0.2

    Adv Rtr   : 192.168.2.1

    LS age    : 922

    Len       : 32

    Options   :  E

    Seq#      : 80000003

    Checksum    : 0x8d1b

    Net mask  : 255.255.255.0

       Attached router    192.168.1.1

       Attached router    192.168.2.1

 

                          Area: 0.0.0.1

 

    Type      : Network

    LS ID     : 192.168.1.2

    Adv Rtr   : 192.168.1.2

    LS age    : 782

    Len       : 32

    Options   :  NP

    Seq#      : 80000003

    Checksum    : 0x2a77

    Net mask  : 255.255.255.0

       Attached router    192.168.1.1

       Attached router    192.168.1.2

# Display Type-2 LSA (Network LSA) information in the LSDB, including the host names of the advertising routers.

<Sysname> display ospf 1 lsdb network resolve-hostname

 

         OSPF Process 1 with Router ID 2.2.2.2

                 Link State Database

 

                         Area: 0.0.0.0

 

    Type      : Network

    LS ID     : 192.168.12.2

    Adv Rtr   : 2.2.2.2

    Hostname  : RouterB

    LS age    : 1552

    Len       : 32

    Options   : O E

    Seq#      : 80000001

    Checksum  : 0xbdd0

    Net mask  : 255.255.255.0

       Attached router    1.1.1.1

       Attached router    2.2.2.2

 

                         Area: 0.0.0.1

 

    Type      : Network

    LS ID     : 192.168.13.2

    Adv Rtr   : 3.3.3.3

    LS age    : 1548

    Len       : 32

    Options   : O E

    Seq#      : 80000001

    Checksum  : 0xc6be

    Net mask  : 255.255.255.0

       Attached router    1.1.1.1

       Attached router    3.3.3.3

Table 25 Command output

Field

Description

Type

LSA type.

LS ID

DR IP address.

Adv Rtr

Router that advertised the LSA.

Hostname

Host name of the advertising router.

LS age

LSA age time.

Len

LSA length.

Options

LSA options:

·     O—Opaque LSA advertisement capability.

·     E—AS External LSA reception capability.

·     L—Local link signaling capability.

·     DC—On-demand link support.

·     N—NSSA external LSA support.

·     P—Capability of an NSSA ABR to translate Type-7 LSAs into Type-5 LSAs.

Seq#

LSA sequence number.

Checksum

LSA checksum.

Net mask

Network mask.

Attached router

ID of the router that established adjacency with the DR, and ID of the DR itself.

# Display Type-9 LSA information in the LSDB for OSPF process 1.

<Sysname> display ospf 1 lsdb opaque-link

 

         OSPF Process 1 with Router ID 1.1.1.1

                 Link State Database

 

                         Area: 0.0.0.0

 

    Type      : Opq-Link

    LS ID     : 3.0.0.0

    Adv Rtr   : 1.1.1.1

    LS age    : 2

    Len       : 44

    Options   : O E

    Seq#      : 80000001

    Checksum  : 0x31cf

      Opaque type: 3(Grace LSA)

      Opaque ID: 0

      IETF Graceful Restart Period: 120

      Restart Reason:    1 - software restart

      Neighbor Interface Address  : 192.168.12.1

# Display Type-10 LSA information in the LSDB for OSPF process 1.

<Sysname> display ospf 1 lsdb opaque-area

 

         OSPF Process 1 with Router ID 2.2.2.2

                 Link State Database

 

                         Area: 0.0.0.0

 

    Type      : Opq-Area

    LS ID     : 4.0.0.0

    Adv Rtr   : 1.1.1.1

    LS age    : 1311

    Len       : 52

    Options   : O E

    Seq#      : 8000015c

    Checksum  : 0x4323

      Opaque type: 4(Router information)

      Opaque ID: 0

 

      Router information TLV:

        Length      : 4

        Capabilities:

          All Capability Bits: 0x60000000

          Graceful restart helper capable

          Stub router capable

 

      Segment routing algorithm TLV:

        Length   : 1

        Algorithm: 0

 

      Segment routing range TLV:

        Length: 12

        Range : 1001

 

        SID sub-TLV:

          Length: 3

          Label : 16000

 

      SR Node Maximum SID Depths:

         MPLS MSD         : 5

 

    Type      : Opq-Area

    LS ID     : 1.0.0.2

    Adv Rtr   : 1.1.1.1

    LS age    : 1239

    Len       : 192

    Options   : O E

    Seq#      : 80000001

    Checksum  : 0x9412

      Opaque type: 1(Traffic Engineering)

      Opaque ID: 2

      Link Type                : Broadcast

      Link ID                  : 12.1.1.2

      Local Interface Address  : 12.1.1.1

      TE Metric                : 1

      Maximum Bandwidth        : 0 bytes/sec

      Maximum Reservable BW    : 0 bytes/sec

      Administrative Group     : 0x0

      IGP Metric               : 1

      Number of SRLGs :  3

        SRLG [1]:10

        SRLG [2]:20

        SRLG [3]:30

      Unreserved Bandwidth for each TE Class:

        TE class  0 = 0 bytes/sec

        TE class  1 = 0 bytes/sec

        TE class  2 = 0 bytes/sec

        TE class  3 = 0 bytes/sec

        TE class  4 = 0 bytes/sec

        TE class  5 = 0 bytes/sec

        TE class  6 = 0 bytes/sec

        TE class  7 = 0 bytes/sec

      Unreserved Bandwidth for each TE Class:

        TE class  0 = 0 bytes/sec

        TE class  1 = 0 bytes/sec

        TE class  2 = 0 bytes/sec

        TE class  3 = 0 bytes/sec

        TE class  4 = 0 bytes/sec

        TE class  5 = 0 bytes/sec

        TE class  6 = 0 bytes/sec

        TE class  7 = 0 bytes/sec

      Bandwidth Constraint Model: Prestandard DS-TE RDM

      Bandwidth Constraints:

        BC [ 0] = 0 bytes/sec

        BC [ 1] = 0 bytes/sec

      Flag: 0, Average delay: 100 us

      Flag: 0, Min delay: 10 us, Max delay: 1000 us

      Delay variation: 200 us

 

    Type      : Opq-Area

    LS ID     : 7.0.0.0

    Adv Rtr   : 1.1.1.1

    LS age    : 1311

    Len       : 44

    Options   : O E

    Seq#      : 8000012f

    Checksum  : 0xabcf

      Opaque type: 7(Extended prefix)

      Opaque ID: 0

 

         Extended prefix TLV:

           Length    : 20

           Route type: 1

           AF        : 0

           Flags     : N

           Prefix    : 23.1.1.1/32

 

           SID sub-TLV:

             Length    : 8

             Flags     : NP/-/E/-/-

             MTID      : 0

             Algorithm : 0

             SID index : 101

 

           LAN adj sub-TLV:

             Length : 11

             Flags (B/V/L/G/P): 0/1/1/0/0

             MTID   : 0

             Weight : 0

             Neighbor ID: 1.1.1.1

             Label  : 1279

# Display Type-11 LSA information in the LSDB for OSPF process 1.

<Sysname> display ospf 1 lsdb opaque-as

 

        OSPF Process 1 with Router ID 3.3.3.3

                 Link State Database

 

    Type      : Opq-AS

    LS ID     : 7.0.0.1

    Adv Rtr   : 3.3.3.3

    LS Age    : 78

    Len       : 44

    Options   : O E

    Seq#      : 80000001

    Checksum  : 0xc164

      Opaque Type: 7(Extended prefix)

      Opaque ID: 1

 

        Extended prefix TLV:

          Length    : 20

          Route type: 5

          AF        : 0

          Flags     : -

          Prefix    : 5.5.5.5/32

 

          SID sub-TLV:

            Length    : 8

            Flags     : NP/-/-/-/-

            MTID      : 0

            Algorithm : 0

            SID index : 50

Table 26 Command output

Field

Description

Type

LSA type:

·     Opq-Link—Type-9 LSA, which is flooded on the local link.

·     Opq-Area—Type-10 LSA, which is flooded within an area.

·     Opq-AS—Type-11 LSA, which is flooded within an AS.

LS ID

IP address of the DR.

Adv Rtr

Router that advertised the LSA.

Hostname

Host name of the router that advertised the LSA.

LS age

LSA aging time.

Len

LSA length.

Options

LSA options:

·     O—Opaque LSA advertisement capability.

·     E—AS External LSA reception capability.

·     L—Local link signaling capability.

·     DC—On-demand link support.

·     N—NSSA external LSA support.

·     P—Capability of an NSSA ABR to translate Type-7 LSAs into Type-5 LSAs.

Seq#

LSA sequence number.

Checksum

LSA checksum.

Opaque type

Opaque type:

·     1(Traffic Engineering)—Opaque LSAs used for MPLS TE.

·     3(Grace LSA)—Opaque LSAs used for GR.

·     4(Router information)—Opaque LSAs used for route capability advertisement.

·     7(Extended prefix)—Opaque LSAs used for SID or MPLS label advertisement.

·     8(Extended link)—Opaque LSAs used for extended link information advertisement.

Opaque ID

Opaque ID.

IETF Graceful Restart Period

GR restart interval in seconds.

Restart Reason

GR restart reason:

·     0 - unknown.

·     1 - software restart.

·     2 - software reload/upgrade.

·     3 - switch to redundant control processor.

Neighbor Interface Address

IP address of the local interface used for establishing neighbor relationship.

Link Type

Link type:

·     Point to Point.

·     Point to Multi Point.

·     Broadcast.

·     NBMA.

Link ID

Link ID.

Local Interface Address

Primary IP address of the local interface.

TE Metric

TE metric.

Maximum Bandwidth

Maximum bandwidth of the link.

Maximum Reservable BW

Maximum bandwidth that can be reserved for the link.

Administrative Group

Administrative group attribute of the link.

IGP Metric

IGP metric.

Number of SRLGs

Number of SRLGs. The n argument in SRLG [n] represents the sequence number of the SRLG. For example, SRLG [1] represents the first SRLG.

Unreserved Bandwidth for each TE Class

Available bandwidth reserved for each TE class.

Bandwidth Constraint Model

Bandwidth constraint model:

·     Prestandard DS-TE RDM.

·     IETF DS-TE RDM.

·     IETF DS-TE MAM.

Bandwidth Constraints

Bandwidth constraint value. The Prestandard model supports 2 BCs, and the IETF models support a maximum of 4 BCs.

Flag

Whether the measured average link delay exceeds 16777215 microseconds.

·     0—The measured average link delay is shorter than 16777215 microseconds, indicating that the link is stable.

·     1—The measured average link delay is longer than or equivalent to 16777215 microseconds, indicating that the link is not stable.

Average delay

Average link delay in microseconds.

Flag

Whether the measured minimum or maximum link delay exceeds 16777215 microseconds.

·     0—The measured minimum or maximum link delay is shorter than 16777215 microseconds, indicating that the link is stable.

·     1—The measured minimum or maximum link delay is longer than or equivalent to 16777215 microseconds, indicating that the link is not stable.

Min delay

Minimum link delay in microseconds.

Max delay

Maximum link delay in microseconds.

Delay variation

Delay variation in microseconds.

Remaining bandwidth

Remaining bandwidth in bps.

Available bandwidth

Available bandwidth in bps.

Utilized bandwidth

Used bandwidth in bps.

MPLS TE Router ID

Local LSR ID.

Router information TLV

Route capability TLV information:

·     Length—TLV length in bytes.

·     Capabilities—Route capabilities:

¡     All Capability Bits—All capability bits, indicating the features that the device supports.

¡     Graceful restart helper capable—GR helper is supported.

¡     Stub router capable—Stub router is supported.

¡     Traffic Engineering enabled area—The OSPF area is enabled with MPLS TE.

Segment routing algorithm TLV

SR algorithm TLV:

·     Length—TLV length in bytes.

·     Algorithm—Prefix related algorithm.

Segment routing range TLV

SR label range TLV:

·     Length—TLV length in bytes.

·     Range—Label range.

·     SID sub-TLV—Prefix SID sub-TLV.

¡     Length—TLV length in bytes.

¡     Label—Minimum label value.

SR Node Maximum SID Depths

Maximum SID depths (MSD) TLV information for SR-MPLS nodes. The MPLS MSD field displays the maximum number of SIDs that an SR-MPLS node can encapsulate in a packet.

Extended prefix TLV

Extended prefix TLV:

·     Length—TLV length in bytes.

·     Route type—Route type:

¡     1—Intra-area route.

¡     3—Inter-area route.

¡     5—AS external route.

¡     7—NSSA external route.

·     AF—Address family.

·     Flags—Prefix SID flag:

¡     A—Attach flag (A-Flag). Inter-area prefix generated by the ABR.

¡     N—Node flag (N-Flag). The prefix SID is the SID to an SR node.

·     Prefix—Prefix information.

·     SID sub-TLV—Prefix SID sub-TLV.

·     Length—Prefix SID sub-TLV length.

·     Flags—Flag carried in the prefix SID sub-TLV:

¡     NP—No-PHP flag. The penultimate node cannot pop the prefix SID.

¡     M—Mapping Server flag. The SID is advertised by the Mapping Server.

¡     E—Explicit null flag. The upstream neighbor must replace the SID with an explicit null flag before forwarding the packets.

¡     V—Value/Index flag. The value of the prefix SID is an absolute value.

¡     L—Local flag. The Value/Index carried in the Prefix-SID has local significance.

·     MTID—Multi-topology ID. If this field displays 0, the topology is the base topology. If this field displays other values, the topology is a subtopology. This value is not supported in the current software version.

·     Algorithm—Prefix related algorithm.

·     SID index—Index value of the prefix SID.

LAN adj sub-TLV

LAN adjacency SID advertisement sub-TLV:

·     Length—Sub-TLV length in bytes.

·     Flags—Flag information:

¡     B—Backup flag. If this bit is set, the adjacency SID is used to protect other nodes.

¡     V—Value/index flag. This field displays V if this bit is set, which indicates that the adjacency SID carries the label value.

¡     L—Local/global flag. If this bit is set, the value/index in the adjacency SID has local significance.

¡     G—Group flag. If this bit is set, The adjacency SID represents an adjacency group.

¡     P—Persistent flag. If this bit is set, the ADJ-SID is valid permanently.

·     MTID—Multi-topology ID. If this field displays 0, the topology is the base topology. If this field displays other values, the topology is a subtopology. This value is not supported in the current software version.

·     Weight—Weight.

·     Neighbor ID—Router ID of the neighbor.

·     Label—Label value.

SR Link Maximum SID Depths

Maximum SID depths (MSD) TLV information for SR-MPLS links. The MPLS MSD field displays the maximum number of SIDs that can be encapsulated in a packet.

display ospf nexthop

Use display ospf nexthop to display OSPF next hop information.

Syntax

display ospf [ process-id ] nexthop

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify this argument, the command displays next hop information for all OSPF processes.

Examples

# Display OSPF next hop information.

<Sysname> display ospf nexthop

 

          OSPF Process 1 with Router ID 1.1.1.2

                  Neighbor Nexthop Information

 

 NbrID           Nexthop         Interface                RefCount   Status

 192.168.12.1    0.0.0.0         XGE3/0/2                  4         Valid

 192.168.12.2    192.168.12.2    XGE3/0/2                 3          Valid

 192.168.12.1    0.0.0.0         Loop100                  1          Valid

Table 27 Command output

Field

Description

NbrID

Neighbor router ID.

Nexthop

Next hop address.

Interface

Output interface.

RefCount

Reference count (routes that use the next hop).

Status

Next hop status:

·     Valid.

·     Invalid.

·     Valid-SR—The next hop type is SR tunnel and the SR tunnel has taken effect.

·     Invalid-SR—The next hop type is SR tunnel and the SR tunnel does not take effect.

display ospf non-stop-routing status

Use display ospf non-stop-routing status to display OSPF NSR information.

Syntax

display ospf [ process-id ] non-stop-routing status

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify this argument, the command displays OSPF NSR information for all OSPF processes.

Usage guidelines

By default, OSPF NSR is enabled. Users cannot use CLI to change the enabling status of OSPF NSR. To view the status of OSPF NSR, use the display ospf non-stop-routing status command.

Examples

# Display OSPF NSR information.

<Sysname> display ospf non-stop-routing status

 

                   OSPF Process 1 with Router ID 192.168.33.12

                          Non Stop Routing information

 

Non Stop Routing capability : Enabled

Upgrade phase : Normal

Table 28 Command output

Field

Description

Non Stop Routing capability

NSR status: enabled or disabled.

Upgrade phase

Upgrade phase:

·     Prepare—Upgrade preparation phase.

·     Restore Smooth—Upgrade phase.

·     Preroute—Route pre-calculation phase.

·     Calculating—Route calculation phase.

·     Redisting—Route redistribution phase.

·     Original and age—LSA generation and aging phase.

·     Normal—Normal status.

display ospf peer

Use display ospf peer to display information about OSPF neighbors.

Syntax

display ospf [ process-id ] peer [ hello | verbose ] [ interface-type interface-number ] [ [ neighbor-id ] [ resolve-hostname ] | hostname host-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

process-id: Specifies an OSPF process by ID in the range of 1 to 65535. If you do not specify this argument, the command displays OSPF neighbor information for all OSPF processes.

hello: Displays information about the hello packets sent to and received from neighbor routers. In scenarios where hello packets are sent in multicast, the command displays information for only the hello packets received from neighbor routers.

verbose: Displays detailed neighbor information. If you do not specify this keyword, the command displays brief OSPF neighbor information.

interface-type interface-number: Specifies an interface by its type and number. If you do not specify this argument, the command displays neighbor information for all interfaces.

neighbor-id: Specifies a neighbor router ID. If you do not specify this argument, the command displays information for all neighbors.

resolve-hostname: Resolves the host names of the neighbor routers. If you do not specify this keyword, the command cannot resolve the host names of the neighbor routers.

hostname host-name: Specifies a neighbor router by its host name, a case-sensitive string of 1 to 255 characters. If you do not specify this option, the command displays information for all neighbors.

Examples

# Display detailed OSPF neighbor information.

<Sysname> display ospf peer verbose

 

          OSPF Process 1 with Router ID 1.1.1.1

                  Neighbors

 

 Area 0.0.0.0 interface 1.1.1.1(Ten-GigabitEthernet3/0/1)'s neighbors

 Router ID: 1.1.1.2          Address: 1.1.1.2          GR state: Normal

   State: Full  Mode: Nbr is master  Priority: 1

   DR: 1.1.1.2  BDR: 1.1.1.1  MTU: 0

   Options is 0x02 (-|-|-|-|-|-|E|-)

   Dead timer due in 33  sec

   Neighbor is up for 02:03:35

   Authentication sequence: [ 0 ]

   Neighbor state change count: 6

   BFD status: Disabled

   Adjacency SID: 24253

   MTID    Cost    Topology name

   33      0       ospf_mtr

   34      5       voice

 

 

 Last Neighbor Down Event:

 Router ID: 22.22.22.22

 Local Address: 11.11.11.11

 Remote Address: 22.22.22.22

 Time: Apr  9 03:18:19 2014

 Reason: Ospf_ifachange

# Display detailed OSPF neighbor information and resolve the host names of the neighbor routers.

<Sysname> display ospf peer verbose resolve-hostname

 

 Area 0.0.0.1 interface 1.1.1.2(Ten-GigabitEthernet3/0/1)'s neighbors

 Router ID: 3.3.3.3          Address: 13.1.1.2          GR state: Normal

   Hostname: RouterA

   State: Full  Mode: Nbr is slave  Priority: 1

   DR: 13.1.1.2  BDR: 13.1.1.1  MTU: 0

   Options is 0x42 (-|O|-|-|-|-|E|-)

   Dead timer due in 31 sec

   Neighbor is up for 00:04:42

   Authentication sequence: [ 0 ]

   Neighbor state change count: 5

   BFD status: Disabled

   Adjacency SID: 24253

 

 Last Neighbor Down Event:

 Router ID: 3.3.3.3

 Local Address: 13.1.1.1

 Remote Address: 13.1.1.2

 Time: Jun 15 16:13:29 2016

 Reason: Reset ospf command was performed

Table 29 Command output

Field

Description

Area areaID interface IPAddress(InterfaceName)'s neighbors

Neighbor information for the interface in the specified area:

·     areaID—Area to which the neighbor belongs.

·     IPAddress—Interface IP address.

·     InterfaceName—Interface name.

Router ID

Neighbor router ID.

Address

Neighbor router address.

GR state

GR state:

·     Normal.

·     Restarter.

·     Complete.

·     Helper.

Hostname

Host name of the neighbor router.

State

Neighbor state:

·     Down—Initial state of a neighbor conversation.

·     Init—The router has received a Hello packet from the neighbor. However, the router has not established bidirectional communication with the neighbor. The router did not appear in the neighbor's hello packet.

·     Attempt—Available only in an NBMA network. In this state, the OSPF router has not received any information from a neighbor for a period. The router can send Hello packets at a longer interval to keep the neighbor relationship.

·     2-Way—Communication between the two routers is bidirectional. The local router appears in the neighbor's Hello packet.

·     Exstart—The goal of this state is to decide which router is the master, and to decide upon the initial Database Description (DD) sequence number.

·     Exchange—The router is sending DD packets to the neighbor, describing its entire link-state database.

·     Loading—The router sends LSRs packets to the neighbor, requesting more recent LSAs.

·     Full—The neighboring routers are fully adjacent.

Mode

Neighbor mode for LSDB synchronization.

Priority

Neighboring router priority.

DR

DR on the interface's network segment.

BDR

BDR on the interface's network segment.

MTU

Interface MTU.

Options

LSA options:

·     O—Opaque LSA advertisement capability.

·     E—AS External LSA reception capability.

·     L—Signaling capability of the local link.

·     DC—On-demand link support.

·     N—NSSA external LSA support.

·     P—Capability of an NSSA ABR to translate Type-7 LSAs into Type-5 LSAs.

Dead timer due in 33 sec

This dead timer will expire in 33 seconds.

Neighbor is up for 02:03:35

The neighbor has been up for 02:03:35.

Authentication sequence

Authentication sequence number.

Neighbor state change count

Count of neighbor state changes.

BFD status

BFD status:

·     Disabled.

·     Enabled (Control mode).

·     Enabled (Echo mode).

Adjacency SID

SID advertised by the adjacency path.

Last Neighbor Down Event

The most recent neighbor down event.

Time

Time when the neighbor went down, in MM DD hh:mm:ss YYYY format.

·     MM—Represents the month.

·     DD—Represents the day.

·     hh—Represents the hours.

·     mm—Represents the minutes.

·     ss—Represents the seconds.

·     YYYY—Represents the year.

Reason

Reason for the neighbor down event:

·     Ospf_resetconnect—The neighbor relationship was down due to memory insufficiency.

·     Ospf Interface Parameters Changed—The interface settings were changed.

·     VLINK Interface Parameters Changed—The virtual link settings were changed.

·     SHAMLINK Interface Parameters Changed—The sham link settings were changed.

·     Reset ospf command was performed—The reset ospf process command was executed.

·     Undo ospf command was performed—The undo ospf command was executed.

·     Undo area command was performed—The undo area command was executed.

·     Undo network—The undo network command was executed.

·     Silent Interface—The silent interface command was executed.

·     Ospf_iflchange—The logical attribute of the interface was changed.

·     Ospf_ifachange—The physical attribute of the interface was changed.

·     Ospf_ifvchange—The virtual link attribute of the interface was changed.

·     Vlink down—The virtual link went down.

·     Shamlink down—The sham link went down.

·     DeadInterval timer expired—The dead timer expired.

·     Configuring stub area—The stub area settings were changed.

·     Configuring nssa area—The NSSA area settings were changed.

·     Area Authentication-mode changed—The area authentication mode was changed.

·     Opaque-Capability changed—The Opaque capability was changed.

·     Too many retransmissions—Excessive retransmissions.

·     Link-local-Signaling Capability changed—The LLS capability was changed.

·     Out-Of-Band Resynchronazition Capability changed—The OOB capability was changed.

·     Graceful-Restart Capability changed—The GR capability was changed.

·     BFD session down—The BFD session associated with OSPF went down.

·     Database-filter or referenced ACL changed—The LSA filter settings on the specified interface were changed or the ACL used by the LSA filter was changed.

·     shutdown—The shutdown process command is executed.

# Display brief OSPF neighbor information.

<Sysname> display ospf peer

 

          OSPF Process 1 with Router ID 1.1.1.1

               Neighbor Brief Information

 

 Area: 0.0.0.0

 Router ID       Address         Pri Dead-Time  State             Interface

 1.1.1.2         1.1.1.2         1   40         Full/DR           XGE3/0/1

 

 Sham link: 11.11.11.11 -> 22.22.22.22

 Router ID       Address         Pri Dead-Time  State

 22.22.22.22     22.22.22.22     1   36         Full

# Display brief OSPF neighbor information and resolve the host names of the neighbor routers.

<Sysname> display ospf peer resolve-hostname

 

         OSPF Process 1 with Router ID 1.1.1.1

               Neighbor Brief Information

 

 Area: 0.0.0.0

 Router ID       Address         Pri Dead-Time  State             Interface

 RouterA         1.1.1.2         1   34         Full/DR           XGE3/0/1

 

 Sham link: 11.11.11.11 -> 22.22.22.22

 Router ID       Address         Pri Dead-Time  State

 22.22.22.22     22.22.22.22     1   36         Full

Table 30 Command output

Field

Description

Area

Neighbor area.

Router ID

ID or host name of the neighbor router.

Address

Neighbor interface address.

Pri

Neighboring router priority.

Dead-Time

Dead interval remained.

Interface

Interface connected to the neighbor.

State

Neighbor state: Down, Init, Attempt, 2-Way, Exstart, Exchange, Loading, or Full.

Sham link 11.11.11.11 -> 22.22.22.22

Sham link from 11.11.11.11 to 22.22.22.22.

# Display information about the hello packets sent to and received from neighbor routers.

<Sysname> display ospf peer hello

 

          OSPF Process 1 with Router ID 1.1.1.1

                  Neighbors

 

 Area 0.0.0.0 interface 1.1.1.1(Ten-GigabitEthernet3/0/1)'s neighbors

 Router ID: 1.1.1.2          Address: 1.1.1.2

 First 4 hello packets received:

   2019-09-06 09:12:10:121

   2019-09-06 09:12:20:121

   2019-09-06 09:12:30:121

   2019-09-06 09:12:40:121

 Last 4 hello packets received:

   2019-09-06 11:15:10:121

   2019-09-06 11:15:20:121

   2019-09-06 11:15:30:121

   2019-09-06 11:15:40:121

 First 4 hello packets sent:

   2019-09-06 09:12:12:121, failed, errno:132

   2019-09-06 09:12:22:121, succeeded

   2019-09-06 09:12:32:121, succeeded

   2019-09-06 09:12:42:121, succeeded

 Last 4 hello packets sent:

   2019-09-06 11:15:12:121, succeeded

   2019-09-06 11:15:22:121, succeeded

   2019-09-06 11:15:32:121, failed, errno:132

   2019-09-06 11:15:42:121, failed, errno:132

Table 31 Command output

Field

Description

Router ID

Router ID of the neighbor.

Address

IP address of the neighbor interface.

First 4 hello packets received

Time for receiving the first four hello packets from neighbors.

Last 4 hello packets received

Time for receiving the last four hello packets from neighbors.

First 4 hello packets sent

Time and result (succeeded or failed) for sending the first four hello packets to neighbors. For a packet failed to be sent, an error code is displayed in the errno field.

This field is not displayed in scenarios where hello packets are sent in multicast.

Last 4 hello packets sent

Time and result (succeeded or failed) for sending the last four hello packets  to neighbors when the command is executed. For a packet failed to be sent, an error code is displayed in the errno field.

This field is not displayed in scenarios where hello packets are sent in multicast.

display ospf peer statistics

Use display ospf peer statistics to display OSPF neighbor statistics.

Syntax

display ospf [ process-id ] peer statistics

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify this argument, the command displays OSPF neighbor statistics for all OSPF processes.

Examples

# Display OSPF neighbor statistics.

<Sysname> display ospf peer statistics

          OSPF Process 1 with Router ID 10.3.1.1

                    Neighbor Statistics

  Area ID         Down Attempt Init 2-Way ExStart Exchange Loading Full Total

  0.0.0.0         0    0       0    0     0       0        0       1    1

  0.0.0.2         0    0       0    0     0       0        0       1    1

  Total           0    0       0    0     0       0        0       2    2

 

  Sham links' neighbors (Total: 1):

    Down: 0, Init: 0, 2-Way: 0, ExStart: 0, Exchange: 0, Loading: 0, Full: 1

Table 32 Command output

Field

Description

Area ID

The state statistics for all the routers in the area to which the router belongs is displayed.

Down

Number of neighboring routers in Down state in the same area.

Attempt

Number of neighboring routers in Attempt state in the same area.

Init

Number of neighboring routers in Init state in the same area.

2-Way

Number of neighboring routers in 2-Way state in the same area.

ExStart

Number of neighboring routers in ExStart state in the same area.

Exchange

Number of neighboring routers in Exchange state in the same area.

Loading

Number of neighboring routers in Loading state in the same area.

Full

Number of neighboring routers in Full state in the same area.

Total

Total number of neighbors in the same state: Down, Attempt, Init, 2-Way, ExStart, Exchange, Loading, or Full.

Sham links' neighbors

Statistics about sham links' neighbors.

display ospf request-queue

Use display ospf request-queue to display OSPF request queue information.

Syntax

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

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify this argument, the command displays the OSPF request queue information for all OSPF processes.

interface-type interface-number: Specifies an interface by its type and number. If you do not specify this argument, the command displays the OSPF request queue information for all interfaces.

neighbor-id: Specifies a neighbor's router ID. If you do not specify this argument, the command displays the OSPF request queue information for all OSPF neighbors.

Examples

# Display OSPF request queue information.

<Sysname> display ospf request-queue

 

          OSPF Process 100 with Router ID 192.168.1.59

                  Link State Request List

 

  The Router's Neighbor is Router ID 2.2.2.2         Address 10.1.1.2

  Interface 10.1.1.1         Area 0.0.0.0

  Request list:

       Type       LinkState ID      AdvRouter         Sequence   Age

       Router     2.2.2.2           1.1.1.1           80000004   1

       Network    192.168.0.1       1.1.1.1           80000003   1

       Sum-Net    192.168.1.0       1.1.1.1           80000002   2

Table 33 Command output

Field

Description

The Router's Neighbor is Router ID

Neighbor router ID.

Address

Neighbor interface IP address.

Interface

Local interface IP address.

Area

Area ID.

Request list

Request list information.

Type

LSA type.

LinkState ID

Link state ID.

AdvRouter

Advertising router.

Sequence

LSA sequence number.

Age

LSA age.

display ospf retrans-queue

Use display ospf retrans-queue to display retransmission queue information.

Syntax

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

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify this argument, the command displays retransmission queue information for all OSPF processes.

interface-type interface-number: Specifies an interface by its type and number. If you do not specify this argument, the command displays retransmission queue information for all interfaces.

neighbor-id: Specifies a neighbor's router ID. If you do not specify this argument, the command displays retransmission queue information for all neighbors.

Examples

# Display OSPF retransmission queue information.

<Sysname> display ospf retrans-queue

 

          OSPF Process 100 with Router ID 192.168.1.59

                  Link State Retransmission List

 

  The Router's Neighbor is Router ID 2.2.2.2         Address 10.1.1.2

  Interface 10.1.1.1         Area 0.0.0.0

  Retransmit list:

       Type       LinkState ID      AdvRouter         Sequence   Age

       Router     2.2.2.2           2.2.2.2           80000004   1

       Network    12.18.0.1         2.2.2.2           80000003   1

       Sum-Net    12.18.1.0         2.2.2.2           80000002   2

Table 34 Command output

Field

Description

The Router's Neighbor is Router ID

Neighbor router ID.

Address

Neighbor interface IP address.

Interface

Interface address of the router.

Area

Area ID.

Retransmit list

Retransmission list.

Type

LSA type.

LinkState ID

Link state ID.

AdvRouter

Advertising router.

Sequence

LSA sequence number.

Age

LSA age.

display ospf routing

Use display ospf routing to display OSPF routing information.

Syntax

display ospf [ process-id ] routing [ ip-address { mask-length | mask } | priority { critical | high | low | medium } ] [ interface interface-type interface-number ] [ nexthop nexthop-address ] [ verbose ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify this argument, the command displays the routing information for all OSPF processes.

ip-address: Specifies a destination IP address.

mask-length: Specifies mask length in the range of 0 to 32.

mask: Specifies the mask in dotted decimal notation.

priority { critical | high | low | medium }: Specifies a route convergence priority. Options include critical, high, low, and medium. If you do not specify this keyword, this command displays OSPF routing information for all convergence priorities.

interface interface-type interface-number: Displays routes passing the specified output interface. If you do not specify this option, the command displays OSPF routing information for all interfaces.

nexthop nexthop-address: Displays routes passing the specified next hop. If you do not specify this option, the command displays all OSPF routing information.

verbose: Displays detailed OSPF routing information. If you do not specify this keyword, the command displays brief OSPF routing information.

Examples

# Display OSPF routing information.

<Sysname> display ospf routing

 

          OSPF Process 1 with Router ID 192.168.1.2

                   Routing Table

 

                Topology base (MTID 0)

 

 Routing for network

 Destination        Cost  Type       NextHop         AdvRouter     Area

 192.168.1.0/24     1562  Stub       192.168.1.2     192.168.1.2   0.0.0.0

 172.16.0.0/16      1563  Inter      192.168.1.1     192.168.1.1   0.0.0.0

 

 Total nets: 2

 Intra area: 1  Inter area: 1  ASE: 0  NSSA: 0

 

                Topology red (MTID 41)

 

 Routing for network

 Destination         Cost    Type    NextHop         AdvRouter       Area

 36.1.1.0/24         1       Transit 0.0.0.0         192.168.1.3     0.0.0.1

 

 Total nets: 1

 Intra area: 1  Inter area: 0  ASE: 0  NSSA: 0

Table 35 Command output

Field

Description

Topology

This field is not supported in the current software version.

Topology name. If this field displays base, the topology is the base topology. If this field displays other values, the topology is a subtopology.

MTID

This field is not supported in the current software version.

Topology ID. If this field displays 0, the topology is the base topology. If this field displays other values, the topology is a subtopology.

Destination

Destination network.

Cost

Cost to destination.

Type

Route type: transit, stub, inter, Type-1, and Type-2. ECMP-backup indicates that the route is the backup route for ECMP routes.

NextHop

Next hop address.

AdvRouter

Advertising router.

Area

Area ID.

Total nets

Total networks.

Intra area

Total intra-area routes.

Inter area

Total inter-area routes.

ASE

Total ASE routes.

NSSA

Total NSSA routes.

# Display detailed OSPF routing information.

<Sysname> display ospf routing verbose

 

          OSPF Process 2 with Router ID 192.168.1.112

                   Routing Table

 

                Topology base (MTID 0)

 

 Routing for network

 

  Destination: 192.168.1.0/24

     Priority: Low                     Type: Stub

    AdvRouter: 192.168.1.2             Area: 0.0.0.0

   SubProtoID: 0x1               Preference: 10

      NextHop: 192.168.1.2        BkNextHop: N/A

       IfType: Broadcast           BkIfType: N/A

    Interface: XGE3/0/2         BkInterface: N/A

        NibID: 0x1300000c            Status: Normal

         Cost: 1562

      InLabel: 4294967295       Tunnel type: -

     OutLabel: 4294967295     OutLabel flag: -

   BkOutLabel: 4294967295   BkOutLabel flag: -

     LabelSrc: N/A               Delay flag: N/A

 Remote-LFA backup Info:

     PQPrefix: 44.44.44.44          PQAdvID: 44.44.44.44

      LsIndex: 1

   LabelStack: {2303}

 TI-LFA backup info:

  BkInterface: XGE3/0/1          BkNextHop: 12.1.1.2

     BkIfType: Broadcast

  PNodePrefix: 3.3.3.3           QNodeAdvID: 2.2.2.2

      LsIndex: 2

   LabelStack: {19030, 2431}

 

  Destination: 172.16.0.0/16

     Priority: Low                     Type: Inter

    AdvRouter: 192.168.1.1             Area: 0.0.0.0

   SubProtoID: 0x1               Preference: 10

      NextHop: 192.168.1.1        BkNextHop: N/A

       IfType: Broadcast           BkIfType: N/A

    Interface: XGE3/0/3         BkInterface: N/A

        NibID: 0x1300000c            Status: Normal

         Cost: 1563

      InLabel: 4294967295       Tunnel type: -

     OutLabel: 4294967295     OutLabel flag: -

   BkOutLabel: 4294967295   BkOutLabel flag: -

     LabelSrc: N/A               Delay flag: N/A

 

 Total nets: 2

 Intra area: 2  Inter area: 0  ASE: 0  NSSA: 0

 

                Topology red (MTID 41)

 

 Routing for network

 

  Destination: 36.1.1.0/24

     Priority: Low                     Type: Transit

    AdvRouter: 192.168.1.3             Area: 0.0.0.1

   SubProtoID: 0x1               Preference: 10

      NextHop: 0.0.0.0            BkNextHop: N/A

       IfType: Broadcast           BkIfType: N/A

    Interface: XGE3/0/2         BkInterface: N/A

        NibID: 0x13000001            Status: Direct

         Cost: 1

      InLabel: 4294967295       Tunnel type: -

     OutLabel: 4294967295     OutLabel flag: -

   BkOutLabel: 4294967295   BkOutLabel flag: -

     LabelSrc: N/A               Delay flag: N/A

 

 Total nets: 1

 Intra area: 1  Inter area: 0  ASE: 0  NSSA: 0

Table 36 Command output

Field

Description

Topology

This field is not supported in the current software version.

Topology name. If this field displays base, the topology is the base topology. If this field displays other values, the topology is a subtopology.

MTID

This field is not supported in the current software version.

Multi-topology ID. If this field displays 0, the topology is the base topology. If this field displays other values, the topology is a subtopology.

Priority

Prefix priority: critical, high, medium, and low.

Type

Route type: transit, stub, inter, Type-1, and Type-2.

AdvRouter

Advertising router.

Area

Area ID.

SubProtoID

Sub protocol ID.

Preference

OSPF route preference.

NextHop

Primary next hop IP address.

BkNextHop

Backup next hop IP address.

IfType

Type of the network to which the primary next hop belongs.

BkIfType

Type of the network to which the backup next hop belongs.

Interface

Output interface.

BkInterface

Backup output interface.

NibID

Next hop ID.

Status

Route status:

·     Local—The route is on the local end and is not sent to the route management module.

·     Invalid—The next hop is invalid.

·     Stale—The next hop is stale.

·     Normal—The route is available.

·     Delete—The route is deleted.

·     Host-Adv—The route is a host route.

·     Rely—The route is a recursive route.

Cost

Cost to destination.

SpfCost

SPF cost of the SR tunnel.

InLabel

Incoming label of the route. Value 4294967295 indicates that the label is invalid.

Tunnel type

Tunnel type. Only SR tunnels are supported in the current software version.

OutLabel

Outgoing label of the route. Value 4294967295 indicates that the label is invalid.

OutLabel flag

Outgoing label flag:

·     E—Explicit null flag. The upstream neighbor must replace the SID with an explicit null flag before forwarding the packets.

·     I—Implicit null flag. The upstream neighbor must replace the SID with an implicit null flag before forwarding the packets. This flag is not supported in the current software version.

·     N—Normal flag.

·     P—SR label preferred flag.

BkOutLabel

Backup outgoing label of the route. Value 4294967295 indicates that the label is invalid.

BkOutLabel flag

Backup outgoing label flag:

·     E—Explicit null flag. The upstream neighbor must replace the SID with an explicit null flag before forwarding the packets.

·     I—Implicit null flag. The upstream neighbor must replace the SID with an implicit null flag before forwarding the packets.

·     N—Normal flag.

·     P—SR label preferred flag.

LabelSrc

Label source:

·     SR—Assigned by an SR node.

·     SRMS—Assigned by the Segment Routing Mapping Server (SRMS).

Delay Flag

Microloop avoidance delay flag:

·     D—Microloop avoidance is configured. Route convergence is delayed.

·     N/A—Microloop avoidance is not configured or the microloop avoidance delay timer has expired. Route convergence is in progress.

MALsIndex

SR microloop avoidance label stack index.

MALabelStack

SR microloop avoidance label stack (from top to bottom).

Remote-LFA back Info

Remote LFA backup information.

PQPrefix

PQ node prefix.

PQAdvID

Router ID of the PQ node.

LsIndex

Label stack index.

LabelStack

Label stack.

TI-LFA backup info

TI-LFA backup information.

PNodePrefix

P node prefix.

QNodeAdvID

Router ID of the Q node.

display ospf spf-tree

Use display ospf spf-tree to display SPF tree information.

Syntax

display ospf [ process-id ] [ area area-id ] spf-tree [ verbose ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify a process, this command displays SPF tree information for all OSPF processes.

area area-id: Specifies an OSPF area by its ID. The area ID is an IP address or a decimal integer in the range of 0 to 4294967295 that is translated into the IP address format. If you do not specify an area, this command displays SPF tree information for all OSPF areas.

verbose: Displays detailed SPF tree information. If you do not specify this keyword, the command displays brief SPF tree information.

Examples

# Display brief SPF tree information for Area 0 in OSPF process 1.

<Sysname> display ospf 1 area 0 spf-tree

 

          OSPF Process 1 with Router ID 100.0.0.4

 

        Flags: S-Node is on SPF tree       R-Node is directly reachable

               I-Node or Link is init      D-Node or Link is to be deleted

               P-Neighbor is parent        A-Node is in candidate list

               C-Neighbor is child         T-Node is tunnel destination

               H-Nexthop changed           N-Link is a new path

               V-Link is involved          G-Link is in change list

 

                Topology base (MTID 0)

 

                  Area: 0.0.0.0  Shortest Path Tree

 

 SpfNode         Type    Flag      SpfLink         Type   Cost  Flag

>192.168.119.130 Network S R

                                -->114.114.114.111 NET2RT 0     C

                                -->100.0.0.4       NET2RT 0     P

>114.114.114.111 Router  S

                                -->192.168.119.130 RT2NET 65535 P

>100.0.0.4       Router  S

                                -->192.168.119.130 RT2NET 10    C

Table 37 Command output

Field

Description

Topology

This field is not supported in the current software version.

Topology name. If this field displays base, the topology is the base topology. If this field displays other values, the topology is a subtopology.

MTID

This field is not supported in the current software version.

Topology ID. If this field displays 0, the topology is the base topology. If this field displays other values, the topology is a subtopology.

SpfNode

SPF node, represented by a router ID when the node type is Router, or the IP address of the DR when the node type is Network.

Node flag:

·     I—The node is in initialization state.

·     A—The node is on the candidate list.

·     S—The node is on the SPF tree.

·     R—The node is directly connected to the root node.

·     D—The node is to be deleted.

·     T—The node is the tunnel destination.

SpfLink

SPF link, representing the peer node.

Link type:

·     RT2RT—Router to router.

·     NET2RT—Network to router.

·     RT2NET—Router to network.

Link flag:

·     I—The link is in initialization state.

·     P—The peer is the parent node.

·     C—The peer is the child node.

·     D—The link is to be deleted.

·     H—The next hop is changed.

·     V—When the peer node is deleted or added, the peer node is not on the SPF tree or is deleted.

·     N—The link is newly added, and both end nodes are on the SPF tree.

·     G—The link is on the area change list.

# Display detailed SPF tree information for Area 0 in OSPF process 1.

<Sysname> display ospf 1 area 0 spf-tree verbose

 

          OSPF Process 1 with Router ID 100.0.0.4

 

        Flags: S-Node is on SPF tree       R-Node is directly reachable

               I-Node or Link is init      D-Node or Link is to be deleted

               P-Neighbor is parent        A-Node is in candidate list

               C-Neighbor is child         T-Node is tunnel destination

               H-Nexthop changed           N-Link is a new path

               V-Link is involved          G-Link is in change list

 

                Topology base (MTID 0)

 

                  Area: 0.0.0.0  Shortest Path Tree

 

>LsId(192.168.119.130)

 AdvId    : 100.0.0.4       NodeType     : Network

 Mask     : 255.255.255.0   SPFLinkCnt   : 2

 Distance : 10

 VlinkData: 0.0.0.0         ParentLinkCnt: 1           NodeFlag: S R

 NextHop  : 1

   192.168.119.130    Interface: XGE3/0/2           Flag: -

 BkNextHop: 1

   0.0.0.0            Interface: XGE3/0/2           Flag: -

 Remote-LFA:

  RLFAAdvId     : 11.11.11.11       RLFAInterface: XGE3/0/3

  RLFANexthop   : 1.1.1.1

  PQNode AdvID  : 44.44.44.44       PQNode prefix: 44.44.44.44

  Protect       : Link

  Label stack   : {2303}

 TI-LFA:

  TiLfaAdvId   : 4.4.4.4           TiLfaInterface: XGE3/0/2

  TiLfaNexthop : 14.1.1.4

  PNode AdvID  : 3.3.3.3              QNode AdvID: 2.2.2.2

  PNode prefix : 3.3.3.3           PNode SidIndex: 30

  Protect      : Link

  Label stack  : {19030, 2431}

 -->LinkId(114.114.114.111)

    AdvId   : 100.0.0.4       LinkType   : NET2RT

    LsId    : 192.168.119.130 LinkCost   : 0           NextHopCnt: 1

    LinkData: 0.0.0.0         LinkNewCost: 0           LinkFlag  : C

 -->LinkId(100.0.0.4)

    AdvId   : 100.0.0.4       LinkType   : NET2RT

    LsId    : 192.168.119.130 LinkCost   : 0           NextHopCnt: 1

    LinkData: 0.0.0.0         LinkNewCost: 0           LinkFlag  : P

Table 38 Command output

Field

Description

Topology

This field is not supported in the current software version.

Topology name. If this field displays base, the topology is the base topology. If this field displays other values, the topology is a subtopology.

MTID

This field is not supported in the current software version.

Topology ID. If this field displays 0, the topology is the base topology. If this field displays other values, the topology is a subtopology.

LsId

Link state ID.

AdvId

ID of the advertising router.

NodeType

Node type:

·     Network—Network node.

·     Router—Router node.

Mask

Network mask. Its value is 0 for a router node.

SPFLinkCnt

Number of SPF links.

Distance

Cost to the root node.

VlinkData

Destination address of virtual link packets.

ParentLinkCnt

Number of parent links.

NodeFlag

Node flag:

·     I—The node is in initialization state.

·     A—The node is on the candidate list.

·     S—The node is on the SPF tree.

·     R—The node is directly connected to the root node.

·     D—The node is to be deleted.

·     T—The node is the tunnel destination.

NextHop

Next hop.

Interface

Output interface.

MADuration

SR microloop avoidance duration in milliseconds.

MALStack

SR microloop avoidance label stack (from top to bottom).

BkNextHop

Backup next hop.

Flag

Next hop type. SR indicates SR tunnel.

This field displays a hyphen (-) for other next hop types.

Remote-LFA

Remote LFA backup information.

RLFAAdvId

Router ID of the remote LFA backup next hop.

RLFAaInterface

Output interface of the remote LFA backup next hop.

RLFaNexthop

Remote LFA backup next hop information.

PQNode AdvID

Router ID of the PQ node.

PQNode prefix

PQ node prefix.

TI-LFA

TI-LFA information.

TiLfaInterface

TI-LFA interface.

TiLfaNexthop

TI-LFA next hop address.

PNode AdvID

Router ID of the P node.

QNode AdvID

Router ID of the Q node.

Protect

Traffic protection type:

·     Link—Link protection that excludes the direct primary link from backup path calculation.

·     Node—Node protection that excludes the primary next hop node from backup path calculation.

·     SrlgLink—SRLG-disjoint link protection that excludes the following links from backup path calculation:

¡     Direct primary link.

¡     Local links in the same SRLG as the direct primary link.

·     SrlgNode—SRLG-disjoint node protection that excludes the following nodes from backup path calculation:

¡     Primary next hop node.

¡     Local links in the same SRLG as the direct primary link.

LinkId

Link ID.

LinkType

Link type:

·     RT2RT—Router to router.

·     NET2RT—Network to router.

·     RT2NET—Router to network.

LinkCost

Link cost.

NextHopCnt

Number of next hops.

LinkData

Link data.

LinkNewCost

New link cost.

LinkFlag

Link flag:

·     I—The link is in initialization state.

·     P—The peer is the parent node.

·     C—The peer is the child node.

·     D—The link is to be deleted.

·     H—The next hop is changed.

·     V—When the peer node is deleted or added, the peer node is not on the SPF tree or is deleted.

·     N—The link is newly added, and both end nodes are on the SPF tree.

·     G—The link is on the area change list.

display ospf statistics

Use display ospf statistics to display OSPF statistics.

Syntax

display ospf [ process-id ] statistics [ error | packet [ hello | interface-type interface-number ] ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify this argument, the command displays OSPF statistics for all OSPF processes.

error: Displays error statistics. If you do not specify this keyword, the command displays OSPF packet, LSA, and route statistics.

packet: Displays OSPF packet statistics.

hello: Displays statistics of the sent and received hello packets. If you do not specify this keyword, the command displays statistics of all types of sent and received packets.

interface-type interface-number: Specifies an interface by its type and number. If you do not specify this argument, the command displays statistics for all interfaces.

Examples

# Display OSPF statistics.

<Sysname> display ospf statistics

 

          OSPF Process 1 with Router ID 2.2.2.2

                  Statistics

 

 I/O statistics

  Type                      Input     Output

  Hello                     61        122

  DB Description            2          3

  Link-State Req            1          1

  Link-State Update         3          3

  Link-State Ack            3          2

 

 LSAs originated by this router

  Router  : 4

  Network : 0

  Sum-Net : 0

  Sum-Asbr: 0

  External: 0

  NSSA    : 0

  Opq-Link: 0

  Opq-Area: 0

  Opq-As  : 0

 

 LSAs originated: 4  LSAs received: 7

 

 Routing table:

   Intra area: 2  Inter area: 3  ASE/NSSA: 0

Table 39 Command output

Field

Description

I/O statistics

Statistics about input/output packets and LSAs.

Type

OSPF packet type.

Input

Packets received.

Output

Packets sent.

Hello

Hell packet.

DB Description

Database Description packet.

Link-State Req

Link-State Request packet.

Link-State Update

Link-State Update packet.

Link-State Ack

Link-State Acknowledge packet.

LSAs originated by this router

LSAs originated by this router.

Router

Number of Type-1 LSAs originated.

Network

Number of Type-2 LSAs originated.

Sum-Net

Number of Type-3 LSAs originated.

Sum-Asbr

Number of Type-4 LSAs originated.

External

Number of Type-5 LSAs originated.

NSSA

Number of Type-7 LSAs originated.

Opq-Link

Number of Type-9 LSAs originated.

Opq-Area

Number of Type-10 LSAs originated.

Opq-As

Number of Type-11 LSAs originated.

LSA originated

Number of LSAs originated.

LSA received

Number of LSAs received.

Routing table

Routing table information.

Intra area

Number of intra-area routes.

Inter area

Number of inter-area routes.

ASE/NSSA

Number of ASE/NSSA routes.

# Display OSPF error statistics.

<Sysname> display ospf statistics error

 

          OSPF Process 1 with Router ID 192.168.1.112

                  OSPF Packet Error Statistics

 

 0         : Router ID confusion         0         : Bad packet

 0         : Bad version                 0         : Bad checksum

 0         : Bad area ID                 0         : Drop on unnumbered link

 0         : Bad virtual link            0         : Bad authentication type

 0         : Bad authentication key      0         : Packet too small

 0         : Neighbor state low          0         : Transmit error

 0         : Interface down              0         : Unknown neighbor

 0         : HELLO: Netmask mismatch     0         : HELLO: Hello-time mismatch

 0         : HELLO: Dead-time mismatch   0         : HELLO: Ebit option mismatch

 0         : HELLO: Mbit option mismatch 0         : DD: MTU option mismatch

 0         : DD: Unknown LSA type        0         : DD: Ebit option mismatch

 0         : ACK: Bad ack                0         : ACK: Unknown LSA type

 0         : REQ: Empty request          0         : REQ: Bad request

 0         : UPD: LSA checksum bad       0         : UPD: Unknown LSA type

 0         : UPD: Less recent LSA

Table 40 Command output

Field

Description

Router ID confusion

Packets with duplicate router ID.

Bad packet

Packets illegal.

Bad version

Packets with wrong version.

Bad checksum

Packets with wrong checksum.

Bad area ID

Packets with invalid area ID.

Drop on unnumbered link

Packets dropped on the unnumbered interface.

Bad virtual link

Packets on wrong virtual links.

Bad authentication type

Packets with invalid authentication type.

Bad authentication key

Packets with invalid authentication key.

Packet too small

Packets too small in length.

Neighbor state low

Packets received in low neighbor state.

Transmit error

Packets with error when being transmitted.

Interface down

Shutdown times of the interface.

Unknown neighbor

Packets received from unknown neighbors.

HELLO: Netmask mismatch

Hello packets with mismatched mask.

HELLO: Hello-time mismatch

Hello packets with mismatched hello timer.

HELLO: Dead-time mismatch

Hello packets with mismatched dead timer.

HELLO: Ebit option mismatch

Hello packets with mismatched E-bit in the option field.

HELLO: Mbit option mismatch

Hello packets with mismatched M-bit in the option field.

DD: MTU option mismatch

DD packets with mismatched MTU.

DD: Unknown LSA type

DD packets with unknown LSA type.

DD: Ebit option mismatch

DD packets with mismatched E-bit in the option field.

ACK: Bad ack

Bad LSAck packets for LSU packets.

ACK: Unknown LSA type

LSAck packets with unknown LSA type.

REQ: Empty request

LSR packets with no request information.

REQ: Bad request

Bad LSR packets.

UPD: LSA checksum bad

LSU packets with wrong LSA checksum.

UPD: Unknown LSA type

LSU packets with unknown LSA type.

UPD: Less recent LSA

LSU packets without the most recent LSA.

# Display OSPF packet statistics for all processes and interfaces.

<Sysname> display ospf statistics packet

 

          OSPF Process 100 with Router ID 192.168.1.59

                  Packet Statistics

 

 Waiting to send packet count: 0

         Hello      DD         LSR        LSU        ACK        Total

 Input : 489        6          2          44         40         581

 Output: 492        8          2          45         40         587

 

 Area: 0.0.0.1

 Interface: 20.1.1.1 (Ten-GigabitEthernet3/0/1)

         DD         LSR        LSU        ACK        Total

 Input : 0          0          0          0          0

 Output: 0          0          0          0          0

 

 Interface: 100.1.1.1 (Ten-GigabitEthernet3/0/2)

         DD         LSR        LSU        ACK        Total

 Input : 3          1          22         16         42

 Output: 2          1          19         20         42

Table 41 Command output

Field

Description

Waiting to send packet count

Number of packets waiting to be sent.

Total

Total number of packets.

Input

Number of received packets.

Output

Number of sent packets.

Area

Area ID.

Interface

Interface address and interface name.

# Display statistics of the sent and received hello packets.

<Sysname> display ospf statistics packet hello

 

         OSPF Process 1 with Router ID 100.1.1.1

                 Hello Statistics

 Total sent                             : 4

 Total sent failed                      : 0

 Sent after one and a half intervals    : 0

 Total received                         : 2

 Total received dropped                 : 0

 Received after one and a half intervals: 0

Table 42 Command output

Field

Description

Total sent

Total number of hello packets sent.

Total sent failed

Total number of hello packets that failed to be sent.

Sent after one and a half intervals

Total number of hello packets sent at intervals greater than 1.5 times the hello interval.

Total received

Total number of hello packets received.

Total received dropped

Total number of received hello packets that were dropped.

Received after one and a half intervals

Total number of hello packets received at intervals greater than 1.5 times the hello interval.

Related commands

reset ospf statistics

display ospf troubleshooting

Use display ospf troubleshooting to display OSPF neighbor relationship troubleshooting information.

Syntax

display ospf troubleshooting

Views

Any view

Predefined user roles

network-admin

network-operator

Examples

# Display OSPF neighbor relationship troubleshooting information.

<Sysname> display ospf troubleshooting

 

                 OSPF troubleshooting Information

Total count: 3

Time                  Sequence  Description

2019-09-04 12:01:07   3         The state of OSPF 1 peer 12.1.1.2 changed to DOWN because OSPF interface parameters changed. Please check the interface parameters (Interface: XGE3/0/1, peer address: 12.1.1.2).

2019-09-04 11:54:19   2         The state of OSPF 1 peer 12.1.1.2 changed to DOWN because the dead timer expired. Please check the connection to the peer (Interface: XGE3/0/1, peer address: 12.1.1.2; ping result: ping was not executed because of the disabled MTP; CPU usage: 29.0%; memory usage: 76.81%, memory state: normal).

2019-09-04 11:48:25   1         The state of OSPF 1 peer 12.1.1.2 changed to INIT because a 1-way hello packet was received. Please check the OSPF peer state on the remote end. (Interface: XGE3/0/1, peer address: 12.1.1.2).

Table 43 Command output

Field

Description

Total count

Total number of OSPF neighbor relationship troubleshooting entries.

Time

Time when the OSPF neighbor was disconnected. The most recent entry is displayed first.

Sequence

Sequence number of the OSPF neighbor relationship troubleshooting entry.

Description

OSPF neighbor relationship troubleshooting information, including the OSPF process ID, neighbor ID, reason, and recommended action.

·     The state of OSPF 1 peer 1.1.1.1 changed to DOWN because OSPF interface parameters changed. Please check the interface parameters (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to DOWN because the OSPF process was reset.

·     The state of OSPF 1 peer 1.1.1.1 changed to DOWN because the OSPF process was deleted.

·     The state of OSPF 1 peer 1.1.1.1 changed to DOWN because the OSPF area was deleted.

·     The state of OSPF 1 peer 1.1.1.1 changed to DOWN because OSPF was disabled (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to DOWN because OSPF packet receiving and sending are disabled (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to DOWN because the interface address was deleted or OSPF was disabled on interface. Please check the interface settings (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to DOWN because the interface went down or MTU changed. Please check the interface state and MTU settings (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to DOWN because the virtual link was deleted or the route it relies on was deleted. Please check the virtual link and the route it relies on (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to DOWN because the virtual link interface went down or the virtual link settings were deleted. Please check the virtual link and the route it relies on (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to DOWN because the sham link was deleted or the route it relies on was deleted. Please check the sham link and the route it relies on (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to DOWN because the dead timer expired. Please check the connection to the peer (Interface: XGE3/0/1, peer address: 10.1.1.1; ping result: 5 packets in total, 5 packets timed out; CPU usage: 25.37%; memory usage: 36.49%, memory state: normal).

·     The state of OSPF 1 peer 1.1.1.1 changed to DOWN because the dead timer expired. Please check the connection to the peer (Interface: XGE3/0/1, peer address: 10.1.1.1; ping result: ping was not executed because of the disabled MTP; CPU usage: 25.37%; memory usage: 36.49%, memory state: normal).

·     The state of OSPF 1 peer 1.1.1.1 changed to DOWN because the dead timer expired. Please check the connection to the peer (Interface: XGE3/0/1, peer address: 10.1.1.1; ping result: waiting for the ping to execute; CPU usage: 25.37%; memory usage: 36.49%, memory state: normal).

·     The state of OSPF 1 peer 1.1.1.1 changed to DOWN because the stub configuration changed in area 0.0.0.1.

·     The state of OSPF 1 peer 1.1.1.1 changed to DOWN because the NSSA configuration changed in area 0.0.0.1.

·     The state of OSPF 1 peer 1.1.1.1 changed to DOWN because the Opaque LSA capability configuration changed.

·     The state of OSPF 1 peer 1.1.1.1 changed to DOWN because the out-of-band resynchronization capability configuration changed.

·     The state of OSPF 1 peer 1.1.1.1 changed to DOWN because the BFD session went down. Please check the BFD session information.

·     The state of OSPF 1 peer 1.1.1.1 changed to INIT because a 1-way hello packet was received. Please check the OSPF peer state on the remote end. (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to DOWN because database-filter configuration changed or database-filter ACL configuration changed. Please check the OSPF database-filter and its ACL configuration (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to EXSTART because a BadLSReq event was triggered upon the request for a nonexistent LSA. Please check the local OSPF LSDB and the OSPF request queue on the remote end (Interface: XGE3/0/1, peer address: 10.1.1.1, LSA type: 5, LSID: 91.1.1.0, AdvRouter: 5.5.5.5).

·     The state of OSPF 1 peer 1.1.1.1 changed to EXSTART because the LSA requested and then learned is the same as that in local. Please check the OSPF request queue and the specified LSA on both ends (Interface: XGE3/0/1, peer address: 10.1.1.1; LSA type: 5, LSID: 91.1.1.0, AdvRouter: 5.5.5.5).

·     The state of OSPF 1 peer 1.1.1.1 changed to EXSTART because the LSA requested and then learned is older than that in local. Please check the OSPF request queue and the specified LSA on both ends (Interface: XGE3/0/1, peer address: 10.1.1.1; LSA type: 5, LSID: 91.1.1.0, AdvRouter: 5.5.5.5).

·     The state of OSPF 1 peer 1.1.1.1 changed to EXSTART because a SeqNumberMismatch event was triggered upon the receipt of a non-retransmitted DD packet from the Loading or Full peer during the DD retransmit interval. Please check the OSPF peer state and LSDB on the remote end (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to EXSTART because a SeqNumberMismatch event was triggered by the change of the OSPF peer’s capability to link-local signaling attribute. Please check the DD packets transmitted on both ends (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to EXSTART because a SeqNumberMismatch event was triggered upon the receipt of a retransmitted DD packet from the Loading or Full peer after the DD retransmit interval expired. Please check the OSPF peer state and LSDB on the remote end (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to EXSTART because a SeqNumberMismatch event was triggered by the change of the OSPF peer’s capability to receive AS external LSA. Please check the area configuration (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to EXSTART because a SeqNumberMismatch event was triggered by the master-slave relationship change. Please check the DD packets transmitted on both ends (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to EXSTART because a SeqNumberMismatch event was triggered upon the receipt of an unexpected initial DD packet after DD transmission started. Please check the DD packets transmitted on both ends (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to EXSTART because a SeqNumberMismatch event was triggered upon the receipt of a DD packet with a wrong sequence number from the slave. Please check the DD packets transmitted on both ends (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to EXSTART because a SeqNumberMismatch event was triggered upon the receipt of a DD packet with a wrong sequence number from the master. Please check the DD packets transmitted on both ends (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to EXSTART because a SeqNumberMismatch event was triggered upon the receipt of a DD packet containing local opaque LSA without enabling the opaque capability. Please check the specified LSA on the remote end and the opaque capability configuration on both ends (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to EXSTART because a SeqNumberMismatch event was triggered upon the receipt of a DD packet containing area opaque LSA without enabling the opaque capability. Please check the specified LSA on the remote end and the opaque capability configuration on both ends (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to EXSTART because a SeqNumberMismatch event was triggered upon the receipt of a DD packet containing AS opaque LSA without enabling the opaque capability. Please check the specified LSA on the remote end and the opaque capability configuration on both ends (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to EXSTART because a SeqNumberMismatch event was triggered upon the receipt of a DD packet containing NSSA external LSA in a non-NSSA area. Please check the specified LSA on the remote end and the area configuration on both ends (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to EXSTART because a SeqNumberMismatch event was triggered upon the receipt of a DD packet containing invalid LSA. Please check the specified LSA on the remote end (Interface: XGE3/0/1, peer address: 10.1.1.1).

·     The state of OSPF 1 peer 1.1.1.1 changed to EXSTART because a SeqNumberMismatch event was triggered upon the receipt of a DD packet containing AS external LSA in the stub area or on the virtual link. Please check the specified LSA on the remote end and the area configuration on both ends (Interface: XGE3/0/1, peer address: 10.1.1.1).

Related commands

reset ospf troubleshooting

display ospf vlink

Use display ospf vlink to display OSPF virtual link information.

Syntax

display ospf [ process-id ] vlink

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify this argument, the command displays the OSPF virtual link information for all OSPF processes.

Examples

# Display OSPF virtual link information.

<Sysname> display ospf vlink

          OSPF Process 1 with Router ID 3.3.3.3

                  Virtual Links

 

 Virtual-link Neighbor-ID  -> 2.2.2.2, Neighbor-State: Full

 Interface: 10.1.2.1 (Ten-GigabitEthernet3/0/1)

 Cost: 1562  State: P-2-P  Type: Virtual

 Transit Area: 0.0.0.1

 Timers: Hello 10 , Dead 40 , Retransmit 5 , Transmit Delay 1

 Cryptographic authentication: Enabled, inherited

    The last key is 3.

    The rollover is in progress, 2 neighbor(s) left.

 

 MTID    Cost      Disabled    Topology name

 0       16777215  No          base

Table 44 Command output

Field

Description

Virtual-link Neighbor-ID

ID of the neighbor on the virtual link.

Neighbor-State

Neighbor state: Down, Init, 2-Way, ExStart, Exchange, Loading, Full.

Interface

IP address and name of the local interface on the virtual link.

Cost

Interface route cost.

State

Interface state.

Type

Virtual link.

Transit Area

Transit area ID.

Timers

Values of timers (in seconds): Hello, Dead, and Retransmit.

Transmit Delay

LSA transmission delay on the interface, in seconds.

Simple authentication: Enabled, inherited

Simple authentication is enabled. The inherited attribute indicates that the virtual link uses the simple authentication mode specified for the backbone area to which the virtual link belongs.

Cryptographic authentication: Enabled, inherited

MD5, HMAC-MD5, or HMAC-SHA-256 authentication is enabled. The inherited attribute indicates that the virtual link uses the authentication mode specified for the backbone area.

The last key

Most recent MD5, HMAC-MD5, or HMAC-SHA-256 authentication key ID.

The rollover is in progress, 2 neighbor(s) left

Key rollover for MD5, HMAC-MD5, or HMAC-SHA-256 authentication is in progress, and two neighbors have not completed the key rollover.

Keychain authentication: Enabled (xxx), inherited

Keychain authentication is enabled. The name of the keychain is xxx. The inherited attribute indicates that the virtual link uses the authentication mode specified for the backbone area to which the virtual link belongs.

MTID

This field is not supported in the current software version.

Topology ID. If this field displays 0, the topology is the base topology. If this field displays other values, the topology is a subtopology.

Cost

Cost of the interface route in the topology.

Disabled

Whether OSPF is disabled from advertising the topology for the virtual link: Yes or No.

Topology name

This field is not supported in the current software version.

Topology name. If this field displays base, the topology is the base topology. If this field displays other values, the topology is a subtopology.

display router id

Use display router id to display the global router ID.

Syntax

display router id

Views

Any view

Predefined user roles

network-admin

network-operator

Examples

# Display the global router ID.

<Sysname> display router id

         Configured router ID is 1.1.1.1

distribute bgp-ls

Use distribute bgp-ls to advertise OSPF link state information to BGP.

Use undo distribute bgp-ls to restore the default.

Syntax

distribute bgp-ls [ instance-id id ] [ strict-link-checking ]

undo distribute bgp-ls

Default

OSPF link state information cannot be advertised to BGP.

Views

OSPF view

Predefined user roles

network-admin

Parameters

instance-id id: Specifies an instance by its ID in the range of 0 to 65535. If you do not specify an instance, this command advertises OSPF link state information of instance 0 to BGP.

strict-link-checking: Enables strict checking on link state information advertised to BGP. If you specify this keyword, the IP addresses of the local and remote ends of a link must be in the same subnet. If you do not specify this keyword, the IP addresses of both ends can be in different subnets. This keyword applies only to P2P links.

Usage guidelines

After the device advertises OSPF link state information to BGP, BGP can advertise the information for intended applications.

If multiple OSPF processes have the same link state information and instance ID, only the link state information of the OSPF process with the smallest process ID is advertised.

To advertise the same link state information of different OSPF processes to BGP, specify a different instance ID for each OSPF process.

As a best practice, enable strict link state information checking when the following conditions exist:

·     The link state information advertised to BGP contains multiple equal-cost links.

·     The local and remote ends of each equal-cost link are in the same subnet.

With this feature enabled, error link state information is not advertised to BGP when the equal-cost links flap.

Strict link state information checking and prefix suppression are mutually exclusive. Before you enable strict link state information checking, make sure prefix suppression is disabled.

Strict link state information checking does not take effect when MPLS TE is enabled. For more information about MPLS TE, see MPLS TE configuration in MPLS Configuration Guide.

Examples

# Advertise link state information of OSPF process 1 to BGP.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] distribute bgp-ls

dscp

Use dscp to set the DSCP value for outgoing OSPF packets.

Use undo dscp to restore the default.

Syntax

dscp dscp-value

undo dscp

Default

The DSCP value for outgoing OSPF packets is 48.

Views

OSPF view

Predefined user roles

network-admin

Parameters

dscp-value: Specifies the DSCP value in the range of 0 to 63 for outgoing OSPF packets.

Examples

# Set the DSCP value for outgoing OSPF packets to 63 in OSPF process 1.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] dscp 63

enable link-local-signaling

Use enable link-local-signaling to enable the OSPF link-local signaling (LLS) capability.

Use undo enable link-local-signaling to disable the OSPF LLS capability.

Syntax

enable link-local-signaling

undo enable link-local-signaling

Default

OSPF link-local signaling capability is disabled.

Views

OSPF view

Predefined user roles

network-admin

Examples

# Enable link-local signaling for OSPF process 1.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] enable link-local-signaling

enable out-of-band-resynchronization

Use enable out-of-band-resynchronization to enable the OSPF out-of-band resynchronization (OOB-Resynch) capability.

Use undo enable out-of-band-resynchronization to disable the OSPF out-of-band resynchronization capability.

Syntax

enable out-of-band-resynchronization

undo enable out-of-band-resynchronization

Default

The OSPF out-of-band resynchronization capability is disabled.

Views

OSPF view

Predefined user roles

network-admin

Usage guidelines

Before you configure this command, enable the link-local signaling capability.

Examples

# Enable the out-of-band resynchronization capability for OSPF process 1.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] enable link-local-signaling

[Sysname-ospf-1] enable out-of-band-resynchronization

Related commands

enable link-local-signaling

event-log

Use event-log to configure the OSPF logging feature.

Use undo event-log to remove the configuration.

Syntax

event-log { hello { received [ abnormal | dropped ] | sent [ abnormal | failed ] } | lsa-flush | peer | route | spf } size count

event-log lsa-history { asbr | ase | include-duplicate | link-state-id | network | nssa | opaque-area | opaque-as | opaque-link | originate-router advertising-router-id | router | size count | summary | verbose } *

undo event-log { hello { received [ abnormal | dropped ] | sent [ abnormal | failed ] } | lsa-flush | peer | route | spf } size

undo event-log lsa-history

Default

The device can generate a maximum of 100 logs for each type.

Views

OSPF view

Predefined user roles

network-admin

Parameters

hello: Specifies the number of logs for received or sent hello packets.

received: Specifies the number of logs for received hello packets.

sent: Specifies the number of logs for sent hello packets.

abnormal: Specifies the number of logs for abnormal hello packets received or sent at intervals greater than or equal to 1.5 times the hello interval.

dropped: Specifies the number of logs for received hello packets that were dropped.

failed: Specifies the number of logs for hello packets that failed to be sent.

lsa-flush: Specifies the number of LSA aging logs.

peer: Specifies the number of neighbor logs.

route: Specifies the number of OSPF route logs.

spf: Specifies the number of route calculation logs.

size count: Specifies the number of OSPF logs, in the range of 0 to 65535.

lsa-history: Logs self-originated and received LSA information.

include-duplicate: Specifies all LSAs including duplicate LSAs. Duplicate LSAs refer to LSAs that carry the same options and contents.

verbose: Logs detailed information about self-originated and received LSAs. If you do not specify this keyword, the command logs brief information about self-originated and received LSAs.

asbr: Logs Type-4 LSA (ASBR Summary LSA) information.

ase: Logs Type-5 LSA (AS External LSA) information.

network: Logs Type-2 LSA (Network LSA) information.

nssa: Logs Type-7 LSA (NSSA External LSA) information.

opaque-area: Logs Type-10 LSA (Opaque-area LSA) information.

opaque-as: Logs Type-11 LSA (Opaque-AS LSA) information.

opaque-link: Logs Type-9 LSA (Opaque-link LSA) information.

router: Logs Type-1 LSA (Router LSA) information.

summary: Logs Type-3 LSA (Network Summary LSA) information.

originate-router advertising-router-id: Specifies an advertising router by its ID.

link-state-id: Specifies a link state ID in the IP address format.

Examples

# Set the number of route calculation logs to 50 in OSPF process 100.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] event-log spf size 50

fast-reroute

Use fast-reroute to configure OSPF FRR.

Use undo fast-reroute to restore the default.

Syntax

fast-reroute { lfa [ abr-only | ecmp-shared ] | route-policy route-policy-name }

undo fast-reroute

Default

OSPF FRR is disabled.

Views

OSPF view

Predefined user roles

network-admin

Parameters

lfa: Uses the LFA algorithm to calculate a backup next hop for all routes.

abr-only: Uses the next hop of the route to the ABR as the backup next hop.

ecmp-shared: Calculates a backup next hop through LFA calculation for all routes, including ECMP routes. ECMP routes share one backup next hop. If you do not specify this keyword, OSPF calculates a backup next hop through LFA calculation only for non-ECMP routes.

route-policy route-policy-name: Uses a routing policy to designate a backup next hop. The route-policy-name argument is a case-sensitive string of 1 to 63 characters.

Usage guidelines

When both OSPF FRR and PIC are configured, OSPF FRR takes effect.

Do not use the fast-reroute lfa command together with the vlink-peer command.

To calculate a shared backup next hop through LFA calculation for ECMP routes, execute this command with the ecmp-shared keyword. If the next hops of all ECMP routes fail, OSPF uses the shared backup next hop to forward packets. The shared backup next hop is issued into the RIB as an ECMP route. The state of the route is Backup in the output from the display ip routing-table command.

Examples

# Enable FRR to calculate a backup next hop for all routes by using LFA algorithm in OSPF process 1.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] fast-reroute lfa ecmp-shared

fast-reroute remote-lfa maximum-cost

Use fast-reroute remote-lfa maximum-cost to set the maximum cost from the source node of a protected link to a PQ node.

Use undo fast-reroute remote-lfa maximum-cost to restore the default.

Syntax

fast-reroute remote-lfa maximum-cost cost

undo fast-reroute remote-lfa maximum-cost

Default

The maximum cost from the source node of a protected link to a PQ node is 4294967295.

Views

OSPF view

Predefined user roles

network-admin

Parameters

cost: Specifies a cost value in the range of 1 to 4294967295.

Usage guidelines

The cost values from different PQ nodes to the source node of a specific protected link might be different. You can use this command to filter PQ nodes based on the cost value.

Examples

# Set the maximum cost from the source node of a protected link to a PQ node to 200.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] fast-reroute remote-lfa maximum-cost 200

fast-reroute remote-lfa prefix-list

Use fast-reroute remote-lfa prefix-list to specify a prefix list to filter remote LFA PQ nodes.

Use undo fast-reroute remote-lfa prefix-list to restore the default.

Syntax

fast-reroute remote-lfa prefix-list prefix-list-name

undo fast-reroute remote-lfa prefix-list

Default

Any PQ node can be selected as the backup next hop by remote LFA FRR.

Views

OSPF view

Predefined user roles

network-admin

Parameters

prefix-list-name: Specifies a prefix list by its name, a case-sensitive string of 1 to 63 characters.

Usage guidelines

Multiple PQ nodes might reach the source node of a specific protected link. You can use this command to specify a prefix list to filter PQ nodes.

Examples

# Use prefix list test1 to filter remote LFA PQ nodes.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] fast-reroute remote-lfa prefix-list 1

Related commands

ip prefix-list

fast-reroute remote-lfa tunnel ldp

Use fast-reroute remote-lfa tunnel ldp to enable OSPF remote LFA FRR.

Use undo fast-reroute remote-lfa tunnel ldp to disable OSPF remote LFA FRR.

Syntax

fast-reroute remote-lfa tunnel ldp

undo fast-reroute remote-lfa tunnel ldp

Default

OSPF remote LFA FRR is disabled.

Views

OSPF view

Predefined user roles

network-admin

Usage guidelines

Configure remote LFA FRR to prevent traffic loss caused by link or node failures.

Before configuring remote LFA FRR, you must perform the following tasks:

·     Use the mpls ldp command to enable MPLS LDP globally.

·     Use the mpls ldp enable command to enable MPLS LDP on all interfaces participating in MPLS forwarding.

·     Use the fast-reroute lfa command to enable LFA FRR for OSPF.

Examples

# Enable remote LFA FRR.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] fast-reroute remote-lfa tunnel ldp

Related commands

fast-reroute

mpls ldp (MPLS Command Reference)

mpls ldp enable (MPLS Command Reference)

fast-reroute tiebreaker

Use fast-reroute tiebreaker to set the priority for FRR backup path selection policies.

Use undo fast-reroute tiebreaker to restore the default.

Syntax

fast-reroute tiebreaker { lowest-cost | node-protecting | srlg-disjoint } preference preference

undo fast-reroute tiebreaker { lowest-cost | node-protecting | srlg-disjoint }

Default

The priority values of the node-protection, lowest-cost, and SRLG-disjoint backup path selection policies are 40, 20, and 10, respectively.

Views

OSPF view

Predefined user roles

network-admin

Parameters

lowest-cost: Sets a priority value for the lowest-cost backup path selection policy.

node-protecting: Sets a priority value for the node-protection backup path selection policy.

srlg-disjoint: Sets a priority value for the SRLG-disjoint backup path selection policy.

preference preference: Specifies a priority value in the range of 1 to 255. A higher value indicates a higher priority.

Usage guidelines

OSPF FRR uses specific policies for backup path calculation. This command defines the priority for the backup path selection policy. The higher the value, the higher the priority of the associated backup path selection policy. Changing the backup path selection policy priority can affect the backup path calculation result for OSPF FRR. The backup paths can provide node protection or link protection for traffic, or provide both node protection and link protection.

OSPF FRR supports the following backup path selection policies that are used to generate different topologies for backup path calculation:

·     Node protection—OSPF FRR performs backup path calculation after excluding the primary next hop node.

·     Lowest cost—OSPF FRR performs backup path calculation after excluding the direct primary link.

·     SRLG disjoint—When one link in the SRLG fails, the other links in the SRLG might also fail. If you use a link in this SRLG as the backup link for the failed link, protection does not take effect. To avoid this issue, OSPF FRR excludes the local links in the same SRLG as the direct primary link and then performs backup path calculation.

For OSPF FRR, the SRLG disjoint policy depends on the node protection and lowest cost policies.

If multiple backup path selection policies exist in an OSPF process, the policy with the highest priority is used to calculate the backup path. If the policy fails to calculate the backup path, another policy with higher priority is used. OSPF performs backup path calculation by using the node protection and lowest cost policies as follows:

·     If the node protection policy has higher priority and fails to calculate the backup path, OSPF uses the lowest cost policy to calculate the backup path. If the lowest cost policy still fails to calculate the backup path, reliability cannot be ensured upon primary link failure.

·     If the lowest cost policy has higher priority and fails to calculate the backup path, OSPF does not perform further backup path calculation with the node protection policy. Reliability cannot be ensured upon primary link failure.

You can execute this command multiple times to specify the priorities for the lowest cost, node protection, and SRLG disjoint policies, respectively.

If you execute this command multiple times for a backup path selection policy, the most recent configuration takes effect.

Examples

# Set the priority value of the node-protection backup path selection policy to 100.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] fast-reroute tiebreaker node-protecting preference 100

Related commands

fast-reroute

filter

Use filter to configure OSPF to filter inbound/outbound Type-3 LSAs on an ABR.

Use undo filter to disable Type-3 LSA filtering.

Syntax

filter { ipv4-acl-number | prefix-list prefix-list-name | route-policy route-policy-name } { export | import }

undo filter { export | import }

Default

Type-3 LSAs are not filtered.

Views

OSPF area view

Predefined user roles

network-admin

Parameters

ipv4-acl-number: Specifies an IPv4 ACL by its number in the range of 2000 to 3999 to filter inbound/outbound Type-3 LSAs.

prefix-list-name: Specifies an IP prefix list by its name, a case-sensitive string of 1 to 63 characters, to filter inbound/outbound Type-3 LSAs.

route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters, to filter inbound/outbound Type-3 LSAs.

export: Filters Type-3 LSAs advertised to other areas.

import: Filters Type-3 LSAs advertised into the local area.

Usage guidelines

This command applies only to an ABR.

When you specify an ACL, follow these guidelines:

·     If the ACL does not exist or does not have any rules, the ABR does not filter Type-3 LSAs.

·     If a rule in the ACL is applied to a VPN instance, the rule will deny all Type-3 LSAs.

To use an advanced ACL (with a number from 3000 to 3999) in the command, configure the ACL using one of the following methods:

·     To deny or permit Type-3 LSAs with the specified link state ID, use the rule [ rule-id ] { deny | permit } ip source sour-addr sour-wildcard command.

·     To deny or permit Type-3 LSAs with the specified link state ID and mask, use the rule [ rule-id ] { deny | permit } ip source sour-addr sour-wildcard destination dest-addr dest-wildcard command.

The source keyword specifies the link state ID of a Type-3 LSA and the destination keyword specifies the subnet mask of the LSA. For the mask configuration to take effect, specify a contiguous subnet mask.

Examples

# Use IP prefix list my-prefix-list to filter inbound Type-3 LSAs. Use basic ACL 2000 to filter outbound Type-3 LSAs in OSPF Area 1.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] area 1

[Sysname-ospf-100-area-0.0.0.1] filter prefix-list my-prefix-list import

[Sysname-ospf-100-area-0.0.0.1] filter 2000 export

filter-policy export

Use filter-policy export to configure OSPF to filter redistributed routes.

Use undo filter-policy export to remove the configuration.

Syntax

filter-policy { ipv4-acl-number | prefix-list prefix-list-name } export [ bgp | direct | eigrp [ eigrp-as ] | { isis | ospf | rip } [ process-id ] | static | unr ]

undo filter-policy export [ bgp | direct | eigrp [ eigrp-as ] | { isis | ospf | rip } [ process-id ] | static | unr ]

Default

OSPF does not filter redistributed routes.

Views

OSPF view

Predefined user roles

network-admin

Parameters

ipv4-acl-number: Specifies an IPv4 ACL by its number in the range of 2000 to 3999 to filter redistributed routes by destination address.

prefix-list-name: Specifies an IP prefix list by its name, a case-sensitive string of 1 to 63 characters, to filter redistributed routes by destination address.

bgp: Filters redistributed BGP routes.

direct: Filters redistributed direct routes.

eigrp: Filters redistributed EIGRP routes.

eigrp-as: Specifies an EIGRP process by its number in the range of 1 to 65535. The default value is 1.

isis: Filters redistributed IS-IS routes.

ospf: Filters redistributed OSPF routes.

rip: Filters redistributed RIP routes.

process-id: Specifies a process by its ID in the range of 1 to 65535. The default value is 1.

static: Filters redistributed static routes.

unr: Filters redistributed user network routes.

Usage guidelines

If you do not specify any parameters, this command filters all redistributed routes.

When you specify an ACL, follow these guidelines:

·     If the ACL does not exist or does not have any rules, OSPF does not filter redistributed routes.

·     If a rule in the ACL is applied to a VPN instance, the rule will deny all redistributed routes.

To use an advanced ACL (with a number from 3000 to 3999) in the command, configure the ACL using one of the following methods:

·     To deny or permit a route with the specified destination, use the rule [ rule-id ] { deny | permit } ip source sour-addr sour-wildcard command.

·     To deny or permit a route with the specified destination and mask, use the rule [ rule-id ] { deny | permit } ip source sour-addr sour-wildcard destination dest-addr dest-wildcard command.

The source keyword specifies the destination address of a route and the destination keyword specifies the subnet mask of the destination address. For the mask configuration to take effect, specify a contiguous subnet mask.

Examples

# Configure OSPF process 100 to filter redistributed routes by using basic ACL 2000.

<Sysname> system-view

[Sysname] acl basic 2000

[Sysname-acl-ipv4-basic-2000] rule deny source 192.168.10.0 0.0.0.255

[Sysname-acl-ipv4-basic-2000] quit

[Sysname] ospf 100

[Sysname-ospf-100] filter-policy 2000 export

# Configure advanced ACL 3000 to permit only route 113.0.0.0/16. Configure OSPF process 100 to filter redistributed routes by using advanced ACL 3000.

<Sysname> system-view

[Sysname] acl advanced 3000

[Sysname-acl-ipv4-adv-3000] rule 10 permit ip source 113.0.0.0 0 destination 255.255.0.0 0

[Sysname-acl-ipv4-adv-3000] rule 100 deny ip

[Sysname-acl-ipv4-adv-3000] quit

[Sysname] ospf 100

[Sysname-ospf-100] filter-policy 3000 export

Related commands

import-route

filter-policy import

Use filter-policy import to configure OSPF to filter routes calculated using received LSAs.

Use undo filter-policy import to restore the default.

Syntax

filter-policy { ipv4-acl-number [ gateway prefix-list-name ] | gateway prefix-list-name | prefix-list prefix-list-name [ gateway prefix-list-name ] | route-policy route-policy-name } import

undo filter-policy import

Default

OSPF does not filter routes calculated using received LSAs.

Views

OSPF view

Predefined user roles

network-admin

Parameters

ipv4-acl-number: Specifies an IPv4 ACL by its number in the range of 2000 to 3999 to filter received routes by destination.

gateway prefix-list-name: Specifies an IP prefix list by its name, a case-sensitive string of 1 to 63 characters, to filter received routes by next hop.

prefix-list prefix-list-name: Specifies an IP prefix list by its name, a case-sensitive string of 1 to 63 characters, to filter received routes by destination.

route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters, to filter received routes.

Usage guidelines

When you specify an ACL, follow these guidelines:

·     If the ACL does not exist or does not have any rules, OSPF does not filter calculated routes.

·     If a rule in the ACL is applied to a VPN instance, the rule will deny all calculated routes.

The filter-policy import command filters only routes computed by OSPF. Routes that fail to pass the filter are not added to the RIB.

To use an advanced ACL (with a number from 3000 to 3999) in the command or in the specified routing policy, configure the ACL in one of the following ways:

·     To deny or permit a route with the specified destination, use the rule [ rule-id ] { deny | permit } ip source sour-addr sour-wildcard command.

·     To deny or permit a route with the specified destination and mask, use the rule [ rule-id ] { deny | permit } ip source sour-addr sour-wildcard destination dest-addr dest-wildcard command.

The source keyword specifies the destination address of a route and the destination keyword specifies the subnet mask of the destination address. For the mask configuration to take effect, specify a contiguous subnet mask.

Examples

# Use basic ACL 2000 to filter received routes.

<Sysname> system-view

[Sysname] acl basic 2000

[Sysname-acl-ipv4-basic-2000] rule deny source 192.168.10.0 0.0.0.255

[Sysname-acl-ipv4-basic-2000] quit

[Sysname] ospf 100

[Sysname-ospf-100] filter-policy 2000 import

# Configure advanced ACL 3000 to permit only route 113.0.0.0/16. Use ACL 3000 to filter received routes.

<Sysname> system-view

[Sysname] acl advanced 3000

[Sysname-acl-ipv4-adv-3000] rule 10 permit ip source 113.0.0.0 0 destination 255.255.0.0 0

[Sysname-acl-ipv4-adv-3000] rule 100 deny ip

[Sysname-acl-ipv4-adv-3000] quit

[Sysname] ospf 100

[Sysname-ospf-100] filter-policy 3000 import

graceful-restart

Use graceful-restart to enable OSPF GR.

Use undo graceful-restart to disable OSPF GR.

Syntax

graceful-restart [ ietf | nonstandard ] [ global | planned-only ] *

undo graceful-restart

Default

OSPF GR is disabled.

Views

OSPF view

Predefined user roles

network-admin

Parameters

ietf: Enables IETF GR.

nonstandard: Enables non-IETF GR.

global: Enables global GR. In global GR mode, a GR process can be completed only when all GR helpers exist. A GR process fails if a GR helper fails (for example, the interface connected to the GR helper goes down). If you do not specify this keyword, the command enables partial GR. In partial GR mode, a GR process can be completed if a GR helper exists.

planned-only: Enables only planned GR. If you do not specify this keyword, the command enables both planned GR and unplanned GR.

Usage guidelines

GR includes planned GR and unplanned GR.

·     Planned GR—Manually restarts OSPF by using the reset ospf process command or performs an active/standby process switchover by using the placement reoptimize command. Before OSPF restart or active/standby switchover, the GR restarter sends Grace-LSAs to GR helpers.

·     Unplanned GR—OSPF restarts or an active/standby switchover occurs because of device failure. Before OSPF restart or active/standby switchover, the GR restarter does not send Grace-LSAs to GR helpers.

Before enabling IETF GR for OSPF, enable Opaque LSA advertisement and reception with the opaque-capability enable command.

Before enabling non-IETF GR for OSPF, enable OSPF LLS with the enable link-local-signaling command and OOB-Resynch with the enable out-of-band-resynchronization command.

If you do not specify the nonstandard or ietf keyword, this command enables non-IETF GR for OSPF.

Examples

# Enable IETF GR for OSPF process 1.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] opaque-capability enable

[Sysname-ospf-1] graceful-restart ietf

# Enable non-IETF GR for OSPF process 1.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] enable link-local-signaling

[Sysname-ospf-1] enable out-of-band-resynchronization

[Sysname-ospf-1] graceful-restart nonstandard

Related commands

enable link-local-signaling

enable out-of-band-resynchronization

opaque-capability enable

graceful-restart helper enable

Use graceful-restart helper enable to enable OSPF GR helper capability.

Use undo graceful-restart helper enable to disable OSPF GR helper capability.

Syntax

graceful-restart helper enable [ planned-only ]

undo graceful-restart helper enable

Default

OSPF GR helper capability is enabled.

Views

OSPF view

Predefined user roles

network-admin

Parameters

planned-only: Enables only planned GR for the GR helper. If you do not specify this keyword, the command enables both planned GR and unplanned GR for the GR helper.

Usage guidelines

The planned-only keyword is available only for the IETF GR helper.

Examples

# Enable GR helper capability for OSPF process 1.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] graceful-restart helper enable

graceful-restart helper strict-lsa-checking

Use graceful-restart helper strict-lsa-checking to enable strict LSA checking capability for GR helper.

Use undo graceful-restart helper strict-lsa-checking to disable strict LSA checking capability for GR helper.

Syntax

graceful-restart helper strict-lsa-checking

undo graceful-restart helper strict-lsa-checking

Default

Strict LSA checking capability for GR helper is disabled.

Views

OSPF view

Predefined user roles

network-admin

Usage guidelines

When an LSA change on the GR helper is detected, the GR helper device exits the GR helper mode.

Examples

# Enable strict LSA checking capability for GR helper in OSPF process 1.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] graceful-restart helper strict-lsa-checking

graceful-restart interval

Use graceful-restart interval to set the GR interval.

Use undo graceful-restart interval to restore the default.

Syntax

graceful-restart interval interval

undo graceful-restart interval

Default

The GR interval is 120 seconds.

Views

OSPF view

Predefined user roles

network-admin

Parameters

interval: Specifies the GR interval in the range of 40 to 1800 seconds.

Usage guidelines

For GR restart to succeed, the value of the GR restart interval cannot be smaller than the maximum OSPF neighbor dead time of all the OSPF interfaces.

Examples

# Set the GR interval for OSPF process 1 to 100 seconds.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] graceful-restart interval 100

Related commands

ospf timer dead

host-advertise

Use host-advertise to advertise a host route.

Use undo host-advertise to remove a host route.

Syntax

host-advertise ip-address cost-value

undo host-advertise ip-address

Default

No host route is advertised.

Views

OSPF area view

Predefined user roles

network-admin

Parameters

ip-address: Specifies the IP address of a host.

cost-value: Specifies a cost for the route, in the range of 1 to 65535.

Examples

# Advertise host route 1.1.1.1 with a cost of 100.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] area 0

[Sysname-ospf-100-area-0.0.0.0] host-advertise 1.1.1.1 100

hostname

Use hostname to enable the OSPF dynamic host name mapping feature.

Use undo hostname disable the OSPF dynamic host name mapping feature.

Syntax

hostname [ host-name ]

undo hostname

Default

The OSPF dynamic host name mapping feature is disabled.

Views

OSPF view

Predefined user roles

network-admin

Parameters

host-name: Specifies the host name mapped to the router ID of the OSPF process, a case-sensitive string of 1 to 255 characters. If you do not specify this argument, the device name is mapped to the router ID of the OSPF process.

Usage guidelines

OSPF uses Type-10 LSAs and Type-11 LSAs to carry information about the dynamic host name attribute. Before using this command, make sure the opaque LSA reception and advertisement capability is enabled.

Examples

# Enable the dynamic host name mapping feature for OSPF process 1, and specify the host name mapped to the router ID as red.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] hostname red

Related commands

display ospf hostname-table

opaque-capability enable

import-route

Use import-route to enable route redistribution.

Use undo import-route to disable route redistribution.

Syntax

import-route bgp [ as-number ] [ allow-ibgp ] [ [ cost cost-value | inherit-cost ] | nssa-only | route-policy route-policy-name | tag tag | type type ] *

import-route { direct | static | unr } [ [ cost cost-value | inherit-cost ] | nssa-only | route-policy route-policy-name | tag tag | type type ] *

import-route eigrp [ eigrp-as | all-as ] [ allow-direct | [ cost cost-value | inherit-cost ] | nssa-only | route-policy route-policy-name | tag tag | type type ] *

import-route { isis | ospf | rip } [ process-id | all-processes ] [ allow-direct | [ cost cost-value | inherit-cost ] | nssa-only | route-policy route-policy-name | tag tag | type type ] *

undo import-route { bgp | direct | eigrp [ eigrp-as | all-as ] | { isis | ospf | rip } [ process-id | all-processes ] | static | unr }

Default

OSPF does not redistribute routes.

Views

OSPF view

Predefined user roles

network-admin

Parameters

bgp: Redistributes BGP routes.

as-number: Redistributes routes in an AS specified by its number in the range of 1 to 4294967295. This argument applies only to the BGP protocol. If you do not specify this argument, this command redistributes all IPv4 EBGP routes. As a best practice, specify an AS number to prevent the system from redistributing excessive IPv4 EBGP routes.

direct: Redistributes direct routes.

eigrp: Redistributes EIGRP routes.

eigrp-as: Specifies an EIGRP process by its number in the range of 1 to 65535. The default value is 1.

all-as: Redistributes routes from all EIGRP processes.

isis: Redistributes IS-IS routes.

ospf: Redistributes OSPF routes.

rip: Redistributes RIP routes.

process-id: Specifies a process ID of IS-IS, RIP, or OSPF, in the range of 1 to 65535. The default is 1.

static: Redistributes static routes.

unr: Redistributes user network routes. User network routes are generated by access devices for online users.

all-processes: Redistributes routes from all the processes of the IS-IS, RIP, or OSPF routing protocol.

allow-ibgp: Redistributes IBGP routes.

allow-direct: Redistributes the networks of the local interfaces enabled with the specified routing protocol. If you do not specify this keyword, the networks of the local interfaces are not redistributed. If you specify both the allow-direct keyword and the route-policy route-policy-name option, make sure the if-match rule defined in the routing policy does not conflict with the allow-direct keyword. For example, if you specify the allow-direct keyword, do not configure the if-match route-type rule for the routing policy. Otherwise, the allow-direct keyword does not take effect.

cost cost-value: Specifies a route cost in the range of 0 to 16777214.

inherit-cost: Uses the original cost of redistributed routes.

nssa-only: Limits the route advertisement to the NSSA area by setting the P-bit of Type-7 LSAs to 0. If you do not specify this keyword, the P-bit of Type-7 LSAs is set to 1. If the router acts as both an ASBR and an ABR and FULL state neighbors exist in the backbone area, the P-bit is set to 0. This keyword applies to NSSA routers.

route-policy route-policy-name: Specifies a routing policy to filter redistributed routes. The route-policy-name argument is a case-sensitive string of 1 to 63 characters.

tag tag: Specifies a tag for external LSAs, in the range of 0 to 4294967295. The default is 1.

type type: Specifies a cost type, 1 or 2. The default is 2.

Usage guidelines

This command redistributes routes destined for other ASs from another protocol. AS external routes include the following types:

·     Type-1 external routes—Have high credibility. The cost of Type-1 external routes is comparable with the cost of OSPF internal routes. The cost of a Type-1 external route equals the cost from the router to the ASBR plus the cost from the ASBR to the external route's destination.

·     Type-2 external routes—Have low credibility. OSPF considers the cost from the ASBR to the destination of a Type-2 external route is much bigger than the cost from the ASBR to an OSPF internal router. The cost of a Type-2 external route equals the cost from the ASBR to the Type-2 external route's destination.

The import-route command redistributes only active routes. To display information about active routes, use the display ip routing-table protocol command. The import-route command cannot redistribute default external routes.

The import-route bgp command redistributes only EBGP routes when the OSPF process meets one of the following requirements:

·     The OSPF process runs on the public network.

·     The OSPF process runs on a VPN instance and you have disabled routing loop detection for the process by using the vpn-instance-capability simple command. In this situation, use the import-route bgp allow-ibgp command with caution, because the command redistributes both EBGP and IBGP routes and might cause routing loops.

The import-route bgp command redistributes both EBGP and IBGP routes when the OSPF process meets the following requirements:

·     The OSPF process runs on a VPN instance.

·     Routing loop detection is not disabled.

The import-route nssa-only command redistributes AS-external routes in Type-7 LSAs only into the NSSA area.

If you specify neither the cost nor the inherit-cost keyword, the cost of a redistributed route is 1.

When you execute the undo form of the command, per-process setting has higher priority than the all-processes setting.

The undo import-route eigrp all-as command cannot remove the setting configured for an EIGRP process by using the import-route eigrp eigrp-as command. To remove the setting for that process, you must specify the process number in the undo form of the command.

The undo import-route { isis | ospf | rip } all-processes command cannot remove the setting configured for a process by using the import-route { isis | ospf | rip } process-id command. To remove the setting for that process, you must specify the process ID in the undo form of the command.

Examples

# Redistribute routes from RIP process 40 and specify the type, tag, and cost as 2, 33, and 50 for redistributed routes.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] import-route rip 40 type 2 tag 33 cost 50

Related commands

default-route-advertise

vpn-instance-capability simple (MPLS Command Reference)

isolate enable

Use isolate enable to enable OSPF isolation.

Use undo isolate enable to disable OSPF isolation.

Syntax

isolate enable

undo isolate enable

Default

OSPF isolation is disabled.

Views

OSPF view

Predefined user roles

network-admin

Usage guidelines

Isolation is a method used for network device maintenance. It gracefully removes a device from the packet forwarding path for maintenance and gracefully adds the device to the network after maintenance.

To reduce impact on traffic forwarding, you can isolate a device before upgrading it. OSPF isolation works as follows:

1.     After OSPF isolation is enabled for a device, OSPF increases the link cost in LSAs advertised by the device based on the following rules:

¡     The link cost in Type-1 LSAs (Router LSAs) is increased to 65535.

¡     The link cost in the following LSAs is increased to 16711680:

-     Type-3 LSAs (Network summary LSAs).

-     Type-5 LSAs (AS external LSAs).

-     Type-7 LSAs (NSSA external LSAs).

2.     Each neighbor of the device reselects an optimal route based on the LSAs and stops forwarding traffic to the device. The device is fully isolated from the network and you can upgrade the device.

3.     After the maintenance, disable OSPF isolation on the device to restore its link cost and gracefully add it back to the network.

Both the isolate enable and stub-router external-lsa 16711680 summary-lsa 16711680 include-stub commands can isolate the device from the network.

When you execute both the isolate enable and stub-router commands, follow these restrictions and guidelines:

·     If the include-stub keyword is specified in the stub-router command, the link costs of Type-3 LSAs are adjusted by the stub router, and the link cost of Type-1, Type-2, and Type-4 LSAs are adjusted by the isolation feature.

·     If you specify the external-lsa and summary-lsa keywords in the stub-router command, the higher one of the two link costs provided by the isolation feature and the stub router feature takes effect.

·     If the on-startup keyword is specified in the stub-router command, traffic forwarding path selection is affected only by the isolation feature when the stub router does not take effect. When the stub router takes effect, both the isolation feature and the stub router affect traffic forwarding path selection.

·     If no keyword is specified in the stub-router command, traffic forwarding path selection is affected only by the isolation feature.

Examples

# Isolate the device from the network in OSPF process 100.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] isolate enable

Related commands

stub-router

ispf enable

Use ispf enable to enable OSPF incremental SPF (ISPF).

Use undo ispf enable to disable OSPF ISPF.

Syntax

ispf enable

undo ispf enable

Default

OSPF ISPF is enabled.

Views

OSPF view

Predefined user roles

network-admin

Usage guidelines

Upon topology changes, ISPF recomputes only the affected part of the SPT, instead of the entire SPT.

Examples

# Disable ISPF for OSPF process 100.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] undo ispf enable

log-peer-change

Use log-peer-change to enable logging for OSPF neighbor state changes.

Use undo log-peer-change to disable logging for OSPF neighbor state changes.

Syntax

log-peer-change

undo log-peer-change

Default

Logging for OSPF neighbor state changes is enabled.

Views

OSPF view

Predefined user roles

network-admin

Usage guidelines

This command enables output of OSPF neighbor state changes to the information center. The information center processes the logs according to user-defined output rules (whether and where to output logs). For more information about the information center, see Network Management and Monitoring Configuration Guide.

Examples

# Disable logging for neighbor state changes for OSPF process 100.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] undo log-peer-change

lsa-arrival-interval

Use lsa-arrival-interval to set the LSA arrival interval.

Use undo lsa-arrival-interval to restore the default.

Syntax

lsa-arrival-interval maximum-interval [ minimum-interval [ incremental-interval ] ]

undo lsa-arrival-interval

Default

The maximum interval, incremental interval, and minimum interval are 1000 milliseconds, 500 milliseconds, and 500 milliseconds, respectively.

Views

OSPF view

Predefined user roles

network-admin

Parameters

maximum-interval: Specifies the maximum LSA arrival interval in the range of 0 to 10000 milliseconds.

minimum-interval: Specifies the minimum LSA arrival interval in the range of 0 to 1000 milliseconds.

incremental-interval: Specifies the incremental LSA arrival interval in the range of 0 to 5000 milliseconds.

Usage guidelines

For a stable network, LSAs arrive at the minimum interval. If network changes become frequent, the LSA arrival interval increases by the incremental interval × 2n-2 for each arrival until the maximum interval is reached. The value n is the number of arrival times.

OSPF drops any duplicate LSAs within the LSA arrival interval. An LSA is a duplicate of a previous LSA if they have the same LSA type, LS ID, and router ID.

On a stable network that requires fast convergence, you can set the LSA arrival interval to 0. In this way, OSPF can learn the changes of the topology or routes immediately.

The minimum interval and the incremental interval cannot be greater than the maximum interval.

Examples

# Set the maximum, minimum, and incremental LSA arrival intervals to 2000 milliseconds, 100 milliseconds, and 300 milliseconds, respectively.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] lsa-arrival-interval 2000 100 300

Related commands

lsa-generation-interval

lsa-arrival-interval suppress-flapping

Use lsa-arrival-interval suppress-flapping to suppress incoming LSAs during route flapping.

Use undo lsa-arrival-interval suppress-flapping to restore the default.

Syntax

lsa-arrival-interval suppress-flapping delay-interval [ threshold threshold-value ]

undo lsa-arrival-interval suppress-flapping

Default

Incoming LSAs are not suppressed during route flapping.

Views

OSPF view

Predefined user roles

network-admin

Parameters

delay-interval: Specifies the suppression interval, which is the minimum interval for accepting instances of the same LSA during route flapping. The value range is 0 to 65535 seconds.

threshold threshold-value: Specifies the suppression trigger threshold as the number of route flaps. When the number of route flaps reaches the threshold, OSPF suppresses instances of the same LSA. The value range for the threshold-value argument is 3 to 100. The default value is 5.

Usage guidelines

Instances of an LSA have the same LSA type, LS ID, and originating router ID.

If OSPF receives multiple instances of the same LSA during the suppression interval, OSPF discards all the instances except the first one.

Examples

# Configure OSPF to suppress incoming LSAs after 10 route flaps, and set the LSA suppression interval to 5 seconds.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] lsa-arrival-interval suppress-flapping 5 threshold 10

Related commands

lsa-arrival-interval

lsa-generation-interval

Use lsa-generation-interval to set the OSPF LSA update interval.

Use undo lsa-generation-interval to restore the default.

Syntax

lsa-generation-interval maximum-interval [ minimum-interval [ incremental-interval ] ]

undo lsa-generation-interval

Default

The maximum interval is 5 seconds, the minimum interval is 50 milliseconds, and the incremental interval is 200 milliseconds.

Views

OSPF view

Predefined user roles

network-admin

Parameters

maximum-interval: Specifies the maximum LSA update interval in the range of 1 to 60 seconds.

minimum-interval: Specifies the minimum LSA update interval in the range of 10 to 60000 milliseconds.

incremental-interval: Specifies the LSA update incremental interval in the range of 10 to 60000 milliseconds.

Usage guidelines

For a stable network, LSAs are generated at the minimum interval. If network changes become frequent, the LSA update interval increases by the incremental interval × 2n-2 for each update until the maximum interval is reached. The value n is the number of update times.

The minimum interval and the incremental interval cannot be greater than the maximum interval.

Examples

# Set the maximum LSA update interval to 2 seconds, minimum interval to 100 milliseconds, and incremental interval to 100 milliseconds.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] lsa-generation-interval 2 100 100

Related commands

lsa-arrival-interval

lsa-generation-interval suppress-flapping

Use lsa-generation-interval suppress-flapping to suppress the update of LSAs during route flapping.

Use undo lsa-generation-interval suppress-flapping to restore the default.

Syntax

lsa-generation-interval suppress-flapping delay-interval [ threshold threshold-value ]

undo lsa-generation-interval suppress-flapping

Default

The update of LSAs is not suppressed during route flapping.

Views

OSPF view

Predefined user roles

network-admin

Parameters

delay-interval: Specifies the suppression interval, which is the minimum interval for generating LSAs during route flapping. The value range is 0 to 65535 seconds.

threshold threshold-value: Specifies the suppression trigger threshold as the number of route flaps. When the number of route flaps reaches the threshold, OSPF suppresses the update of LSAs. The value range for the threshold-value argument is 3 to 100. The default value is 5.

Examples

# Configure OSPF to suppress the LSA update after 10 route flaps, and set the suppression interval to 3 seconds.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] lsa-generation-interval suppress-flapping 3 threshold 10

Related commands

lsa-generation-interval

lsdb-overflow-interval

Use lsdb-overflow-interval to set the interval that OSPF exits overflow state.

Use undo lsdb-overflow-interval to restore the default.

Syntax

lsdb-overflow-interval interval

undo lsdb-overflow-interval

Default

The OSPF exit overflow interval is 300 seconds.

Views

OSPF view

Predefined user roles

network-admin

Parameters

interval: Specifies the interval that OSPF exits overflow state, in the range of 0 to 2147483647 seconds.

Usage guidelines

When the number of LSAs in the LSDB exceeds the upper limit, the LSDB is in an overflow state. In this state, OSPF does not receive any external LSAs and deletes the external LSAs generated by itself to save system resources.

You can configure the interval that OSPF exits overflow state. An interval of 0 indicates that the timer is not started and OSPF does not exit overflow state.

Examples

# Set the OSPF exit overflow interval to 10 seconds.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] lsdb-overflow-interval 10

lsdb-overflow-limit

Use lsdb-overflow-limit to set the upper limit of external LSAs in the LSDB.

Use undo lsdb-overflow-limit to restore the default.

Syntax

lsdb-overflow-limit number

undo lsdb-overflow-limit

Default

The number of external LSAs is not limited.

Views

OSPF view

Predefined user roles

network-admin

Parameters

number: Specifies the upper limit of external LSAs in the LSDB, in the range of 1 to 1000000.

Examples

# Set the upper limit of external LSAs to 400000.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] lsdb-overflow-limit 400000

maxage-lsa route-calculate-delay

Use maxage-lsa route-calculate-delay to set the delay for route calculation triggered by router LSAs with max age.

Use undo maxage-lsa route-calculate-delay to restore the default.

Syntax

maxage-lsa route-calculate-delay delay-interval

undo maxage-lsa route-calculate-delay

Default

The delay is 10 seconds for route calculation triggered by router LSAs with max age.

Views

OSPF view

Predefined user roles

network-admin

Parameters

delay-interval: Specifies the delay for route calculation triggered by router LSAs with max age, in the range of 0 to 65535 seconds.

Usage guidelines

When a router receives a router LSA with max age, it immediately computes routes with the SPF algorithm rather than with the router LSA. During route flapping, such a route calculation can make the situation worse. You can use this command to suppress frequent route flaps by setting the routing calculation delay.

Examples

# Set the delay to 20 seconds for route calculation triggered by router LSAs with max age.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] maxage-lsa route-calculate-delay 20

maximum load-balancing

Use maximum load-balancing to set the maximum number of equal-cost multi-path (ECMP) routes for load balancing.

Use undo maximum load-balancing to restore the default.

Syntax

maximum load-balancing number

undo maximum load-balancing

Default

The maximum number of equal-cost multi-path (ECMP) routes for load balancing is 64.

Views

OSPF view

Predefined user roles

network-admin

Parameters

number: Specifies the maximum number of ECMP routes. No ECMP load balancing is available when the number is set to 1. If the value for this argument is not greater than 64, the number of ECMP routes that you can use for load balancing is in the range of 1 to number. If the value for this argument is greater than 64, the number of ECMP routes that you can use for load balancing is in the range of 1 to 64.

Examples

# Set the maximum number of ECMP routes to 2.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] maximum load-balancing 2

metric-bandwidth advertisement enable

Use metric-bandwidth advertisement enable to enable OSPF to advertise link bandwidth information.

Use undo metric-bandwidth advertisement enable to disable OSPF from advertising link bandwidth information.

Syntax

metric-bandwidth advertisement enable

undo metric-bandwidth advertisement enable

Default

A device does not advertise link bandwidth information.

Views

OSPF view

Predefined user roles

network-admin

Usage guidelines

Perform this task to enable OSPF to advertise link bandwidth information and report the information to the controller through BGP-LS. Then, the controller performs optimal route calculation based on the link bandwidth information.

Examples

# Enable OSPF process 1 to advertise link bandwidth information.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] metric-bandwidth advertisement enable

Related commands

distribute bgp-ls

metric-bandwidth suppression

Use metric-bandwidth suppression to enable OSPF to suppress link bandwidth information advertisement and configure the suppression timer.

Use undo metric-bandwidth suppression to disable OSPF from suppressing link bandwidth information advertisement.

Syntax

metric-bandwidth suppression timer time-value

undo metric-bandwidth suppression

Default

OSPF suppresses link bandwidth information advertisement, and the suppression interval is 120 seconds.

Views

OSPF view

Predefined user roles

network-admin

Parameters

timer time-value: Specifies the suppression timer in the range of 0 to 600 seconds. To disable OSPF from suppressing link bandwidth information advertisement, set the timer to 0.

Usage guidelines

By suppressing link bandwidth information advertisement, you can prevent device resources from being over consumed due to frequent bandwidth changes.

Link bandwidth advertisement suppression works as follows:

·     The interface reports link bandwidth information to OSPF at negotiated intervals.

·     OSPF advertises link bandwidth information through BGP-LS at specified intervals. OSPF does not advertise link bandwidth information within the specified interval.

This command takes effect only after you enable link bandwidth information advertisement by executing the metric-bandwidth advertisement enable command.

As a best practice, the suppression timer you specified should not be less than the Ethernet interface measurement interval. For more information about Ethernet interfaces, see Ethernet interface configuration in Interface Configuration Guide.

Examples

# Enable OSPF process 1 to suppress link bandwidth information advertisement and set the suppression timer to 100 seconds.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] metric-bandwidth suppression timer 100

Related commands

metric-bandwidth advertisement enable

metric-delay advertisement enable

Use metric-delay advertisement enable to enable OSPF to advertise link delay information.

Use undo metric-delay advertisement enable to disable OSPF from advertising link delay information.

Syntax

metric-delay advertisement enable

undo metric-delay advertisement enable

Default

Link delay information advertisement is disabled.

Views

OSPF view

Predefined user roles

network-admin

Usage guidelines

Perform this task to enable OSPF to advertise link delay information and report the information to the controller through BGP-LS. Then, the controller performs optimal route calculation based on the link delay information.

Examples

# Enable OSPF process 1 to advertise link delay information.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] metric-delay advertisement enable

Related commands

distribute bgp-ls

metric-delay suppression

Use metric-delay suppression to enable OSPF to suppress advertisement of link delay information and configure the suppression settings.

Use undo metric-delay suppression to disable OSPF from suppressing advertisement of link delay information.

Syntax

metric-delay suppression timer time-value percent-threshold percent-value absolute-threshold absolute-value

undo metric-delay suppression

Default

OSPF suppresses advertisement of link delay information.

Views

OSPF view

Predefined user roles

network-admin

Parameters

timer time-value: Specifies the suppression timer in the range of 0 to 600 seconds. The default timer is 120 seconds. When the suppression is disabled, the timer is 0.

percent-value: Specifies the suppression threshold for link delay variation ratio in the range of 0 to 100%. The default threshold is 10%. If this argument is unnecessary, you can set it to 0.

absolute-value: Specifies the suppression threshold for the absolute value of link delay variation in the range of 0 to 10000 microseconds. The default threshold is 1000 microseconds. If this argument is unnecessary, you can set it to 0.

Usage guidelines

By suppressing link delay information advertisement, you can prevent device resources from being over consumed due to frequent link delay changes.

Link delay advertisement suppression works as follows:

·     The interface reports link delay information to OSPF at the specified interval.

·     OSPF advertises link delay information through BGP-LS at the specified interval. OSPF does not advertise link delay information within the specified interval except for the following conditions:

¡     The variation ratio between two consecutive minimum delays is larger than or equivalent to the suppression threshold for the delay variation ratio.

¡     The absolute value of the difference between two consecutive minimum delays is larger than or equivalent to the suppression threshold for the absolute value of the delay variation.

This command takes effect only when you execute the metric-delay advertisement enable command.

As a best practice, the  suppression timer you specified should not be less than the NQA measurement interval. For more information about NQA, see NQA configuration in Network Management and Monitoring Configuration Guide.

Examples

# Enable OSPF process 1 to suppress link delay information advertisement and set the following parameters:

·     Suppression timer: 100 seconds.

·     Suppression threshold for link delay variation ratio: 50%.

·     Suppression threshold for the absolute value of link delay variation: 200 microseconds.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] metric-delay suppression timer 100 percent-threshold 50 absolute-threshold 200

Related commands

metric-delay advertisement enable

network

Use network to enable OSPF on the interface attached to the specified network in the area.

Use undo network to disable OSPF for the interface attached to the specified network in the area.

Syntax

network ip-address wildcard-mask

undo network ip-address wildcard-mask

Default

OSPF is not enabled for any interface.

Views

OSPF area view

Predefined user roles

network-admin

Parameters

ip-address: Specifies the IP address of a network.

wildcard-mask: Specifies the wildcard mask of the IP address. For example, the wildcard mask of mask 255.0.0.0 is 0.255.255.255.

Usage guidelines

This command enables OSPF on the interface attached to the specified network. The interface's primary IP address must be in the specified network. If only the interface's secondary IP address is on the network, the interface cannot run OSPF.

Examples

# Specify the interface whose primary IP address is on network 131.108.20.0/24 to run OSPF in Area 2.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] area 2

[Sysname-ospf-100-area-0.0.0.2] network 131.108.20.0 0.0.0.255

Related commands

ospf

nssa

Use nssa to configure an area as an NSSA area.

Use undo nssa to restore the default.

Syntax

In OSPF area view:

nssa [ default-route-advertise [ cost cost-value | nssa-only | route-policy route-policy-name | type type ] * | no-import-route | no-summary | suppress-fa | [ [ [ translate-always ] [ translate-ignore-checking-backbone ] ] | translate-never ] | translator-stability-interval value ] *

undo nssa [ default-route-advertise [ cost | nssa-only | route-policy | type ] * | no-import-route | no-summary | suppress-fa | [ translate-always | translate-never ] | translator-stability-interval ] *

Default

No area is configured as an NSSA area.

Views

OSPF area view

Predefined user roles

network-admin

Parameters

default-route-advertise: Used on an NSSA ABR or an ASBR only. With this keyword, an NSSA ABR redistributes a default route in a Type-7 LSA into the NSSA area. The ABR redistributes a default route regardless of whether a default route exists in the routing table. With this keyword, an ASBR redistributes a default route in a Type-7 LSA only when the default route exists in the routing table.

cost cost-value: Specifies a cost for the default route, in the range of 0 to 16777214. If you do not specify this option, the default cost specified by the default-cost command applies.

nssa-only: Limits the default route advertisement to the NSSA area by setting the P-bit of Type-7 LSAs to 0. By default, the P-bit of Type-7 LSAs is set to 1. If the router acts as both an ASBR and an ABR and FULL state neighbors exist in the backbone area, the P-bit is set to 0.

route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters. When a default route exists in the routing table and the routing policy is matched, the command redistributes a default route in a Type-7 LSA into the OSPF routing domain. The routing policy modifies values in the Type-7 LSA.

type type: Specifies a type for the Type-7 LSA, 1 or 2. If you do not specify this option, the default type specified by the default type command applies.

no-import-route: Used on an NSSA ABR to control the import-route command to not redistribute routes into the NSSA area.

no-summary: Used only on an ABR to advertise a default route in a Type-3 summary LSA into the NSSA area and to not advertise other summary LSAs into the area. The area is a totally NSSA area.

suppress-fa: Suppresses the forwarding address in the Type-7 LSAs from being placed in the Type-5 LSAs.

translate-always: Always translates Type-7 LSAs to Type-5 LSAs. This keyword takes effect only on an NSSA ABR.

translate-ignore-checking-backbone: Ignores checking for FULL state neighbors in the backbone area during the translator election in the NSSA area.

translate-never: Never translates Type-7 LSAs to Type-5 LSAs. This keyword takes effect only on an NSSA ABR.

translator-stability-interval value: Specifies the stability interval of the translator. During the interval, the translator can maintain its translating capability after another device becomes the new translator. The value argument is the stability interval in the range of 0 to 900 seconds and defaults to 0. A value of 0 means the translator does not maintain its translating capability when a new translator arises.

Usage guidelines

All routers attached to an NSSA area must be configured with the nssa command in area view.

If you specify the translate-ignore-checking-backbone keyword for an ABR, you must also specify the keyword for other ABRs in the NSSA area. This ensures that a translator can be elected among the ABRs.

Examples

# Configure Area 1 as an NSSA area.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] area 1

[Sysname-ospf-100-area-0.0.0.1] nssa

Related commands

default-cost

opaque-capability enable

Use opaque-capability enable to enable opaque LSA advertisement and reception.

Use undo opaque-capability to disable opaque LSA advertisement and reception.

Syntax

opaque-capability enable

undo opaque-capability

Default

The feature is enabled.

Views

OSPF view

Predefined user roles

network-admin

Usage guidelines

After the opaque LSA advertisement and reception capability is enabled, OSPF can receive and advertise Type-9, Type-10, and Type-11 opaque LSAs.

Examples

# Disable opaque LSA advertisement and reception.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] undo opaque-capability

ospf

Use ospf to enable OSPF and enter OSPF view.

Use undo ospf to disable OSPF.

Syntax

ospf [ process-id | router-id { auto-select | router-id } | vpn-instance vpn-instance-name ] *

undo ospf [ process-id ] [ router-id ]

Default

OSPF is disabled.

Views

System view

Predefined user roles

network-admin

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535.

router-id: Specifies an OSPF router ID. If you do not specify an OSPF router ID, the global router ID is used.

auto-select: Automatically obtains an OSPF router ID.

router-id: Manually specifies an OSPF router ID in dotted decimal notation. The value range is from 0.0.0.1 to 255.255.255.255.

vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the OSPF process runs on the public network.

Usage guidelines

You can enable multiple OSPF processes on a router and specify different router IDs for them.

Enable an OSPF process before performing other tasks.

If you specify the auto-select keyword, the OSPF process obtains a router ID in the following ways:

·     During the startup of the OSPF process, the primary IPv4 address of the first interface that runs the process is specified as the router ID.

·     During the reboot of the router, the primary IPv4 address of the first interface that runs the process is specified as the router ID.

·     During the restart of the OSPF process, the highest primary IPv4 address of the loopback interface that runs the process is specified as the router ID. If no loopback address is available, the highest primary IPv4 address of the interface that runs the process is used, regardless of the interface state (up or down).

If you do not specify the router-id keyword, the undo ospf command shuts down an OSPF process. If you specify the router-id keyword, the undo ospf command specifies the global router ID as the router ID. The setting takes effect after the OSPF process restarts.

Examples

# Enable OSPF process 100 and specify router ID 10.10.10.1.

<Sysname> system-view

[Sysname] ospf 100 router-id 10.10.10.1

[Sysname-ospf-100]

ospf area

Use ospf area to enable OSPF on an interface.

Use undo ospf area to disable OSPF on an interface.

Syntax

ospf process-id area area-id [ exclude-subip ]

undo ospf process-id area [ exclude-subip ]

Default

OSPF is not enabled on an interface.

Views

Interface view

Predefined user roles

network-admin

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535.

area-id: Specifies an area by its ID, an IP address or a decimal integer in the range of 0 to 4294967295 that is translated into the IP address format.

exclude-subip: Excludes secondary IP addresses. If you do not specify this keyword, the command enables OSPF also on secondary IP addresses.

Usage guidelines

The ospf area command has a higher priority than the network command.

If the specified process and area do not exist, the command creates the process and area. Disabling an OSPF process on an interface does not delete the OSPF process or the area.

Examples

# Enable OSPF process 1 on Ten-GigabitEthernet 3/0/2 that is in Area 2 and exclude secondary IP addresses.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/2

[Sysname-Ten-GigabitEthernet3/0/2] ospf 1 area 2 exclude-subip

Related commands

network

ospf authentication-mode

Use ospf authentication-mode to set the authentication mode and key on an interface.

Use undo ospf authentication-mode to remove specified configuration.

Syntax

For MD5/HMAC-MD5/HMAC-SHA-256 authentication:

ospf authentication-mode { hmac-md5 | hmac-sha-256 | md5 } key-id { cipher | plain } string

undo ospf authentication-mode { hmac-md5 | hmac-sha-256 | md5 } key-id

For simple authentication:

ospf authentication-mode simple { cipher | plain } string

undo ospf authentication-mode simple

For keychain authentication:

ospf authentication-mode keychain keychain-name

undo ospf authentication-mode keychain

Default

No authentication is performed for an interface.

Views

Interface view

Predefined user roles

network-admin

Parameters

hmac-md5: Specifies HMAC-MD5 authentication.

hmac-sha-256: Specifies HMAC-SHA-256 authentication.

md5: Specifies MD5 authentication.

simple: Specifies simple authentication.

key-id: Specifies a key by its ID in the range of 1 to 255.

cipher: Specifies a key in encrypted form.

plain: Specifies a key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the key. This argument is case sensitive.

·     In simple authentication mode, the plaintext form of the key is a string of 1 to 8 characters. The encrypted form of the key is a string of 33 to 41 characters.

·     In MD5/HMAC-MD5 authentication mode, the plaintext form of the key is a string of 1 to 16 characters. The encrypted form of the key is a string of 33 to 53 characters.

·     In HMAC-SHA-256 authentication mode, the plaintext form of the key is a string of 1 to 255 characters. The encrypted form of the key is a string of 33 to 373 characters.

keychain: Specifies keychain authentication.

keychain-name: Specifies a keychain by its name, a case-sensitive string of 1 to 63 characters.

Usage guidelines

To establish or maintain adjacencies, interfaces attached to the same network segment must have the same authentication mode and key.

If MD5, HMAC-MD5, or HMAC-SHA-256 authentication is configured, you can configure multiple keys, each having a unique key ID and key string. To minimize the risk of key compromise, use only one key for an interface and delete the old key after key replacement.

To replace the key used for MD5, HMAC-MD5, or HMAC-SHA-256 authentication on an interface, you must configure the new key before removing the old key from each router. OSPF uses the key rollover mechanism to ensure that the routers can pass authentication before the replacement is complete on the interface. After you configure a new key on a router, the router sends copies of the same packet, each authenticated by a different key, including the new key and the keys in use. This practice continues until the router detects that all its neighbors have the new key.

When keychain authentication is configured for an OSPF interface, OSPF performs the following operations before sending a packet:

1.     Obtains a valid send key from the keychain.

OSPF does not send the packet if it fails to obtain a valid send key.

2.     Uses the key ID, authentication algorithm, and key string to authenticate the packet.

If the key ID is greater than 255, OSPF does not send the packet.

When keychain authentication is configured for an OSPF interface, OSPF performs the following operations after receiving a packet:

1.     Uses the key ID carried in the packet to obtain a valid accept key from the keychain.

OSPF discards the packet if it fails to obtain a valid accept key.

2.     Uses the authentication algorithm and key string for the valid accept key to authenticate the packet.

If the authentication fails, OSPF discards the packet.

The authentication algorithm can be MD5, HMAC-MD5, HMAC-SHA-256, or HMAC-SM3 and the ID of keys used for authentication can only be in the range of 0 to 255.

For more information about keychains, see keychain commands in Security Command Reference.

Examples

# On Ten-GigabitEthernet 3/0/1, enable MD5 authentication, and set the interface key ID to 15 and the key to 123456 in plaintext form.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf authentication-mode md5 15 plain 123456

# On Ten-GigabitEthernet 3/0/1, enable simple authentication, and set the key to 123456 in plaintext form.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf authentication-mode simple plain 123456

# On Ten-GigabitEthernet 3/1/1, enable keychain authentication and use keychain abc for authentication.

<Sysname> system-view

[Sysname] keychain abc mode absolute

[Sysname-keychain-abc] key 1

[Sysname-keychain-abc-key-1] authentication-algorithm md5

[Sysname-keychain-abc-key-1] key-string plain hello12345

[Sysname-keychain-abc-key-1] send-lifetime utc 10:00:00 2023/03/02 to 11:00:00 2023/03/02

[Sysname-keychain-abc-key-1] accept-lifetime utc 10:00:00 2023/03/02 to 11:00:00 2023/03/02

[Sysname-keychain-abc-key-1] quit

[Sysname-keychain-abc] quit

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf authentication-mode keychain abc

Related commands

authentication-mode

ospf bfd adjust-cost

Use ospf bfd adjust-cost to enable OSPF to adjust the interface cost according to the BFD session state.

Use undo ospf bfd adjust-cost to restore the default.

Syntax

ospf bfd adjust-cost { cost-offset | max }

undo ospf bfd adjust-cost

Default

OSPF does not adjust the link cost according to the BFD session state.

Views

Interface view

Predefined user roles

network-admin

Parameters

cost-offset: Specifies the value to be added to the interface cost when the BFD session goes down. The value range for this argument is 1 to 65534. When the BFD session goes down, the interface cost is cost-offset plus the original interface cost, and cannot exceed 65535.

max: Sets the interface cost to the maximum value 65535 when the BFD session goes down.

Usage guidelines

After you enable BFD for OSPF, the OSPF neighbor relationship goes down when the BFD session is down and comes up when the BFD session is up. When the BFD session state changes frequently, OSPF neighbor relationship flapping will occur and traffic forwarding might be affected.

To resolve this issue, enable OSPF to adjust the interface cost according to the BFD session state.

After you execute this command on an interface, OSPF adjusts the interface cost as follows:

·     When the BFD session on the interface goes down, OSPF increases the cost value for the interface.

·     When the BFD session on the interface comes up, OSPF restores the cost value for the interface.

Examples

# Enable OSPF to adjust the cost of interface Ten-GigabitEthernet 3/0/1 according to the BFD session state, and set the value to be added to the interface cost to 100.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf bfd enable

[Sysname-Ten-GigabitEthernet3/0/1] ospf bfd adjust-cost 100

Related commands

display ospf interface

ospf bfd enable

ospf bfd adjust-cost suppress-flapping

Use ospf bfd adjust-cost suppress-flapping to suppress adjustment of the interface cost according to the BFD session state upon BFD session flapping.

Use undo ospf bfd adjust-cost suppress-flapping to restore the default.

Syntax

ospf bfd adjust-cost suppress-flapping { detect-interval detect-interval | resume-interval resume-interval | threshold threshold } *

undo ospf bfd adjust-cost suppress-flapping [ detect-interval | resume-interval | threshold ] *

Default

OSPF does not suppress adjustment of the interface cost according to the BFD session state upon BFD session flapping.

Views

Interface view

Predefined user roles

network-admin

Parameters

detect-interval detect-interval: Specifies the interval at which OSPF detects BFD session state changes, in the range of 1 to 600 seconds. The default value is 60.

resume-interval resume-interval: Specifies the delay timer before OSPF resumes the original interface cost, in the range of 0 to 600 seconds. The default value is 0.

threshold threshold: Specifies the maximum number of BFD session down events, in the range of 1 to 100. The default value is 1.

Usage guidelines

After you enable OSPF to adjust the interface cost according to the BFD session state, if BFD session flaps frequently, the following conditions might occur:

·     The OSPF interface cost changes frequently, resulting in repeated route calculations that greatly consume device resources.

·     When the BFD session state changes from down to up, OSPF immediately resumes the original interface cost. If the link becomes unavailable again in a short time, packet loss will occur on this link before route convergence.

You can configure this feature to address the previous issues. When the BFD session state changes, OSPF performs the following operations instead of immediately adjusting the interface cost:

·     When the BFD session state changes from up to down, OSPF starts a BFD session state detection timer, and records one BFD session down event. If the number of BFD session down events crosses the threshold within the detection interval, OSPF adjusts the interface cost based on configuration of the ospf bfd adjust-cost command. (The threshold is specified with the threshold keyword. The detection interval is specified with the detect-interval argument.) If this condition is not met, OSPF does not adjust the interface cost.

·     After OSPF adjusts the interface cost (based on the configuration of the ospf bfd adjust-cost command), it starts a delay timer when the BFD session state changes from down to up. Before expiration of the delay timer (specified with the resume-interval argument), the following conditions will occur:

¡     If the BFD session remains up, OSPF resumes the original interface cost when the delay timer expires.

¡     If the BFD session state changes from up to down, OSPF deletes the delay timer and does not resume the original interface cost.

Follow these restrictions and guidelines when you configure this command:

·     This command takes effect only after you configure the ospf bfd adjust-cost command.

·     You can repeat this command to edit the settings for the detect-interval, threshold, resume-interval keywords. Upon modification, the detection timer (detect-interval), delay timer (resume-interval), and threshold counter (threshold) will restart.

Examples

# Suppress adjustment of the cost for interface Ten-GigabitEthernet 3/0/1 according to the BFD session state upon BFD session flapping. Set the BFD session state detection timer to 60 seconds, threshold to 10, and delay timer to 10 seconds.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf bfd adjust-cost suppress-flapping detect-interval 60 threshold 10 resume-interval 10

Related commands

display ospf interface

ospf bfd adjust-cost

ospf bfd enable

ospf bfd enable

Use ospf bfd enable to enable BFD on an OSPF interface.

Use undo ospf bfd enable to disable BFD on an OSPF interface.

Syntax

ospf bfd enable [ echo ]

undo ospf bfd enable

Default

BFD for OSPF is disabled.

Views

Interface view

Predefined user roles

network-admin

Parameters

echo: Enables BFD single-hop echo detection. If you do not specify this keyword, the command enables BFD bidirectional control detection.

Usage guidelines

OSPF sends hello packets to neighbors at specific intervals to detect their state. If OSPF does not receive a hello packet from a neighbor within a specific period, OSPF considers the neighbor stale. Such a failure detection method cannot achieve high data reliability, because it takes a long time and causes data loss.

To resolve this issue, configure Bidirectional Forwarding Detection (BFD) for OSPF. This feature improves the route convergence speed against link state changes through fast link state detection.

Examples

# Enable BFD for OSPF on Ten-GigabitEthernet 3/0/1.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf bfd enable

ospf cost

Use ospf cost to set an OSPF cost for an interface.

Use undo ospf cost to restore the default.

Syntax

ospf cost cost-value

undo ospf cost

Default

An interface computes its OSPF cost according to the interface bandwidth. For a loopback interface, the cost is 0.

Views

Interface view

Predefined user roles

network-admin

Parameters

cost-value: Specifies an OSPF cost in the range of 0 to 65535 for a loopback interface, and in the range of 1 to 65535 for other interfaces.

Usage guidelines

If you do not execute this command, the interface automatically computes its OSPF cost.

Examples

# Set the OSPF cost on Ten-GigabitEthernet 3/0/1 to 65.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf cost 65

Related commands

bandwidth-reference

ospf cost-fallback

Use ospf cost-fallback to change the link cost of a Layer 3 aggregate interface when its bandwidth falls below the threshold.

Use undo ospf cost-fallback to remove the configuration.

Syntax

ospf cost-fallback cost-value threshold bandwidth-value

undo ospf cost-fallback

Default

A Layer 3 aggregate interface uses the original link cost.

Views

Layer 3 aggregate interface view

Layer 3 aggregate subinterface view

Predefined user roles

network-admin

Parameters

cost-value: Specifies a link cost in the range of 1 to 65535. As a best practice, set the link cost to a value higher than the original link cost of the interface.

threshold bandwidth-value: Specifies the bandwidth threshold in the range of 1 to 4294967295 Mbps.

Usage guidelines

When a member port of a Layer 3 aggregate interface goes down, the bandwidth of the aggregate interface decreases and services might be interrupted. To resolve this issue, execute this command to change the link cost of a Layer 3 aggregate interface as follows:

·     When the bandwidth of the Layer 3 aggregate interface falls below the bandwidth threshold, the aggregate interface uses the specified link cost. Then, OSPF can select an optimal path for traffic forwarding.

·     When the bandwidth of the Layer 3 aggregate interface is equal to or larger than the bandwidth threshold, the aggregate interface uses the original link cost.

Examples

# Change the link cost of interface Route-Aggregation 1 to 100 when its bandwidth falls below 300 Mbps.

<Sysname> system-view

[Sysname] interface Route-Aggregation 1

[Sysname-Route-Aggregation1] ospf cost-fallback 100 threshold 300

Related commands

display ospf interface

ospf database-filter

Use ospf database-filter to filter outbound LSAs on an interface.

Use undo ospf database-filter to restore the default.

Syntax

ospf database-filter { all | { ase [ acl ipv4-acl-number ] | nssa [ acl ipv4-acl-number ] | summary [ acl ipv4-acl-number ] } * }

undo ospf database-filter

Default

The outbound LSAs are not filtered on the interface.

Views

Interface view

Predefined user roles

network-admin

Parameters

all: Filters all outbound LSAs except the Grace LSAs.

ase: Filters outbound Type-5 LSAs.

nssa: Filters outbound Type-7 LSAs.

summary: Filters outbound Type-3 LSAs.

acl ipv4-acl-number: Specifies an IPv4 ACL by its number in the range of 2000 to 3999.

Usage guidelines

When you specify an ACL, follow these guidelines:

·     If the ACL does not exist or does not have any rules, OSPF does not filter outbound LSAs.

·     If a rule in the ACL is applied to a VPN instance, the rule will deny all outbound LSAs.

To use an advanced ACL (with a number from 3000 to 3999) in the command, configure the ACL using one of the following methods:

·     To deny or permit LSAs with the specified link state ID, use the rule [ rule-id ] { deny | permit } ip source sour-addr sour-wildcard command.

·     To deny or permit LSAs with the specified link state ID and mask, use the rule [ rule-id ] { deny | permit } ip source sour-addr sour-wildcard destination dest-addr dest-wildcard command.

The source keyword specifies the link state ID of an LSA and the destination keyword specifies the subnet mask of the LSA. For the mask configuration to take effect, specify a contiguous subnet mask.

If the neighbor has already received an LSA to be filtered, the LSA still exists in the LSDB of the neighbor after you execute the command.

Examples

# Filter all outbound LSAs (except the Grace LSAs) on Ten-GigabitEthernet 3/0/1.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf database-filter all

# On Ten-GigabitEthernet 3/0/2, configure ACL 2000, 2100, and 2200 to filter outbound Type-5, Type-7, and Type-3 LSAs, respectively.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/2

[Sysname-Ten-GigabitEthernet3/0/2] ospf database-filter ase acl 2000 nssa acl 2100 summary acl 2200

Related commands

database-filter peer

ospf dr-priority

Use ospf dr-priority to set the router priority for DR/BDR election on an interface.

Use undo ospf dr-priority to restore the default value.

Syntax

ospf dr-priority priority

undo ospf dr-priority

Default

The router priority is 1.

Views

Interface view

Predefined user roles

network-admin

Parameters

priority: Specifies the router priority for the interface, in the range of 0 to 255.

Usage guidelines

The greater the value, the higher the priority for DR/BDR election. If a device has a priority of 0, it will not be elected as a DR or BDR.

Examples

# Set the router priority on Ten-GigabitEthernet 3/0/1 to 8.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf dr-priority 8

ospf fast-reroute lfa-backup

Use ospf fast-reroute lfa-backup to enable LFA on an interface.

Use undo ospf fast-reroute lfa-backup to disable LFA on an interface.

Syntax

ospf fast-reroute lfa-backup

undo ospf fast-reroute lfa-backup

Default

LFA is enabled on an interface.

Views

Interface view

Predefined user roles

network-admin

Usage guidelines

An interface enabled with LFA can be selected as a backup interface. After you disable LFA on the interface, it cannot be selected as a backup interface.

Examples

# Disable Ten-GigabitEthernet 3/0/1 from calculating a backup next hop by using the LFA algorithm.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] undo ospf fast-reroute lfa-backup

ospf fast-reroute remote-lfa disable

Use ospf fast-reroute remote-lfa disable to disable remote LFA calculation on an interface.

Use undo ospf fast-reroute remote-lfa disable to enable remote LFA calculation on an interface.

Syntax

ospf fast-reroute remote-lfa disable

undo ospf fast-reroute remote-lfa disable

Default

Remote LFA calculation is enabled on an interface.

Views

Interface view

Predefined user roles

network-admin

Usage guidelines

Use this command to disable remote LFA calculation on an interface to prevent it from participating in the calculation.

Examples

# Disable remote LFA calculation on interface Ten-GigabitEthernet 3/0/1.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf 1 area 0

[Sysname-Ten-GigabitEthernet3/0/1] ospf fast-reroute remote-lfa disable

ospf link-delay

Use ospf link-delay to configure link delay settings on an OSPF interface.

Use undo ospf link-delay to remove link delay settings on an OSPF interface.

Syntax

ospf link-delay { average average-delay-value | min min-delay-value max max-delay-value | variation variation-value } *

undo ospf link-delay [ average | min | variation ]

Default

No link delay settings are configured on an OSPF interface.

Views

Interface view

Predefined user roles

network-admin

Parameters

average average-delay-value: Specifies the average link delay on an interface in the range of 1 to 16777215 microseconds. The average-delay-value parameter represents the average link delay for the interface to send a packet to its directly-connected peer. If you do not specify this option, the delay value is the average link delay reported by the interface.

min min-delay-value max max-delay-value: Specifies the minimum and maximum link delays on an interface in the range of 1 to 16777215 microseconds. The min-delay-value parameter represents the minimum link delay for the interface to send a packet to its directly-connected peer. The max-delay-value parameter represents the maximum link delay for the interface to send a packet to its directly-connected peer. If you do not specify this option, the minimum and maximum link delays reported by the interface will be used.

variation variation-value: Sets the acceptable delay variation on an interface in the range of 1 to 16777215 microseconds. The variation-value parameter represents the difference between two consecutive average link delays. If you do not specify this option, the delay variation value is the variation reported by the interface.

Usage guidelines

Perform either of the following tasks to obtain link delay information of an interface:

·     Static configuration—Execute the ospf link-delay command to manually configure link delay parameters on the interface.

·     Dynamic acquisition—Execute the test-session bind interface command to bind the interface as the out interface of a TWAMP Light test session. Then, TWAMP Light will send the detected link delay information to the interface, and the interface will report the link delay information to OSPF at periodic intervals. For more information about TWAMP, see NQA TWAMP-light configuration in Network Management and Monitoring Configuration Guide.

For an instance, the ospf link-delay command takes precedence over the test-session bind interface command.

The specified minimum link delay must be lower than the maximum link delay.

Examples

# Set the average link delay, minimum link delay, maximum link delay, and acceptable link delay variation to 100, 10, 1000, and 20 microseconds, respectively.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf link-delay average 100 min 10 max 1000 variation 20

Related commands

test-session bind interface (Network Management and Monitoring Command Reference)

ospf link-quality adjust-cost

Use ospf link-quality adjust-cost to enable OSPF to adjust the interface cost according to the link quality.

Use undo ospf link-quality adjust-cost to restore the default.

Syntax

ospf link-quality adjust-cost { cost-offset | max }

undo ospf link-quality adjust-cost

Default

OSPF does not adjust the interface cost according to the link quality.

Views

Interface view

Predefined user roles

network-admin

Parameters

cost-offset: Specifies the value to be added to the interface cost when the link quality changes to LOW. The value range for this argument is 1 to 65534. When the link quality changes to LOW, the interface cost is cost-offset plus the original interface cost, and cannot exceed 65535.

max: Sets the interface cost to the maximum value 65535 when the link quality changes to LOW.

Usage guidelines

Error codes, which refer to bit differences between the received and source signals, cannot be avoided because of inevitable link aging and optical path jitter problems. A high error code ratio might cause service degradation or interruption.

To reduce the impact of error codes on an OSPF network, you can enable OSPF to adjust the interface cost according to the link quality.

After you configure this command on an interface, OSPF adjusts the interface cost as follows:

·     When the link quality of the interface becomes LOW, OSPF increases the cost value for the interface.

·     When the link quality of the interface restores to GOOD, OSPF restores the cost value for the interface.

Examples

# Enable OSPF to adjust the cost of interface Ten-GigabitEthernet 3/0/1 according to the link quality, and set the value to be added to the interface cost to 200.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf link-quality adjust-cost 200

ospf mib-binding

Use ospf mib-binding to bind an OSPF process to MIB.

Use undo ospf mib-binding to restore the default.

Syntax

ospf mib-binding process-id

undo ospf mib-binding

Default

MIB is bound to the OSPF process with the smallest process ID.

Views

System view

Predefined user roles

network-admin

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535.

Usage guidelines

To access information or data about an OSPF process in RFC4750-OSPF.MIB, use this command. To access information or data about an OSPF process in a Comware MIB for the device, you do not need to use this command. You can access information or data about all OSPF processes in the Comware MIBs.

If the specified process ID does not exist, a notification is displayed to report that the MIB binding configuration has failed.

Deleting an OSPF process that has been bound to MIB unbinds the OSPF process from MIB, and re-binds MIB to the OSPF process with the smallest process ID.

Examples

# Bind OSPF process 100 to MIB.

<Sysname> system-view

[Sysname] ospf mib-binding 100

ospf mtu-enable

Use ospf mtu-enable to enable an interface to add the interface MTU into DD packets.

Use undo ospf mtu-enable to restore the default.

Syntax

ospf mtu-enable

undo ospf mtu-enable

Default

The MTU in DD packets is 0.

Views

Interface view

Predefined user roles

network-admin

Usage guidelines

After a virtual link is established through a Virtual-Template or Tunnel, two devices on the link from different vendors might have different MTU values. To make them consistent, restore the interfaces' MTU to the default value 0.

After you configure this command, the interface checks whether the MTU in a received DD packet is greater than its own MTU. If yes, the interface discards the packet.

Examples

# Enable Ten-GigabitEthernet 3/0/1 to add the interface MTU value into DD packets.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf mtu-enable

ospf network-type

Use ospf network-type to specify the network type for an interface.

Use undo ospf network-type to restore the default.

Syntax

ospf network-type { broadcast | nbma | p2mp [ unicast ] | p2p [ multicast | peer-address-check ] * }

undo ospf network-type

Default

By default, the network type of an interface depends on its link layer protocol:

·     For Ethernet and FDDI, the network type is broadcast.

·     For PPP, LAPB, HDLC, and POS, the network type is P2P.

Views

Interface view

Predefined user roles

network-admin

Parameters

broadcast: Specifies the network type as broadcast.

nbma: Specifies the network type as NBMA.

p2mp: Specifies the network type as P2MP.

unicast: Specifies the P2MP interface to unicast OSPF packets. By default, a P2MP interface multicasts OSPF packets.

p2p: Specifies the network type as P2P.

multicast: Enables the P2P interface to multicast OSPF packets. If you do not specify this keyword, the P2P interface unicasts DD packets and multicasts other packets.

peer-address-check: Checks whether the peer interface and the local interface are on the same network segment. Two P2P interfaces can establish a neighbor relationship only when they are on the same network segment.

Usage guidelines

If a router on a broadcast network does not support multicast, configure the network type for the connected interfaces as NBMA.

If any two routers on an NBMA network are directly connected through a virtual link, the network is fully meshed. You can configure the network type for the connected interfaces as NBMA. If two routers are not directly connected, configure the P2MP network type so that the two routers can exchange routing information through another router.

When the network type of an interface is NBMA or P2MP unicast, you must use the peer command to specify the neighbor.

If only two routers run OSPF on a network, you can configure the network type for the connected interfaces as P2P.

When the network type of an interface is P2MP unicast, all OSPF packets are unicast by the interface.

Examples

# Specify the OSPF network type for Ten-GigabitEthernet 3/0/1 as NBMA.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf network-type nbma

Related commands

ospf dr-priority

ospf packet-size

Use ospf packet-size to set the maximum length of OSPF packets that can be sent by an interface.

Use undo ospf packet-size to restore the default.

Syntax

ospf packet-size value

undo ospf packet-size

Default

The maximum length of OSPF packets that an interface can send equals the interface's MTU.

Views

Interface view

Predefined user roles

network-admin

Parameters

value: Specifies the maximum length of OSPF packets that can be sent by an interface, in the range of 500 to 10000 bytes.

Usage guidelines

The interface chooses the smaller one between the value set in this command and the interface MTU, and uses it as the maximum length of OSPF packets that can be sent.

When you establish OSPF neighbors over a tunnel, you can use this command to prevent OSPF packet fragmentation on the outgoing tunnel interface. Make sure the maximum length of OSPF packets plus the encapsulated header length is no greater than the outgoing tunnel interface's MTU. For more information about tunnels, see Layer 3—IP Services Configuration Guide.

Examples

# Set the maximum length of OSPF packets that can be sent by Ten-GigabitEthernet 3/0/1.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf packet-size 1000

ospf peer hold-max-cost duration

Use ospf peer hold-max-cost duration to enable OSPF to advertise the maximum link cost to neighbors within the specified period of time.

Use undo ospf peer hold-max-cost duration to restore the default.

Syntax

ospf peer hold-max-cost duration time

undo ospf peer hold-max-cost duration

Default

OSPF advertises the original link cost to neighbors during a route convergence.

Views

Interface view

Predefined user roles

network-admin

Parameters

time: Specifies the time period during which OSPF advertises the maximum link cost to neighbors, in the range of 100 to 1000000 milliseconds.

Usage guidelines

On an OSPF network, when a link recovers from failures or the state of an interface changes, OSPF will re-establish neighbor relationships and perform route convergence. During the route convergence process, routing loops and traffic loss might occur because the convergence speeds of the nodes are different. To address this issue, enable OSPF to advertise the maximum link cost (65535) to neighbors within the specified period of time, so the traffic forwarding path remains unchanged. After the specified period of time, OSPF advertises the original link cost to neighbors and performs optimal route selection again.

The timer specified by the time  argument starts when the OSPF neighbor enters Full state.

Examples

# On interface Ten-GigabitEthernet3/0/1, enable OSPF to advertise the maximum link cost to neighbors within 1000 milliseconds.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf peer hold-max-cost duration 1000

Related commands

display ospf interface verbose

ospf peer suppress-flapping

Use ospf peer suppress-flapping to configure detection parameters for OSPF neighbor flapping suppression.

Use undo ospf peer suppress-flapping to remove the configuration.

Syntax

ospf peer suppress-flapping { detect-interval detect-interval | threshold threshold | resume-interval resume-interval } *

undo ospf peer suppress-flapping { detect-interval | threshold | resume-interval } *

Default

The detect interval is 60 seconds, the threshold value is 10, and the resume interval is 120 seconds.

Views

Interface view

Predefined user roles

network-admin

Parameters

detect-interval detect-interval: Specifies the interval to detect OSPF neighbor flapping events, in the range of 1 to 300 seconds. The default value is 60. If the time interval between two consecutive neighbor state changes (from Full to another state) is less than the specified detect interval, a neighbor flapping event has occurred.

threshold threshold: Specifies the threshold value that triggers neighbor flapping suppression, in the range of 1 to 1000. The default value is 10.

resume-interval resume-interval: Specifies the resume interval of neighbor flapping suppression, in the range of 2 to 1000 seconds. The default value is 120.

Usage guidelines

Before executing this command, make sure OSPF neighbor flapping suppression is enabled by using the suppress-flapping hold-down or ospf peer suppress-flapping hold-max-cost command.

The OSPF neighbor flapping suppression mechanism is as follows:

·     The interface starts a flapping counter to count neighbor flapping events. When the device detects a neighbor flapping event, it increases the flapping counter by 1.

A neighbor flapping event occurs when the time interval between two consecutive neighbor state changes (from Full to another state) is less than the specified detect interval.

·     If the time interval between two consecutive neighbor state changes (from Full to another state) is greater than the specified resume interval, the flapping counter is reset.

·     If the flapping counter reaches or exceeds the specified threshold, OSPF starts flapping suppression for all neighbors on the interface.

·     During the flapping suppression period, if the device detects another neighbor flapping event, it resets the resume interval.

The resume interval value must be greater than the detect interval value.

The resume interval specifies the suppression period during which the maximum cost is used for neighbor flapping suppression enabled by using the ospf peer suppress-flapping hold-max-cost command.

Examples

# Set the detect interval, threshold, and resume interval values to 5, 40, and 20 for OSPF neighbor flapping suppression on Ten-GigabitEthernet 3/0/1.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf peer suppress-flapping detect-interval 5 threshold 40 resume-interval 20

Related commands

display ospf interface verbose

display ospf

ospf peer suppress-flapping hold-down

ospf peer suppress-flapping hold-max-cost

ospf peer suppress-flapping hold-down

Use ospf peer suppress-flapping hold-down to enable OSPF neighbor flapping suppression and set the suppression timer.

Use undo ospf peer suppress-flapping to disable OSPF neighbor flapping suppression.

Syntax

ospf peer suppress-flapping hold-down interval

undo ospf peer suppress-flapping hold-down

Default

OSPF neighbor flapping suppression is disabled.

Views

Interface view

Predefined user roles

network-admin

Parameters

interval: Specifies the neighbor flapping suppression timer in the range of 1 to 600 seconds. OSPF can establish neighbor relationships only when the suppression timer expires.

Usage guidelines

Neighbor state changes will cause neighbor relationship reestablishment, LSDB synchronization, and route calculation. A large number of packets will be exchanged, which affects stability of existing neighbors and operation of OSPF and relevant services. To resolve this issue, enable OSPF neighbor flapping suppression to delay neighbor relationship establishment or traffic forwarding through neighbor links.

Use this command to avoid frequent flooding and topology changes during neighbor relationship establishment. Before the specified neighbor flapping suppression timer expires, OSPF does not establish neighbor relationships.

If you execute both the suppress-flapping hold-down and ospf peer suppress-flapping hold-max-cost commands for an interface, the suppress-flapping hold-down command applies first. When neighbor suppression starts, OSPF performs the following operations in sequence:

1.     Disables neighbor relationship establishment until the specified suppression timer expires.

2.     Allows neighbor relationship establishment and sets the maximum cost for neighbor links until the specified resume interval expires.

3.     Resumes the original link cost when the specified resume interval expires.

Neighbor flapping suppression applies to all neighbors attached to the interface.

Examples

# Enable OSPF neighbor flapping suppression and set the suppression timer to 200 seconds on Ten-GigabitEthernet 3/0/1.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf peer suppress-flapping hold-down 200

Related commands

display ospf interface verbose

display ospf

ospf peer suppress-flapping hold-max-cost

Use ospf peer suppress-flapping hold-max-cost to enable OSPF neighbor flapping suppression and set the maximum cost for flapping links.

Use undo ospf peer suppress-flapping hold-max-cost to disable OSPF neighbor flapping suppression.

Syntax

ospf peer suppress-flapping hold-max-cost

undo ospf peer suppress-flapping hold-max-cost

Default

OSPF neighbor flapping suppression is disabled.

Views

Interface view

Predefined user roles

network-admin

Usage guidelines

Frequent neighbor state changes will cause neighbor relationship reestablishment, LSDB synchronization, and route calculation. A large number of packets will be exchanged, which affects stability of existing neighbors and operation of OSPF and relevant services. To resolve this issue, enable OSPF neighbor flapping suppression to delay neighbor relationship establishment or traffic forwarding through neighbor links.

After you execute this command, OSPF sets the cost of all neighbor links to the maximum value 65535 within the neighbor flapping suppression period (resume interval). When the resume interval expires, OSPF resumes the original link cost.

If you execute both the suppress-flapping hold-down and ospf peer suppress-flapping hold-max-cost commands for an interface, the suppress-flapping hold-down command applies first. When neighbor suppression starts, OSPF performs the following operations in sequence:

1.     Disables neighbor relationship establishment until the specified suppression timer expires.

2.     Allows neighbor relationship establishment and sets the maximum cost for neighbor links until the specified resume interval expires.

3.     Resumes the original link cost when the specified resume interval expires.

Neighbor flapping suppression applies to all neighbors attached to the interface.

Examples

# Enable OSPF neighbor flapping suppression and set the maximum cost for neighbor links on Ten-GigabitEthernet 3/0/1.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf peer suppress-flapping hold-max-cost

Related commands

display ospf interface verbose

display ospf

ospf prefix-suppression

Use ospf prefix-suppression to disable an OSPF interface from advertising all its IP prefixes, except for the prefixes of secondary IP addresses.

Use undo ospf prefix-suppression to restore the default.

Syntax

ospf prefix-suppression [ disable ]

undo ospf prefix-suppression

Default

Prefix suppression is disabled.

Views

Interface view

Predefined user roles

network-admin

Parameters

disable: Disables prefix suppression for an interface.

Usage guidelines

To disable prefix suppression for an interface associated with an OSPF process that has been enabled with prefix suppression, use the ospf prefix-suppression disable command on that interface.

Examples

# Enable prefix suppression for Ten-GigabitEthernet 3/0/2.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/2

[Sysname-Ten-GigabitEthernet3/0/2] ospf prefix-suppression

Related commands

prefix-suppression

ospf primary-path-detect bfd

Use ospf primary-path-detect bfd to enable BFD for OSPF FRR or OSPF PIC.

Use undo ospf primary-path-detect bfd to disable BFD for OSPF FRR or OSPF PIC.

Syntax

ospf primary-path-detect bfd { ctrl | echo }

undo ospf primary-path-detect bfd

Default

BFD is disabled for OSPF FRR or OSPF PIC.

Views

Interface view

Predefined user roles

network-admin

Parameters

ctrl: Enables BFD control packet mode.

echo: Enables BFD echo packet mode.

Usage guidelines

This command enables OSPF PIC or OSPF FRR to use BFD to detect primary link failures.

Examples

# On Ten-GigabitEthernet 3/0/1, enable BFD control packet mode for OSPF FRR.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] fast-reroute lfa

[Sysname-ospf-1] quit

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf primary-path-detect bfd ctrl

# On Ten-GigabitEthernet 3/0/2, enable BFD echo packet mode for OSPF PIC.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] pic additional-path-always

[Sysname-ospf-1] quit

[Sysname] bfd echo-source-ip 1.1.1.1

[Sysname] interface ten-gigabitethernet 3/0/2

[Sysname-Ten-GigabitEthernet3/0/2] ospf primary-path-detect bfd echo

ospf silent

Use ospf silent to disable the interface from receiving and sending OSPF packets.

Use undo ospf silent to restore the default.

Syntax

ospf silent

undo ospf silent

Default

The interface can receive and send OSPF packets.

Views

Interface view

Predefined user roles

network-admin

Usage guidelines

Use this command to achieve the following purposes:

·     Disable the local device from receiving route updates advertised by other devices in the network through the interface.

·     Disable the local device from advertising route updates to other devices in the network through the interface.

After you configure this command, the OSPF interface performs the following operations:

·     Sends a one-way hello packet to its neighbor. The neighbor terminates the neighbor relationship with the sending interface upon receiving the one-way hello packet.

·     No longer establishes neighbor relationship.

You can execute either the silent-interface or ospf silent command or both commands for an interface to achieve the same effect. Choose an appropriate configuration method as needed.

Examples

# Disable Ten-GigabitEthernet 3/0/1 from receiving and sending OSPF packets.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf silent

Related commands

silent-interface

ospf timer dead

Use ospf timer dead to set the neighbor dead interval.

Use undo ospf timer dead to restore the default.

Syntax

ospf timer dead seconds

undo ospf timer dead

Default

The dead interval is 40 seconds for broadcast and P2P interfaces. The dead interval is 120 seconds for P2MP and NBMA interfaces.

Views

Interface view

Predefined user roles

network-admin

Parameters

seconds: Specifies the dead interval in the range of 1 to 2147483647 seconds.

Usage guidelines

If an interface receives no hello packet from a neighbor within the dead interval, the interface considers the neighbor down. The dead interval on an interface is a minimum of four times longer than the hello interval. Devices attached to the same network segment must have the same dead interval.

By default, the neighbor dead interval is four times longer than the hello interval. If you specify a hello interval and do not specify a dead interval, the default dead interval is four times longer than the specified hello interval. To specify a hello interval, use the ospf timer hello command.

When you use the ospf timer dead command on an interface, following these guidelines:

·     The specified neighbor dead interval can be issued to and can take effect on the interface only when it is not shorter than the hello interval.

·     To avoid neighbor flapping, do not set a short dead interval.

Examples

# Set the dead interval for Ten-GigabitEthernet 3/0/1 to 60 seconds.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf timer dead 60

Related commands

ospf timer hello

ospf timer hello

Use ospf timer hello to set the hello interval on an interface.

Use undo ospf timer hello to restore the default.

Syntax

ospf timer hello seconds

undo ospf timer hello

Default

The hello interval is 10 seconds for P2P and broadcast interfaces, and is 30 seconds for P2MP and NBMA interfaces.

Views

Interface view

Predefined user roles

network-admin

Parameters

seconds: Specifies the hello interval in the range of 1 to 65535 seconds.

Usage guidelines

The shorter the hello interval, the faster the topology converges, and the more resources are consumed. Make sure the hello interval on two neighboring interfaces is the same.

Examples

# Set the hello interval on Ten-GigabitEthernet 3/0/1 to 20 seconds.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf timer hello 20

Related commands

ospf timer dead

ospf timer poll

Use ospf timer poll to set the poll interval on an NBMA interface.

Use undo ospf timer poll to restore the default.

Syntax

ospf timer poll seconds

undo ospf timer poll

Default

The poll interval is 120 seconds on an interface.

Views

Interface view

Predefined user roles

network-admin

Parameters

seconds: Specifies the poll interval in the range of 1 to 2147483647 seconds.

Usage guidelines

When an NBMA interface finds its neighbor is down, it sends hello packets at the poll interval.

The poll interval must be a minimum of four times the hello interval.

Examples

# Set the poll timer interval on Ten-GigabitEthernet 3/0/1 to 130 seconds.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf timer poll 130

Related commands

ospf timer hello

ospf timer retransmit

Use ospf timer retransmit to set the LSA retransmission interval on an interface.

Use undo ospf timer retransmit to restore the default.

Syntax

ospf timer retransmit seconds

undo ospf timer retransmit

Default

The LSA retransmission interval is 5 seconds on an interface.

Views

Interface view

Predefined user roles

network-admin

Parameters

seconds: Specifies the LSA retransmission interval in the range of 1 to 3600 seconds.

Usage guidelines

After sending an LSA, an interface waits for an acknowledgment packet. If the interface receives no acknowledgment within the retransmission interval, it retransmits the LSA.

To avoid unnecessary retransmissions, set an appropriate retransmission interval. For example, you can set a large retransmission interval value on a low-speed link.

Examples

# Set the LSA retransmission interval to 8 seconds on Ten-GigabitEthernet 3/0/1.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf timer retransmit 8

ospf trans-delay

Use ospf trans-delay to set the LSA transmission delay on an interface.

Use undo ospf trans-delay to restore the default.

Syntax

ospf trans-delay seconds

undo ospf trans-delay

Default

The LSA transmission delay is 1 second.

Views

Interface view

Predefined user roles

network-admin

Parameters

seconds: Specifies the LSA transmission delay in the range of 1 to 3600 seconds.

Usage guidelines

Each LSA in the LSDB has an age that increases by 1 every second, but the age does not change during transmission. Adding a transmission delay into the age time is important in low speed networks.

Examples

# Set the LSA transmission delay to 3 seconds on Ten-GigabitEthernet 3/0/1.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf trans-delay 3

ospf troubleshooting max-number

Use ospf troubleshooting max-number to set the maximum number of OSPF neighbor relationship troubleshooting entries.

Use undo ospf troubleshooting max-number to restore the default.

Syntax

ospf troubleshooting max-number number

undo ospf troubleshooting max-number

Default

The maximum number of OSPF neighbor relationship troubleshooting entries is 100.

Views

System view

Predefined user roles

network-admin

Parameters

number: Specifies the maximum number of OSPF neighbor relationship troubleshooting entries, in the range of 0 to 65535. The value 0 means OSPF does not record neighbor relationship troubleshooting entries.

Examples

# Set the maximum number of OSPF neighbor relationship troubleshooting entries to 50.

<Sysname> system-view

[Sysname] ospf troubleshooting max-number 50

ospf ttl-security

Use ospf ttl-security to enable OSPF GTSM for an interface.

Use ospf ttl-security disable to disable OSPF GTSM for an interface.

Use undo ospf ttl-security to restore the default.

Syntax

ospf ttl-security [ hops hop-count | disable ]

undo ospf ttl-security

Default

An interface uses the GTSM configuration of the area to which the interface belongs.

Views

Interface view

Predefined user roles

network-admin

Parameters

hops hop-count: Specifies the hop limit for checking OSPF packets, in the range of 1 to 254. The default hop limit is 1 for packets from common neighbors, and is 255 for packets from virtual link neighbors.

disable: Disables OSPF GTSM for the interface.

Usage guidelines

GTSM checks OSPF packets from common neighbors and virtual link neighbors.

GTSM protects the device by comparing the TTL value in the IP header of incoming OSPF packets against a valid TTL range. If the TTL value is within the valid TTL range, the packet is accepted. If not, the packet is discarded.

The valid TTL range is from 255 – the configured hop count + 1 to 255.

When GTSM is configured, the OSPF packets sent by the device have a TTL of 255. To use GTSM, you must configure GTSM on both the local and peer devices. You can specify different hop-count values for them.

The GTSM configuration in OSPF area view applies to all OSPF interfaces in the area. The GTSM configuration in interface view takes precedence over the configuration in OSPF area view.

If a virtual link exists in an area, you can enable GTSM for the interfaces on the virtual link. If you do not know the interfaces on the virtual link, enable GTSM in area view to prevent packet loss.

Editing the hop limit will clear GTSM dropped packet statistics from the interface.

Examples

# Enable OSPF GTSM for Ten-GigabitEthernet 3/0/1 and set the hop limit to 254.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf ttl-security hops 254

# Enable GTSM in OSPF area view and disable OSPF GTSM for Ten-GigabitEthernet 3/0/1.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] area 1

[Sysname-ospf-100-area-0.0.0.1] ttl-security

[Sysname-ospf-100-area-0.0.0.1] quit

[Sysname-ospf-100] quit

[Sysname] interface ten-gigabitethernet 3/0/1

[Sysname-Ten-GigabitEthernet3/0/1] ospf ttl-security disable

Related commands

ttl-security

peer

Use peer to specify a neighbor in an NBMA or P2MP network.

Use undo peer to remove a neighbor in an NBMA or P2MP network.

Syntax

peer ip-address [ cost cost-value | dr-priority priority ]

undo peer ip-address

Default

No neighbor is specified.

Views

OSPF view

Predefined user roles

network-admin

Parameters

ip-address: Specifies a neighbor by its IP address.

cost cost-value: Specifies the cost to reach the neighbor, in the range of 1 to 65535.

dr-priority priority: Specifies the DR priority for the neighbor, in the range of 0 to 255. The default neighbor DR priority is 1.

Usage guidelines

On an NBMA or P2MP network, OSPF packets are sent in unicast, so you must use this command to specify neighbors.

The cost set with the peer command applies only to P2MP neighbors. If no cost is specified, the cost to the neighbor equals the local interface's cost.

A router uses the priority set with the peer command to determine whether to send a hello packet to the neighbor rather than for DR election. The DR priority set with the ospf dr-priority command is used for DR election.

Examples

# Specify the neighbor 1.1.1.1.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] peer 1.1.1.1

Related commands

ospf dr-priority

pic

Use pic to enable OSPF PIC.

Use undo pic to disable OSPF PIC.

Syntax

pic [ additional-path-always ]

undo pic

Default

OSPF PIC is disabled.

Views

OSPF view

Predefined user roles

network-admin

Parameters

additional-path-always: Allows the indirect suboptimal route as the backup route.

Usage guidelines

Prefix Independent Convergence (PIC) enables the device to speed up network convergence by ignoring the number of prefixes. PIC applies only to inter-area routes and external routes.

When both OSPF PIC and OSPF FRR are configured, OSPF FRR takes effect.

Examples

# Configure OSPF PIC to support the suboptimal route as the backup route.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] pic additional-path-always

preference

Use preference to set a preference for OSPF.

Use undo preference to remove the configuration.

Syntax

preference [ ase ] { preference | route-policy route-policy-name } *

undo preference [ ase ]

Default

The preference is 10 for OSPF internal routes and 150 for OSPF external routes (ASE routes).

Views

OSPF view

Predefined user roles

network-admin

Parameters

ase: Specifies a preference for OSPF external routes. If you do not specify this keyword, the command sets a preference for OSPF internal routes.

preference: Specifies the preference value in the range of 1 to 255. A smaller value represents a higher preference.

route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters, to set a preference for the specified routes.

Usage guidelines

If multiple routing protocols find routes to the same destination, the router uses the route found by the protocol with the highest preference.

When the route-policy route-policy-name option is specified, the following preferences take effect:

·     For routes matching the routing policy, the preference set in the routing policy takes effect.

·     For other routes, the preference set with the preference command takes effect.

Examples

# Set a preference of 200 for OSPF external routes.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] preference ase 200

# Set a preference of 100 for OSPF internal routes matching the specified routing policy, and set a preference of 150 for other routes.

<Sysname> system-view

[Sysname] ip prefix-list test index 10 permit 100.1.1.0 24

[Sysname] route-policy pre permit node 10

[Sysname-route-policy-pre-10] if-match ip address prefix-list test

[Sysname-route-policy-pre-10] apply preference 100

[Sysname-route-policy-pre-10] quit

[Sysname] ospf 100

[Sysname-ospf-100] preference route-policy pre 150

prefix-priority

Use prefix-priority to enable prefix prioritization.

Use undo prefix-priority to disable prefix prioritization.

Syntax

prefix-priority route-policy route-policy-name

undo prefix-priority

Default

Prefix prioritization is disabled.

Views

OSPF view

Predefined user roles

network-admin

Parameters

route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters, to set a priority for the specified route prefixes.

Usage guidelines

OSPF calculates intra-area routes, inter-area routes, and AS external routes in descending convergence priority order: critical, high, medium, and low. When a route has multiple prefix priorities, it uses the highest priority.

To prioritize the convergence of specific routes, use the prefix prioritization feature to set a higher convergence priority value for those routes.

Examples

# Use a routing policy to assign the medium priority to the specified route prefixes.

<Sysname> system-view

[Sysname] ip prefix-list test index 10 permit 100.1.1.0 24

[Sysname] route-policy pre permit node 10

[Sysname-route-policy-pre-10] if-match ip address prefix-list test

[Sysname-route-policy-pre-10] apply prefix-priority medium

[Sysname-route-policy-pre-10] quit

[Sysname] ospf 100

[Sysname-ospf-100] prefix-priority route-policy pre

prefix-suppression

Use prefix-suppression to disable an OSPF process from advertising all IP prefixes except for the prefixes of loopback interfaces, secondary IP addresses, and passive interfaces.

Use undo prefix-suppression to restore the default.

Syntax

prefix-suppression

undo prefix-suppression

Default

An OSPF process advertises all prefixes.

Views

OSPF view

Predefined user roles

network-admin

Usage guidelines

By default, an OSPF interface advertises all of its prefixes in LSAs. To speed up OSPF convergence, you can suppress interfaces from advertising all their prefixes. This feature helps improve network security by preventing IP routing to the suppressed networks.

As a best practice, configure prefix suppression on all OSPF routers if you want to use prefix suppression.

To disable an OSPF process from advertising the prefixes of loopback and passive interfaces, configure prefix suppression on the interfaces by using the ospf prefix-suppression command.

When prefix suppression is enabled:

·     On P2P and P2MP networks, OSPF does not advertise Type-3 links in Type-1 LSAs. Other routing information can still be advertised to ensure traffic forwarding.

·     On broadcast and NBMA networks, the DR generates Type-2 LSAs with a mask length of 32 to suppress network routes. Other routing information can still be advertised to ensure traffic forwarding. If no neighbors exist, the DR also does not advertise the primary IP addresses of interfaces in Type-1 LSAs.

Examples

# Enable prefix suppression for OSPF process 1.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] prefix-suppression

Related commands

ospf prefix-suppression

reset ospf event-log

Use reset ospf event-log to clear OSPF log information.

Syntax

reset ospf [ process-id ] event-log [ lsa-flush | lsa-history | peer [ slot slot-number ] | route | spf ]

Views

User view

Predefined user roles

network-admin

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify this argument, the command clears OSPF log information for all OSPF processes.

lsa-flush: Clears LSA aging log information.

lsa-history: Clears self-originated and received LSA log information.

peer: Clears neighbor state change log information.

slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command clears neighbor state change log information on the card where the active process resides.

route: Clears OSPF route log information.

spf: Clears route calculation log information.

Usage guidelines

If you do not specify a log type, this command clears all log information.

Examples

# Clear OSPF route calculation log information for all OSPF processes.

<Sysname> reset ospf event-log spf

Related commands

display ospf event-log

reset ospf event-log hello

Use reset ospf event-log hello to clear OSPF log information about received or sent hello packets.

Syntax

reset ospf [ process-id ] event-log hello { received [ abnormal | dropped ] | sent [ abnormal | failed ] } [ slot slot-number ]

Views

User view

Predefined user roles

network-admin

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify this argument, the command clears OSPF log information for all processes.

received: Specifies log information for received hello packets.

sent: Specifies log information for sent hello packets.

abnormal: Specifies log information for abnormal hello packets received or sent at intervals greater than or equal to 1.5 times the hello interval.

dropped: Specifies log information for received hello packets that were dropped.

failed: Specifies log information for hello packets that failed to be sent.

slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command clears received or sent hello packet log information on the card where the active process resides.

Examples

# Clear sent hello packet log information for all OSPF processes.

<Sysname> reset ospf event-log hello sent

Related commands

display ospf event-log hello

reset ospf process

Use reset ospf process to restart all OSPF processes or a specified process.

Syntax

reset ospf [ process-id ] process [ graceful-restart ]

Views

User view

Predefined user roles

network-admin

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify a process, this command restarts all OSPF processes.

graceful-restart: Resets the OSPF process by using GR.

Usage guidelines

The reset ospf process command performs the following actions:

·     Clears all invalid LSAs without waiting for their timeouts.

·     Makes a newly configured router ID take effect.

·     Starts a new DR/BDR election.

·     Keeps previous OSPF configurations.

The system prompts you to select whether to restart OSPF process upon execution of this command.

Examples

# Restart all OSPF processes.

<Sysname> reset ospf process

Reset OSPF process? [Y/N]:y

reset ospf redistribution

Use reset ospf redistribution to restart route redistribution.

Syntax

reset ospf [ process-id ] redistribution

Views

User view

Predefined user roles

network-admin

Parameters

process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify a process, this command restarts route redistribution for all OSPF processes.

Examples

# Restart route redistribution.

<Sysname> reset ospf redistribution

reset ospf statistics

Use reset ospf statistics to clear OSPF statistics.

Syntax

reset ospf [ process-id ] statistics

Views

User view

Predefined user roles

network-admin

Parameters

process-id: Clears the statistics for an OSPF process specified by its ID in the range of 1 to 65535.

Examples

# Clear OSPF statistics for all processes.

<Sysname> reset ospf statistics

Related commands

display ospf statistics

reset ospf troubleshooting

Use reset ospf troubleshooting to clear OSPF neighbor relationship troubleshooting information.

Syntax

reset ospf troubleshooting

Views

User view

Predefined user roles

network-admin

Examples

# Clear OSPF neighbor relationship troubleshooting information.

<Sysname> reset ospf troubleshooting

Related commands

display ospf troubleshooting

rfc1583 compatible

Use rfc1583 compatible to enable compatibility with RFC 1583.

Use undo rfc1583 compatible to disable compatibility with RFC 1583.

Syntax

rfc1583 compatible

undo rfc1583 compatible

Default

Compatibility with RFC 1583 is enabled.

Views

OSPF view

Predefined user roles

network-admin

Usage guidelines

RFC 1583 specifies a different method than RFC 2328 for selecting the optimal route to a destination in another AS. When multiple routes are available to the ASBR, OSPF selects the optimal route by using the following procedure:

1.     Selects the route with the highest preference.

¡     If RFC 2328 is compatible with RFC 1583, all these routes have equal preference.

¡     If RFC 2328 is not compatible with RFC 1583, the intra-area route in a non-backbone area is preferred to reduce the burden of the backbone area. The inter-area route and intra-area route in the backbone area have equal preference.

2.     Selects the route with lower cost if two routes have equal preference.

3.     Selects the route with larger originating area ID if two routes have equal cost.

To avoid routing loops, set identical RFC 1583-compatibility on all routers in a routing domain.

Examples

# Disable compatibility with RFC 1583.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] undo rfc1583 compatible

router id

Use router id to configure a global router ID.

Use undo router id to restore the default.

Syntax

router id router-id

undo router id

Default

No global router ID is configured.

Views

System view

Predefined user roles

network-admin

Parameters

router-id: Specifies the global router ID in dotted decimal format. The value range for this argument is 0.0.0.1 to 255.255.255.254.

Usage guidelines

OSPF uses a router ID to identify a device. If no router ID is specified, the global router ID is used.

If no global router ID is configured, the highest loopback interface IP address is used as the router ID. If no loopback interface IP address is available, the highest physical interface IP address is used, regardless of the interface status (up or down).

During an active/standby switchover, the new active main processing unit (MPU) checks whether the previously backed up router ID is valid. If not, it selects a new router ID.

A new router ID is selected only when the interface IP address used as the router ID is removed or changed. Other events will not trigger a router ID re-selection. For example, router ID re-selection is not triggered in the following situations:

·     The interface goes down.

·     You change the router ID to the address of a loopback interface after a physical interface address is selected as the router ID.

·     A higher interface IP address is configured as the router ID.

After a router ID is changed, you must use the reset command to enable it.

Examples

# Configure a global router ID as 1.1.1.1.

<Sysname> system-view

[Sysname] router id 1.1.1.1

shutdown process

Use shutdown process to shut down an OSPF process.

Use undo shutdown process to start an OSPF process.

Syntax

shutdown process

undo shutdown process

Default

An OSPF process is not shut down.

Views

OSPF view

Predefined user roles

network-admin

Usage guidelines

Both this feature and OSPF isolation can be used for OSPF maintenance.

After you execute the shutdown process command for an OSPF process, the process performs the following operations:

·     Sends 1-way hello packets to its neighbors.

On receipt of the packets, the neighbors disconnect from the OSPF process.

·     Stops receiving and sending OSPF packets.

·     Clears its neighbor, LSDB, and OSPF route information.

After maintenance, you can use the undo shutdown process command to restart the process for neighbor relationship re-establishment.

Examples

# Shut down OSPF process 100.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] shutdown process

Related commands

isolate enable

silent-interface

Use silent-interface to disable an interface or all interfaces from receiving and sending OSPF packets.

Use undo silent-interface to remove the configuration.

Syntax

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

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

Default

An interface can receive and send OSPF packets.

Views

OSPF view

Predefined user roles

network-admin

Parameters

interface-type interface-number: Specifies an interface by its type and number.

all: Specifies all interfaces.

Usage guidelines

Use this command to achieve the following purposes:

·     Disable the local device from receiving route updates advertised by other devices in the network through the interface.

·     Disable the local device from advertising route updates to other devices in the network through the interface.

After you configure this command, the OSPF interface performs the following operations:

·     Sends a one-way hello packet to its neighbor. The neighbor terminates the neighbor relationship with the sending interface upon receiving the one-way hello packet.

·     No longer establishes neighbor relationship.

You can execute either the silent-interface or ospf silent command or both commands for an interface to achieve the same effect. Choose an appropriate configuration method as needed.

Multiple processes can disable the same interface from receiving and sending OSPF packets. However, the silent-interface command takes effect only on interfaces enabled with the current process.

Examples

# Disable Ten-GigabitEthernet 3/0/1 from receiving and sending OSPF packets.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] silent-interface ten-gigabitethernet 3/0/1

Related commands

ospf silent

snmp trap rate-limit

Use snmp trap rate-limit to set the SNMP notification output interval and the maximum number of SNMP notifications that can be output at each interval.

Use undo snmp trap rate-limit to restore the default.

Syntax

snmp trap rate-limit interval trap-interval count trap-number

undo snmp trap rate-limit

Default

OSPF outputs a maximum of seven SNMP notifications within 10 seconds.

Views

OSPF view

Predefined user roles

network-admin

Parameters

interval trap-interval: Specifies the SNMP notification output interval in the range of 2 to 60 seconds.

count trap-number: Specifies the number of SNMP notifications output by OSPF at each interval, in the range of 0 to 300. The value of 0 indicates that OSPF does not output SNMP notifications.

Examples

# Configure OSPF to output a maximum of 10 SNMP notifications within 5 seconds.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] snmp trap rate-limit interval 5 count 10

snmp-agent trap enable ospf

Use snmp-agent trap enable ospf to enable SNMP notifications for OSPF.

Use undo snmp-agent trap enable ospf to disable SNMP notifications for OSPF.

Syntax

snmp-agent trap enable ospf [ authentication-failure | bad-packet | config-error | dr-ip-address-conflict | grhelper-status-change | grrestarter-status-change | if-state-change | intra-area-router-id-conflict | lsa-maxage | lsa-originate | lsdb-approaching-overflow | lsdb-overflow | neighbor-state-change | nssatranslator-status-change | peer-flapping-suppress-status-change | retransmit | sr-prefix-sid-conflict | sr-prefix-sid-conflict-clear | virt-authentication-failure | virt-bad-packet | virt-config-error | virt-retransmit | virtgrhelper-status-change | virtif-state-change | virtneighbor-state-change ] *

undo snmp-agent trap enable ospf [ authentication-failure | bad-packet | config-error | dr-ip-address-conflict | grhelper-status-change | grrestarter-status-change | if-state-change | intra-area-router-id-conflict | lsa-maxage | lsa-originate | lsdb-approaching-overflow | lsdb-overflow | neighbor-state-change | nssatranslator-status-change | peer-flapping-suppress-status-change | retransmit | sr-prefix-sid-conflict | sr-prefix-sid-conflict-clear | virt-authentication-failure | virt-bad-packet | virt-config-error | virt-retransmit | virtgrhelper-status-change | virtif-state-change | virtneighbor-state-change ] *

Default

SNMP notifications for OSPF are enabled.

Views

System view

Predefined user roles

network-admin

Parameters

authentication-failure: Specifies notifications about authentication failures on an interface.

bad-packet: Specifies notifications about error messages received on an interface.

config-error: Specifies notifications about error configuration of an interface.

dr-ip-address-conflict: Specifies notifications about DR IP address conflicts within an area.

grhelper-status-change: Specifies notifications about GR helper state change.

grrestarter-status-change: Specifies notifications about GR restarter state change.

if-state-change: Specifies notifications about interface state change.

intra-area-router-id-conflict: Specifies notifications about router ID conflicts within an area.

lsa-maxage: Specifies LSA max age notifications.

lsa-originate: Specifies notifications about locally generated LSAs.

lsdb-approaching-overflow: Specifies notifications about approaching LSDB overflows.

lsdb-overflow: Specifies LSDB overflow notifications.

neighbor-state-change: Specifies notifications about neighbor state change.

nssatranslator-status-change: Specifies notifications about NSSA translator state change.

peer-flapping-suppress-status-change: Specifies notifications about neighbor flapping suppression status change.

retransmit: Specifies notifications about packets that are received and forwarded on an interface.

sr-prefix-sid-conflictSpecifies notifications about SR prefix SID conflicts.

sr-prefix-sid-conflict-clearSpecifies notifications about recoveries from SR prefix SID conflict conditions.

virt-authentication-failure: Specifies notifications about authentication failures on a virtual interface.

virt-bad-packet: Specifies notifications about error messages received on a virtual interface.

virt-config-error: Specifies notifications about error configuration of a virtual interface.

virt-retransmit: Specifies notifications about packets that are received and forwarded on a virtual interface.

virtgrhelper-status-change: Specifies notifications about neighbor GR helper state changes of a virtual interface.

virtif-state-change: Specifies notifications about virtual interface state change.

virtneighbor-state-change: Specifies notifications about the neighbor state change of a virtual interface.

Usage guidelines

If you do not specify any parameters, the command enables all types of SNMP notifications for OSPF.

You can enable SNMP notifications only when OSPF processes exist. If you delete all OSPF processes after enabling SNMP notifications, the SNMP notifications feature will not take effect.

Examples

# Disable SNMP notifications for OSPF.

<Sysname> system-view

[Sysname] undo snmp-agent trap enable ospf

snmp-agent trap ospf neighbor-state-change extended

Use snmp-agent trap ospf neighbor-state-change extended to extend the format of SNMP notifications for neighbor state changes.

Use undo snmp-agent trap ospf neighbor-state-change extended to restore the default.

Syntax

snmp-agent trap ospf neighbor-state-change extended

undo snmp-agent trap ospf neighbor-state-change extended

Default

OSPF does not extend the format of SNMP notifications for neighbor state changes.

Views

System view

Predefined user roles

network-admin

Usage guidelines

After you execute this command, OSPF generates a notification in extended format when the state of a neighbor changes. Compared with notifications in standard format, notifications in extended format include interface names additionally. This setting enables the network administrator to quickly locate problems.

The NMS might fail to parse the notifications in extended format if it does not support this format.

Examples

# Extend the format of SNMP notifications for neighbor state changes.

<Sysname> system-view

[Sysname] snmp-agent trap ospf neighbor-state-change extended

spf-schedule-interval

Use spf-schedule-interval to set the OSPF SPF calculation interval.

Use undo spf-schedule-interval to restore the default.

Syntax

spf-schedule-interval { maximum-interval [ minimum-interval [ incremental-interval [ conservative ] ] ] | millisecond interval }

undo spf-schedule-interval

Default

The maximum calculation interval is 5 seconds, the minimum interval is 50 milliseconds, and the incremental interval is 200 milliseconds.

Views

OSPF view

Predefined user roles

network-admin

Parameters

maximum-interval: Specifies the maximum OSPF SPF calculation interval in the range of 1 to 60 seconds.

minimum-interval: Specifies the minimum OSPF SPF calculation interval in the range of 10 to 60000 milliseconds.

incremental-interval: Specifies the incremental OSPF SPF calculation interval in the range of 10 to 60000 milliseconds.

conservative: Keeps the maximum interval when route flapping occurs. If you do not specify this keyword, the OSPF SPF calculation is performed at the maximum interval for three consecutive times and then performed at the minimum interval.

millisecond interval: Specifies the fixed OSPF SPF calculation interval in the range of 0 to 10000 milliseconds.

Usage guidelines

Based on the LSDB, an OSPF router uses SPF to calculate a shortest path tree with itself as the root. OSPF uses the shortest path tree to determine the next hop to a destination. By adjusting the SPF calculation interval, you can prevent overconsumption of bandwidth and router resources due to frequent topology changes.

For a stable network, use the minimum interval set by the spf-schedule-interval maximum-interval [ minimum-interval [ incremental-interval ] ] command. If network changes become frequent, the SPF calculation interval increases by the incremental interval × 2n-2 for each calculation until the maximum interval is reached. The value n is the number of calculation times. The minimum interval and the incremental interval cannot be greater than the maximum interval.

For a network that requires fast route convergence, use the spf-schedule-interval millisecond interval command to set a short SPF calculation interval.

Examples

# Set the maximum SPF calculation interval to 10 seconds, minimum interval to 500 milliseconds, and incremental interval to 300 milliseconds.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] spf-schedule-interval 10 500 300

stub

Use stub to configure an area as a stub area.

Use undo stub to restore the default.

Syntax

stub [ default-route-advertise-always | no-summary ] *

undo stub

Default

No area is a stub area.

Views

OSPF area view

Predefined user roles

network-admin

Parameters

default-route-advertise-always: Enables the ABR to advertise a default route in a Type-3 LSA into the stub area regardless of whether FULL-state neighbors exist in the backbone area. If you do not specify this keyword, the ABR advertises a default route in a Type-3 LSA into the stub area only when a minimum of one FULL-state neighbor exists in the backbone area.

no-summary: Enables the ABR to advertise only a default route in a Type-3 LSA into the stub area without advertising any other Type-3 LSAs. The area is a totally stub area.

Usage guidelines

To configure an area as a stub area, use the stub command on all routers attached to the area.

If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Configure Area 1 as a stub area.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] area 1

[Sysname-ospf-100-area-0.0.0.1] stub

Related commands

default-cost

stub-router

Use stub-router to configure a router as a stub router.

Use undo stub-router to restore the default.

Syntax

stub-router [ external-lsa [ max-metric-value ] | include-stub | on-startup { seconds | wait-for-bgp [ seconds ] }| summary-lsa [ max-metric-value ] ] *

undo stub-router

Default

The router is not configured as a stub router.

Views

OSPF view

Predefined user roles

network-admin

Parameters

external-lsa max-metric-value: Specifies a cost for the external LSAs, in the range of 1 to 16777215. The default is 16711680.

include-stub: Specifies the cost of the stub links (link type 3) in Router LSAs to the maximum value 65535.

on-startup seconds: Specifies the router as a stub router during reboot, and specifies the timeout time in the range of 5 to 86400 seconds.

wait-for-bgp seconds: Specifies the router as a stub router during BGP route convergence after reboot, and specifies the timeout time in the range of 5 to 86400 seconds. The default timeout time is 600 seconds.

summary-lsa max-metric-value: Specifies a cost for the Type-3 LSAs, in the range of 1 to 16777215. The default cost value is 16711680.

Usage guidelines

The router LSAs sent by the stub router over different links contain different link type values. A value of 3 represents a link to a stub network, and the cost of the link is not changed. A value of 1, 2, or 4 represents a point-to-point link, a link to a transit network, or a virtual link. The cost of these links is set to 65535. Neighbors on such links will not send packets to the stub router as long as they have a route with a smaller cost.

Examples

# Configure a stub router.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] stub-router

transmit-pacing

Use transmit-pacing to set the LSU transmission interval and the maximum number of LSU packets that can be sent at each interval.

Use undo transmit-pacing to restore the default.

Syntax

transmit-pacing interval interval count count

undo transmit-pacing

Default

An OSPF interface sends a maximum of three LSU packets every 20 milliseconds.

Views

OSPF view

Predefined user roles

network-admin

Parameters

interval interval: Specifies an interval at which an interface sends LSU packets, in the range of 0 to 1000 milliseconds. If the router has multiple OSPF interfaces, increase this interval to reduce the total number of LSU packets sent by the router every second. As a best practice to maintain network stability, do not set the interval to 0 milliseconds when the OSPF LSDB is large or network changes are frequent.

count count: Specifies the maximum number of LSU packets sent by an interface at each interval, in the range of 1 to 200. If the router has multiple OSPF interfaces, decrease the maximum number to reduce the total number of LSU packets sent by the router every second.

Examples

# Configure all the interfaces running OSPF process 1 to send a maximum of 10 LSU packets every 30 milliseconds.

<Sysname> system-view

[Sysname] ospf 1

[Sysname-ospf-1] transmit-pacing interval 30 count 10

ttl-security

Use ttl-security to enable OSPF GTSM for an area.

Use undo ttl-security to disable OSPF GTSM for an area.

Syntax

ttl-security [ hops hop-count ]

undo ttl-security

Default

OSPF GTSM is disabled for an OSPF area.

Views

OSPF area view

Predefined user roles

network-admin

Parameters

hops hop-count: Specifies the hop limit for checking OSPF packets, in the range of 1 to 254. The default hop limit is 1 for packets from common neighbors, and is 255 for packets from virtual link neighbors.

Usage guidelines

After you enable GTSM in area view, GTSM checks OSPF packets from common neighbors and virtual link neighbors.

GTSM protects the device by comparing the TTL value in the IP header of incoming OSPF packets against a valid TTL range. If the TTL value is within the valid TTL range, the packet is accepted. If not, the packet is discarded.

The valid TTL range is from 255 – the configured hop count + 1 to 255.

When GTSM is configured, the OSPF packets sent by the device have a TTL of 255. To use GTSM, you must configure GTSM on both the local and peer devices. You can specify different hop-count values for them.

The GTSM configuration in OSPF area view applies to all OSPF interfaces in the area. The GTSM configuration in interface view takes precedence over the configuration in OSPF area view.

As a best practice, set the hop limit if a virtual link exists in an area. You can enable GTSM for the interfaces on the virtual link. If you do not know the interfaces on the virtual link, enable GTSM in area view to prevent packet loss.

Editing the hop limit will clear GTSM dropped packet statistics from the interface.

Examples

# Enable OSPF GTSM for OSPF area 1.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] area 1

[Sysname-ospf-100-area-0.0.0.1] ttl-security

Related commands

ospf ttl-security

vlink-peer

Use vlink-peer to configure a virtual link.

Use undo vlink-peer to remove a virtual link.

Syntax

vlink-peer router-id [ dead seconds | hello seconds | { { hmac-md5 | hmac-sha-256 | md5 } key-id { cipher | plain } string | keychain keychain-name | simple { cipher | plain } string } | retransmit seconds | trans-delay seconds ] *

undo vlink-peer router-id [ dead | hello | { hmac-md5 | hmac-sha-256 | md5 } key-id | keychain | retransmit | simple | trans-delay ] *

Default

No virtual links exist.

Views

OSPF area view

Predefined user roles

network-admin

Parameters

router-id: Specifies the router ID of the neighbor on the virtual link.

dead seconds: Specifies the dead interval in the range of 1 to 32768 seconds. The default is 40. The dead interval must be identical with that on the virtual link neighbor, and a minimum of four times the hello interval.

hello seconds: Specifies the hello interval in the range of 1 to 8192 seconds. The default is 10. It must be identical with the hello interval on the virtual link neighbor.

hmac-md5: Specifies the HMAC-MD5 authentication mode.

hmac-sha-256: Specifies the HMAC-SHA-256 authentication mode.

md5: Specifies the MD5 authentication mode.

simple: Specifies the simple authentication mode.

key-id: Specifies the key ID for MD5 or HMAC-MD5 authentication, in the range of 1 to 255.

cipher: Specifies a key in encrypted form.

plain: Specifies a key in plaintext form. For security purposes, the key specified in plaintext form will be stored in encrypted form.

string: Specifies the key. This argument is case sensitive.

·     In simple authentication mode, the plaintext form of the key is a string of 1 to 8 characters. The encrypted form of the key is a string of 33 to 41 characters.

·     In MD5/HMAC-MD5 authentication mode, the plaintext form of the key is a string of 1 to 16 characters. The encrypted form of the key is a string of 33 to 53 characters.

·     In HMAC-SHA-256 authentication mode, the plaintext form of the key is a string of 1 to 255 characters. The encrypted form of the key is a string of 33 to 373 characters.

keychain: Specifies the keychain authentication mode.

keychain-name: Specifies a keychain by its name, a case-sensitive string of 1 to 63 characters.

retransmit seconds: Specifies the retransmission interval in the range of 1 to 3600 seconds. The default is 5.

trans-delay seconds: Specifies the transmission delay interval in the range of 1 to 3600 seconds. The default is 1.

Usage guidelines

As defined in RFC 2328, all non-backbone areas must maintain connectivity to the backbone. You can use the vlink-peer command to configure a virtual link to connect an area to the backbone.

When you configure this command, follow these guidelines:

·     The smaller the hello interval is, the faster the network converges, and the more network resources are consumed.

·     A retransmission interval that is too small can cause unnecessary retransmissions. A large value is appropriate for a low speed link.

·     Specify an appropriate transmission delay with the trans-delay keyword.

If MD5, HMAC-MD5, or HMAC-SHA-256 authentication is configured, you can configure multiple keys, each having a unique key ID and key string. As a best practice to minimize the risk of key compromise, use only one key for a virtual link and delete the old key after key replacement.

To replace the key used for MD5, HMAC-MD5, or HMAC-SHA-256 authentication for a virtual link, you must configure the new key before removing the old key from each router. OSPF uses the key rollover mechanism to ensure that the routers can pass authentication before the replacement is complete on the interface. After you configure a new key on a router, the router sends copies of the same packet, each authenticated by a different key, including the new key and the keys in use. This practice continues until the router detects that all its neighbors have the new key.

When keychain authentication is configured for a virtual link, OSPF performs the following operations before sending a packet:

1.     Obtains a valid send key from the keychain.

OSPF does not send the packet if it fails to obtain a valid send key.

2.     Uses the key ID, authentication algorithm, and key string to authenticate the packet.

If the key ID is greater than 255, OSPF does not send the packet.

When keychain authentication is configured for a virtual link, OSPF performs the following operations after receiving a packet:

1.     Uses the key ID carried in the packet to obtain a valid accept key from the keychain.

OSPF discards the packet if it fails to obtain a valid accept key.

2.     Uses the authentication algorithm and key string for the valid accept key to authenticate the packet.

If the authentication fails, OSPF discards the packet.

The authentication algorithm can be MD5, HMAC-MD5, HMAC-SHA-256, or HMAC-SM3 and the ID of keys used for authentication can only be in the range of 0 to 255.

Examples

# Configure a virtual link to the neighbor with router ID 1.1.1.1.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] area 2

[Sysname-ospf-100-area-0.0.0.2] vlink-peer 1.1.1.1

Related commands

authentication-mode

display ospf vlink

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网