同步配置

This commit is contained in:
2025-10-30 08:32:36 +08:00
parent 1660565696
commit 0a2ed5e91f
6 changed files with 89 additions and 61 deletions

View File

@@ -1,61 +1,18 @@
function is_self_net() {
return net ~ [
44.32.191.0/24
];
}
protocol static route_int_export_v4 {
route 44.32.191.0/24 reject;
ipv4 {
table inet4;
import filter {
bgp_large_community.add((LOCAL_ASN,3,0));
bgp_large_community.add((LOCAL_ASN,1,0));
bgp_large_community.add((LOCAL_ASN,200,0));
accept;
};
export none;
};
}
function is_self_net_v6() {
return net ~ [
2406:840:e600::/44{44,48},
2a14:7580:9600::/40{40,48}
];
}
protocol static route_int_export_v6 {
route 2406:840:e600::/48 reject;
route 2406:840:e601::/48 reject;
route 2406:840:e608::/46 reject;
route 2a14:7580:9600::/47 reject;
route 2a14:7580:9603::/48 reject;
route 2a14:7580:9604::/48 reject;
ipv6 {
table inet6;
import filter {
bgp_large_community.add((LOCAL_ASN,3,0));
bgp_large_community.add((LOCAL_ASN,1,0));
bgp_large_community.add((LOCAL_ASN,200,0));
accept;
};
export none;
};
}
function unet_is_self_net() {
return net ~ [
10.188.2.0/23+,
10.188.11.0/24,
172.20.21.0/29
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.2.0/23 reject;
route 10.188.11.0/24 reject;
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 {
@@ -71,12 +28,14 @@ protocol static route_unet_export_v4 {
function unet_is_self_net_v6() {
return net ~ [
2406:840:e601::/48{48,56}
2406:840:e603::/48{48,56},
2406:840:e60e::/56
];
}
protocol static route_unet_export_v6 {
route 2406:840:e601::/48 reject;
route 2406:840:e603::/48 reject;
route 2406:840:e60e::/56 reject;
ipv6 {
table unet6;
import filter {

41
bird/conf/pub.conf Normal file
View File

@@ -0,0 +1,41 @@
function is_self_net() {
return net ~ [
44.32.191.0/24
];
}
protocol static route_int_export_v4 {
route 44.32.191.0/24 reject;
ipv4 {
table inet4;
import filter {
bgp_large_community.add((LOCAL_ASN,3,0));
bgp_large_community.add((LOCAL_ASN,1,0));
bgp_large_community.add((LOCAL_ASN,200,0));
accept;
};
export none;
};
}
function is_self_net_v6() {
return net ~ [
2406:840:e600::/44{44,48}
];
}
protocol static route_int_export_v6 {
route 2406:840:e602::/48 reject;
route 2406:840:e604::/48 reject;
route 2406:840:e606::/48 reject;
ipv6 {
table inet6;
import filter {
bgp_large_community.add((LOCAL_ASN,3,0));
bgp_large_community.add((LOCAL_ASN,1,0));
bgp_large_community.add((LOCAL_ASN,200,0));
accept;
};
export none;
};
}