Viewing BGP neighbors information

Display information about BGP neighbors.

Procedure

  1. To enter User EXEC mode, log on to the switch.
  2. Display information about BGP neighbors:

    show ip bgp neighbors [{A.B.C.D}] [vrf WORD<1–16>] [vrfids WORD<0–512>]

  3. Display information about BGP peer advertised routes:

    show ip bgp neighbors {A.B.C.D} advertised-routes [<prefix/len>] [longer-prefixes] [vrf WORD<1–16>] [vrfids WORD<0–512>]

  4. Display information about BGP peer routes:

    show ip bgp neighbors {A.B.C.D} routes [<prefix/len>] [community <enable|disable>] [longer-prefixes] [vrf WORD<1–16>] [vrfids WORD<0–512>]

  5. Display statistics for BGP peers:

    show ip bgp neighbors {A.B.C.D} stats [vrf WORD<1–16>] [vrfids WORD<0–512>]

Example

Switch:#show ip bgp neighbors vrf vrf1

=========================================================================                        
BGP Neighbor Info - VRF vrf1
=========================================================================

BGP neighbor is 200.200.200.63 remote AS 63, Internal Peer, MP-BGP-capable, BGP state [Established] UP Time 0 day(s), 07:27:24 remote router ID 63.1.1.1

                                    vrf instance - 0
                                     admin-state - BGP ON
                          connect-retry-interval - 120
                                   ebgp-multihop - disable
                                       hold-time - 30
                                  keepalive-time - 10
                            hold-time-configured - 180
                       keepalive-time-configured - 60
                                      max-prefix - 12000
                                    nexthop-self - disable
                             originate-def-route - disable
                              MD5-authentication - disable
                                  neighbor-debug - all
                               remove-private-as - disable
                    route-advertisement-interval - 5
                          route-reflector-client - disable
                                  send-community - disable
                         soft-reconfiguration-in - disable
                           updt-source-interface - 0.0.0.0
                                          weight - 100
                                 Route Policy In -
                                Route Policy Out -
																										                                   
										address-family vpnv4 - disable
                         route-refresh - disable
				 
  										Total bgp neighbors - 1 

Variable Definitions

The following table defines parameters for the show ip bgp neighbors command.

Variable

Value

{A.B.C.D}

Specifies the IP address.

community <enable|disable>

Enables or disables the display of community attributes.

longer-prefixes

Shows long prefixes. The longer-prefixes indicate the mask length from a specified prefix to 32 (for example, show from prefix a.b.c.d/len to a.b.c./32).

prefix/len

Shows paths with this prefix. The prefix is the IP address and exact mask length (must be an integer value from 0–32).

vrf WORD<1–16>

Specifies a VRF instance by name.

vrfids WORD<0–512>

Specifies a range of VRFs by ID number.