From ff8ef6bdd84a5edc068069b5ff382c35e2456881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Sloth=20T=C3=B8nnesen?= Date: Fri, 18 Jun 2021 21:35:52 +0000 Subject: space_server: bird: set communities on import Assign large communities on prefix import. Later we can then use the community, to decide if we should announce it to our peers. --- roles/space_server/files/bird.conf | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/roles/space_server/files/bird.conf b/roles/space_server/files/bird.conf index 67f7419..943cd6c 100644 --- a/roles/space_server/files/bird.conf +++ b/roles/space_server/files/bird.conf @@ -107,6 +107,7 @@ function honor_graceful_shutdown() { filter transit_import { honor_graceful_shutdown(); + set_peer_type(lc_type_transit); accept; } @@ -115,14 +116,23 @@ filter transit_export { reject; } +filter import_originating { + set_peer_type(lc_type_originate); + accept; +} + # generate local routes protocol static static4 { - ipv4; + ipv4 { + import filter import_originating; + }; route 185.38.175.0/24 unreachable; } protocol static static6 { - ipv6; + ipv6 { + import filter import_originating; + }; route 2a01:4262:1ab::/48 unreachable; } @@ -130,6 +140,7 @@ protocol static static6 { function customer_import(int peer_asn; prefix set peer_prefixes) { if net !~ peer_prefixes then reject; if bgp_path.first != peer_asn then reject; + set_peer_type(lc_type_customer); accept; } -- cgit v1.2.1