Cisco Tips & Tricks

May 29, 2006

Using BGP communities to control Upstream Anouncements

Filed under: bgp, IP Routing, Router — ciscotips @ 12:31 am

There is a way to tag a route advertisements with additional information. you can tag route using bgp communities. 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.RFC1997 gives you more details on BGP communities.

Most important communities 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.

WARNING: Setting the no-export, no-advertise, or no-export-subconfed communities can have the (possibly unwanted) side effect that no routes are announced, even if there are other routes that would otherwise be eligible for announcement.

For instance, if we have 2 ISP's ISP A and ISP B,if you set the no-advertise community on routes announced to ISP B, other customers of ISP Bwon't see these routes because they aren't advertised. This is as intended. But routes with the same NLRI that ISP B has learned from ISP A will not be advertised either, because ISP B considers the directly received routes with the no-advertise community best, and only the best route is eligible for further announcement over BGP.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: