00
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -16,7 +16,7 @@ function function_dn42_bgp_export_to_upstream1() {
|
||||
}
|
||||
if source = RTS_BGP then {
|
||||
# BGP路由,允许 300,0
|
||||
if bgp_large_community ~ [(DN42_ASN, 300, 0)] then return true;
|
||||
if bgp_large_community ~ [(DN42_ASN, 10100, 4)] then return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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路由,允许 300,0
|
||||
if bgp_large_community ~ [(LOCAL_ASN, 300, 0)] then return true;
|
||||
if bgp_large_community ~ [(LOCAL_ASN, 10100, 4)] then return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user