Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

show-bgp-diagnostics

Syntax

Description

The show bgp diagnostics command is the main command that identifies the root cause of common BGP issues. It includes troubleshooting commands for BGP global state overview, BGP running state warnings, neighbor down and flap diagnostics, CPU hogging diagnostics, missing route diagnostics, and dropped route diagnostics.

Options

dropped-route-cache

(Optional) Shows all cached dropped routes for a given peer rib.

export-evaluation-triggers

(Optional) Shows events which lead to the current BGP export evaluation.

import-evaluation-triggers

(Optional) Show events which lead to the current BGP import evaluation.

local-rib-evaluation-triggers

(Optional) Shows events which lead to the current BGP local rib evaluation.

neighbor

(Optional) Shows BGP neighbor diagnostics.

overview

(Optional) Shows BGP diagnostics overview.

route

(Optional) Shows BGP route diagnostics.

warnings

(Optional) Shows BGP related warnings.

Syntax

Description

Sometimes the dropped route might not be cached due to the cache size limit. In such cases, we can show the entire dropped-route-cache table to find alternative dropped routes to debug. The show bgp diagnostics dropped-route-cache table bgp.l3vpn.0 from 1.1.1.1

BGP diagnostics indicates that the route 1.1.1.1/32 drops due to AS path loop.

Syntax

Description

The RPD hogs the CPU where BGP export evaluation occur. This command shows the event that causes the groups to run export evaluation.

  1. When BGP group is specified, the event that caused the most recent export evaluation is displayed. This command is used when the "New policy flash update" job is already complete.

  2. When BGP group is not specified, the event that caused the BGP groups currently under export evaluation is displayed. This command is used when the "New policy flash update" job is currently running.

Syntax

Description

The RPD hogs the CPU where BGP import evaluation is performed. This command shows the events that causes peer(s) to run import evaluation.

  1. When BGP neighbor address is specified, the command displays the event that causes the most recent import evaluation for this neighbor. This command is used when the "BGP Peer reconfig" job is already complete.

  2. When the BGP neighbor address is not specified, the event that causes BGP neighbors currently under import evaluation. This command is useful when the “BGP Peer reconfig” job is currently running.

Syntax

Description

The RPD hogs the CPU where BGP RIB is reconfigured. This command shows the events that causes the RIB(s) to run local evaluation.

  1. When the RIB name is specified, the command displays the event that causes the most recent local evaluation for this RIB. This command is used when the "BGP RIB reconfig" job is already complete.

  2. When the RIB name is not specified, the event that causes all RIBs currently under local evaluation. This command is used when the "BGP RIB reconfig" job is currently running.

Syntax

Description

The show bgp diagnostics neighbor <neighbor address> command is used for two purpose.

  1. The command specifies the reason for which the bgp neighbor is down and also suggests troubleshooting instructions.

  2. Currently the BGP neighbor is up but has flapped before. The command show bgp diagnostics neighbor shows the last flap reason.

Syntax

Description

The show bgp diagnostics route 1.1.1.1/32 table red.inet.0 from 10.1.1.1 command is used to debug the missing inbound route.

BGP diagnostics indicates that the route 1.1.1.1/32 drops due to AS path loop.

Syntax

Description

This command shows the running values of some important BGP variables.

Syntax

Description

This command shows warnings when BGP is running in abnormal state.

Additional Information

For information about the local-address, nlri, hold-time, and preference statements, see the Junos OS Routing Protocols Library for Routing Devices.

Required Privilege Level

view

Output Fields

Table 1 lists the output fields for the show-bgp-diagnostics command.

Table 1: show-bgp-diagnostics Output Fields

Field Name

Field Description

Group Specifies BGP group.
Export eval trigger Specifies the event which has triggered the BGP group export evaluation.

Export eval trigger time

Specifies the time when export evaluation is triggered for a BGP group.

Peer BGP neighbor address.
Import eval trigger Specifies the event which has triggered the BGP neighbor import evaluation.
Import eval trigger time Specifies the time when import evaluation is triggered for a BGP neighbor.
Table Routing table
Local-rib eval trigger Specifies the event which has triggered the BGP local RIB evaluation.

Local-rib eval trigger time

Specifies the time when the evaluation is triggered for a BGP RIB local RIB.

State

Current state of the BGP session:

Active—BGP is initiating a transport protocol connection in an attempt to connect to a peer. If the connection is successful, BGP sends an Open message.

Connect—BGP is waiting for the transport protocol connection to be completed.

Established—The BGP session has been established, and the peers are exchanging update messages.

Idle—This is the first stage of a connection. BGP is waiting for a Start event.

OpenConfirm—BGP has acknowledged receipt of an open message from the peer and is waiting to receive a keepalive or notification message.

OpenSent—BGP has sent an open message and is waiting to receive an open message from the peer.

route reflector client—The BGP session is established with a route reflector client.

Down reason record time

Specifies the duration of the down time of a BGP neighbor.

Down reason

Specifies the reason for which the BGP neighbor is down.

Detail reason

Specifies the detailed reason for which the BGP neighbor is down.

Suggestion

Suggests the next probable step to be taken.

Last flap time

Specifies the date and time when the neighbor state transition from up to down or vice versa

Last flap event

Specifies the event which has triggered the BGP neighbor to move out of Established state.

Flap reason

Specifies the reason for which the BGP neighbor flaps last time. Notification code/subcode indicates flap is caused by administrative action rather than the error event.

Notification message

Displays raw notification message printed at the end for advanced troubleshooting.

BGP enabled in master instance

Specifies True if BGP is enabled in master instance. BGP is currently running as the master mode of NSR.

BGP enabled in other instances

Specifies True if BGP is enabled in atleast one of the non-master routing-instances.

BGP enabled for API

Specifies True if BGP is enabled for API.

BGP enabled for BMP station

Specifies true if BMP monitoring station enables BGP devices.

BGP running in master mode

BGP is currently running as the master mode of NSR.

BGP ID

Unique ID of the cloud router in a network. BGP indentifier for the node.

Global AS number

Global AS number of the node.

Number of BGP RIBs

Specifies the number of RIBs BGP manages.

Maximum BGP RIB index

The maximum number of the BGP RIB indices.

Maximum number of NLRIs

Specifies maximum number of network layers reachable information.

Number of unconfigured BGP peers

Specifies the number of BGP peers which are not configured but accepted via allow or auto-discovery.

Number of autodiscovered BGP peers

Specifies number of devices that are discovered as BGP peers.

Number of BGP peers pending inbound-convergence

Specifies the number of BGP peers which haven't received all routes from the peer.

Number of read jobs in progress

The number of read jobs which are currently running.

Optimal route reflection

Specifies if optimal route reflection is configured on this router.

BGP segment routing start label

Start label value used in BGP segment routing.

BGP segment routing end label

End label value used in BGP segment routing.

BGP segment routing type

Specifies the routing type ISIS, OSPF, BGP, or GLOBAL.

BGP multipath enabled globally

Specifies globally enabled BGP multipath.

Not sharding l3vpn routes

Specifies that L3vpn cannot divide routes.

Number of shards

Number of shards used in BGP RIB-sharing.

Number of update-io threads

Specifies number of update-io threads used in BGP RIb-sharing.

Neighbor

IP address of the neighbor device/peer.

Cache size

Number of entries used in the dropped route cache.

Total number of dropped routes

Total number of dropped routes cached.

Route

BGP route of the device.

Prefix limit

Maximum number of prefixes allowed.

Current memory in use

Amount of memory currently used by RPD.

Maximum memory ever used

Maximum amount of memory RPD has ever used.

BGP groups

Number of BGP groups.

bgp_adv_entry count

Number of BGP Adj-RIB-Out entries.

Community-match cache hit ratio

Hit ratio of the community-match cache.

Aspath-match cache hit ratio

Hit ratio of the as-path-match cache.

Lsp-regex-match cache hit ratio

Hit ratio of the lsp-regex-match cache.

Release Information

Command show bgp diagnostics is introduced in Junos OS 24.4R1 and Junos OS Evolved Release 24.4R1 Releases.