clear bgp neighbor
Syntax
clear bgp neighbor <all> <as as-number> <gracefully> <instance instance-name> <logical-system (all | logical-system-name)> <malformed-route> <neighbor> <soft | soft-inbound> <soft-minimum-igp> <soft-reconfig> <stale-routes>
Syntax (EX Series Switch and QFX Series)
clear bgp neighbor <all> <as as-number> <instance instance-name> <malformed-route> <neighbor> <soft | soft-inbound> <soft-minimum-igp>
Description
Perform one of the following tasks:
Change the state of one or more BGP neighbors to
IDLE
. For neighbors in theESTABLISHED
state, this command drops the TCP connection to the neighbors and then reestablishes the connection.(
soft
keyword only) Reapply export policies and send refresh updates to one or more BGP neighbors without changing their state.(
soft-inbound
keyword only) Send a route-refresh message to one or more BGP neighbors without changing their state, and reapply import policies on the received updates.
Options
all | Change the state
of all BGP neighbors to |
as as-number | (Optional) Apply this command only to neighbors in the specified autonomous system (AS). |
gracefully | (Optional) Enable the
BGP peer to start graceful-restart receiving-speaker mode. The receiving
speaker also sends its own routes to the restarted speaker, and sends
an End-of-RIB marker when it completes the update. The |
instance instance-name | (Optional) Apply this command only to neighbors for the specified routing instance. |
logical-system (all | logical-system-name) | (Optional) Perform this operation on all logical systems or on a particular logical system. |
malformed-route | (Optional) Remove
malformed routes. If a specific neighbor is provided, Junos OS removes
malformed routes for that particular neighbor. Otherwise, Junos OS
removes malformed routes for all BGP neighbors. To find routes that
have malformed attributes, run the |
neighbor | (Optional) IP address of a BGP peer. Apply this command only to the specified neighbor. |
soft | (Optional) Reapply any export policies and send refresh updates to neighbors without clearing the state. |
soft-inbound | (Optional) Send a route-refresh message to BGP neighbors and reapply import policies on the route updates received from the BGP neighbors without clearing the BGP state. |
soft-minimum-igp | (Optional) Provide soft refresh of the outbound state when the interior gateway protocol (IGP) metric is reset. |
soft-reconfig | (Optional) Trigger the import re-evaluation of a set of BGP neighbors. soft reset inbound state by import re-evaluation. |
stale-routes | (Optional) Any stale route currently being held for the specified neighbor because of BGP graceful restart (GR) or long-lived graceful restart (LLGR) receiver mode operations. |
Required Privilege Level
clear
Output Fields
When you enter this command, you are provided feedback on the status of your request.
Sample Output
clear bgp neighbor
user@host> clear bgp neighbor
Release Information
Command introduced before Junos OS Release 7.4.
malformed-route
option introduced in Junos OS Release
13.2.
all
option introduced in Junos OS Release 14.2.
gracefully
and stale-routes
options introduced
in Junos OS Release 15.1.