clear ip bgp

To clear the BGP inbound and outbound route policy, use the command clear ip bgp in Privileged EXEC Mode. The inbound routing tables are updated dynamically or by generating new updates using stored update information. If the keyword soft and the associated direction are not specified, then this causes hard clear, that is, the BGP session with peer is reset.

clear ip bgp

clear ip bgp
{ {dampening } { [<random_str> } { <num_str>] } { | flap-statistics } { [<random_str> } { <num_str>] } { | {* | <AS no> } { | external } { | ipv4 | ipv6| <random_str> } } { [soft } { [{in } { [prefix-filter] } { |out}]]} }

Parameters

Parameter Type Description
dampening   Enter to clear the dampening related configuration for the BGP.
<random_str>   Enter to clear the dampening information for the specified ipv4/ipv6 address.
<num_str>   Enter to specify the prefix length of the route. This value ranges from 0 to 128.
*   Enter to reset all BGP peers.
<AS no>   Enter to clear peers with the specified AS number. This value ranges from 1 to 4294967295 or 0.1 to 65535.65535.
Note:

When four-bit-asn is enabled, This value ranges from 1 to 4294967295 or between 0.1 and 65535.65535

Note:

When four-bit-asn is disabled, This value ranges from 1 to 65535 or between 0.0 and 0.65535

Note:

When bgp asnotation is enabled, the AS number of the BGP Speaker is displayed in the range 0.1 to 65535.65535.

external   Enter to clear all external peers.
ipv4   Enter to reset the bgp connection dynamically for all ipv4 address family peers.
ipv6   Enter to reset the bgp connection dynamically for all ipv6 address family peers
soft   Enter to configure the Soft clear which is automatically assumed when the route refresh capability is supported
in   Enter to initiate inbound soft reconfiguration which causes the software to store all received updates without modification regardless of whether an update is accepted by the inbound policy
prefix-filter   Enter to push out prefix-list ORF and initiates inbound soft reconfiguration.
out   Enter to initiate outbound soft configuration which does not have any memory overhead and does not require any preconfiguration. An outbound reconfiguration can be triggered on the other side of the BGP session to make the new inbound policy take effect.

Mode

Privileged EXEC Mode

Examples

iS5Comm# clear ip bgp dampening 12.0.0.1 0