clear ip bgp neighbor

Requests a dynamic refresh of BGP4 connections or routes from a neighbor, with a variety of options.

Syntax

clear ip bgp neighbor { all | as-num | ip-addr | peer-group-name } [ last-packet-with-error | notification-errors | soft [ in [ prefix-filter] | out ] | soft-outbound | traffic ] [ vrf vrf-name ]

Parameters

all
Resets and clears all BGP4 connections to all neighbors.
as-num
Clears all BGP4 connections within this autonomous system. Range is from 1 through 4294967295.
peer-group-name
Clears all BGP4 connections in this peer group. Range is from 1 through 63 characters.
ip-addr
Clears all BGP4 connections with this IPv4 address, in dotted-decimal notation.
last-packet-with-error
Clears all BGP4 connections identified as having the last packet received with an error.
notification-errors
Clears all BGP4 connections identified as having notification errors.
soft
Refreshes routes received from or sent to the neighbor.
in
Refreshes received routes.
prefix-filter
Refreshes Outbound Route Filters (ORFs) that are prefix-based.
out
Refreshes sent routes.
soft-outbound
Refreshes all outbound routes by applying new or changed filters, but sends only the existing routes affected by the new or changed filters to the neighbor.
Note

Note

Use soft-outbound only if the outbound policy is changed. This operand updates all outbound routes by applying the new or changed filters. However, the device sends to the neighbor only the existing routes that are affected by the new or changed filters. The soft out operand updates all outbound routes and then sends the entire BGP4 route table on the device to the neighbor after the device changes or excludes the routes affected by the filters.
traffic
Clears the counters (resets them to 0) for BGP4 messages.
vrf vrf-name
Specifies the name of a VRF instance.

Modes

Privileged EXEC mode

Examples

This example refreshes all BGP4 neighbor connections.

device# clear ip bgp neighbor all
This example refreshes all BGP4 neighbor connections for VRF "red".
device# clear ip bgp neighbor all vrf red