< Home

stub-router (OSPF)

Function

The stub-router command configures a stub router.

The undo stub-router command restores the default configuration.

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

Format

stub-router [ on-startup [ interval ] ]

undo stub-router

Parameters

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

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

After the stub router command is configured on a device, the device informs other devices not to use this stub router to forward data by increasing the metric to 65535 of the links in the LSA that is generated by the device. As the metric is not infinite, there can still be a route to this stub router. The metric of the LSA links that are generated by the stub router is very high.

Example

# Configure a the device as a stub router.

<HUAWEI> system-view
[HUAWEI] ospf 1
[HUAWEI-ospf-1] stub-router
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >