Menu

US Region

Grandmetric LLC
Lewes DE 19958
16192 Coastal Hwy USA
EIN: 98-1615498
+1 302 691 94 10
info@grandmetric.com

EMEA Region

GRANDMETRIC Sp. z o.o.
ul. Metalowa 5, 60-118 Poznań, Poland
NIP 7792433527
+48 61 271 04 43
info@grandmetric.com

UK

Grandmetric LTD
Office 584b
182-184 High Street North
London
E6 2JA
+44 20 3321 5276
info@grandmetric.com

  • en
  • pl
  • BGP: BGP Community

    Design & Configure

    BGP: BGP Community

    Technology: Routing

    Area: EGP

    Vendor: Cisco

    Title: BGP aggregation

    Software: 12.X , 15.X, IP Services

    Platform: Catalyst 3560, 3750, 3850, 4500, 6500, ISR/ASR Routers

     

    BGP community stands for the attributes which can easily be added to the group of prefixes to marked them with the same meaning. With that possibility we can manipulate the whole bunch of prefixes base on single tag which is transitive across BGP autonomous systems.

    There are four well-known communities values (https://tools.ietf.org/html/draft-ietf-idr-wide-bgp-communities-04):

    1. NO_EXPORT (0xFFFFFF01) – instruct the BGP neighbor not to advertise prefix to any EBGP peers,
    2. NO_ADVERTISE (0xFFFFFF02) – obligate the BGP neighbor not to advertise prefix to any BGP peers,
    3. NO_EXPORT_SUBCONFED (0xFFFFFF03) – inform the BGP neighbor not to advertise prefix to any BGP peers outside a local sub-confederation,
    4. NOPEER (0xFFFFFF04) – advisory to BGP neighbor not to readvertise the route prefix to all external bilateral peers.

     

    To configure router R1 to send prefix marked with community:

    R1# configure terminal
    R1 (config)# ip bgp- community new-format
    R1 (config)# route-map COMMUNITY permit 10
    R1 (config-route-map)# set community 100:999
    R1 (config)# router bgp 100
    R1 (config-router)# network 94.70.40.0 mask 255.255.255.0 route-map COMMUNITY
    R1 (config-router)# neighbor 80.50.0.2 remote-as 200
    R1 (config-router)# neighbor 80.50.0.2 send-community
    R1 (config-router)# exit

     

    R2# configure terminal
    R2 (config)# ip bgp-community new-format
    R2 (config)# router bgp 200
    R2 (config-router)# neighbor 80.50.0.1 remote-as 100
    R2 (config-router)# exit

     

    Verification commands:

    R1# show bgp ipv4 unicast neighbors 80.50.0.2 | i Community

     

    BGP Community attribute sent to this neighbor

    R2# show bgp ipv4 unicast 94.70.40.0/24
    BGP routing table entry for 94.70.40.0/24, version 6
    Paths: (1 available, best #1, table Default-IP-Routing-Table)
    Flag: 0x820
    Not advertised to any peer
    100
    80.50.0.1 from 80.50.0.1 (80.50.0.1)
    Origin IGP, metric 0, localpref 100, valid, external, best
    Community: 100:999

    To configure router R2 to match on specific community and change the prefixes preference:

    R2# configure terminal
    R2 (config)# ip community-list 10 permit 100:999
    R2 (config)# route-map R1_IN permit 10
    R2 (config-route-map)# match community 10
    R2 (config-route-map)# set local-preference 150
    R2 (config)# router bgp 200
    R2 (config-router)# neighbor 80.50.0.1 route-map R1_IN in
    R2 (config-router)# exit

     

    R2# show bgp ipv4 unicast 94.70.40.0/24
    BGP routing table entry for 94.70.40.0/24, version 7
    Paths: (1 available, best #1, table Default-IP-Routing-Table)
    Flag: 0x820
    Not advertised to any peer
    100
    80.50.0.1 from 80.50.0.1 (80.50.0.1)
    Origin IGP, metric 0, localpref 150, valid, external, best
    Community: 100:999

    Author: Marcin Bialy
     

    Cisco ISR Routers Offer

    Up to 60% discount for Cisco ISR routers portfolio. Get quote for ISR4300 | ISR4400 C1000 | C800

    Get a Quote
    Grandmetric