blade-router: tweak export filter to drop local communities
This commit is contained in:
parent
a8bb05ba1e
commit
27eb5b251e
2 changed files with 18 additions and 6 deletions
|
@ -30,6 +30,18 @@ let
|
|||
bgp_local_pref = ${toString ix.remote.bgp_local_pref};
|
||||
accept;
|
||||
}
|
||||
filter bgp_export_${ixName}4
|
||||
{
|
||||
if ! ((ro, ${toString ix.local.asn}, 1000) ~ bgp_ext_community) then reject;
|
||||
bgp_ext_community.delete([(ro, ${toString ix.local.asn}, *)]);
|
||||
accept;
|
||||
}
|
||||
filter bgp_export_${ixName}6
|
||||
{
|
||||
if ! ((ro, ${toString ix.local.asn}, 1000) ~ bgp_ext_community) then reject;
|
||||
bgp_ext_community.delete([(ro, ${toString ix.local.asn}, *)]);
|
||||
accept;
|
||||
}
|
||||
protocol pipe ${ixName}pipe_4 {
|
||||
table ${ixName}4;
|
||||
peer table master4;
|
||||
|
@ -61,7 +73,7 @@ let
|
|||
ipv4 {
|
||||
table ${ixName}4;
|
||||
import all;
|
||||
export ${if ix.remote.is_route_collector then "all" else "where ((ro, ${toString ix.local.asn}, 1000) ~ bgp_ext_community)"};
|
||||
export ${if ix.remote.is_route_collector then "all" else "filter bgp_export_${ixName}4"};
|
||||
${prefixLimitSnippet ix.remote.prefix_limit.v4}
|
||||
};
|
||||
};
|
||||
|
@ -77,7 +89,7 @@ let
|
|||
ipv6 {
|
||||
table ${ixName}6;
|
||||
import all;
|
||||
export ${if ix.remote.is_route_collector then "all" else "where ((ro, ${toString ix.local.asn}, 1000) ~ bgp_ext_community)"};
|
||||
export ${if ix.remote.is_route_collector then "all" else "filter bgp_export_${ixName}6"};
|
||||
${prefixLimitSnippet ix.remote.prefix_limit.v6}
|
||||
};
|
||||
};
|
||||
|
|
|
@ -349,10 +349,10 @@ in
|
|||
v4 = "195.66.225.6";
|
||||
v6 = "2001:7f8:4::3f94:2";
|
||||
}];
|
||||
}];
|
||||
bgp_local_pref = 120;
|
||||
prefix_limit.v4 = 1000;
|
||||
prefix_limit.v6 = 200;
|
||||
bgp_local_pref = 120;
|
||||
prefix_limit.v4 = 1000;
|
||||
prefix_limit.v6 = 200;
|
||||
};
|
||||
};
|
||||
export.v4 = [ "92.118.28.0/24" ];
|
||||
export.v6 = [ "2a09:a441::/32" ];
|
||||
|
|
Loading…
Reference in a new issue