This commit is contained in:
2026-06-05 16:10:46 +08:00
parent 420250832e
commit 2991b41762
5 changed files with 8 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
function function_dn42_ibgp_import() {
bgp_large_community.delete((DN42_ASN,3,1));
bgp_large_community.delete((DN42_ASN,3,0));
if is_dn42_self_net() then return false;
if !is_dn42_prefix() then return false;
if bgp_large_community ~ [(DN42_ASN, 1,*)] then return false;
@@ -7,7 +7,7 @@ function function_dn42_ibgp_import() {
}
function function_dn42_ibgp_export() {
bgp_large_community.delete((DN42_ASN,3,1));
bgp_large_community.delete((DN42_ASN,3,0));
if is_dn42_self_net() then return false;
if !is_dn42_prefix() then return false;
if bgp_large_community ~ [(DN42_ASN, 1,*)] then return false;

View File

@@ -16,7 +16,7 @@ function function_dn42_bgp_export_to_upstream1() {
}
if source = RTS_BGP then {
# BGP路由允许 3000
if bgp_large_community ~ [(DN42_ASN, 300, 0)] then return true;
if bgp_large_community ~ [(DN42_ASN, 10100, 4)] then return true;
}
return false;
}

View File

@@ -1,5 +1,5 @@
function function_inet_ibgp_import() {
bgp_large_community.delete((LOCAL_ASN,3,1));
bgp_large_community.delete((LOCAL_ASN,3,0));
if is_self_net() then return false;
if is_bogon_prefix() then return false;
if bgp_large_community ~ [(LOCAL_ASN, 1,*)] then return false;
@@ -7,7 +7,7 @@ function function_inet_ibgp_import() {
}
function function_inet_ibgp_export() {
bgp_large_community.delete((LOCAL_ASN,3,1));
bgp_large_community.delete((LOCAL_ASN,3,0));
if is_self_net() then return false;
if is_bogon_prefix() then return false;
if bgp_large_community ~ [(LOCAL_ASN, 1,*)] then return false;

View File

@@ -15,8 +15,7 @@ function function_inet_bgp_export_to_upstream1() {
if bgp_large_community ~ [(LOCAL_ASN, 200, 1)] then return false;
}
if source = RTS_BGP then {
# BGP路由允许 3000
if bgp_large_community ~ [(LOCAL_ASN, 300, 0)] then return true;
if bgp_large_community ~ [(LOCAL_ASN, 10100, 4)] then return true;
}
return false;
}

View File

@@ -3,11 +3,8 @@
cd
git clone https://git.nia.ink/brnet/bird_config.git
rm /etc/bird/template/dn42.conf
mv ./bird_config/bird/template/dn42.conf /etc/bird/template/
rm /etc/bird/function/dn42.conf
mv ./bird_config/bird/function/dn42.conf /etc/bird/function/
rm /etc/bird/filter/*.conf
mv ./bird_config/bird/filter/*.conf /etc/bird/filter/
birdc c