update internal network
continuous-integration/drone/push Build is passing Details

This commit is contained in:
186526 2023-02-19 00:03:54 +08:00
parent 4a00d50144
commit 0268ebd055
1 changed files with 3 additions and 2 deletions

View File

@ -8,7 +8,7 @@ function net186_import_filter(int POPID)
if public_bgp_path.len = 1 then bgp_local_pref = 550;
else if bgp_large_community ~ [(LOCAL_ASN, 110, 0), (LOCAL_ASN, 110, 2), (LOCAL_ASN, 110, 20)] then bgp_local_pref = 500;
else if bgp_large_community ~ [(LOCAL_ASN, 110, 1), (LOCAL_ASN, 110, 10)] then bgp_local_pref = 400;
else if bgp_large_community ~ [(LOCAL_ASN, 110, 10)] then bgp_local_pref = 400;
else bgp_local_pref = 300;
pub_route_controller_specific();
@ -21,7 +21,8 @@ function net186_import_filter(int POPID)
# Route is via or locate East Asia & Oceania
if bgp_large_community ~ [(LOCAL_ASN, 122, 400..500), (LOCAL_ASN, 121, 400..500)] || POP ~ [400..500] then viaRegion = viaRegion + 1;
bgp_local_pref = bgp_local_pref - 50 * viaRegion;
if bgp_large_community !~ [(LOCAL_ASN, 110, 0), (LOCAL_ASN, 110, 2), (LOCAL_ASN, 110, 1)] then bgp_local_pref = bgp_local_pref - 50 * viaRegion;
else bgp_local_pref = bgp_local_pref - 100 * viaRegion;
# Route is via China mainland but not advertise in China mainland.
if (LOCAL_ASN, 122, 430) ~ bgp_large_community && REGION != 430 && (LOCAL_ASN, 121, 430) !~ bgp_large_community then return false;