Files
dn42_config/bird/conf/unet.conf
2025-11-03 15:49:32 +08:00

43 lines
883 B
Plaintext

ipv4 table unet4;
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+
];
}
protocol pipe unet4_sync {
table unet4;
peer table master4;
export filter {
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
accept;
};
}
function unet_is_self_net() {
return net ~ [
10.188.18.8/29,
172.20.0.0/14
];
}
protocol static route_unet_export_v4 {
route 10.188.18.8/29 reject;
route 172.20.0.0/14 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;
};
}