show-bgp-diagnostics
Syntax
show bgp diagnostics ? <dropped-route-cache> <export-evaluation-triggers> <import-evaluation-triggers> <local-rib-evaluation-triggers> <neighbor> <overview> <route> <statistics> <warnings>
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
show bgp diagnostics dropped-route-cache table <name> from <neighbor-address>
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.
user@host> show bgp diagnostics dropped-route-cache table bgp.l3vpn.0 from 1.1.1.1 Neighbor: 1.1.1.1 Table: bgp.l3vpn.0 Cache size: 1 Total number of dropped routes: 1 Reason: Failed in prefix qualification, Number of dropped routes: 1 Route: 2:1:10.1.1.12/94, Record time: 47
Syntax
show bgp diagnostics export-evaluation-triggers [group name]
Description
The RPD hogs the CPU where BGP export evaluation occur. This command shows the event that causes the groups to run export evaluation.
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.
user@host> show bgp diagnostics export-evaluation-triggers g1 Group: g1 (0xf76a000) Instance: master Export eval trigger: metric-out value changed Export eval trigger time: 32
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.
user@host> show bgp diagnostics export-evaluation-triggers Group: g1 (0xf76a000) Instance: master Export eval trigger: metric-out value changed Export eval trigger time: 32 Group: g2 (0xf76b000) Instance: master Export eval trigger: metric-out value changed Export eval trigger time: 32 Group: g3 (0xf76c000) Instance: master Export eval trigger: metric-out value changed Export eval trigger time: 32
Syntax
show bgp diagnostics import-evaluation-triggers [neighbor address]
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.
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.
user@host> show bgp diagnostics import-evaluation-triggers 10.1.1.2 Peer: 10.1.1.2 Instance: master Import eval trigger: administrative soft-reconfig Import eval trigger time: 11
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.
user@host> show bgp diagnostics import-evaluation-triggers Peer: 10.1.1.2 Instance: master Import eval trigger: administrative soft-reconfig Import eval trigger time: 11 Peer: 10.2.1.2 Instance: master Import eval trigger: administrative soft-reconfig Import eval trigger time: 11
Syntax
show bgp diagnostics local-rib-evaluation-triggers [rib name]
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.
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.
user@host> show bgp diagnostics local-rib-evaluation-triggers inet.0 Table: inet.0 (0x9c76180) Local-rib eval trigger: bgp path-selection changed Local-rib eval trigger time: 13
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.
user@host> show bgp diagnostics local-rib-evaluation-triggers Table: inet.0 (0x9c76180) Local-rib eval trigger: bgp path-selection changed Local-rib eval trigger time: 13 Table: inet.3 (0x9c761c0) Local-rib eval trigger: bgp path-selection changed Local-rib eval trigger time: 13
Syntax
show bgp diagnostics neighbor <neighbor address>
Description
The show bgp diagnostics neighbor <neighbor address>
command is used
for two purpose.
The command specifies the reason for which the bgp neighbor is down and also suggests troubleshooting instructions.
user@host> show bgp diagnostics neighbor 1.1.1.4 Peer: 1.1.1.4 (0x9bed000) Instance: master State: Active Down reason record time: 3 Down reason: Open message received has BGP identifier same as our local BGP identifier 1.1.1.4 Suggestion: change the BGP identifier (router-id or bgp-identifier) Open message: 0000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0010 00 3f 01 04 00 02 00 06 01 01 01 04 22 02 06 01 0020 04 00 01 00 80 02 02 80 00 02 02 02 00 02 04 40 0030 02 40 78 02 06 41 04 00 00 00 02 02 02 47 00
Currently the BGP neighbor is up but has flapped before. The command
show bgp diagnostics neighbor
shows the last flap reason.user@host> show bgp diagnostics neighbor 1.1.1.4 Peer: 1.1.1.4 (0xfbed000) Instance: master State: Established Last flap time: 24 Last flap event: RecvNotify Flap reason: Notification message received, code 6 (Cease) subcode 4 (Administratively Reset) Notification message: 0000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0010 00 17 03 06 09 06 04
Syntax
show bgp diagnostics route <prefix> table <name> from <neighbor-address>
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.
user@host> show bgp diagnostics route 1.1.1.1/32 table red.inet.0 from 10.1.1.1 Table: red.inet.0 Route: 1.1.1.1/32 State: dropped Record time: 56:06 Reason: AS path loop Suggestion: follow these steps to identify the looped AS path 1. Use "show as-path domain" to find all Local AS 2. Use "show route advertising-protocol bgp 10.1.1.2 detail" on peer router to find AS path advertised by peer router
Syntax
show bgp diagnostics overview
Description
This command shows the running values of some important BGP variables.
user@host> run show bgp diagnostics overview BGP running: Yes On master instance For API For BMP NSR enabled: Yes RE mode: Master Number of shards: 8 Number of update-io threads: 12 Global AS number: 65500 Global BGP ID: 1.1.1.2 BGP listening port: 179 BGP multipath enabled globally BGP multipath foreground: Path delete Optimal route reflection enabled for at least one group Flash inactive routes to BGP: Yes Route walk jobs can use full quantum: No Write job suspend threshold: 5000 Defer unreachable NLRIs VPN NLRIs advertised from main tables: inet-vpn-unicast evpn VPN NLRIs in RR/ASBR mode: inet-vpn-unicast VPN NLRIs configured to advertise-from-main-vpn-tables: VPN NLRIs always advertised from main tables: evpn Type of stale labels to holddown: Stale label holddown period: 60 Number of stale labels:12 Stale label cleanup timer expiring in: 25 Interface replay done: Yes Number of peers pending inbound convergence: 2 Number of GR restarting peers waiting for EORs from us: 3
Syntax
show bgp diagnostics warnings
Description
This command shows warnings when BGP is running in abnormal state.
user@host> show bgp diagnostics warnings High RPD memory usage, current percentage: 90, maximum ever percentage: 92 Effective community match cache lookups: 18345908, hit ratio: 0.58 Effective aspath match cache lookups: 25678302, hit ratio: 0.71 Community hash table bucket count: 16001, used bucket count: 6 Average number of entries per used bucket: 12 Max number of entries in one bucket: 35 Number of BGP advertisement entries: 51500004 Number of BGP groups: 80 BGP ID is 0.0.0.0 Peer: 10.1.1.2, NLRI: inet-unicast Prefix limit: 1000, prefix percentage: 91 Accepted prefix limit: 1000, accepted prefix percentage: 91
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.
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:
|
||||||||
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.