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
  • control the redistribution of advertised prefixes, based on geolocation
  • control the redistribution of advertised prefixes, based on ASN and geolocation
  • prepend your own ASN up to three times, and
  • trigger the calculation of a new alternate path (if available) for your advertised prefixes before commencing maintenance.

Please note that if the $ASN is a four byte AS number you have to use the 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
  • Switch
  • Metro region
  • Country
  • Continent

The 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 . If two or more BGP (large) Communities contradict each other, the community with the lowest evaluation order is processed.


 

EVALUATION ORDER GROUP ACTION

BGP STANDARD COMMUNITY

(RFC 1997)

BGP LARGE COMMUNITY

(RFC 8092)

1

Well-known

Well-known NO EXPORT

65535:65281

/

Well-known NO ADVERTISE

65535:65282

/

2

ASN based

Do not redistribute to $ASN

0:$ASN

50263:0:$ASN

3

Redistribute to $ASN

50263:$ASN

50263:1:$ASN

4

Do not redistribute to $ASN in $SWITCH


 

50263:921$SWITCH:$ASN

5

Redistribute to $ASN in $SWITCH


 

50263:911$SWITCH:$ASN

6

Do not redistribute to $ASN in $METRO


 

50263:922$METRO:$ASN

7

Redistribute to $ASN in $METRO


 

50263:912$METRO:$ASN

8

Do not redistribute to $ASN in $COUNTRY


 

50263:923$COUNTRY:$ASN

9

Redistribute to $ASN in $COUNTRY


 

50263:913$COUNTRY:$ASN

10

Do not redistribute to $ASN in $CONTINENT


 

50263:924$CONTINENT:$ASN

11

Redistribute to $ASN in $CONTINENT


 

50263:914$CONTINENT:$ASN

12

Switch based

Do not redistribute to $SWITCH

 

50263:921:$SWITCH

13

Redistribute to $SWITCH 

 

50263:911:$SWITCH

14

Metro based 

Do not redistribute to $METRO

 

50263:922:$METRO

15

Redistribute to $METRO


 

50263:912:$METRO


 

16

Country based

Do not redistribute to $COUNTRY


 

50263:923:$COUNTRY

17

Redistribute to $COUNTRY


 

50263:913:$COUNTRY

18

Continent based

Do not redistribute to $CONTINENT


 

50263:924:$CONTINENT

19

Redistribute to $CONTINENT

 

50263:914:CONTINENT

20

General

Do not distribute

0:50263

50263:0:0

21

Redistribute to all (default)

50263:50263

50263:1:0


 


 


 


 


 


 

More than one of the aforementioned BGP Communities and BGP Large Communities can be added to a single BGP announcement. 

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 1-IX EU Looking Glass . If you type your ASN into the global search field, you will find all matching prefixes from all 1-IX EU route servers. 

By clicking on a prefix, you get the prefix information dialogue with details (BGP Communities etc.) 


 

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 selectively to only certain peers. 


 
BGP STANDARD COMMUNITY (RFC 1997)  BGP LARGE COMMUNITY (RFC 8092) 

Prepend once selectively 

65001:$ASN 

50263:65001:$ASN 

Prepend twice selectively 

65002:$ASN 

50263:65002:$ASN 

Prepend three times selectively 

65003:$ASN 

50263:65003:$ASN 


 

Filtering Example 1


 

If you would like to redistribute your routes to only $COUNTRY = Ukraine and $COUNTRY = Slovakia and filter to all the others, you can put Do not distribute (50263:0:0) plus Redistribute to Ukraine(50263:913:804) and Redistribute to Slovakia(50263:913:703)

set policy-options community 1-IX-EU-export-Ukraine members large:50263:913:804     
set policy-options community 1-IX-EU-export-Slovakia members large:50263:913:703      
set policy-options community 1-IX-EU-no-export-all members large:50263:0:0      
set policy-options policy-statement export-1-IX-EU term 1 then community set 1-IX-EU-no-export-all      
set policy-options policy-statement export-1-IX-EU term 1 then community add 1-IX-EU-export-Ukraine     
set policy-options policy-statement export-1-IX-EU term 1 then community add 1-IX-EU-export-Slovakia     
set policy-options policy-statement export-1-IX-EU then reject     
show |compare      
[edit policy-options]     
+ policy-statement export-1-IX-EU {     
+    term 1 {     
+       then {     
+          community set 1-IX-EU-no-export-all;     
+          community add 1-IX-EU-export-Ukraine;     
+           community add 1-IX-EU-export-Slovakia;     
+        }     
+    }     
+ then reject;     
+ }     
[edit policy-options]     
+ community 1-IX-EU-export-Ukraine members large:50263:913:804;     
+ community 1-IX-EU-no-export-all members large:50263:0:0;

 

Filtering Example 2

