Browse Source

Update bgp filters : the med is used between different ASes for incoming routes

Philippe Le Brouster 8 years ago
parent
commit
bbedbdca32
2 changed files with 22 additions and 12 deletions
  1. 21 11
      etc/local/bird/bird/bgp.conf
  2. 1 1
      etc/local/bird/bird6/bgp.conf

+ 21 - 11
etc/local/bird/bird/bgp.conf

@@ -2,10 +2,20 @@
 #
 #
 # vim: set ts=4:sw=4
 # vim: set ts=4:sw=4
 
 
+
+#
+# Default configuration for all bgp templates
+#
+template bgp tpl_bgp {
+        # Use MED for routes received by different ASes
+        bgp med;
+}
+
+
 #
 #
 # iBGP (Backbone)
 # iBGP (Backbone)
 #
 #
-template bgp ibgp {
+template bgp ibgp from tpl_bgp {
 	direct;
 	direct;
 	gateway direct;
 	gateway direct;
 	local as 20766;
 	local as 20766;
@@ -35,7 +45,7 @@ protocol bgp core_vodka from ibgp {
 #
 #
 # Member: FDN
 # Member: FDN
 #
 #
-template bgp tpl_fdn {
+template bgp tpl_fdn from tpl_bgp {
 	local as 20766;
 	local as 20766;
 	description "Livraison FDN";
 	description "Livraison FDN";
         import where bgp_import(65055,"member",50000,100);
         import where bgp_import(65055,"member",50000,100);
@@ -52,7 +62,7 @@ protocol bgp membre_fdn2 from tpl_fdn {
 #
 #
 # Member: Lorraine Data Network
 # Member: Lorraine Data Network
 #
 #
-template bgp tpl_ldn {
+template bgp tpl_ldn from tpl_bgp {
        local as 20766;
        local as 20766;
        description "Livraison Lorraine Data Network";
        description "Livraison Lorraine Data Network";
         import where bgp_import(60197,"member",40000,100);
         import where bgp_import(60197,"member",40000,100);
@@ -71,7 +81,7 @@ protocol bgp member_ldn2 from tpl_ldn {
 #
 #
 # Member: Neutrinet
 # Member: Neutrinet
 #
 #
-template bgp tpl_neutrinet {
+template bgp tpl_neutrinet from tpl_bgp {
 	local as 20766;
 	local as 20766;
 	description "Livraison Neutrinet";
 	description "Livraison Neutrinet";
         import where bgp_import(204059,"member",40000,100);
         import where bgp_import(204059,"member",40000,100);
@@ -85,7 +95,7 @@ protocol bgp member_neutrinet from tpl_neutrinet {
 #
 #
 # Transit: Absolight
 # Transit: Absolight
 #
 #
-template bgp tpl_absolight {
+template bgp tpl_absolight from tpl_bgp {
 	local as 20766;
 	local as 20766;
 	description "Transit Absolight";
 	description "Transit Absolight";
         import where bgp_import(29608,"transit",10004,100);
         import where bgp_import(29608,"transit",10004,100);
@@ -115,7 +125,7 @@ protocol bgp transit_ielo from tpl_ielo {
 #
 #
 # Peering: Grenode
 # Peering: Grenode
 #
 #
-template bgp tpl_grenode {
+template bgp tpl_grenode from tpl_bgp {
 	local as 20766;
 	local as 20766;
 	description "Peering Grenode";
 	description "Peering Grenode";
 	import where bgp_import(51083,"peering",30000,100);
 	import where bgp_import(51083,"peering",30000,100);
@@ -129,13 +139,13 @@ protocol bgp peering_grenode1 from tpl_grenode {
 #
 #
 # Peering : FranceIX
 # Peering : FranceIX
 #
 #
-template bgp tpl_franceix_rs {
+template bgp tpl_franceix_rs from tpl_bgp {
 	local as 20766;
 	local as 20766;
         import where bgp_import(51706,"peering",26000,200);
         import where bgp_import(51706,"peering",26000,200);
         export where bgp_export(51706,"members");
         export where bgp_export(51706,"members");
 	import limit 100000;
 	import limit 100000;
 }
 }
-template bgp tpl_franceix_peers {
+template bgp tpl_franceix_peers from tpl_bgp {
 	local as 20766;
 	local as 20766;
         import where bgp_import(51706,"peering",26000,210);
         import where bgp_import(51706,"peering",26000,210);
         export where bgp_export(51706,"members");
         export where bgp_export(51706,"members");
@@ -217,7 +227,7 @@ protocol bgp franceix_21502 from tpl_franceix_peers {
 # Peering: EquinIX
 # Peering: EquinIX
 #
 #
 # EquinIX: route collector (only for monitoring)
 # EquinIX: route collector (only for monitoring)
-template bgp tpl_equinix_rc {
+template bgp tpl_equinix_rc from tpl_bgp {
         local as 20766;
         local as 20766;
         import where bgp_import(65517,"peering",22000,100);
         import where bgp_import(65517,"peering",22000,100);
         export where bgp_export(65517,"members");
         export where bgp_export(65517,"members");
@@ -230,13 +240,13 @@ protocol bgp equinix_rc1 from tpl_equinix_rc {
 }
 }
 
 
 # EquinIX: Route server
 # EquinIX: Route server
-template bgp tpl_equinix_rs {
+template bgp tpl_equinix_rs from tpl_bgp {
         local as 20766;
         local as 20766;
         import where bgp_import(24115,"peering",22000,100);
         import where bgp_import(24115,"peering",22000,100);
         export where bgp_export(24115,"members");
         export where bgp_export(24115,"members");
 	import limit 100000;
 	import limit 100000;
 }
 }
-template bgp tpl_equinix_peers {
+template bgp tpl_equinix_peers from tpl_bgp {
         local as 20766;
         local as 20766;
         import where bgp_import(24115,"peering",22000,110);
         import where bgp_import(24115,"peering",22000,110);
         export where bgp_export(24115,"members");
         export where bgp_export(24115,"members");

+ 1 - 1
etc/local/bird/bird6/bgp.conf

@@ -14,7 +14,7 @@ template bgp tpl_bgp {
 #
 #
 # iBGP: Backbone
 # iBGP: Backbone
 #
 #
-template bgp ibgp {
+template bgp ibgp from tpl_bgp
 	direct;
 	direct;
 	gateway direct;
 	gateway direct;
 	local as 20766;
 	local as 20766;