Files
bird_config/bird/conf/unet.conf
2025-10-30 10:25:57 +08:00

50 lines
1.2 KiB
Plaintext

function unet_is_self_net() {
return net ~ [
10.188.6.0/23+,
10.188.5.124/30,
44.32.191.16/28,
44.32.191.7/32
];
}
protocol static route_unet_export_v4 {
route 10.188.6.0/23 reject;
route 10.188.5.124/30 reject;
route 44.32.191.16/28 reject;
route 44.32.191.7/32 reject;
ipv4 {
table unet4;
import filter {
bgp_large_community.add((UNET_ASN,3,0));# 不允许导出到内核
bgp_large_community.add((UNET_ASN,1,0));# 不允许传输到ibgp
bgp_large_community.add((UNET_ASN,200,0));# 传输到Ebgp
accept;
};
export none;
};
}
function unet_is_self_net_v6() {
return net ~ [
2406:840:e603::/48{48,56},
2406:840:e60e::/56
];
}
protocol static route_unet_export_v6 {
route 2406:840:e603::/48 reject;
route 2406:840:e60e::/56 reject;
ipv6 {
table unet6;
import filter {
bgp_large_community.add((UNET_ASN,3,0));# 不允许导出到内核
bgp_large_community.add((UNET_ASN,1,0));# 不允许传输到ibgp
bgp_large_community.add((UNET_ASN,200,0));# 传输到Ebgp
accept;
};
export none;
};
}