update internal network
parent
4a00d50144
commit
0268ebd055
|
@ -8,7 +8,7 @@ function net186_import_filter(int POPID)
|
||||||
|
|
||||||
if public_bgp_path.len = 1 then bgp_local_pref = 550;
|
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, 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;
|
else bgp_local_pref = 300;
|
||||||
|
|
||||||
pub_route_controller_specific();
|
pub_route_controller_specific();
|
||||||
|
@ -21,7 +21,8 @@ function net186_import_filter(int POPID)
|
||||||
# Route is via or locate East Asia & Oceania
|
# 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;
|
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.
|
# 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;
|
if (LOCAL_ASN, 122, 430) ~ bgp_large_community && REGION != 430 && (LOCAL_ASN, 121, 430) !~ bgp_large_community then return false;
|
||||||
|
|
Loading…
Reference in New Issue