keep-all-routes

Function

The keep-all-routes command saves all the routes carried in BGP Update messages advertised by BGP peers or peer groups after BGP connections are established.

The undo keep-all-routes command disables this function.

By default, the device saves only accepted routes (routes that match the import policy).

Format

keep-all-routes

undo keep-all-routes

Parameters

None

Views

BGP view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

After changing a BGP import policy, you must reset BGP connections for the new import policy to take effect. As a result, services on these BGP connections are interrupted temporarily. If a device's peer does not support route-refresh, you can run the keep-all-routes command on the device to save all routing updates received from the peer so that the device can refresh its routing table without resetting the connection with the peer.

Precautions

If the device does not support route-refresh, you need to run the keep-all-routes command on both ends. If the keep-all-routes command is run on the device for the first time, the sessions between the device and its peers are reestablished.

If the device supports route-refresh, running this command does not result in reestablishment of the sessions between the device and its peers. After the refresh bgp command is run, however, the route-refresh capability does not take effect on the device.

Example

# Configure a device to save all BGP routing updates received from its peers.
<HUAWEI> system-view
[~HUAWEI] bgp 100
[*HUAWEI-bgp] keep-all-routes
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >