BGP Operational Commands

BGP Show Commands

The BGP show commands provide detailed information about the BGP protocol operation and BGP routes.

BGP Summary

This command displays BGP protocol parameters like attributes or timers that are generic to the BGP instance.

Syntax:

show bgp summary <option>

Option Description

-

Without any option, the commands displays the information for all instances.

instance <instance-name>

BGP summary information for the given instance.

Example: BGP summary for the default instance

supervisor@rtbrick: op> show bgp summary instance default
Instance: default
  General information
    Hostname: PE1, Domain name:
    Local AS: 1000, Version: 4
    Local preference: 100, eBGP Protocol preference: 20, iBGP Protocol preference: 200
    Router ID: 198.51.100.102, Cluster ID: 198.51.100.102
  Capabilities
    Route refresh: True, AS4: True, Graceful restart: False, L2VPN EVPN:True L2VPN VPLS:True
  Best route selection
    Always compare MED: False, Ignore as path: False
    Ignore local preference: False, Ignore origin: False
    Ignore MED: False, Ignore route source: False
    Ignore router ID: False, Ignore uptime: True
    Ignore cluster length: False, Ignore peer IP: False
    Route select parameter: 0
  Timers
    Connect retry: 30s, Keepalive: 30s, Holdtime: 90s
  Statistics
    Peers configured: 1, Peers auto discovery: 0
      Peers in idle          : 0
      Peers in connect       : 0
      Peers in active        : 0
      Peers in opensent      : 0
      Peers in openconfirm   : 0
      Peers in established   : 1

api  To access the Operational State API that corresponds to this CLI, click here.

BGP Peer

The 'show bgp peer' commands display information on BGP peers.

Syntax:

show bgp peer <option> …​

Option Description

-

Without any option, the commands display all BGP peers in all instances in a summary table format.

summary

Displays scaled BGP peer status.

detail

Detailed information on all BGP peers in all instances in a list view.

<peer-name>

Detailed information on the peer with the given name.

history

Displays BGP peer history information such as the peer state down reasons.

history <peer-address>

Displays BGP peer history information such as the peer state down reasons for a specified peer.

history <peer-address> detail`

Displays Detailed BGP peer history information such as the peer state down reasons for a specified peer.

history detail

Displays detailed BGP history information such as the peer state down reasons.

address <peer-address>

Detailed information on the peer with the given IP address.

instance <instance-name>

Summary of all BGP peers in the given instance.

instance <instance-name> detail

Detailed information on all BGP peers in the given instance.

instance <instance-name> detail <peer-name>

Detailed information on the peer with the given name in the given instance.

instance <instance-name> detail address <peer-address>

Detailed information on the peer with the given IP address in the given instance.

statistics

Received and sent BGP prefixes per AFI/SAFI for all peers in all instances.

statistics peer <peer-name>

Received and sent BGP prefixes per AFI/SAFI for the peer with the given name.

statistics peer address <peer-address>

Received and sent BGP prefixes per AFI/SAFI for the peer with the given IP address.

statistics instance <instance-name> peer <peer-name>

Received and sent BGP prefixes per AFI/SAFI for the peer with the given name in the given instance.

statistics instance <instance-name> peer address <peer-address>

Received and sent BGP prefixes per AFI/SAFI for the peer with the given IP address in the given instance.

Although 6PE routes are labeled, they are handled as unicast routes, and therefore will be shown as IPv6 unicast in the BGP peer statistics.

Example 1: BGP Peer Summary View

supervisor@rtbrick: op> show bgp peer
Instance: default
  Peer                                     Remote AS    State         Up/Down Time               PfxRcvd              PfxSent
  PE2                                      2000         Established   11d:22h:18m:30s            12                   20
Instance: default
  Peer                                     Remote AS    State         Up/Down Time               PfxRcvd              PfxSent
  CE1                                      65535        Established   6d:02h:28m:02s             2                    2
  CE1                                      65535        Established   6d:02h:27m:45s             2                    2

Example 2: BGP peer summary

supervisor@rtbrick.net: op> show bgp peer summary
Instance: default
 Established: 2, OpenConfirm: 0, OpenSent: 0, Active: 0, Connect: 0, Idle: 0
Instance: vrf1-blue
 Established: 0, OpenConfirm: 0, OpenSent: 0, Active: 0, Connect: 0, Idle: 0
Instance: vrf1-evpn-vpws
 Established: 0, OpenConfirm: 0, OpenSent: 0, Active: 0, Connect: 0, Idle: 0
Instance: vrf1-vpls-vpws
 Established: 0, OpenConfirm: 0, OpenSent: 0, Active: 0, Connect: 0, Idle: 0

Example 3: BGP Peer Detail View

supervisor@rtbrick.net cfg> show bgp peer detail
Peer: -, Peer IP: 12.0.0.1, Remote AS: -, Local IP: 12.0.0.2, Local AS: 4200000002, Any AS: False
  Type: ebgp, State: Idle, Up/Down Time: Thu Aug 07 05:57:40 GMT +0000 2025, Reason: Cease, Sub-Code: Connect reject
  Discovered on interface: -
  Last transition: Thu Aug 07 17:19:19 GMT +0000 2025, Flap count: 1
  Peer ID        : 0.0.0.0, Local ID: 192.168.0.20
  Instance       : default, Peer group: PE1_PE2
  6PE enabled    : False
  TTL security   : False, TTL limit: -
  Timer values:
    Peer keepalive : 0s, Local keepalive: 30s
    Peer holddown  : 0s, Local holddown : 90s
    Connect retry  : 30s
  Timers:
    Connect retry timer : 0
    Keepalive timer     : 0
    Holddown timer      : 0
  NLRIs:
    Sent           : ['l2vpn-evpn', 'ipv4-unicast', 'ipv6-unicast', 'ipv4-vpn-unicast', 'ipv6-vpn-unicast', 'ipv4-vpn-multicast', 'ipv4-labeled-unicast', 'ipv6-labeled-unicast']
    Received       : ['l2vpn-evpn', 'ipv4-unicast', 'ipv6-unicast', 'ipv4-vpn-unicast', 'ipv6-vpn-unicast', 'ipv4-vpn-multicast', 'ipv4-labeled-unicast', 'ipv6-labeled-unicast']
    Negotiated     : ['l2vpn-evpn', 'ipv4-unicast', 'ipv6-unicast', 'ipv4-vpn-unicast', 'ipv6-vpn-unicast', 'ipv4-vpn-multicast', 'ipv4-labeled-unicast', 'ipv6-labeled-unicast']
  Capabilities:
    Addpath sent                  : None
    Addpath received              : None
    Addpath negotiated            : None
    Extended nexthop sent         : ['ipv4-vpn-unicast', 'ipv4-vpn-multicast']
    Extended nexthop received     : ['ipv4-vpn-multicast', 'ipv4-vpn-unicast']
    Extended nexthop negotiated   : ['ipv4-vpn-multicast', 'ipv4-vpn-unicast']
    <...>

Example 4: BGP Peer Statistics

supervisor@rtbrick: op> show bgp peer statistics instance default peer PE2
Instance: default
  Peer           AFI     SAFI               PfxRcvd    PfxSent
  PE2            ipv4    unicast            0          0
                 ipv4    labeled-unicast    0          0
                 ipv6    unicast            2          3
                 ipv6    labeled-unicast    2          3
                 ipv4    vpn-unicast        4          7
                 ipv6    vpn-unicast        4          7
                 ipv4    multicast          0          0
                 ipv4    vpn-multicast      0          0

Example 5: BGP Peer history for a specified peer

supervisor@rtbrick.net: op> show bgp peer history peer address 26.0.1.6
Instance: vrf1-blue
  Peer Address                             Source Address                           Type         Last Reset Reason  Update Time
  26.0.1.6                                 26.0.1.2                                 TCP Error    Cease, Sub-Cod...  Sun Aug 10 13:12:21
  26.0.1.6                                 26.0.1.2                                 Config C...  Cease, Sub-Cod...  Sun Aug 10 13:12:04

Example 6: Detailed BGP peer history information

supervisor@rtbrick.net: op> show bgp peer history detail
Instance: vrf1-blue
  Peer address: 26.0.1.6, Source address: 26.0.1.2
    Type: TCP Error, Update time: Sun Aug 10 13:12:21 GMT +0000 2025,
    Last reset reason: Cease, Sub-Code: Admin shutdown
  Peer address: 26.0.1.6, Source address: 26.0.1.2
    Type: Config Change, Update time: Sun Aug 10 13:12:04 GMT +0000 2025,
    Last reset reason: Cease, Sub-Code: Admin shutdown
  <...>

api  To access the Operational State API that corresponds to this CLI, click here.

BGP Peer Group

The 'show bgp peer-group' commands display parameters like BGP attributes that are specific to the respective peer groups.

Syntax:

show bgp peer-group <option> …​

Option Description

-

Without any option, the commands display information on all peer groups in all instances.

<peer-group-name>

Information on the peer group with the given name.

instance <instance-name>

All peer groups in the given instance.

instance <instance-name> <peer-group-name>

Information on the peer group with the given name in the given instance.

Example 1: BGP Peer Group

supervisor@rtbrick: op> show bgp peer-group to_pe2
Instance: default
  Peer group name       : to_pe2
    Remote AS           : 2000
    Import rule         : None
    Export rule         : None
    Remove AS           : None
    Nexthop self        : None
    Multipath iBGP      : None
    Multipath eBGP      : None
    Client-to-Client    : None
    Add path            : None
    eBGP multihop       : None
    Hop (TTL)           : None
    Any AS              : None
    Update VPNv4 NH     : None
    Update MVPN NH      : None

Example 2: BGP peer group with TTL limit

supervisor@rtbrick.net: cfg> show bgp peer-group
Instance: default
  Peer group name: CE1
    Remote AS: 65034, EBGP multihop: 15
    Link-local next hop only: True, Local AS: 2
    RPKI validation filter: loose
  Peer group name: PE1
    Remote AS: 4200000001
    Local AS: 12, No prepend: True, Replace AS: True
    TTL security: True

Example 3: BGP peer group with EBGP multihop

supervisor@rtbrick.net: cfg> show bgp peer-group
Instance: default
  Peer group name: PE2
    Remote AS: 4200000002, EBGP multihop: 255
    Local AS: 4200000001, No prepend: True, Replace AS: True

BGP FIB

The show bgp fib commands display the BGP forwarding table. In contrast to the 'show bgp rib' commands, the output of the show bgp fib commands includes only the selected routes. The BGP route selection occurs between the RIB and the FIB.

Syntax:

show bgp fib <option> …​

Option Description

-

Without any option, the commands display the BGP forwarding table for all address families and all instances in a summary table format.

instance

Instance name.

summary

Displays summary information.

<afi>

BGP forwarding table summary for the given address family (AFI), all sub-address families and all instances. Supported AFI values are 'ipv4' and 'ipv6'.

<afi> <safi>

BGP forwarding table summary for the given address family (AFI) and sub-address family (SAFI), and all instances. Supported SAFI values are 'unicast', 'labeled-unicast', 'multicast', 'vpn-multicast', and 'vpn-unicast'.

<afi> <safi> detail

Detailed list view of the BGP forwarding table for the given address family (AFI) and sub-address family (SAFI), and all instances.

<afi> <safi> <prefix>

BGP forwarding table entry for the given prefix and all instances.

<afi> <safi> instance <instance-name>

BGP forwarding table summary for the given AFI, SAFI, and instance.

<afi> <safi> instance <instance-name> detail

Detailed list view of BGP forwarding table for the given AFI, SAFI, and instance.

<afi> <safi> instance <instance-name> <prefix>

BGP forwarding table entry for the given prefix and instance.

Example 1: Summary information for the installed BGP routes in the FIB under a specific BGP instance.

supervisor@rtbrick.net: cfg> show bgp fib instance default summary
Instance: default, Total Routes: 1230200
  Address family                 Routes
  IPv4 unicast                  1000100
  IPv6 unicast                   230100
  Total Routes                  1230200

Example 2: Summary view of the BGP FIB for IPv6, all SAFIs and all instances

supervisor@rtbrick: op> show bgp fib ipv6
Instance: default, AFI: ipv6, SAFI: unicast
  Prefix                                        Preference      Out Label            Next Hop
  2001:db8:0:2::/32                             20              -                    198.51.100.39
  2001:db8:0:2::/32                             20              -                    198.51.100.39
Instance: services, AFI: ipv6, SAFI: unicast
  Prefix                                        Preference      Out Label            Next Hop
  2001:db8:0:6::/32                             200             -                    2001:db8:0:4::
Instance: default, AFI: ipv6, SAFI: labeled-unicast
  Prefix                                        Preference      Out Label            Next Hop
  2001:db8:0:2::/32                             20              2003                 198.51.100.39
  2001:db8:0:2::/32                             20              2003                 198.51.100.39
Instance: default, AFI: ipv6, SAFI: vpn-unicast
  Prefix                                        Preference      Out Label            Next Hop
  2001:db8:0:5::/32                             200             20003,bos:1
  2001:db8:0:6::/32                             200             20003,bos:1
  2001:db8:0:8::/32                             200             20003,bos:1
  2001:db8:0:9::/32                             20              20006,bos:1          2001:db8:0:7::
  2001:db8:0:10::/32                            20              20006,bos:1          2001:db8:0:7::
  2001:db8:0:11::/32                            20              20006,bos:1          2001:db8:0:7::
  2001:db8:0:12::/32                            20              20006,bos:1          2001:db8:0:7::

Example 3: Detailed view of the BGP FIB for IPv6 VPN unicast routes in the default instances

supervisor@rtbrick: op> show bgp fib ipv6 vpn-unicast instance default detail
Instance: default, AFI: ipv6, SAFI: vpn-unicast
  Prefix: 2001:db8:0:5::/32
    Route source: bgp-local, Send path ID: 405188370, Received path ID: None, Path hash: None
    AS path: None, Originator ID: None, Origin: Incomplete
    Community: None
    Extended community: ['target:198.51.100.93:2']
    Large community: None
    Cluster list: None
    IGP metric: None, Local preference: 100, Multi exit discriminator: 0
    Preference: 200, External route: None, Readvertised route: None
    Route up: None
    Next hop: 12.0.0.2, Label: 20003,bos:1
  Prefix: 2001:db8:0:6::/32
    Route source: bgp-local, Send path ID: 2400017309, Received path ID: None, Path hash: None
    AS path: None, Originator ID: None, Origin: Incomplete
    Community: None
    Extended community: ['target:198.51.100.93:2']
    Large community: None
    Cluster list: None
    IGP metric: None, Local preference: 100, Multi exit discriminator: None
    Preference: 200, External route: None, Readvertised route: None
    Route up: None
    Next hop: 12.0.0.2, Label: 20003,bos:1

Example 4: Summary information for the installed BGP routes in the FIB under a specific BGP instance.

supervisor@rtbrick.net: cfg> show bgp fib instance default summary
Instance: default, Total Routes: 1230200
  Address family                 Routes
  IPv4 unicast                  1000100
  IPv6 unicast                   230100
  Total Routes                  1230200

Example 5: Summary information for the installed BGP routes in the FIB for a specified AFI and SAFI within a specific BGP instance.

supervisor@rtbrick.net: cfg> show bgp fib ipv6 unicast summary
Instance: default, Total Routes: 230100
  Address family                 Routes
  IPv6 unicast                   230100
  Total Routes                   230100

Example 5: Summary information for the installed BGP routes in the FIB.

supervisor@rtbrick.net: cfg> show bgp fib summary
Instance: default, Total Routes: 1230200
  Address family                 Routes
  IPv4 unicast                  1000100
  IPv6 unicast                   230100
  Total Routes                  1230200

BGP RIB-in

This command displays information about the BGP routes received from BGP neighbors.

Syntax:

show bgp rib-in <option>

Attribute Description

-

Without any option, the command displays information on the received BGP routing table on all instances in a summary table format.

summary

Displays a summary of the RIB for all instances.

instance <instance-name>

Name of the instance. Displays the RIB summary information for BGP routes received from all neighbors for a specified instance. Additional filtering options such as detail, prefix, peer, peer address, and summary can be added to further narrow down the results.

instance <instance_name> peer address <peer_ip>

Displays the RIB entry for BGP routes learned from a specific peer IP address for a specified instance. Additional filtering options such as detail, summary can be used to further narrow down the results.

instance <instance_name> peer <peer-name>

Displays the RIB entry for BGP routes learned from a specific peer (name) for a specified instance. Additional filtering options such as detail, summary can be used to further narrow down the results.

instance <instance_name> <prefix>

Displays the RIB entry for a given prefix for a specified instance. Additional filtering options such as detail can be used to further narrow down the results.

instance <instance_name> summary

Displays a summary of the RIB for a specified instance.

<prefix>

Displays the RIB entry for a given prefix across all instances. Additional filtering options such as detail can be used to further narrow down the results.

<afi>

BGP routing table summary for the given address family (AFI), all sub-address families and all instances. Supported AFI values are 'ipv4' and 'ipv6'. Additional filtering options such as detail, flowspec, and instance can be added to further narrow down the results.

<afi> detail

Detailed list view of the BGP routing table for the given AFI,

<afi> flowspec

Displays BGP routing table entries for FlowSpec routes for the given AFI, all sub-address families and all instances. Supported AFI values are 'ipv4' and 'ipv6'. Additional filtering options such as community, detail, filter, hash, instance, peer address, peer, and summary can be added to further narrow down the results.

<afi> <prefix>

Displays the RIB entry for a given prefix for a specified address family. Supported AFI values are 'ipv4' and 'ipv6'. Additional filtering options such as detail can be added to further narrow down the results.

<afi> <safi>

Displays BGP routing table summary for the given AFI and subsequent address family identifier (SAFI), and all instances. Supported SAFI values are 'labeled-unicast', 'unicast', 'vpn-multicast', and 'vpn-unicast'. Additional filtering options such as community, detail, instance, peer address, peer, source, and summary can be added to further narrow down the results.

<afi> <safi> community <community>

Displays BGP routing table entries for a given community for the specified AFI and SAFI, and all instances. Additional filtering options such as detail can be added to further narrow down the results.

<afi> <safi> detail

Detailed list view of the BGP routing table for the given AFI and SAFI, and all instances. Supported SAFI values are 'labeled-unicast', 'unicast', 'vpn-multicast', and 'vpn-unicast'.

<afi> <safi> instance <instance_name>

BGP routing table summary for the given AFI, SAFI, and instance. Supported SAFI values are 'labeled-unicast', 'unicast', 'vpn-multicast', and 'vpn-unicast'. Additional filtering options such as detail, peer address, peer, prefix, and summary can be added to further narrow down the results.

<afi> <safi>source <source>

Displays a summarized list of all BGP routes received from a peer (source) for a specified AFI and SAFI. Supported AFI values are 'ipv4' and 'ipv6'. Additional filtering options such as detail can be added to further narrow down the results.

post-policy

Displays the post-policy RIB summary information for BGP routes received from all neighbors for all instances. Additional filtering options such as instance, import, prefix, source, summary, and validation-state can be added to further narrow down the results.

post-policy summary

Displays a summary of the post-policy RIB.

post-policy instance <instance-name>

Name of the instance. Displays the post-policy RIB summary information for BGP routes received from all neighbors for a specified instance. Additional filtering options such as detail, error, import, peer, peer address, policy-accept, policy-deny, summary, and validation-state can be added to further narrow down the results.

post-policy instance <instance-name> error

Displays the post-policy RIB entry for BGP routes that encountered errors during processing for a specified instance. Additional filtering options such as detail, nexthop-unreachable, and retain-rt-deny can be used to further narrow down the results.

post-policy instance <instance-name> import

Displays the post-policy RIB entry for BGP routes that were rejected by the import policy for a specified instance. Additional filtering options such as detail and summary can be used to further narrow down the results.

post-policy instance <instance-name> peer address <peer_ip>

Displays the post-policy RIB entry for BGP routes learned from a specific peer IP address for a specified instance. Additional filtering options such as detail, error, policy-accept, policy-deny, summary can be used to further narrow down the results.

post-policy instance <instance-name> peer <peer-name>

Displays the post-policy RIB entry for BGP routes learned from a specific peer (name) for a specified instance. Additional filtering options such as detail, error, policy-accept, policy-deny, summary can be used to further narrow down the results.

post-policy instance <instance-name> policy-accept

Displays the post-policy RIB entry for BGP routes that were accepted by the import policy for a specified instance. Additional filtering options such as detail can be used to further narrow down the results.

post-policy instance <instance-name> policy-deny

Displays the post-policy RIB entry for BGP routes that were denied by the import policy for a specified instance. Additional filtering options such as detail can be used to further narrow down the results.

post-policy instance <instance-name> <prefix>

Displays the post-policy RIB entry for a given prefix for a specified instance. Additional filtering options such as detail can be used to further narrow down the results.

post-policy instance <instance-name> summary

Displays a summary of the post-policy RIB for a specified instance.

post-policy instance <instance-name> validation-state <state>

Displays the post-policy RIB entry for BGP routes with a specific validation state for a specified instance. Supported validation states are unknown, valid, invalid, and init. Additional filtering options such as detail can be added to further narrow down the results.

post-policy <prefix>

Displays the post-policy RIB entry for a given prefix for all instances. Additional filtering options such as detail can be added to further narrow down the results.

post-policy <afi>

BGP routing table summary for the given AFI, all sub-address families and all instances. Supported AFI values are 'ipv4' and 'ipv6'. Additional filtering options such as detail, flowspec, and instance can be added to further narrow down the results.

post-policy <afi> detail

Detailed list view of the BGP routing table for the given AFI.

post-policy <afi> flowspec

Displays BGP routing table entries for FlowSpec routes for the given AFI, all sub-address families and all instances. Supported AFI values are 'ipv4' and 'ipv6'. Additional filtering options such as community, detail, error, filter, hash, import, instance, peer address, peer, policy-accept, policy-deny, and summary can be added to further narrow down the results.

post-policy <afi> <prefix>

Displays the post-policy RIB entry for a given prefix for a specified AFI. Supported AFI values are 'ipv4' and 'ipv6'. Additional filtering options such as detail can be added to further narrow down the results.

post-policy <afi> source <source>

Displays a summarized list of all BGP routes received from a peer (source) for a specified AFI. Supported AFI values are 'ipv4' and 'ipv6'. Additional filtering options such as detail can be added to further narrow down the results.

post-policy <afi> <safi>

Displays BGP routing table summary for the given AFI and SAFI, and all instances. Supported SAFI values are 'labeled-unicast', 'unicast', 'vpn-multicast', and 'vpn-unicast'. Additional filtering options such as community, detail, error, import, instance, peer address, peer, policy-accept, policy-deny can be added to further narrow down the results.

post-policy <afi> <safi> community <community>

Displays BGP routing table entries for a given community for the specified AFI and SAFI, and all instances. Additional filtering options such as detail can be added to further narrow down the results.

post-policy <afi> <safi> error

BGP routes with error status for the given AFI and SAFI, and all instances. Supported SAFI values are 'labeled-unicast', 'unicast', 'vpn-multicast', and 'vpn-unicast'. Additional filtering options such as detail, nexthop-unreachable, and retain-rt-deny can be used to further narrow down the results.

post-policy <afi> <safi> import

BGP routes that were rejected by the import policy for the given AFI and SAFI, and all instances. Supported SAFI values are 'labeled-unicast', 'unicast', 'vpn-multicast', and 'vpn-unicast'. Additional filtering options such as detail, summary and validation-state can be used to further narrow down the results.

post-policy <afi> <safi> detail

Detailed list view of the BGP routing table for the given AFI and SAFI, and all instances. Supported SAFI values are 'labeled-unicast', 'unicast', 'vpn-multicast', and 'vpn-unicast'.

post-policy <afi> <safi> instance <instance_name>

BGP routing table summary for the given AFI, SAFI, and instance. Supported SAFI values are 'labeled-unicast', 'unicast', 'vpn-multicast', and 'vpn-unicast'. Additional filtering options such as detail, error, import, peer address, peer, policy-accept, policy-deny, and summary can be added to further narrow down the results.

Example 1: Summary of the BGP received routes

supervisor@rtbrick.net: cfg> show bgp rib-in
Flags: & - Imported, ! - Error, N - RPKI Unknown, I - RPKI Invalid, V - RPKI Valid
Instance: default, AFI: ipv4, SAFI: unicast
  Hostname: Local, Peer IP: 0.0.0.0
  Source IP: 0.0.0.0, Total routes: 9
    Prefix                                   Next Hop        MED         Lpref       AS Path
    192.0.2.0/24                             -               0           -           -
    198.51.100.0/24                          -               0           -           -
    203.0.113.0/24                           -               0           -           -
    192.0.2.10/32                            -               0           -           -
    192.0.2.20/32                            -               0           -           -
    192.0.2.30/32                            -               0           -           -
    192.0.2.11/32                            -               0           -           -
    192.0.2.21/32                            -               0           -           -
    192.0.2.31/32                            -               0           -           -
Instance: default, AFI: ipv4, SAFI: unicast
  Hostname: PE1, Peer IP: 203.0.113.1
  Source IP: 203.0.113.2, Total routes: 4
    Prefix                                   Next Hop        MED         Lpref       AS Path
    198.51.100.10/32                         203.0.113.1     0           -           65536
    198.51.100.20/32                         203.0.113.1     0           -           65536
    198.51.100.11/32                         203.0.113.1     0           -           65536
    198.51.100.21/32                         203.0.113.1     0           -           65536
Instance: default, AFI: ipv4, SAFI: unicast
  Hostname: PE1, Peer IP: 2001:DB8::1
  Source IP: 2001:DB8::2, Total routes: 4

Example 2: The summary of all routes received from a specific BGP instance.

supervisor@rtbrick.net: cfg> show bgp rib-in summary
Instance: default, Total Routes: 124
  Hostname: Local, Peer IP: 0.0.0.0, Source IP: 0.0.0.0
    Address family                           Routes
    IPv4 unicast                             9
    IPv4 labeled-unicast                     9
    Total Routes                             18
  Hostname: PE1, Peer IP: 192.0.2.1, Source IP: 192.0.2.2
    Address family                           Routes
    IPv4 unicast                             4
    IPv4 labeled-unicast                     2
    IPv4 VPN-unicast                         6
    IPv4 VPN-multicast                       6
    IPv6 unicast                             4
    IPv6 labeled-unicast                     2
    IPv6 VPN-unicast                         6
    L2VPN VPLS                               7
    L2VPN EVPN                               7
    Total Routes                             44
  Hostname: Local, Peer IP: ::, Source IP: ::
    Address family                           Routes
    IPv6 unicast                             9
    IPv6 labeled-unicast                     9
    Total Routes                             18
  Hostname: PE1, Peer IP: 2001:DB8::1, Source IP: 2001:DB8::2
    Address family                           Routes
    IPv4 unicast                             4
    IPv4 labeled-unicast                     2
    IPv4 VPN-unicast                         6
    IPv4 VPN-multicast                       6
    IPv6 unicast                             4
    IPv6 labeled-unicast                     2
    IPv6 VPN-unicast                         6
    L2VPN VPLS                               7
    L2VPN EVPN                               7
    Total Routes                             44
    <...>

Example 3: View of BGP routes filtered based in the source protocol, direct.

supervisor@rtbrick.net: cfg> show bgp rib-in source direct
Flags: & - Imported, ! - Error, N - RPKI Unknown, I - RPKI Invalid, V - RPKI Valid
Instance: default, AFI: ipv4, SAFI: unicast
  Hostname: Local, Peer IP: 0.0.0.0
  Source IP: 0.0.0.0, Total routes: 9
    Prefix                                    Next Hop        MED         Lpref       AS Path
    192.0.2.0/24                              -               0           -           -
    192.0.2.1/24                              -               0           -           -
    192.0.2.2/24                              -               0           -           -
    192.168.0.20/32                           -               0           -           -
    192.168.1.20/32                           -               0           -           -
    192.168.2.20/32                           -               0           -           -
    192.168.0.21/32                           -               0           -           -
    192.168.1.21/32                           -               0           -           -
    192.168.2.21/32                           -               0           -           -
Instance: vrf1-blue, AFI: ipv4, SAFI: unicast
  Hostname: Local, Peer IP: 0.0.0.0
  Source IP: 0.0.0.0, Total routes: 4
    Prefix                                   Next Hop        MED         Lpref       AS Path

Example 4: Summary view of the BGP rib-in for IPv4, all SAFIs and all instances

supervisor@rtbrick: op> show bgp rib-in ipv4
Flags: & - Imported, ! - Error, N - RPKI Unknown, I - RPKI Invalid, V - RPKI Valid
Instance: default, AFI: ipv4, SAFI: unicast
  Hostname: Local, Peer IP: 0.0.0.0
  Source IP: 0.0.0.0, Total routes: 9
    Prefix                                           Next Hop        MED         Lpref       AS Path
    192.0.2.0/24                                     -               0           -           -
    192.0.2.1/24                                     -               0           -           -
    192.0.2.2/24                                     -               0           -           -
    192.0.2.20/32                                    -               0           -           -
    192.0.2.21/32                                    -               0           -           -
    192.0.2.22/32                                    -               0           -           -
    192.0.2.23/32                                    -               0           -           -
    192.0.2.24/32                                    -               0           -           -
    192.0.2.25/32                                    -               0           -           -
Instance: default, AFI: ipv4, SAFI: unicast
  Hostname: PE1, Peer IP: 192.0.2.1
  Source IP: 192.0.2.2, Total routes: 4
    Prefix                                           Next Hop        MED         Lpref       AS Path
    192.0.2.10/32                                    192.0.2.1       0           -           65536
    192.0.2.11/32                                    192.0.2.1       0           -           65536
    192.0.2.12/32                                    192.0.2.1       0           -           65536
    192.0.2.13/32                                    192.0.2.1       0           -           65536
Instance: default, AFI: ipv4, SAFI: unicast
  Hostname: PE1, Peer IP: 192::1
  Source IP: 192::2, Total routes: 4
    Prefix                                           Next Hop        MED         Lpref       AS Path
    192.0.2.10/32                                    192::1          0           -           65536
    192.0.2.11/32                                    192::1          0           -           65536
    192.0.2.12/32                                    192::1          0           -           65536
    192.0.2.13/32                                    192::1          0           -           65536

Example 5: Summary view of the received routes

supervisor@rtbrick: op> show bgp rib-in ipv4 unicast instance default peer address 192.0.2.1
Flags: & - Imported, ! - Error, N - RPKI Unknown, I - RPKI Invalid, V - RPKI Valid
Instance: default, AFI: ipv4, SAFI: unicast
  Hostname: PE1, Peer IP: 192.0.2.1
  Source IP: 192.0.2.2, Total routes: 4
    Prefix                           Next Hop               MED         Lpref       AS Path
    192.168.1.10/32                  192.0.2.1              0           -           65536
    192.168.2.10/32                  192.0.2.1              0           -           65536
    192.168.1.11/32                  192.0.2.1              0           -           65536
    192.168.2.11/32                  192.0.2.1              0           -           65536

Example 6: Summary view of the BGP rib-in post-policy

supervisor@rtbrick.net: op> show bgp rib-in post-policy
Flags: & - Imported, ! - Error, N - RPKI Unknown, I - RPKI Invalid, V - RPKI Valid
Instance: default, AFI: ipv4, SAFI: unicast
  Hostname: Local, Peer IP: 0.0.0.0
  Source IP: 0.0.0.0, Total routes: 9
    Flags  Prefix                                Next Hop          MED         Lpref       AS Path
           192.0.2.0/24                          -                 0           -           -
           192.0.2.1/24                          -                 0           -           -
           192.0.2.2/24                          -                 0           -           -
           203.0.113.20/32                       -                 0           -           -
           203.0.113.21/32                       -                 0           -           -
           203.0.113.22/32                       -                 0           -           -
           203.0.113.23/32                       -                 0           -           -
           203.0.113.24/32                       -                 0           -           -
           203.0.113.25/32                       -                 0           -           -
Instance: default, AFI: ipv4, SAFI: unicast
  Hostname: PE1, Peer IP: 192.0.2.1
  Source IP: 192.0.2.2, Total routes: 3
    Flags  Prefix                                Next Hop          MED         Lpref       AS Path
           192.0.2.10/32                         192.0.2.1         0           -           65536
           192.0.2.11/32                         192.0.2.1         0           -           65536
           192.0.2.12/32                         192.0.2.1         0           -           65536
Instance: default, AFI: ipv4, SAFI: unicast
  Hostname: PE1, Peer IP: 2001:DB8::1
  Source IP: 2001:DB8::2, Total routes: 3
    Flags  Prefix                                Next Hop          MED         Lpref       AS Path
           192.0.2.10/32                         2001:DB8::1       0           -           65536
           192.0.2.11/32                         2001:DB8::1       0           -           65536
           192.0.2.12/32                         2001:DB8::1       0           -           65536
Instance: vrf1-blue, AFI: ipv4, SAFI: unicast
  Hostname: Local, Peer IP: 0.0.0.0
  Source IP: 0.0.0.0, Total routes: 5
    Flags  Prefix                                Next Hop          MED         Lpref       AS Path
           0.0.0.0/0                             -                 0           -           -
           192.0.2.30/24                         -                 0           -           -
           192.0.2.31/32                         -                 0           -           -
           192.0.2.32/32                         -                 0           -           -
           192.0.2.33/32                         -                 0           -           -

Example 7: Summary view of the BGP rib-in post-policy for a specific instance, AFI, and SAFI.

supervisor@rtbrick.net: op> show bgp rib-in post-policy ipv4 unicast instance default
Flags: & - Imported, ! - Error, N - RPKI Unknown, I - RPKI Invalid, V - RPKI Valid
Instance: default, AFI: ipv4, SAFI: unicast
  Hostname: Local, Peer IP: 0.0.0.0
  Source IP: 0.0.0.0, Total routes: 9
    Flags  Prefix                               Next Hop            MED         Lpref       AS Path
           192.0.2.0/24                         -                   0           -           -
           192.0.2.1/24                         -                   0           -           -
           192.0.2.2/24                         -                   0           -           -
           192.0.2.3/32                         -                   0           -           -
           192.0.2.4/32                         -                   0           -           -
           192.0.2.5/32                         -                   0           -           -
           192.0.2.6/32                         -                   0           -           -
           192.0.2.7/32                         -                   0           -           -
           192.0.2.8/32                         -                   0           -           -
Instance: default, AFI: ipv4, SAFI: unicast
  Hostname: PE1, Peer IP: 192.0.2.9
  Source IP: 192.0.2.10, Total routes: 3
    Flags  Prefix                               Next Hop           MED         Lpref       AS Path
           192.0.2.11/32                        192.0.2.9          0           -           65536
           192.0.2.12/32                        192.0.2.9          0           -           65536
           192.0.2.13/32                        192.0.2.9          0           -           65536
Instance: default, AFI: ipv4, SAFI: unicast
  Hostname: PE1, Peer IP: 192.0.2.14
  Source IP: 192.0.2.15, Total routes: 3
    Flags  Prefix                               Next Hop           MED         Lpref       AS Path
           192.0.2.11/32                        192.0.2.14         0           -           65536
           192.0.2.12/32                        192.0.2.14         0           -           65536
           192.0.2.13/32                        192.0.2.14         0           -           65536

Example 8: Summary view of the BGP rib-in post-policy for a specific instance, AFI, SAFI, and policy-accept filter.

supervisor@rtbrick.net: op> show bgp rib-in post-policy ipv4 unicast policy-accept
Flags: & - Imported, ! - Error, N - RPKI Unknown, I - RPKI Invalid, V - RPKI Valid
Instance: default, AFI: ipv4, SAFI: unicast
  Hostname: PE1, Peer IP: 192.0.2.1
  Source IP: 192.0.2.2, Total routes: 3
    Flags  Prefix                               Next Hop           MED         Lpref       AS Path
           192.168.1.10/32                      192.0.2.1          0           -           65536
           192.168.2.10/32                      192.0.2.1          0           -           65536
           192.168.1.11/32                      192.0.2.1          0           -           65536
Instance: default, AFI: ipv4, SAFI: unicast
  Hostname: PE1, Peer IP: 192::1
  Source IP: 192::2, Total routes: 3
    Flags  Prefix                               Next Hop           MED         Lpref       AS Path
           192.168.1.10/32                      192::1             0           -           65536
           192.168.2.10/32                      192::1             0           -           65536
           192.168.1.11/32                      192::1             0           -           65536

Example 9: Summary view of the BGP rib-in post-policy for a specific instance, AFI, SAFI, and policy-deny filter.

supervisor@rtbrick.net: op> show bgp rib-in post-policy ipv4 unicast policy-deny
Flags: & - Imported, ! - Error, N - RPKI Unknown, I - RPKI Invalid, V - RPKI Valid
Instance: default, AFI: ipv4, SAFI: unicast
  Hostname: PE1, Peer IP: 192.0.2.1
  Source IP: 192.0.2.2, Total routes: 1
    Flags  Prefix                               Next Hop               MED         Lpref       AS Path
    !      192.168.2.11/32                      192.0.2.1              0           -           65536
Instance: default, AFI: ipv4, SAFI: unicast
  Hostname: PE1, Peer IP: 192::1
  Source IP: 192::2, Total routes: 1
    Flags  Prefix                               Next Hop               MED         Lpref       AS Path
    !      192.168.2.11/32                      192::1                 0           -           65536

Example 10: Summary view of the BGP rib-in post-policy for a specific instance, AFI, SAFI, and peer address filter.

supervisor@rtbrick.net: op> show bgp rib-in post-policy ipv4 unicast peer address 192.0.2.1
Flags: & - Imported, ! - Error, N - RPKI Unknown, I - RPKI Invalid, V - RPKI Valid
Instance: default, AFI: ipv4, SAFI: unicast
  Hostname: PE1, Peer IP: 192.0.2.1
  Source IP: 192.0.2.2, Total routes: 3
    Flags  Prefix                             Next Hop               MED         Lpref       AS Path
           192.0.2.10/32                      192.0.2.1              0           -           65536
           192.0.2.20/32                      192.0.2.1              0           -           65536
           192.0.2.11/32                      192.0.2.1              0           -           65536

Example 11: Summary view of the BGP rib-in post-policy for a specific instance, AFI, SAFI, and validation-state filter.

supervisor@rtbrick.net: op> show bgp rib-in post-policy ipv4 unicast validation-state init
Flags: & - Imported, ! - Error, N - RPKI Unknown, I - RPKI Invalid, V - RPKI Valid
Instance: default, AFI: ipv4, SAFI: unicast
  Hostname: PE1, Peer IP: 192.0.2.1
  Source IP: 192.0.2.2
    Flags  Prefix                                 Next Hop           MED         Lpref       AS Path
           192.0.2.10/32                          192.0.2.1          0           -           65536
           192.0.2.20/32                          192.0.2.1          0           -           65536
           192.0.2.11/32                          192.0.2.1          0           -           65536
Instance: default, AFI: ipv4, SAFI: unicast
  Hostname: PE1, Peer IP: 192::1
  Source IP: 192::2
    Flags  Prefix                                 Next Hop           MED         Lpref       AS Path
           192.0.2.10/32                          192::1             0           -           65536
           192.0.2.20/32                          192::1             0           -           65536
           192.0.2.11/32                          192::1             0           -           65536

BGP RIB-out

This command displays the send routes.

Syntax:

show bgp rib-out <option> …​

Option Description

-

Without any option, the command displays advertised BGP routes for all instances.

<afi>

BGP routing table summary for the given address family (AFI), all sub-address families and all instances. Supported AFI values are 'ipv4' and 'ipv6'.

<afi> <safi>

BGP routing table summary for the given address family (AFI) and sub-address family (SAFI), and all instances. Supported SAFI values are evpn, evpn-vpws, flowspec, labeled-unicast, multicast, unicast, vpls, vpls-vpws, vpn-multicast, and vpn-unicast.

<afi> <safi> detail

Detailed list view of the BGP routing table for the given address family (AFI) and sub-address family (SAFI), and all instances.

<afi> <safi> <prefix>

BGP routing table entry for the given prefix and all instances.

<afi> <safi> instance <instance-name>

BGP routing table summary for the given AFI, SAFI, and instance.

<afi> <safi> instance <instance-name> detail

Detailed list view of BGP routing table for the given AFI, SAFI, and instance.

<afi> <safi> peer address <peer-ip>

View of BGP routing table for the given peer Ip address.

<afi> <safi> peer address <peer-ip> detail

Detailed list view of BGP routes for give peer IP address.

<afi> <safi> peer <peer-name>

Displays BGP routing table for the given peer.

<afi> <safi> peer <peer-name>

Detailed list view of BGP routes for the given peer IP address.

<afi> <safi> peer-group <name>

Information of BGP routes for the given peer group name.

<afi> <safi> community <community-name>

Displays BGP routing table for the given community.

<afi> <safi> community <community-name> detail

Detailed list view of BGP routing table for the given community.

<afi> <safi> instance <instance-name> <prefix>

BGP routing table entry for the given prefix and instance.

<afi> <safi> peer <name> / peer address <ip>

Peer name or address

Example 1: Summary view of the routes advertised to a peer

supervisor@rtbrick.net: cfg> sho bgp rib-out ipv4 unicast peer PE2_HOST
Instance: default, AFI: ipv4, SAFI: unicast
  Peer: PE2_HOST, Peer IP: 12.0.0.2, Sent routes: 4
    Prefix                                        MED     Lpref      Origin          Next Hop                                 AS Path
    192.168.1.10/32                               -       100        Incomplete      -                                        -
    192.168.2.10/32                               -       100        Incomplete      -                                        -
    192.168.1.11/32                               -       100        Incomplete      -                                        -
    192.168.2.11/32                               -       100        Incomplete      -                                        -

Example 2: Detailed view of the routes advertised to a peer

supervisor@rtbrick: op> show bgp rib-out
Instance: vrf1, AFI: ipv4, SAFI: unicast
  Peer-group: pe1_ce1, Sent routes: 4
    Prefix                              MED             Lpref             Origin          Next Hop                            AS Path
    198.51.100.104/24                   0               -                 Incomplete      -                                   65001
    198.51.100.113/24                   0               -                 Incomplete      -                                   65001
    198.51.100.105/24                   0               -                 Incomplete      -                                   65001
    198.51.100.106/24                   0               -                 Incomplete      -                                   65001
Instance: vrf1, AFI: ipv6, SAFI: unicast
  Peer-group: pe1_ce1, Sent routes: 3
    Prefix                              MED             Lpref             Origin          Next Hop                            AS Path
    2001:db8:0:14::/24                  0               -                 Incomplete      -                                   65001
    2001:db8:0:15::/24                  0               -                 Incomplete      -                                   65001
    2001:db8:0:16::/24                  0               -                 Incomplete      -                                   65001

Example 3: Routes advertised to a peer

supervisor@rtbrick.net: cfg> show bgp fib ipv4 multicast
Instance: vrf1-blue, AFI: ipv4, SAFI: multicast
  Group           Source                                        Preference      Out Label            Route Type           Next Hop
  -               -                                             20              20002,bos:1          Intra-AS_I-PMSI_AD   12.0.0.1
                                                                                20002,bos:1          Intra-AS_I-PMSI_AD   12::1
  232.1.1.1/32    10.1.1.1/32                                   20              20002,bos:1          Source_Tree_Join     12.0.0.1
                                                                                20002,bos:1          Source_Tree_Join     12::1
  232.1.2.1/32    10.1.1.1/32                                   20              20002,bos:1          Source_Tree_Join     12.0.0.1
                                                                                20002,bos:1          Source_Tree_Join     12::1

TCP Connections

This command displays information of the TCP connections used by BGP.

Syntax:

show bgp tcp bgp.iod.1 connection <option> …​

Option Description

-

Without any option, the command displays the TCP connections used by BGP for all instances.

detail

Detailed list view of the the TCP connections for the given address family (AFI) and sub-address family (SAFI), and all instances.

prefix

TCP connections for the given prefix and all instances.

instance <instance-name>

TCP connections summary for the given instance.

Example 1: Summary view of the BGP TCP connections

supervisor@leaf1: cfg> show bgp tcp bgp.iod.1 connection
Instance       Local IP Address                  Remote IP Address           Local Port  Remote Port  State
default        2001:db8:0:189::                  2001:db8:0:38::             179         49568        Established
default        2001:db8:0:61::                   2001:db8:0:237::            50529       179          Established

Example 2: Detailed information of the BGP TCP connections

supervisor@leaf1: cfg> show bgp tcp bgp.iod.1 connection detail
Instance: default
  Local IPv6 address       : 2001:db8:0:189::
  Remote IPv6 address      : 2001:db8:0:38::
  Local port               : 179
  Remote port              : 49568
  State                    : Established
    Internal
      Options                  : -- | Keepalive | --
      TOS                      : 0
      TTL                      : 1
      Priority                 : 1
      Flags                    : -|-|-|-|-|Nagle Disabled|-|Wnd Scale|-|-|-
      Last trigger             : 27
      Timer                    : 37624
    Timers
      Poll                     : 0s
      Poll interval            : 0s
      Retransmission           : 65535s
    Receiver
      Expected sequence        : 32965979
      Available window         : 96816
      Announced window         : 95562
      Announced wnd RT edge    : 33061541
      MSS                      : 1440
      RTT estimate             : 0
    Timeout
      Sequence                 : 17683639s
      Retransmission           : 3s
      Retransmissions          : 0s
      Duplicate acks           : 0s
      Highest ack'd sequence   : 17683658s
    Congestion
      Window                   : 162834
      Persist count            : 0
      Send scale               : 5
      Receive scale            : 5
    Sender
      Next seq to send         : 17683658
      Last wnd update seq      : 32965979
      Last wnd update ack      : 17683658
      Window                   : 96192
      Max window announced     : 96800
      Acknowledged             : None
      Send buf                 : 56476
      Send queue length        : 0
      Unsent oversize          : 0
      TS last ack sent         : 818020352
    Keepalive
      Next keepalive idle      : 7200000
      Keepalive interval       : 75000
      Keepalive count          : 9
      Keep sent count          : 0
    Authentication
      Auth type                : HMAC-SHA-256-128
      key1-id                  : 255
      key2-id                  : 0
      Algorithm mismatch       : 0
      Secret mismatch          : 43
      Latest sent digest       : 850fea02c98912ce4497ec2b101a4f7c
      Latest received digest   : a718fb88e0d7fd4a00843e6aec03c864

TCP Statistics

This command displays TCP statistics information of the TCP connections used by BGP.

Syntax:

show bgp tcp bgp.iod.1 statistics <option> …​

Option Description

-

Without any option, the command displays the TCP statistics information of the TCP connections used by BGP for all instances.

instance <instance-name>

TCP connections summary for the given instance.

Example: TCP statistics information of the TCP connections used by BGP for the default instance

supervisor@rtbrick: op> show bgp tcp bgp.iod.1 statistics instance default
Instance: default
  IP statistics
    Transmitted packets    : 3103242412
    Received packets       : 47351
    Forwarded packets      : 0
    Dropped packets        : 0
    Checksum error         : 0
    Invalid length error   : 0
    Out of memory error    : 0
    Routing error          : 0
    Protocol error         : 0
    Error in options       : 0
    Misc error             : 0
    Cachehit               : 0
  TCP statistics
    Transmitted packets    : 365499779
    Received packets       : 5577
    Forwarded packets      : 3014656
    Dropped packets        : 46
    Checksum error         : 0
    Invalid length error   : 0
    Out of memory error    : 0
    Routing error          : 3014656
    Protocol error         : 46
    Error in options       : 0
    Misc error             : 2097152
    Cachehit               : 1557594144

BGP Clear Commands

Clear commands allow to reset operational states.

BGP Peer

This commands resets BGP peerings.

Syntax:

clear bgp peer <option> …​

Option Description

all

Clears all the BGP peers.

all soft-in <afi> <safi>

Sends route refresh to all neighbors.

all soft-out <afi> <safi>

Re-advertises all the routes previously sent to the peer.

all stats

Clears the statistics of all the BGP peers.

instance <instance> <peer-ip>

Clears the peer for the given instance and peer IP address.

instance <instance> <peer-ip> source <src-ip>

Clears a specific peer for the given peer IP address and source IP address in the specified instance.

instance <instance> all

Clears all peers in the given instance.

instance <instance> <peer-ip> source <src-ip> soft-in <afi> <safi>

Sends route refresh to specific peer for the given instance, peer-ip, source-ip and address-family.

instance <instance> <peer-ip> soft-in <afi> <safi>

Sends route refresh to peer for the given instance, peer-ip and address-family.

instance <instance> all soft-in <afi> <safi>

Sends route refresh to all peers for the given instance and address family.

instance <instance> <peer-ip> source <src-ip> soft-out <afi> <safi>

Re-advertises all the routes previously sent to the specific peer for the given instance, peer-ip, source-ip and address-family.

instance <instance> <peer-ip> soft-out <afi> <safi>

Sends route refresh to peer for a given instance, peer-ip and address-family.

instance <instance> all soft-out <afi> <safi>

Sends route update to all peers for given instance and address family.

instance <instance> <peer-ip> source <src-ip> stats

Clears the statistics of a specific peer for a given instance, peer-ip and source-IP.

instance <instance> <peer-ip> stats

Clears the statistics of the peer for a given instance and peer-IP.

instance <instance> all stats

Clears the statistics of all peers for a given instance.

Example: The example below shows how to clear all the BGP peers.

supervisor@rtbrick: op> clear bgp peer all

api  To access the Operational State API that corresponds to this CLI, click here.