BGP Communities Explained with Practical Examples – Complete CCNP Guide

BGP Communities Explained with Practical Examples – Complete CCNP Guide
Networking ATN Campus November 18, 2026 26 views

BGP Communities Explained with Practical Examples – Complete CCNP Guide

BGP Communities are an important feature used by network administrators to classify routes and apply routing policies across large networks. They make it easier to control how routes are advertised, accepted, and processed by different BGP routers.

Instead of creating separate routing policies for every individual prefix, administrators can assign community values to routes and apply policies based on those values.

In this CCNP guide, you will learn what BGP Communities are, understand standard and well-known communities, configure community lists and route maps, and practise controlling BGP route advertisements using Cisco IOS commands.

1. What Are BGP Communities?

A BGP Community is an optional transitive path attribute used to group BGP routes according to a shared routing policy or administrative purpose.

For example, an ISP may classify routes into different groups:

  • Customer routes
  • Premium customer routes
  • Backup routes
  • Routes that should not be advertised outside an AS
  • Routes that should not be advertised to any other BGP neighbor

Instead of identifying every prefix individually, the ISP can attach a community value to each route and apply a policy to all routes with that community.

Important: A community is a label attached to a route. It does not automatically change the BGP best-path selection. A router must have a policy that interprets the community and takes an action.

2. BGP Community Format

A traditional standard BGP community is a 32-bit value, commonly represented using this format:

ASN:COMMUNITY_VALUE

Example:

65001:100
65001:200
65001:300

In this example:

  • 65001 represents the autonomous system identifier used by the organization.
  • 100, 200, and 300 represent locally defined community identifiers.

The meaning of these values is determined by the network's routing policy. For example, an organization might define 65001:100 as a premium route and 65001:200 as a backup route.

3. Types of BGP Communities

BGP supports several community formats:

Community TypeDescription
Standard CommunityA 32-bit community value used to classify routes.
Extended CommunityA larger, structured community attribute used for more advanced policies, including VPN-related routing.
Large CommunityA 96-bit community format designed to support modern 32-bit ASNs and flexible policy tagging.

4. Understanding Well-Known BGP Communities

BGP defines several well-known community values that have standardized meanings.

CommunityPurpose
NO_EXPORTDo not advertise the route outside the local AS or confederation boundary.
NO_ADVERTISEDo not advertise the route to any BGP peer.
NO_EXPORT_SUBCONFEDDo not advertise the route outside the local AS confederation.
NOPEERDo not advertise the route to peers that are not customers or providers, according to the relevant peering policy.

These communities are useful when an organization needs to control how far a route is propagated.

5. Understanding NO_EXPORT

The NO_EXPORT community tells BGP routers not to advertise a route outside the local AS or confederation boundary.

Example scenario:

        Enterprise AS 65001
        +------------------+
        |                  |
        |       R1         |
        |                  |
        +------------------+
                 |
                 |
             ISP AS 65002
                 |
                 |
             Other AS

Suppose an ISP learns a route that should remain inside its own AS. It can attach NO_EXPORT to that route.

On Cisco IOS:

route-map TAG-NO-EXPORT permit 10
 set community no-export

router bgp 65002
 network 192.0.2.0 mask 255.255.255.0

This example applies the route map to a locally originated prefix through a network statement. The exact prefix must exist in the local routing table. The route map's community setting is applied when the route is originated, subject to platform and IOS support.

Alternatively, a route map can be applied to a neighbor's inbound or outbound routing policy to set communities on matching routes.

6. Understanding NO_ADVERTISE

The NO_ADVERTISE community prevents a route from being advertised to any BGP peer.

Example:

route-map BLOCK-ADVERTISEMENT permit 10
 set community no-advertise

When this community is attached to a route, BGP routers should not advertise that route to other BGP peers.

Difference: NO_EXPORT restricts advertisement beyond the local AS or confederation boundary, while NO_ADVERTISE prevents advertisement to any BGP peer.

7. BGP Community Topology

Let's create a simple topology with an enterprise router connected to an ISP router.

       Enterprise Network
          AS 65001
              |
              |
         203.0.113.1/30
              |
         203.0.113.2/30
              |
          +-------+
          |  R2   |
          |  ISP  |
          |AS65002|
          +-------+
              |
              |
        Other BGP Networks

       Enterprise Prefix:
         192.0.2.0/24

Our objective is to advertise the enterprise prefix with a standard community and allow the ISP to identify it using a community list.

8. Configure Basic eBGP

R1 – Enterprise Router

enable
configure terminal

interface GigabitEthernet0/0
 ip address 203.0.113.1 255.255.255.252
 no shutdown
exit

interface Loopback0
 ip address 192.0.2.1 255.255.255.0
exit

router bgp 65001
 neighbor 203.0.113.2 remote-as 65002
 network 192.0.2.0 mask 255.255.255.0

end

R2 – ISP Router

enable
configure terminal

interface GigabitEthernet0/0
 ip address 203.0.113.2 255.255.255.252
 no shutdown
exit

router bgp 65002
 neighbor 203.0.113.1 remote-as 65001

end

The BGP network statement on R1 can originate 192.0.2.0/24 because the loopback interface provides that exact prefix in the routing table.

9. Configure a Standard BGP Community

Now assign the community 65001:100 to the enterprise prefix.

R1 Configuration:

configure terminal

ip prefix-list CUSTOMER-PREFIX permit 192.0.2.0/24

route-map SET-CUSTOMER-COMMUNITY permit 10
 match ip address prefix-list CUSTOMER-PREFIX
 set community 65001:100

router bgp 65001
 network 192.0.2.0 mask 255.255.255.0 route-map SET-CUSTOMER-COMMUNITY
 neighbor 203.0.113.2 send-community

