bgp hints - internet routing news, hints and tips

Posted: 2003-09-25

Category: General

Use communities to control upstream route announcements

BGP communities, defined in RFC 1997, provide a way to tag route advertisements with additional information. A community defines a property of a prefix, in such a way that a router can be configured to treat all prefixes with a certain community in a certain way, for example, to give those a higher preference. This way, one does not have to build an access list to match all the prefixes explicitly. A prefix can be tagged with multiple communities, and a community can be attached to multiple prefixes.

Several standard communities are defined. The most important ones are NO_ADVERTISE and NO_EXPORT, indicating that a prefix should not be re-advertised beyond the router or the autonomous system receiving the prefix respectively. The latter is useful if you want to announce a more-specific prefix to one of your upstreams without polluting the global routing table.

One application of communities is described in RFC 1998. This RFC describes a scenario in which two ISPs provide each other with backup connectivity. Using communities, they can tag the prefixes for which they provide backup routing. The upstream provider can then apply a lower local preference to these routes so that in the normal case traffic is not routed via the backup path. Of course, this assumes some cooperation of the upstream provider, but the level of cooperation is less than would be required if the usptream provider would have to create explicit access lists for the prefixes or ASes involved.

Many transit providers have standard communities to influence how prefixes are treated. The most common ones are for changing the local preference value (as used for the backup routing example described above), suppressing advertisements to certain peers, and prepending the AS-path to certain peers. Commonly, the policies are listed in the aut-num object in the RADB or RIPE routing registry. For example, Level 3 has described their policy and the communities their customers can use in quite some detail in the AS 3356 record.

In Iljitsch van Beijnum's book BGP several other examples on how to use communities are described. The section about communities is available on-line.

Unfortunately, each provider uses their own set of community values. An IETF workgroup has proposed a new attribute type, called redistribution community. These are similar to existing communities, but have defined standard semantics rather than being generic tags. A reference implementation, as described in a NANOG presentation, exists for the open source Zebra routing suite.

If you have any questions or comments regarding this article, please contact