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.
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. |
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.
<HUAWEI> system-view [~HUAWEI] ospf 1 [*HUAWEI-ospf-1] stub-router
<HUAWEI> system-view [~HUAWEI] ospf 1 [*HUAWEI-ospf-1] stub-router on-startup 65535 include-stub external-lsa 16777214 summary-lsa 16777214