end

The send-community command enables transmission of standard communities to the specified BGP neighbor on Cisco IOS platforms that require explicit configuration.

Community transmission behavior and supported community types can vary by platform and software release. Verify the actual advertised attributes.

10. Create a Community List

A community list allows a router to identify routes based on their community values.

Example:

ip community-list standard PREMIUM-CUSTOMERS permit 65001:100

This creates a standard community list named PREMIUM-CUSTOMERS. It matches routes carrying community 65001:100.

Now create a route map to match that community:

route-map PREMIUM-POLICY permit 10
 match community PREMIUM-CUSTOMERS
 set local-preference 200

This route map sets Local Preference to 200 for routes matching the specified community.

It can be applied to an appropriate BGP neighbor policy. For example, if the community is received from an external neighbor and should influence local outbound path selection:

router bgp 65002
 neighbor 203.0.113.1 remote-as 65001
 neighbor 203.0.113.1 route-map PREMIUM-POLICY in

The route map uses the community as a classification label and changes Local Preference as the routing policy action.

11. Understanding the Additive Keyword

When setting a community using a route map, Cisco IOS normally replaces existing standard community values unless the additive keyword is used.

Example without additive:

route-map SET-COMMUNITY permit 10
 set community 65001:100

This replaces existing standard communities with the configured community value.

Example with additive:

route-map ADD-COMMUNITY permit 10
 set community 65001:100 additive

This adds 65001:100 while preserving existing standard community values.

Use additive when you want to retain community tags that were attached by another router or policy.

12. Understanding Extended Communities

Extended Communities provide additional structure and a larger value space compared with standard communities.

They are commonly used in advanced BGP applications, particularly:

  • MPLS Layer 3 VPNs
  • Route Targets
  • Route Origin information
  • Some EVPN and inter-domain routing policies

Example of a route target:

route-target import 65001:100
route-target export 65001:100

These commands are used in a VPN address-family configuration, not as ordinary global standard-community commands. Route Targets control VPN route import and export membership.

13. Understanding Large Communities

Large Communities were introduced to provide a more flexible community format, especially for networks using 32-bit autonomous system numbers.

The format contains three 32-bit fields:

Global Administrator : Local Data 1 : Local Data 2

Example:

65001:100:200

Large Communities are useful for building scalable policies across large ISP networks and multi-AS environments.

Unlike standard communities, Large Communities use a dedicated BGP path attribute and require support and appropriate configuration on the routers that process them.

14. Verify BGP Communities

Use these Cisco IOS commands to verify community information.

show ip bgp
show ip bgp 192.0.2.0
show ip bgp community
show ip community-list
show route-map
show running-config

To display standard communities in BGP output, some IOS versions support:

show ip bgp community

Check the advertised routes to confirm that the community is being sent to the neighbor. The neighbor must also support the relevant community attribute.

15. Common BGP Community Troubleshooting

ProblemPossible CauseSolution
Community is missing on the neighborCommunity transmission is not enabledCheck the send-community configuration
Route map does not matchCommunity list or route-map condition is incorrectVerify community values and matching logic
Existing community values disappearCommunity was replaced instead of appendedUse the additive keyword when appropriate
NO_EXPORT route is still visible inside the ASNO_EXPORT does not block all internal advertisementsCheck the intended AS boundary and policy
Unexpected route advertisementCommunity was not attached or policy was not appliedInspect BGP attributes and route-map direction

16. Frequently Asked Questions

1. What is a BGP Community?

A BGP Community is a route classification attribute that allows routers to apply routing policies to groups of prefixes.

2. What is the standard BGP Community format?

The traditional standard community uses a 32-bit value, commonly displayed as ASN:VALUE.

3. What is NO_EXPORT?

NO_EXPORT prevents a route from being advertised outside the local AS or confederation boundary.

4. What is the difference between NO_EXPORT and NO_ADVERTISE?

NO_EXPORT restricts advertisement beyond the local AS or confederation, while NO_ADVERTISE prevents advertisement to any BGP peer.

5. Why is send-community required?

On Cisco IOS configurations that require it, send-community enables the router to transmit standard community attributes to a BGP neighbor.

6. What is the difference between standard and large communities?

Standard communities are 32-bit values. Large Communities use three 32-bit fields, providing more flexible policy identification.

17. Practical CCNP Lab Challenge

Build a topology with one enterprise router and two ISP routers.

Your tasks:

  1. Configure eBGP between the enterprise and both ISPs.
  2. Advertise at least three test prefixes.
  3. Assign different standard community values to selected prefixes.
  4. Enable community transmission to the ISP neighbors.
  5. Create community lists to identify premium and backup routes.
  6. Use route maps to set different Local Preference values.
  7. Test NO_EXPORT and NO_ADVERTISE behavior.
  8. Use additive to preserve existing communities.
  9. Verify all community values using BGP show commands.

Conclusion

BGP Communities provide a powerful way to classify routes and implement scalable routing policies. Standard, extended, and large communities support different networking requirements, while well-known communities such as NO_EXPORT and NO_ADVERTISE help control route propagation.

Learning how to configure community lists, route maps, and community transmission is essential for managing enterprise and service provider BGP networks.

???? Advance Your Networking Career with ATN Campus

Want to master BGP, advanced routing, and enterprise network engineering? Visit ATN Campus and develop practical networking skills through structured learning and hands-on labs.

???? Learn Networking.
???? Master Advanced Routing & Switching.
???? Practice with Real Labs.
???? Prepare for CCNP Certifications.
???? Build Your IT Career with ATN Campus.
Document ATN CAMPUS