Update: filter: if route located on other region, export will prepend 1x
parent
4eb7327648
commit
d59bc5feb1
|
@ -78,12 +78,12 @@ function pub_process_communities(int ASN; int PeerType) {
|
||||||
function pub_process_path() {
|
function pub_process_path() {
|
||||||
# Delete Self eBGP Confed Path.
|
# Delete Self eBGP Confed Path.
|
||||||
bgp_path.delete([4200000000..4225479999]);
|
bgp_path.delete([4200000000..4225479999]);
|
||||||
# Route is via Europe & Africa & Middle East
|
# Route is via or locate Europe & Africa & Middle East
|
||||||
if bgp_large_community ~ [(LOCAL_ASN, 122, 100), (LOCAL_ASN, 122, 300..310), (LOCAL_ASN, 122, 600)] then bgp_path.prepend(LOCAL_ASN);
|
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 bgp_path.prepend(LOCAL_ASN);
|
||||||
# Route is via America
|
# Route is via or locate America
|
||||||
if bgp_large_community ~ [(LOCAL_ASN, 122, 200..299)] then bgp_path.prepend(LOCAL_ASN);
|
if bgp_large_community ~ [(LOCAL_ASN, 122, 200..299), (LOCAL_ASN, 121, 200..299)] then bgp_path.prepend(LOCAL_ASN);
|
||||||
# Route is via East Asia & Oceania
|
# Route is via or locate East Asia & Oceania
|
||||||
if bgp_large_community ~ [(LOCAL_ASN, 122, 400..500)] then bgp_path.prepend(LOCAL_ASN);
|
if bgp_large_community ~ [(LOCAL_ASN, 122, 400..500), (LOCAL_ASN, 121, 200..299)] then bgp_path.prepend(LOCAL_ASN);
|
||||||
# Self PoP
|
# Self PoP
|
||||||
if (LOCAL_ASN, 120, POP) ~ bgp_large_community then bgp_path.delete(LOCAL_ASN);
|
if (LOCAL_ASN, 120, POP) ~ bgp_large_community then bgp_path.delete(LOCAL_ASN);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue