Add thetford and peers

This commit is contained in:
Alex D. 2024-11-10 18:19:00 +00:00
parent dfcfe9fbc7
commit cb3707c9e8
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
4 changed files with 76 additions and 0 deletions

View File

@ -0,0 +1,9 @@
protocol bgp thetford from downstream_peer {
local as DOWNSTREAM_OWN_AS;
neighbor fe80::2 as 4200000002;
interface "caskd-thetford";
ipv6 {
import all;
export none;
};
}

View File

@ -0,0 +1,7 @@
log stderr all;
debug protocols { states, routes, filters, interfaces };
router id 127.0.0.1;
protocol device { scan time 10; }
include "/etc/bird/v6gw/bird.conf";

View File

@ -0,0 +1,48 @@
define V6GW_EXPORTABLE_NETSET = [
2a04:5b81:2060:b00b::/64,
2a04:5b81:2060:d00d::/64,
2a04:5b81:2060:f33d::/64
];
define V6GW_OWN_AS = 4200000002;
function v6gw_is_selfnet() {
return net ~ V6GW_EXPORTABLE_NETSET;
}
ipv6 table v6gw;
protocol direct v6gw_direct {
vrf "vrf-v6";
check link yes;
ipv6 { table v6gw; };
}
protocol kernel v6gw_kernel {
vrf "vrf-v6";
kernel table 10;
scan time 20;
learn;
merge paths 64;
ipv6 {
table v6gw;
import filter {
if !v6gw_is_selfnet() then reject; # Only import valid networks
if source != RTS_STATIC then reject; # Don't import non-static routes
accept;
};
export none;
};
}
template bgp v6gwpeer {
vrf "vrf-v6";
local as V6GW_OWN_AS;
path metric 1;
ipv6 {
table v6gw;
};
}
include "/etc/bird/v6gw/peers/*";

View File

@ -0,0 +1,12 @@
protocol bgp mika_frankfurt from v6gwpeer {
neighbor fe80::1 as 4200000000;
interface "vultrbgp";
ipv6 {
import none;
export filter {
if !v6gw_is_selfnet() then reject;
reject;
#accept;
};
};
}