Update: update filter
parent
eec92c3fa1
commit
61167cba6d
|
@ -12,11 +12,11 @@ function net186_import_filter(int POPID)
|
||||||
|
|
||||||
viaRegion = 0;
|
viaRegion = 0;
|
||||||
# Route is via Europe & Africa & Middle East
|
# 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;
|
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 America
|
# Route is via or locate America
|
||||||
if bgp_large_community ~ [(LOCAL_ASN, 122, 200..299)] then viaRegion = viaRegion + 1;
|
if bgp_large_community ~ [(LOCAL_ASN, 122, 200..299), (LOCAL_ASN, 121, 200..299)] then viaRegion = viaRegion + 1;
|
||||||
# Route is via East Asia & Oceania
|
# Route is via or locate East Asia & Oceania
|
||||||
if bgp_large_community ~ [(LOCAL_ASN, 122, 400..500)] then viaRegion = viaRegion + 1;
|
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;
|
if viaRegion >= 2 then bgp_local_pref = bgp_local_pref - 50 * viaRegion;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue