@@ -38,12 +38,13 @@ prefix set as_prefixes;
return (net ~ as_prefixes);
}
-# prefix equivalent ot rfc1918
+# prefix equivalent of rfc1918
function is_rfc1918() {
return net ~ [ FC00::/7+ ];
-# Martians route
+# This function excludes weird networks
+# rfc1918, class D, class E
function is_martians() {
return net ~ [ FE80::/10+, fec0::/10+, FF00::/8+, ::/96+, 0100::/64+, 2001:10::/28+, 2001:0db8::/32+, fc00::/7+ ];
@@ -67,4 +68,3 @@ function is_within_carp() {
function is_default() {
return (net ~ [ ::/0 ]);
-
@@ -28,7 +28,6 @@ protocol static static_noexport_routes {
# bgp_community.add((20766,9999));
# accept;
# };
-# # Exemple a rajouter ici:
+# # Example here:
# # route a:b:c:d:e:f:g:h/i blackhole;
#}
@@ -53,7 +53,6 @@ function bgp_import( int AS; string import_type; int community)
if import_type = "member" then bgp_community.filter( [(20766,9999)] );
# adding the community to identify the source of the route
- # fr: ajout de la communaute pour identifier la source de la route
if import_type != "core" && community > 0 then bgp_community.add((20766,community));
return true;
@@ -95,7 +94,6 @@ pair set full_export_communities;
if export_type = "members"
&& filter(bgp_community, members_export_communities).len = 0 then return false;
- # Filtrage des exports de la full view
# for the full-view, only the routes having one of these communities are exported
full_export_communities = [
(20766,1),
@@ -2,6 +2,7 @@
#
# vim: set ts=4:sw=4
+# All "connected" routes
protocol direct {
interface "lagg0.*";
@@ -10,4 +10,3 @@ router id 80.67.168.5;
# AS number
define my_as = 20766;
@@ -2,7 +2,7 @@
-# OSPF export only the routes not from BGP and wihtin the gitoyen network
+# OSPF export only the routes not from BGP and wihtin the gitoyen network
filter export_OSPF {
if source = RTS_BGP then reject;
@@ -18,7 +18,7 @@ filter export_OSPF {
reject;
-# en OSPF import only the routes within the gitoyen network
+# OSPF import only the routes within the gitoyen network
filter import_OSPF {
if is_rfc1918() then reject;
if is_martians() then reject;
@@ -45,4 +45,3 @@ protocol ospf {
};