show ip bgp community

Syntax

show ip bgp community [<VALUE> | <TYPE>] [all-vrfs | vrf <VRF-NAME>] [vsx-peer]

Description

Displays routes that belong to BGP communities. Optionally you can specify displaying information by a specific community or by VRF.

Command context

Operator (>) or Manager (#)

Parameters

<VALUE>

Specifies a community number in aa:nn format.

<TYPE>
Specifies a community type. Can include the following well-known communities as well as others:
  • internet (advertise the prefix to all BGP neighbors)

  • local-as (do not advertise the prefix outside the sub-AS)

  • no-advertise (do not advertise the prefix to any BGP neighbors)

  • no-export (do not advertise the prefix to any eBGP neighbors)

all-vrfs | vrf <VRF-NAME>

Optional. Select to display information by VRFs by specifying the VRF by VRF name (if no <vrf-name> is specified, the default VRF is implied). Or specify all-vrfs to display information for all VRFs.

[vsx-peer]

Shows the output from the VSX peer switch. If the switches do not have the VSX configuration or the ISL is down, the output from the VSX peer switch is not displayed.

Authority

Operators or Administrators. Users without administrator authority can execute this command from the operator context (>) only.

Examples

Showing information for routes that belong to all BGP communities

switch# show ip bgp community
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
              i internal, e external S Stale, R Removed
VRF : default
Local router-id 9.0.0.1

    Network         Next Hop        Community
*>e 9.0.0.0/24      9.0.0.2         200:20
*>e 100.0.0.0/24    9.0.0.2         200:20
*>e 100.0.1.0/24    9.0.0.2         200:20
*>e 100.0.2.0/24    9.0.0.2         200:20
*>e 100.0.3.0/24    9.0.0.2         200:20

Total number of entries 5

Showing information for routes that belong to 200:20 BGP community number

switch# show ip bgp community 200:20
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
              i internal, e external S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete

VRF : default
Local router-id 9.0.0.1

    Network            Nexthop        Metric     LocPrf     Weight Path
*>e 9.0.0.0/24         9.0.0.2        0          100        0      200 ?
*>e 100.0.0.0/24       9.0.0.2        0          100        0      200 ?
*>e 100.0.1.0/24       9.0.0.2        0          100        0      200 ?
*>e 100.0.2.0/24       9.0.0.2        0          100        0      200 ?
*>e 100.0.3.0/24       9.0.0.2        0          100        0      200 ?
Total number of entries 5

Showing information for routes that belong to the Internet BGP community type

switch# show ip bgp community internet
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
              i internal, e external S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete

VRF : default
Local router-id 9.0.0.1

    Network            Nexthop        Metric     LocPrf     Weight Path
*>e 9.0.0.0/24         9.0.0.2        0          100        0      200 ?
*>e 100.0.0.0/24       9.0.0.2        0          100        0      200 ?
*>e 100.0.1.0/24       9.0.0.2        0          100        0      200 ?
*>e 100.0.2.0/24       9.0.0.2        0          100        0      200 ?
*>e 100.0.3.0/24       9.0.0.2        0          100        0      200 ?
Total number of entries 5