BGP communities enable to label prefixes announced by BGP in order to apply specific policies. Two good examples of using BGP communities in real networks are provided for Sprint and RENATER.
Let us analyze the illustration below provided by RENATER to explain how to use communities on its network. A dual-connected client network identifies a primary link and a secondary or backup link toward RENATER. In the BGP prefix announcements, this network can use the community 2200:610
on the primary link, and the community 2200:590
on the backup link. RENATER applies specific policies in order to implement the primary/backup behavior. A simple way to do this is described in the following:
2200:610
.2200:590
.p
.p
'.p
'.p = 610
and p' = 590
), RENATER ensures that all its iBGP routers prefer the exit NR-1 to reach the client network and implement this information in their routing table.With this configuration, all the traffic going to the client network is forwarded by RENATER on the primary link. Note that whenever this link goes down, the BGP selection process chooses the next best announcement (lower local preference) and forwards the traffic on the backup link.