flush suboptimal-route

Use flush suboptimal-route to enable BGP to flush the suboptimal BGP route to the RIB.

Use undo flush suboptimal-route to disable BGP from flushing the suboptimal BGP route to the RIB.

Syntax

flush suboptimal-route

undo flush suboptimal-route

Default

BGP is disabled from flushing the suboptimal BGP route to the RIB. Only the optimal route is flushed to the RIB.

Views

BGP instance view

Predefined user roles

network-admin

Usage guidelines

This command flushes the suboptimal BGP route to the RIB when the following conditions are met:

After the suboptimal route is flushed to the RIB on a network, BGP immediately switches traffic to the suboptimal route when the optimal route fails.

For example, the device has a static route to the subnet 1.1.1.0/24 that has a higher priority than a BGP route. BGP redistributes the static route and receives a route to 1.1.1.0/24 from a peer. After the flush suboptimal-route command is executed, BGP flushes the received BGP route to the RIB as the suboptimal route. When the static route fails, BGP immediately switches traffic to the suboptimal route if inter-protocol FRR is enabled. For more information about inter-protocol FRR, see Layer 3IP Routing Configuration Guide.

Examples

# Enable BGP to flush the suboptimal BGP route to the RIB.

<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] flush suboptimal-route