The BGP community attribute is a very powerful tool for assisting and scaling BGP at any level.
Most of the ISPs make extensive use of BGP communities while defining internal policies, Inter-provider relationships and Customer traffic engineering. There is no such standard defined for these communities but still RFC 1998 has community values which defined to have particular meaning:-
• ASx:100 :- This community says set local preference to 100 and make this path as preferred path.
• ASx:90:- This community says set local preference to 90 and make this path as backup if dual homed to ASx.
• ASx:80:- This community says set local preference to 80. This link is to another ISP with same AS path length.
• ASx:70:- This community says set local preference to 70. This link is to another ISP.
These communities are defined by the upstream ISP. All the customers which are homing to ISP, they can attach these communities while advertising the routes.
If upstream ISP is AS 200; To declare a particular path as a backup path, their customer would announce the prefix with community 100:70 to AS200. ISP with AS200 would receive the prefix with the community 100:70 tag, and then set local preference to 70.
Customer Configuration Template
router bgp 65000
neighbor x.x.x.x remote-as 200
neighbor x.x.x.x description Backup ISP
neighbor x.x.x.x route-map as200-out out
neighbor x.x.x.x send-community
ip as-path access-list 20 permit ^$
route-map as100-out permit 10
match as-path 20
set community 100:70
Sample ISP Router Configuration
router bgp 200
neighbor y.y.y.y remote-as 65000
neighbor y.y.y.y route-map customer-policy-in in
! Homed to another ISP
ip community-list 7 permit 200:70
! Homed to another ISP with equal ASPATH length
ip community-list 8 permit 200:80
! Customer backup routes
ip community-list 9 permit 200:90
route-map customer-policy-in permit 10
match community 7
set local-preference 70
route-map customer-policy-in permit 20
match community 8
set local-preference 80
route-map customer-policy-in permit 30
match community 9
set local-preference 90
route-map customer-policy-in permit 40
set local-preference 100