From 6456863d1350340a8d6cfad183332e80b334bd8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Sloth=20T=C3=B8nnesen?= Date: Fri, 18 Jun 2021 21:34:39 +0000 Subject: space_server: bird: prepare large communities This patch prepares us for adopting Large BGP Communities (RFC 8092). Basic format of Large BGP Communities: :: We use function 1 for storing prefix type (or relation). We then assign a value to transit, peering, customer and originated prefixes. Large BGP Communities http://largebgpcommunities.net/ https://tools.ietf.org/html/rfc8092 https://tools.ietf.org/html/rfc8195 --- roles/space_server/files/bird.conf | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'roles/space_server/files') diff --git a/roles/space_server/files/bird.conf b/roles/space_server/files/bird.conf index fbd426a..5e48427 100644 --- a/roles/space_server/files/bird.conf +++ b/roles/space_server/files/bird.conf @@ -60,8 +60,22 @@ define hafnium_prefixes_v6 = [ 2a0e:8f02:f034::/48 ]; +# large communities +define lc_f_type = 1; + +define lc_type_transit = 1; +define lc_type_peering = 2; +define lc_type_customer = 3; +define lc_type_originate = 4; + # functions and filters +function set_peer_type(int new_type) +{ + bgp_large_community.delete([(local_asn, lc_f_type, *)]); + bgp_large_community.add( (local_asn, lc_f_type, new_type)); +} + function is_default_route() { case net.type { NET_IP4: if net = 0.0.0.0/0 then return true; -- cgit v1.2.1