Troubleshooting Border Gateway Protocol (BGP) - dummies

Troubleshooting Border Gateway Protocol (BGP)

By Edward Tetz

To troubleshoot with Border Gateway Protocol (BGP), you must gather information about the protocol and how it is functioning. As with other protocols, the two main sources of information are the show command and the debug command, so the place to start is by reviewing the show commands that you can use with BGP.

The BGP show command is surprisingly show ip bgp, which displays information about your router, including its Router ID and the networks that are visible with their metric, weight, and route flag. This command shows you whether the routes are internal (on the inside of your network) or stale (not updated recently and possibly down).

Notice that the RouterID is the address that was associated with the loopback interface, as with the OSPF protocol (covered in the previous chapter). Also as with the OSPF protocol, BGP uses the highest IP address of its connected interfaces as its RouterID, which you can force by using a loopback interface. To review both the OSPF protocol and how to configure the loopback interface.

Router2#show ip bgp
BGP table version is 2, local router ID is
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network          Next Hop            Metric LocPrf Weight Path
*>              0             0 100 i

The show ip bgp command has many options for viewing additional information. One of these options is neighbors. The command reveals the following information:

  • BGP version that is in use.

  • Neighbors that are visible. Although the command can be run with a neighbor specified.

  • BGP messages that have been seen.

  • BGP connections to other routers.

  • Event timer summary.

Router2#show ip bgp neighbors
BGP neighbor is,  remote AS 100, external link
  BGP version 4, remote router ID
  BGP state = Established, up for 00:11:11
  Last read 00:00:11, hold time is 180, keepalive interval is 60 seconds
  Neighbor capabilities:
    Route refresh: advertised and received(old & new)
    Address family IPv4 Unicast: advertised and received
  Message statistics:
    InQ depth is 0
    OutQ depth is 0
                         Sent       Rcvd
    Opens:                  1          1
    Notifications:          0          0
    Updates:                0          1
    Keepalives:            14         14
    Route Refresh:          0          0
    Total:                 15         16
  Default minimum time between advertisement runs is 30 seconds
 For address family: IPv4 Unicast
  BGP table version 2, neighbor version 2
  Index 1, Offset 0, Mask 0x2
  1 update-group member
                                 Sent       Rcvd
  Prefix activity:               ----       ----
    Prefixes Current:               0          1 (Consumes 48 bytes)
    Prefixes Total:                 0          1
    Implicit Withdraw:              0          0
    Explicit Withdraw:              0          0
    Used as bestpath:             n/a          1
    Used as multipath:            n/a          0
                                   Outbound    Inbound
  Local Policy Denied Prefixes:    --------    -------
    Bestpath from this peer:              1        n/a
    Total:                                1          0
  Number of NLRIs in the update sent: max 0, min 0
  Connections established 1; dropped 0
  Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host:, Local port: 11001
Foreign host:, Foreign port: 179
Enqueued packets for retransmit: 0, input: 0  mis-ordered: 0 (0 bytes)
Event Timers (current time is 0x75ECBF0):
Timer          Starts    Wakeups            Next
Retrans            15          0             0x0
TimeWait            0          0             0x0
AckHold            14          8             0x0
SendWnd             0          0             0x0
KeepAlive           0          0             0x0
GiveUp              0          0             0x0
PmtuAger            0          0             0x0
DeadWait            0          0             0x0
iss: 2844915809  snduna: 2844916121  sndnxt: 2844916121     sndwnd:  16073
irs: 1529136828  rcvnxt: 1529137192  rcvwnd:      16021  delrcvwnd:    363
SRTT: 259 ms, RTTO: 579 ms, RTV: 320 ms, KRTT: 0 ms
minRTT: 0 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: active open, nagle
IP Precedence value : 6
Datagrams (max data segment is 1460 bytes):
Rcvd: 20 (out of order: 0), with data: 14, total data bytes: 363
Sent: 25 (retransmit: 0, fastretransmit: 0), with data: 15, total data bytes: 311

Other show ip bgp options include the following:

Router2#show ip bgp ?
  A.B.C.D          IP prefix <network>/<length>, e.g.,
  A.B.C.D          Network in the BGP routing table to display
  all              All address families
  cidr-only        Display only routes with non-natural netmasks
  community        Display routes matching the communities
  community-list   Display routes matching the community-list
  dampening        Display detailed information about dampening
  filter-list      Display routes conforming to the filter-list
  inconsistent-as  Display only routes with inconsistent origin ASs
  injected-paths   Display all injected paths
  ipv4             Address family
  ipv6             Address family
  labels           Display Labels for IPv4 NLRI specific information
  neighbors        Detailed information on TCP and BGP neighbor connections
  nsap             Address family
  paths            Path information
  peer-group       Display information on peer-groups
  prefix-list      Display routes matching the prefix-list
  quote-regexp     Display routes matching the AS path "regular expression"
  regexp           Display routes matching the AS path regular expression
  replication      Display replication status of update-group(s)
  rib-failure      Display bgp routes that failed to install in the routing
                   table (RIB)
  route-map        Display routes matching the route-map
  summary          Summary of BGP neighbor status
  template         Display peer-policy/peer-session templates
  update-group     Display information on update-groups
  vpnv4            Address family
  |                Output modifiers