log syslog all; router id 82.165.162.239; # interne BIRD Routing-Tabelle table ffrl; # freifunk ip ranges in general function is_freifunk() { return net ~ [ fc00::/7{48,64}, # unique local addresses 2001:bf7::/32+, 2a03:2260:3009::/48+ ]; } function is_ffrl_export() { return net ~ [ 2a03:2260:3009:100::/56, 2a03:2260:3009::/56, 2a03:2260:3009:f00::/56 ]; } function is_default() { return net ~ [ ::/0 ]; } # BGP Import Filter für Rheinland filter ebgp_ffrl_import_filter { if is_default() then accept; reject; } # BGP Export Filter für Rheinland filter ebgp_ffrl_export_filter { if is_ffrl_export() then accept; reject; } # Dies lädt die Devices in die Tabelle. Die meisten anderen Protokolle brauchen das. protocol device { table ffrl; vrf "vrf_freifunk"; scan time 30; primary 2a03:2260::/48; } # Statische Routen für unsere Netze protocol static local_routes { table ffrl; vrf "vrf_freifunk"; # FFRL-assigned space: Gateway subspaces # we are all in the same layer 2 segment, so we can take all this route 2a03:2260:3009:100::/56 via "saarBR"; route 2a03:2260:3009:200::/56 via "saarBR"; route 2a03:2260:3009:300::/56 via "saarBR"; route 2a03:2260:3009:400::/56 via "saarBR"; # FFRL-assigned space: subet for admin & user services route 2a03:2260:3009::/56 via "saarBR"; route 2a03:2260:3009:f00::/56 via "saarBR"; # FFRL-assigned space: blackhole the rest route 2a03:2260:3009::/48 unreachable; # Intranet space route fd4e:f2d7:88d2:ffff::/64 via "saarBR"; } # Wir exportieren über Rheinland gelernte Routen in die Kernel Table 1042 (freifunk) protocol kernel kernel_ffrl { scan time 30; import none; export filter { # Advise the kernel about which address to use as the source krt_prefsrc = 2a03:2260:3009::2; accept; }; device routes; table ffrl; vrf "vrf_freifunk"; kernel table 1042; }; # BGP Template für Rheinland Peerings template bgp ffrl_uplink { table ffrl; vrf "vrf_freifunk"; local as 64899; import keep filtered; import filter ebgp_ffrl_import_filter; export filter ebgp_ffrl_export_filter; next hop self; direct; }; # P E E R I N G S protocol bgp ffrl_a_ak from ffrl_uplink { source address 2a03:2260:0:194::2; neighbor 2a03:2260:0:194::1 as 201701; }; protocol bgp ffrl_b_ak from ffrl_uplink { source address 2a03:2260:0:195::2; neighbor 2a03:2260:0:195::1 as 201701; }; protocol bgp ffrl_a_ix from ffrl_uplink { source address 2a03:2260:0:196::2; neighbor 2a03:2260:0:196::1 as 201701; }; protocol bgp ffrl_b_ix from ffrl_uplink { source address 2a03:2260:0:197::2; neighbor 2a03:2260:0:197::1 as 201701; }; protocol bgp ffrl_a_fra from ffrl_uplink { source address 2a03:2260:0:1e9::2; neighbor 2a03:2260:0:1e9::1 as 201701; }; protocol bgp ffrl_b_fra from ffrl_uplink { source address 2a03:2260:0:1ea::2; neighbor 2a03:2260:0:1ea::1 as 201701; };