stub-router

Function

The stub-router command configures a stub router.

The undo stub-router command restores the default configuration.

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

Format

stub-router [ [ on-startup [ interval ] ] | [ include-stub ] | [ external-lsa [ externallsa-metric ] ] | [ summary-lsa [ summarylsa-metric ] ] ] *

undo stub-router

Parameters

Parameter Description Value
on-startup interval

Specifies an interval for the device to remain as a stub router after being restarted.

The value is an integer ranging from 5 to 65535, in seconds. The default value is 500 seconds.

include-stub

Sets the maximum cost 65535 for the stub links in router-LSAs.

-

external-lsa externallsa-metric

Advertises external-LSAs with the configured or default maximum cost.

The value is an integer ranging from 1 to 16777215. The default value is 16711680.

summary-lsa summarylsa-metric

Advertises summary-LSAs with the configured or default maximum cost.

The value is an integer ranging from 1 to 16777215. The default value is 16711680.

Views

OSPF view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
ospf write

Usage Guidelines

Usage Scenario

After the stub router command is configured on a device, the device instructs other devices not to forward data to itself by increasing the cost to the maximum value (65535) for the links in the LSA generated by the device. The cost is not infinite, and therefore, the routes to this stub router still exist. The cost of the links in Router-LSAs generated by the stub router is very large.

Example

# Configure the stub router.
<HUAWEI> system-view
[~HUAWEI] ospf 1
[*HUAWEI-ospf-1] stub-router
# Configure the stub router to advertise external-LSAs and summary-LSAs with cost 16777214.
<HUAWEI> system-view
[~HUAWEI] ospf 1
[*HUAWEI-ospf-1] stub-router on-startup 65535 include-stub external-lsa 16777214 summary-lsa 16777214
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >