Add: (LOCAL_ASN, 110, 30)
continuous-integration/drone/push Build is passing Details

This commit is contained in:
186526 2022-12-28 09:51:41 +08:00
parent dcfe9c677a
commit 98c3e0be9f
4 changed files with 7 additions and 3 deletions

View File

@ -21,6 +21,9 @@ function pub_add_communities(int ASN; int PeerType) {
# DOWNSTREAM
} else if (PeerType=20) then {
if bgp_large_community !~ [(LOCAL_ASN, 110, *)] then bgp_large_community.add((LOCAL_ASN, 110, 20));
# Self Route
} else if (PeerType=30) then {
if bgp_large_community !~ [(LOCAL_ASN, 110, *)] then bgp_large_community.add((LOCAL_ASN, 110, 30));
}
# Finished (LOCAL_ASN, 110, *);
@ -98,7 +101,7 @@ function transit_export_filter(int ASN) {
if !is_valid() then return false;
if bgp_large_community ~ [(LOCAL_ASN, 110, 0), (LOCAL_ASN, 110, 10)] then return false;
if bgp_path.last !~ DOWNSTREAM_ASN && source = RTS_BGP then return false;
pub_add_communities(ASN, 10);
pub_add_communities(ASN, 30);
if pub_process_communities(ASN, 10) then return true;
else return false;
}

View File

@ -10,7 +10,7 @@ function downstream_import_filter(int ASN) {
function downstream_export_filter(int ASN) {
pub_process_path();
if !is_valid() then return false;
pub_add_communities(ASN, 10);
pub_add_communities(ASN, 30);
if pub_process_communities(ASN, 20) then return true;
else return false;
}

View File

@ -20,7 +20,7 @@ function direct_peer_export_filter(int ASN) {
pub_process_path();
if !is_valid() then return false;
if !is_peer_route() then return false;
pub_add_communities(ASN, 10);
pub_add_communities(ASN, 30);
if pub_process_communities(ASN, 0) then return true;
else return false;
}

View File

@ -30,6 +30,7 @@
| (LOCAL_ASN, 110, 2) | Route learn from direct peer |
| (LOCAL_ASN, 110, 10) | Route learn from upstream |
| (LOCAL_ASN, 110, 20) | Route learn from downstream |
| (LOCAL_ASN, 110, 30) | Route from 186526 Network |
| (LOCAL_ASN, 120, `this PoP`) | Route learn on `this PoP` |
| (LOCAL_ASN, 121, `this region`) | Route learn in `this region` |
| (LOCAL_ASN, 122, `this region`) | Route is passed through `this region` in 186526 Network |