Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


show bgp replication



Displays the status of BGP state replication between the primary and backup Routing Engines on devices that have nonstop active routing configured on them.


Before attempting nonstop active routing switchover, check the output of show bgp replication to confirm that BGP routing table synchronization has completed on the backup Routing Engine. The complete status in the output of show task replication only indicates that the socket replication has completed and the BGP synchronization is in progress.

To determine whether BGP synchronization is complete, you must check the Protocol state and Synchronization state fields in the output of show bgp replication on the primary Routing Engine. The Protocol state must be idle and the Synchronization state must be complete. If you perform NSR switchover before the BGP synchronization has completed, the BGP session might flap.

rib-sharding (rib-shard-name)

(Optional) Display replicated information for specific shard only.

Required Privilege Level


Output Fields

Table 1 lists the output fields for the show bgp replication command. Output fields are listed in the approximate order in which they appear.

Table 1: show bgp replication Output Fields

Field Name

Field Description

Precision timer registration

State of BGP precision timer feature in the kernel.

  • Registered

    BGP registers with the precision-timer feature in the kernel for auto keepalive generation after switchover.

  • NotRegistered

    Keepalive format of BGP is not registered.

session state

State of the current internal BGP state replication session, Up or Down, and the duration for which the session has been in the indicated state.


Total number of flaps that occurred.

protocol state

Current state of the protocol operation, Active, Connect, Idle, and the duration for which the protocol has been in the indicated state.

synchronization state

Synchronization state at the time of executing the command. The states can be:

  • Idle

  • Neighbor—Indicates that the neighbor state synchronization is in progress.

  • AckWait—Indicates that the request processing is over.

  • ORF—Indicates that the outbound routing filter synchronization is in progress.

  • RIB—Indicates that the routing table synchronization is in progress.

  • Complete

number of peers waiting

Total number of peers waiting for various messages:

  • AckWait—Number of peers waiting for a connection establishment or completed acknowledgment messages.

  • SoWait—Number of peers waiting for TCP socket-related operations.

  • Scheduled—Number of peers being synchronized.

messages sent

Number of various types of messages that have been sent since internal replication session became active:

  • Open—Number of Open messages sent.

  • Establish—Number of connection establishment acknowledgment messages sent.

  • Update—Number of update messages sent.

  • Error—Number of error messages sent.

  • Complete—Number of connection complete acknowledgment messages sent.

messages received

Total number of messages received:

  • Open—Number of Open messages received.

  • Request—Number of request messages received:

    • Wildcard—Number of requests received that used wildcards in the target address.

    • Targeted—Number of requests received that used a specific address.

  • EstablishAck—Number of connection establishment acknowledgement messages received.

  • CompleteAck—Number of connection completed acknowledgement messages received.

Sample Output

show bgp replication (for Primary)

show bgp replication (for Primary with rib-sharding configured)

show bgp replication (for Backup)

show bgp replication (for Backup with rib-sharding configured)

Release Information

Command introduced in Junos OS Release 8.5.

Support for logical-system option introduced in Junos OS Release 13.3.

Support for rib-sharding (rib-shard-name) option introduced in Junos OS and Junos Evolved Release 22.2.