LAB 11 / 20

BGP Communities — Tagging and Policy Control

BGP CommunitiesRoute MapsLocal PreferencePolicy

Active Nodes

11 BGP COMMUNITIES Communities — Active: BORDER-1,BORDER-2,EDGE-1,EDGE-4 See master topology for full 20-router diagram Active Nodes: BORDER-1,BORDER-2,EDGE-1,EDGE-4 Communities BORDER-1,BORDER-2,EDGE-1,EDGE-4 Refer to lab.html for complete step-by-step configuration and verification commands for each active router Active Zone Inactive (dimmed) Ioannis (John) Alexander Konstas

Active routers: BORDER-1, BORDER-2, EDGE-1, EDGE-4, CORE-1

Key Concepts

Standard BGP Communities

Communities are 32-bit values (displayed as AA:NN) attached to BGP routes that convey policy intent. Standard communities include well-known values: NO_EXPORT (65535:65281) prevents redistribution outside the AS, NO_ADVERTISE (65535:65282) prevents advertising to any BGP neighbor, and INTERNET (65535:65000) marks routes for unrestricted advertisement. Custom communities (e.g., 65000:200 = "low priority internet route") enable flexible policy without complex prefix lists.

Community-Based Local Preference

BORDER-1 tags routes from ISP1 with community 65000:200 (high priority). BORDER-2 tags routes from ISP2 with community 65000:100 (backup). Core routers receive these tagged routes via iBGP and apply community-based policy: routes with 65000:200 get LOCAL_PREF 200, routes with 65000:100 get LOCAL_PREF 100. This centralizes policy — changing ISP preference only requires updating the community tag at the border, not reconfiguring every router.

Community List and Route Maps

Community lists match routes by community value: ip community-list 100 permit 65000:200. Route maps then act on the match: match community 100 with set local-preference 200. Extended community lists support regex matching against community strings — useful for matching ranges. Always send communities explicitly: neighbor X send-community is required, as communities are not sent by default.

Community Configuration

BORDER-1Tag inbound routes with community
route-map FROM-ISP1 permit 10
 set community 65000:200 additive
 set local-preference 200

router bgp 65001
 address-family ipv4
  neighbor 198.51.100.2 route-map FROM-ISP1 in
  neighbor 10.0.201.0 send-community
CORE-1Apply local-pref based on received community
ip community-list 200 permit 65000:200
ip community-list 100 permit 65000:100

route-map SET-LOCALPREF permit 10
 match community 200
 set local-preference 200
route-map SET-LOCALPREF permit 20
 match community 100
 set local-preference 100
route-map SET-LOCALPREF permit 30

router bgp 65000
 address-family ipv4
  neighbor 10.255.3.1 route-map SET-LOCALPREF in

Verification

show ip bgp community 65000:200
Expected: Routes tagged with high-priority community listed. All should prefer BORDER-1 path with LOCAL_PREF 200.
show ip bgp 0.0.0.0/0
Expected: Best path via BORDER-1 (Local pref 200). Alternate via BORDER-2 with lower local-pref shown as backup.
show ip bgp neighbors 10.255.3.1 advertised-routes | include Community
Expected: Community attributes visible in advertised routes. Confirm send-community is configured.

Research and direction by Ioannis (John) Konstas; compiled and finalized with AI assistance.

Initial Configs — Load These First