If you would like to redistribute your routes to all peers except $CONTINENT=Africa ( 50263:924:2 ), except $COUNTRY=Ukraine ( 50263:923:804), but redistribute to $METRO=Odesa(50263:912:105) (which is in Ukraine) and redistribute to $METRO=Lviv(50263:912:102) (which is in Ukraine)

set policy-options community 1-IX-EU-no-export-Ukraine members large:50263:923:804     
set policy-options community 1-IX-EU-export-Ukraine-Odesa members large:50263:912:105     
set policy-options community 1-IX-EU-export-Ukraine-Lviv members large:50263:912:102     
set policy-options community 1-IX-EU-no-export-Africa members large:50263:924:2     
set policy-options policy-statement export-1-IX-EU term 1 then community set 1-IX-EU-no-export-Africa     
set policy-options policy-statement export-1-IX-EU term 1 then community add 1-IX-EU-no-export-Ukraine     
set policy-options policy-statement export-1-IX-EU term 1 then community add 1-IX-EU-export-Ukraine-Odesa     
set policy-options policy-statement export-1-IX-EU term 1 then community add 1-IX-EU-export-Ukraine-Lviv     
set policy-options policy-statement export-1-IX-EU term 1 then accept     
set policy-options policy-statement export-1-IX-EU then reject     
show | compare      
[edit policy-options]     
+ policy-statement export-1-IX-EU {     
+    term 1 {     
+       then {     
+           community set 1-IX-EU-no-export-Africa;     
+           community add 1-IX-EU-no-export-Ukraine;     
+           community add 1-IX-EU-export-Ukraine-Odesa;     
+           community add 1-IX-EU-export-Ukraine-Lviv;     
+           accept;     
+       }     
+    }     
+    then reject;     
+ }     
[edit policy-options]     
+ community 1-IX-EU-export-Ukraine-Lviv members large:50263:912:102;     
+ community 1-IX-EU-export-Ukraine-Odesa members large:50263:912:105;     
+ community 1-IX-EU-no-export-Africa members large:50263:924:2;     
+ community 1-IX-EU-no-export-Ukraine members large:50263:923:804;

 

Filtering Example 3 

If you would like to redistribute your routes to $ASN=24940 in $METRO=Amsterdam, but not redistribute your routes to $ASN=24940 in $COUNTRY=Netherlands, and not redistribute your routes to $ASN=24940 in $COUNTRY=Germany, and redistribute to $ASN=32590 in $METRO=Warsaw, but not redistribute your routes to $ASN=32590 in $COUNTRY=Poland

set policy-options community 1-IX-EU-AS24940-export-Amsterdam members large:50263:912110:24940     
set policy-options community 1-IX-EU-AS24940-no-export-Netherlands members large:50263:923528:24940     
set policy-options community 1-IX-EU-AS24940-no-export-Germany members large:50263:923276:24940     
set policy-options community 1-IX-EU-AS32590-export-Warsaw members large:50263:912107:32590     
set policy-options community 1-IX-EU-AS32590-no-export-Poland members large:50263:923616:32590     
set policy-options policy-statement export-1-IX-EU term 1 then community set 1-IX-EU-AS24940-export-Amsterdam     
set policy-options policy-statement export-1-IX-EU term 1 then community add 1-IX-EU-AS24940-no-export-Netherlands     
set policy-options policy-statement export-1-IX-EU term 1 then community add 1-IX-EU-AS24940-no-export-Germany     
set policy-options policy-statement export-1-IX-EU term 1 then community add 1-IX-EU-AS32590-export-Warsaw     
set policy-options policy-statement export-1-IX-EU term 1 then community add 1-IX-EU-AS32590-no-export-Poland     
set policy-options policy-statement export-1-IX-EU term 1 then accept      
set policy-options policy-statement export-1-IX-EU then reject     
show | compare      
      [edit policy-options]     
+ policy-statement export-1-IX-EU {     
+    term 1 {     
+       then {     
+           community set 1-IX-EU-AS24940-export-Amsterdam;     
+           community add 1-IX-EU-AS24940-no-export-Netherlands;     
+           community add 1-IX-EU-AS24940-no-export-Germany;     
+           community add 1-IX-EU-AS32590-export-Warsaw;     
+           community add 1-IX-EU-AS32590-no-export-Poland;     
+           accept;     
+       }     
+    }     
+    then reject;     
+ }     
[edit policy-options]     
+ community 1-IX-EU-AS24940-export-Amsterdam members large:50263:912110:24940;     
+ community 1-IX-EU-AS24940-no-export-Germany members large:50263:923276:24940;     
+ community 1-IX-EU-AS24940-no-export-Netherlands members large:50263:923528:24940;     
+ community 1-IX-EU-AS32590-export-Warsaw members large:50263:912107:32590;     
+ community 1-IX-EU-AS32590-no-export-Poland members large:50263:923616:32590;