# Monitoring the BGP Routing Table

#### Purpose

Display the BGP IPv4 routing table or BGP IPv6 routing table.

The show ip bgp and show bgp ipv6 commands display similar information.

#### Action

To display information about routes in the IPv6 multicast address family:

    host1#show bgp ipv6 multicast
    Local BGP identifier 10.13.13.13, local AS 400
      4 routes (160 bytes)
      4 destinations (288 bytes) of which 4 have a route
      4 routes selected for route table installation
      3 path attribute entries (456 bytes)
      Local-RIB version 31. FIB version 31.

    Status codes: > best, * invalid, s suppressed, d dampened, r rejected,
                  a auto-summarized

      Prefix                  Peer            Next-hop               MED  LocPrf   Weight  Origin
      ::103.103.103.0/120     103.103.103.3   ::103.103.103.3        0             0       inc.
    > 3ffe:0:0:1::/64         11.11.11.11     ::101.101.101.1        0    100      0       inc.
    > 3ffe:0:0:3::/64         103.103.103.3   ::103.103.103.3        0             0       inc.
    > 3ffe:0:1:1::/64         12.12.12.12     ::102.102.102.2        0    100      0       inc.

To display information about routes for the specified IPv4 prefix:

    host1:pe1#show ip bgp 10.88.88.1
    BGP route information for prefix 10.88.88.1/32
      Network route (best route
        Advertised to both internal and external peers
        Address Family Identifier (AFI) is ip-v4
        Subsequent Address Family Identifier (SAFI) is unicast
        Next hop IP address is 0.0.0.0 (metric 2)
        Multi-exit discriminator is 1
        Local preference is not present
        Weight is 32768
        Origin is IGP
        AS path is empty
        Extended communities empty

To display information about routes for the specified IPv6 prefix:

    host1:pe1#show bgp ipv6 2001:0430::1/128

    BGP route information for prefix 2001:1::1/128
      Received route learned from internal peer 2.2.2.2 (best route)
        Route placed in IP forwarding table
        Best to advertise to external peers
        Address Family Identifier (AFI) is ip-v6
        Subsequent Address Family Identifier (SAFI) is unicast
        MPLS in-label is none
        MPLS out-label is 17
        Next hop IP address is ::ffff:2.2.2.2 (metric 3)
        Multi-exit discriminator is 0
        Local preference is 100
        Weight is 0
        Origin is IGP
        AS path is 65021

To display information about next hop routers for VRF PE 11 in the IPv4 VPN address family:

    host1:pe1#show ip bgp vpnv4 vrf pe11 next-hops
    Indirect next-hop 11.11.11.2
        Resolution in IP route table of VR pe11
    Reachable (metric 0)
    IP indirect next-hop index 35
    Direct next-hop ATM2/0.11 (11.11.11.2)
        Resolution in IP tunnel-route table of VR pe11
            Not reachable
          Reference count is 1

    Indirect next-hop 2.2.2.2
        Resolution in IP route table of VR pe1
    IP indirect next-hop index 123
    Reachable (metric 100)
        Direct next-hop POS4/0 (10.10.10.1)
                    POS4/1 (12.12.12.1)

    Resolution in IP tunnel-route table of VR pe1
    MPLS indirect next-hop index 578
    Reachable (metric 100)
        Direct next-hop Push 23, POS4/0 (10.10.10.1)
                    Push 43, POS4/1 (12.12.12.1)

    Reference count is 1

To display information about routes in the route-target address family:

    host1:pe1#show ip bgp route-target signaling
    Local BGP identifier 13.13.13.13, local AS 100
      4 routes (240 bytes)
      3 destinations (228 bytes) of which 3 have a route
      3 routes selected for route tables installation
      0 unicast/multicast routes selected for route table installation
      0 unicast/multicast tunnel-usable routes selected for route table installation
      0 tunnel-only routes selected for tunnel-route table installation
      10 path attribute entries (1520 bytes)
      Local-RIB version 19. FIB version 19.
    Status codes: > best, * invalid, s suppressed, d dampened, r rejected,
                  a auto-summarized
      Prefix             Peer            Next-hop         MED LocPrf Weight Origin
    > 0:0:0/0            12.12.12.12     12.12.12.12             100      0 IGP
    > 100:100:1/96       11.11.11.11     11.11.11.11             100      0 IGP
      100:100:1/96       14.14.14.14     14.14.14.14             100      0 IGP
    > 100:100:2/96       11.11.11.11     11.11.11.11             100      0 IGP

To display information about routes in the route-target address family corresponding to the specified RT-MEM-NLRI:

    host1:pe1#show ip bgp route-target signaling 100:100:1/96
    BGP route information for prefix 100:100:1/96
      Received route learned from internal peer 11.11.11.11 (best route)
        Route not placed in IP forwarding table
        Best to advertise to both internal and external peers
        Address Family Identifier (AFI) is ip-v4
        Subsequent Address Family Identifier (SAFI) is route-target-signaling
        Next hop IP address is 11.11.11.11 (metric 0)
        Multi-exit discriminator is not present
        Local preference is 100
        Weight is 0
        Origin is IGP
        AS path is empty
      Received route learned from internal peer 14.14.14.14
        Route not placed in IP forwarding table
        Do not advertise to any peers
        Address Family Identifier (AFI) is ip-v4
        Subsequent Address Family Identifier (SAFI) is route-target-signaling
        Next hop IP address is 14.14.14.14 (metric 0)
        Multi-exit discriminator is not present
        Local preference is 100
        Weight is 0
        Origin is IGP
        AS path is empty

To display information about network routes in the route-target address family:

    host1:pe1#show ip bgp route-target signaling network
    Prefix             Weight Route-map                        Backdoor
    102:111:34/96                                              No
    1111111111:23:1/96                                         No

To display information about network routes in the route-target address family corresponding to the specified RT-MEM-NLRI:

    host1:pe1#show ip bgp route-target signaling network 102:111:34
    Prefix             Weight Route-map                        Backdoor
    102:111:34/96                                              No

To display filtered information about all networks in the BGP routing table:

    host1:pe1#show ip bgp fields peer next-hop next-hop-cost
    Prefix             Peer            Next-hop      Next-hop-cost
    11.11.11.11/32     3.3.3.3         3.3.3.3       Unreachable
    11.11.11.11/32     4.4.4.4         4.4.4.4       Unreachable
    22.22.22.22/32     3.3.3.3         3.3.3.3       Unreachable
    22.22.22.22/32     4.4.4.4         4.4.4.4       Unreachable
    33.33.33.33/32     3.3.3.3         3.3.3.3       Unreachable
    44.44.44.44/32     4.4.4.4         4.4.4.4       Unreachable
    55.55.55.55/32     0.0.0.0         0.0.0.0       0
    66.66.66.66/32     6.6.6.6         6.6.6.6       Unreachable
    77.77.77.77/32     57.57.57.7      57.57.57.7    1
    88.88.88.88/32     57.57.57.7      57.57.57.7    1

To display filtered information about routes that are stale due to peer restart:

    host1:pe1#show ip bgp fields best peer next-hop stale
    Prefix             Stale Peer            Next-hop
    10.22.22.1/32      stale 10.12.12.2      10.12.12.2
    10.22.22.2/32      stale 10.12.12.2      10.12.12.2
    10.22.22.3/32      stale 10.12.12.2      10.12.12.2
    10.33.33.1/32            10.13.13.3      10.13.13.3
    10.33.33.2/32            10.13.13.3      10.13.13.3
    10.33.33.3/32            10.13.13.3      10.13.13.3

To display introductory information about BGP attributes:

    host1:pe1#show ip bgp 0.0.0.0 /0 fields intro
    Local BGP identifier 192.168.254.79, local AS 6730
      201058 routes (12063492 bytes)
      201540 destinations (15317040 bytes) of which 201058 have a route
      193909 routes selected for route tables installation
      0 unicast/multicast routes selected for route table installation
      0 unicast/multicast tunnel-usable routes selected for route table     installation
      0 tunnel-only routes selected for tunnel-route table installation
      35097 path attribute entries (5334744 bytes)
      Local-RIB version 20969483. FIB version 20969483.
      Statistics baseline set WED JUL 12 2006 10:31:53 METDST
      ...

To display all routes with a prefix that is equal to or more specific than the specified prefix:

    host1#show ip bgp 12.2.0.0 255.255.0.0 longer-prefixes
    Local router ID 192.168.1.153, local AS 100
      72074 paths, 72074 distinct prefixes (5189328 bytes used)
      72074 paths selected for route table installation
      21685 path attribute entries (2965327 bytes used)

      Prefix         Peer       Next-hop   MED CalPrf  Weight  Origin
    > 12.2.6.0/24    10.5.0.48  10.5.0.48    100         100     IGP
    > 12.2.7.0/24    10.5.0.48  10.5.0.48    100         100     IGP
    > 12.2.76.0/24   10.5.0.48  10.5.0.48    100         100     IGP
    > 12.2.88.0/22   10.5.0.48  10.5.0.48    100         100     IGP
    > 12.2.97.0/24   10.5.0.48  10.5.0.48    100         100     IGP
    > 12.2.99.0/24   10.5.0.48  10.5.0.48    100         100     IGP
    > 12.2.109.0/24  10.5.0.48  10.5.0.48    100         100     IGP
    > 12.2.169.0/24  10.5.0.48  10.5.0.48    100         100     IGP

#### Meaning

Table 25 lists the show ip bgp command output fields.

Table 25: show ip bgp Output Fields

Field Name | Field Description
--- | ---
Local BGP identifier | BGP router ID of the local router
local AS | Local autonomous system number
routes | Total number of routes stored in the BGP routing table and amount of memory consumed by routes. If several peers have advertised a route to the same prefix, all routes are included in this count.
destinations | Number of routes to unique prefixes stored in the BGP routing table and amount of memory consumed by routes. If several peers have advertised a route to the same prefix, only the best route is included in this count.
routes selected for route table installation | Number of routes in the BGP routing table that have been inserted into the IP routing table, plus prefixes for which there are currently no routes but which have had to be withdrawn from peers to which these prefixes may been previously advertised.
path attribute entries | Number of distinct path attributes stored in BGP's internal path attributes table. If BGP receives two routes for different prefixes but with identical path attributes, BGP will create only one entry in its internal path attribute table and share it between the two routes to conserve memory.
Local-RIB version | Number that is increased by one each time a route in that RIB is added, removed or modified.
FIB version | Number that is increased by one each time BGP updates the routes in the IP routing table based on changes in the local RIB. The FIB version matches the local-RIB version when BGP has finished updating the routes in the IP route table. The FIB version is less than the local-RIB version when BGP is still in the process of updating the IP routing table.
Prefix | Prefix for the routing table entry
Peer | Peer from which route was learned
Next hop IP address | IP address of the next router that is used when a packet is forwarded to the destination network
MED | Multiexit discriminator for the route
LocPrf | Local preference for the route
Weight | Weight of the route
Origin | Origin of the route
AS path | AS path through which this route has been advertised
Communities | Community number associated with the route
Stale | Routes that have gone stale due to peer restart
unicast/multicast routes selected for route table installation | Number of unicast routes in the BGP routing table that have been inserted into the IP routing table that are also available for use in the multicast view of the IP routing table
unicast/multicast tunnel-usable routes selected for route table installation | Number of unicast and multicast routes in the BGP routing table that have been inserted into the IP routing table that are also available for use in the IP tunnel routing table
tunnel-only routes selected for tunnel-route table installation | Number of routes in the BGP routing table that have been inserted into the IP tunnel routing table
path attribute entries | Number of distinct path attributes stored in BGP's internal path attributes table. If BGP receives two routes for different prefixes but with identical path attributes, BGP will create only one entry in its internal path attribute table and share it between the two routes to conserve memory.
Statistics baseline set | Timestamp indicating when the statistics baseline was last set
Route-map | Indicates whether network-route filtering is enabled
Backdoor | Indicates whether an IGP backdoor route is favored over an EBGP route
CalPrf | Calculated preference

#### Related Topics

- show bgp ipv6
- show ip bgp