Files
bird_config/bird/function/unet.conf
2025-11-03 15:51:48 +08:00

49 lines
907 B
Plaintext

ipv4 table unet4;
ipv6 table unet6;
function unet_is_valid_network_v4() {
return net ~ [
10.50.0.0/16+,
10.88.0.0/16+,
10.21.0.0/16+,
10.188.0.0/16+,
172.20.0.0/14+ #DN42转发器服务
];
}
function unet_is_valid_network_v4_anynet() {
return net ~ [
44.32.191.0/24+
];
}
function unet_is_valid_network_v4_allnet(){
if !unet_is_valid_network_v4_anynet() && !unet_is_valid_network_v4() then return false;
return true;
}
function unet_is_voalid_net_v6(){
return net ~ [
2406:840:e600::/44{44,64},
2a0f:1cc5:0010::/44{44,64}
];
}
protocol pipe unet4_sync {
table unet4;
peer table master4;
export filter {
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
accept;
};
}
protocol pipe unet6_sync {
table unet6;
peer table master6;
export filter {
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
accept;
};
}