Bird config
This commit is contained in:
parent
66a812b5e7
commit
521bb0f5ea
|
@ -1,9 +1,9 @@
|
|||
define AS = 4242421411;
|
||||
define IPv4 = 172.23.196.32;
|
||||
define IPv4 = 172.23.196.33;
|
||||
define IPv6 = fd42:deca:fbad::1;
|
||||
define NETv4 = 172.23.196.32/27;
|
||||
define NETv6 = fd42:deca:fbad::/48;
|
||||
define NETSETv4 = 172.23.196.32/27;
|
||||
define NETSETv4 = [172.23.196.32/27+];
|
||||
define NETSETv6 = [fd42:deca:fbad::/48+];
|
||||
define DN42_REGION = 41; # Europe
|
||||
|
||||
|
@ -18,7 +18,7 @@ roa6 table dn42_roa_v6;
|
|||
|
||||
protocol device {
|
||||
scan time 10;
|
||||
}
|
||||
};
|
||||
|
||||
protocol kernel {
|
||||
scan time 20;
|
||||
|
@ -30,7 +30,7 @@ protocol kernel {
|
|||
accept;
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
protocol kernel {
|
||||
scan time 20;
|
||||
|
@ -45,12 +45,16 @@ protocol kernel {
|
|||
};
|
||||
|
||||
protocol static {
|
||||
roa4 { table dn42_roa; };
|
||||
roa4 {
|
||||
table dn42_roa;
|
||||
};
|
||||
include "/etc/bird/roa/dn42_roa_bird2_4.conf";
|
||||
};
|
||||
|
||||
protocol static {
|
||||
roa6 { table dn42_roa_v6; };
|
||||
roa6 {
|
||||
table dn42_roa_v6;
|
||||
};
|
||||
include "/etc/bird/roa/dn42_roa_bird2_6.conf";
|
||||
};
|
||||
|
||||
|
@ -71,13 +75,20 @@ protocol static {
|
|||
}
|
||||
|
||||
include "/etc/bird/config/community_filters.conf";
|
||||
|
||||
template bgp dn42_peer {
|
||||
local as AS;
|
||||
prefer older on;
|
||||
|
||||
enforce first as on;
|
||||
advertise hostname on;
|
||||
}
|
||||
};
|
||||
|
||||
template bgp dn42_igp {
|
||||
local as AS;
|
||||
direct;
|
||||
};
|
||||
|
||||
include "/etc/bird/igp/ospf/ospf.conf";
|
||||
include "/etc/bird/igp/peers/*";
|
||||
include "/etc/bird/peers/*";
|
||||
|
||||
|
|
|
@ -91,3 +91,24 @@ function dn42_export_filter(int link_latency; int link_bandwidth; int link_crypt
|
|||
reject;
|
||||
}
|
||||
|
||||
function dn42_ibgp_import_filter(int link_latency; int link_bandwidth; int link_crypto) {
|
||||
if source = RTS_BGP && net.type = NET_IP4 && is_valid_network() && !is_self_net() then {
|
||||
update_flags(link_latency, link_bandwidth, link_crypto);
|
||||
accept;
|
||||
} else if source = RTS_BGP && net.type = NET_IP6 && is_valid_network_v6() && !is_self_net_v6() then {
|
||||
update_flags(link_latency, link_bandwidth, link_crypto);
|
||||
accept;
|
||||
} else {
|
||||
reject;
|
||||
}
|
||||
}
|
||||
|
||||
function dn42_ibgp_export_filter(int link_latency; int link_bandwidth; int link_crypto) {
|
||||
if source = RTS_BGP && (is_valid_network() || is_valid_network_v6()) && (!is_self_net() || !is_self_net_v6()) then {
|
||||
update_flags(link_latency, link_bandwidth, link_crypto);
|
||||
accept;
|
||||
}
|
||||
reject;
|
||||
}
|
||||
|
||||
|
||||
|
|
16
thilo-alpine/config/bird/bird/igp/ospf/ospf.conf
Normal file
16
thilo-alpine/config/bird/bird/igp/ospf/ospf.conf
Normal file
|
@ -0,0 +1,16 @@
|
|||
protocol ospf v3 ospf_karx {
|
||||
ipv4 {
|
||||
import where is_self_net() && source != RTS_BGP;
|
||||
export where is_self_net() && source != RTS_BGP;
|
||||
};
|
||||
include "/etc/bird/igp/ospf/ospf_backbone.conf";
|
||||
};
|
||||
|
||||
protocol ospf v3 ospf6_karx {
|
||||
ipv6 {
|
||||
import where is_self_net_v6() && source != RTS_BGP;
|
||||
export where is_self_net_v6() && source != RTS_BGP;
|
||||
};
|
||||
include "/etc/bird/igp/ospf/ospf_backbone.conf";
|
||||
};
|
||||
|
10
thilo-alpine/config/bird/bird/igp/ospf/ospf_backbone.conf
Normal file
10
thilo-alpine/config/bird/bird/igp/ospf/ospf_backbone.conf
Normal file
|
@ -0,0 +1,10 @@
|
|||
area 0 {
|
||||
interface "wgs1" {
|
||||
cost 100;
|
||||
};
|
||||
|
||||
interface "dn42_igp_gpvm" {
|
||||
stub;
|
||||
};
|
||||
};
|
||||
|
16
thilo-alpine/config/bird/bird/igp/peers/karx.conf
Normal file
16
thilo-alpine/config/bird/bird/igp/peers/karx.conf
Normal file
|
@ -0,0 +1,16 @@
|
|||
protocol bgp karx_ibgp from dn42_igp {
|
||||
neighbor fe80::4242%wgs1 as AS;
|
||||
|
||||
ipv4 {
|
||||
import where dn42_ibgp_import_filter(5,24,33);
|
||||
export where dn42_ibgp_export_filter(5,24,33);
|
||||
next hop self;
|
||||
extended next hop on;
|
||||
};
|
||||
ipv6 {
|
||||
import where dn42_ibgp_import_filter(5,24,33);
|
||||
export where dn42_ibgp_export_filter(5,24,33);
|
||||
next hop self;
|
||||
};
|
||||
}
|
||||
|
29
thilo-alpine/config/bird/bird/peers/COLLECTOR.conf
Normal file
29
thilo-alpine/config/bird/bird/peers/COLLECTOR.conf
Normal file
|
@ -0,0 +1,29 @@
|
|||
protocol bgp COLLECTOR {
|
||||
local as 4242421411;
|
||||
neighbor fd42:4242:2601:ac12::1 as 4242422602;
|
||||
multihop;
|
||||
|
||||
ipv4 {
|
||||
add paths tx;
|
||||
import none;
|
||||
export filter {
|
||||
if ( is_valid_network() && source ~ [ RTS_STATIC, RTS_BGP ] )
|
||||
then {
|
||||
accept;
|
||||
}
|
||||
reject;
|
||||
};
|
||||
};
|
||||
ipv6 {
|
||||
add paths tx;
|
||||
import none;
|
||||
export filter {
|
||||
if ( is_valid_network_v6() && source ~ [ RTS_STATIC, RTS_BGP ] )
|
||||
then {
|
||||
accept;
|
||||
}
|
||||
reject;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue