Update: update filter

production
186526 2023-01-01 03:23:34 +08:00
parent eec92c3fa1
commit 61167cba6d
1 changed files with 5 additions and 5 deletions

View File

@ -12,11 +12,11 @@ function net186_import_filter(int POPID)
viaRegion = 0;
# Route is via Europe & Africa & Middle East
if bgp_large_community ~ [(LOCAL_ASN, 122, 100), (LOCAL_ASN, 122, 300..310), (LOCAL_ASN, 122, 600)] then viaRegion = viaRegion + 1;
# Route is via America
if bgp_large_community ~ [(LOCAL_ASN, 122, 200..299)] then viaRegion = viaRegion + 1;
# Route is via East Asia & Oceania
if bgp_large_community ~ [(LOCAL_ASN, 122, 400..500)] then viaRegion = viaRegion + 1;
if bgp_large_community ~ [(LOCAL_ASN, 122, 100), (LOCAL_ASN, 122, 300..310), (LOCAL_ASN, 122, 600), (LOCAL_ASN, 121, 100), (LOCAL_ASN, 121, 300..310), (LOCAL_ASN, 121, 600)] then viaRegion = viaRegion + 1;
# Route is via or locate America
if bgp_large_community ~ [(LOCAL_ASN, 122, 200..299), (LOCAL_ASN, 121, 200..299)] then viaRegion = viaRegion + 1;
# Route is via or locate East Asia & Oceania
if bgp_large_community ~ [(LOCAL_ASN, 122, 400..500), (LOCAL_ASN, 121, 200..299)] then viaRegion = viaRegion + 1;
if viaRegion >= 2 then bgp_local_pref = bgp_local_pref - 50 * viaRegion;