Fix:add dn42 and change config

This commit is contained in:
2025-12-16 15:56:30 +08:00
parent 95a3532da2
commit 521702243b
20 changed files with 399 additions and 138 deletions

View File

@@ -0,0 +1,42 @@
function is_self_net() {
return net ~ [
44.32.191.0/24
];
}
function is_self_net_v6() {
return net ~ [
2406:840:e600::/44{44,48},
2a0f:1cc5:10::/44{44,48}
];
}
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
];
}
function unet_is_self_net_v6() {
return net ~ [
2406:840:e603::/48{48,56},
2406:840:e60e::/56
];
}
function dn42_is_self_net() {
return net ~ [
172.20.21.0/26+
];
}
function dn42_is_self_net_v6() {
return net ~ [
fde8:936e:ee29::/48+
];
}

28
bird/conf/dn42.conf Normal file
View File

@@ -0,0 +1,28 @@
protocol static route_dn42_export_v4 {
route 172.20.21.0/26 reject;
ipv4 {
table dn42v4;
import filter {
bgp_large_community.add((DN42_ASN,3,0));# 不允许导出到内核
bgp_large_community.add((DN42_ASN,1,0));# 不允许传输到ibgp
bgp_large_community.add((DN42_ASN,200,0));# 传输到Ebgp
accept;
};
export none;
};
}
protocol static route_dn42_export_v6 {
route fde8:936e:ee29::/48 reject;
ipv6 {
table dn42v6;
import filter {
bgp_large_community.add((DN42_ASN,3,0));# 不允许导出到内核
bgp_large_community.add((DN42_ASN,1,0));# 不允许传输到ibgp
bgp_large_community.add((DN42_ASN,200,0));# 传输到Ebgp
accept;
};
export none;
};
}

View File

@@ -1,13 +0,0 @@
function is_self_net() {
return net ~ [
44.32.191.0/24
];
}
function is_self_net_v6() {
return net ~ [
2406:840:e600::/44{44,48},
2a0f:1cc5:10::/44{44,48}
];
}

View File

@@ -1,13 +1,3 @@
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;
@@ -25,14 +15,6 @@ protocol static route_unet_export_v4 {
};
}
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;