Action BGP Communities
Action BGP Communities can be used to control various functions of the route server. With these communities, you can:
- control the redistribution of advertised prefixes, based on an ASN or on geolocation
- prepend your own ASN up to three times
- trigger the calculation of a new alternate path (if available) for your advertised prefixes before you start commencing a maintenance
Please note that if the $PEER-AS is a four byte AS number you have to use BGP Large Communities.
Control of prefix redistribution
You can control which BGP announcements you send to the route servers are redistributed to other peers. This can be done based on the following criteria:
- ASN
- Edge node
- Metro region
- Country
- Continent
Redistribution can be controlled with BGP Communities and BGP Large Communities.
The following table gives an overview of available options and their corresponding BGP Communities. The according values for $SWITCH, $METRO, $COUNTRY, $CONTINENT are available here. In case two or more BGP (large) Communities are contradicting the community with the lowest evaluation order is processed.
Please note: Location-based redistribution control works in the context of GlobePEER Remote.
Example: If you peer at Ruhr-CIX and instruct the Ruhr-CIX route server to redistribute your routes only to local peers (Ruhr-CIX), DE-CIX peers connected to Ruhr-CIX via GlobePEER Remote will not receive them.
Evaluation Order | Group | Action | BGP Standard Community (RFC 1997) | BGP Large Community (RFC 8092) |
---|---|---|---|---|
1 | Well-known | 65535:65281 | / | |
65535:65282 | / | |||
2 | ASN based | Do not redistribute to $PEER-AS | 0:$PEER-AS | 57891:0:PEER-AS |
3 | Redistribute to $PEER-AS* | 57891:$PEER-AS | 57891:1:$PEER-AS | |
4 | Switch based | Do not redistribute to $SWITCH | 65221:$SWITCH | 57891:921:$SWITCH |
5 | Redistribute to $SWITCH* | 65211:$SWITCH | 57891:911:$SWITCH | |
6 | Metro based | Do not redistribute to $METRO | 65222:$METRO | 57891:922:$METRO |
7 | Redistribute only to local peers** This is a shortcut for 0:57891 and 65222:$METRO (where $METRO equals the local metro region) | 65200:65212 | 57891:900:65212 | |
8 | Redistribute to $METRO* | 65212:$METRO | 57891:912:$METRO | |
9 | Country based | Do not redistribute to $COUNTRY | 65223:$COUNTRY | 57891:923:$COUNTRY |
10 | Redistribute to $COUNTRY* | 65213:$COUNTRY | 57891:913:$COUNTRY | |
11 | Continent based | Do not redistribute to $CONTINENT | 65224:$CONTINENT | 57891:924:$CONTINENT |
12 | Redistribute to $CONTINENT* | 65214:$CONTINENT | 57891:914:$CONTINENT | |
13 | General | Do not redistribute | 0:57891 | 57891:0:0 |
14 | Redistribute to all (default) | 57891:57891 | 57891:1:0 |
* Only useful in combination with one or more "do not announce" BGP Communities with lower priority that will allow an override (e.g. 57891:$PEER-AS can provide a selective override for 65222:$METRO)
** Only useful when announced to your local route server. E.g. if your access location is Ruhr-CIX then announce this community only to the Ruhr-CIX RS and not to other GlobePEER Remote location RS (e.g. FRA). They will not consider you as "local" and ignore any "only to local peers" Community received from remote peers. In this example it would be sufficient to only announce to the local Ruhr-CIX RS and not to RS of GlobePEER Remote locations.
The route servers remove the aforementioned BGP Communities and BGP Large Communities from a BGP announcement before re-distributing it.
The well-known BGP Communities NO_EXPORT (65535:65281) and NO_ADVERTISE (65535:65282) are also honored meaning that a BGP announcement marked by one of these communities is not re-distributed to any peer. If you want the route server system to add a NO_EXPORT or NO_ADVERTISE community for a given BGP announcement before re-distributing, you have to add the community (57891:65281) or (57891:65282) respectively. This is also possible on a per-peer basis using BGP Large Communities:
- (57891:901:$PEER-AS) for selective NO_EXPORT and
- (57891:902:$PEER-AS) for selective NO-ADVERTISE
| BGP Standard Community (RFC 1997) | BGP Large Community (RFC 8092) |
---|---|---|
add NO_EXPORT | 57891:65281 | / |
add NO_ADVERTISE | 57891:65282 | / |
|
|
|
add NO_EXPORT selective | / | 57891:901:$PEER-AS |
add NO_ADVERTISE selective | / | 57891:902:$PEER-AS |
More than one of the aforementioned BGP Communities and BGP Large Communities can be added to a single BGP announcement. Ruhr-CIX recommends not to add more than 50 of these communities as it makes handling complex and error-prone. If you need to do this, please contact Customer Service.
All BGP Communities and BGP Large Communities that are not listed above are not touched by the route servers and transparently re-distributed. For backwards compatibility, routes with no community at all are distributed to all peers as well.
You can check this in the Ruhr-CIX Looking Glass. If you type your ASN into the global search field, you will find all matching prefixes from all Ruhr-CIX route servers. By clicking on a prefix, you get the prefix information dialogue with details (BGP Communities etc.). You can apply further filters, e.g. filter for a specific route server or IX.
How the different communities can be used
Please note: In the following examples we only make use of Large Communities when it becomes necessary.
BGP announcements marked with the following communities are only re-distributed to AS64501 and AS64502 (both 2 Byte ASNs):
- (0:57891)
- (57891:64501)
- (57891:64502)
BGP announcements marked with the following communities are re-distributed to all peers/ASNs except AS64501 and AS64502:
- (0:64501)
- (0:64502)
- (57891:57891)
BGP announcements tagged with the following communities are only re-distributed to AS65550 (4 Byte ASN) and AS64501 (2 Byte ASN):
- (0:57891)
- (57891:1:65550)
- (57891:64501)
BGP announcements tagged with the following communities are only re-distributed to other Ruhr-CIX peers:
- (65200:65212)
BGP announcements tagged with the following communities are not re-distributed to peers of DE-CIX FRA:
- (65222:1000)
AS Path Prepending
You can use BGP communities to prepend your own ASN up to three times. This can be done to all other peers or selective to only certain peers.
| BGP Standard Community (RFC 1997) | BGP Large Community (RFC 8092) |
---|---|---|
Prepend once | 65001:0 | 57891:101:0 |
Prepend twice | 65002:0 | 57891:102:0 |
Prepend three times | 65003:0 | 57891:103:0 |
|
|
|
Prepend one selective | 65001:$PEER-AS | 57891:101:$PEER-AS |
Prepend twice selective | 65002:$PEER-AS | 57891:102:$PEER-AS |
Prepend three times selective | 65003:$PEER-AS | 57891:103:$PEER-AS |
Graceful BGP Session Shutdown
The Ruhr-CIX route servers support RFC 8326 (Graceful BGP Session Shutdown). With this well-known BGP Community, you can instruct the route servers to calculate and redistribute an alternate path (if available) for your advertised prefixes before you start commencing your maintenance. This makes sure that routers of other customers have fully converged before you interrupt L2 connectivity and thereby so called micro blackholing is prevented.
Details:
- Setting BGP Community GRACEFUL_SHUTDOWN (65535:0) on all you advertised prefixes. The route server will set BGP local preference to 0 for these prefixes.
- The route server will calculate alternative paths for your advertised prefixes (if available) and redistribute these to other peers. Prefixes with no alternative path will get redistributed with BGP Community GRACEFUL_SHUTDOWN
- You should also apply GRACEFUL_SHUTDOWN on the inbound policy of you eBGP session
- After convergence has completed, you can safely shut down the BGP session. At this point, routers of other customers have learned alternative paths for your prefixes (if available) from the route server and forward traffic on the new path