diff --git a/lib/20-community-net186.conf b/lib/20-community-net186.conf index 8650530..e5311de 100644 --- a/lib/20-community-net186.conf +++ b/lib/20-community-net186.conf @@ -18,7 +18,7 @@ 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, 200..299)] then viaRegion = viaRegion + 1; - if viaRegion >= 2 then bgp_local_pref = bgp_local_pref - 50 * viaRegion; + bgp_local_pref = bgp_local_pref - 50 * viaRegion; # Route is via China mainland but not advertise in China mainland. if (LOCAL_ASN, 122, 430) ~ bgp_large_community && REGION != 430 && (LOCAL_ASN, 120, 430) ~ bgp_large_community then return false; @@ -28,7 +28,7 @@ function net186_import_filter(int POPID) bgp_local_pref = bgp_local_pref - public_bgp_path.len * 10; if LOCAL_ASN ~ bgp_path then return false; - + return true; }; diff --git a/readme.md b/readme.md index 53e6221..7b639ff 100644 --- a/readme.md +++ b/readme.md @@ -30,7 +30,7 @@ To get in touch with me, please send mail to the following mailboxes. | Community | Description | Action | | -------------- | ------------ | ------------------------------------------------------------------- | -| (65535, 65281) | No Export | Prefix should not be exported outside of 186526 Network (LOCAL_ASN) | +| (65535, 65281) | No Export | Prefix should not be exported outside of 186526 Network (AS200536) | | (65535, 65282) | No Advertise | Prefix should not be exported outside of this PoP | | (65535, 65283) | Local AS | Prefix should not be exported outside of this region | | (65535, 666) | Blackhole | Prefix should be blackholed at our PoP | @@ -43,32 +43,32 @@ To get in touch with me, please send mail to the following mailboxes. | Community | Description | | ------------------------------- | ------------------------------------------------------- | -| (LOCAL_ASN, 110, 0) | Route learn from peer | -| (LOCAL_ASN, 110, 1) | Route learn from IX | -| (LOCAL_ASN, 110, 2) | Route learn from direct peer | -| (LOCAL_ASN, 110, 10) | Route learn from upstream | -| (LOCAL_ASN, 110, 20) | Route learn from downstream | -| (LOCAL_ASN, 110, 30) | Route from 186526 Network | -| (LOCAL_ASN, 120, `this PoP`) | Route learn on `this PoP` | -| (LOCAL_ASN, 121, `this region`) | Route learn in `this region` | -| (LOCAL_ASN, 122, `this region`) | Route is passed through `this region` in 186526 Network | +| (200536, 110, 0) | Route learn from peer | +| (200536, 110, 1) | Route learn from IX | +| (200536, 110, 2) | Route learn from direct peer | +| (200536, 110, 10) | Route learn from upstream | +| (200536, 110, 20) | Route learn from downstream | +| (200536, 110, 30) | Route from 186526 Network | +| (200536, 120, `this PoP`) | Route learn on `this PoP` | +| (200536, 121, `this region`) | Route learn in `this region` | +| (200536, 122, `this region`) | Route is passed through `this region` in 186526 Network | #### User-controllable Community | Community | Action | | ------------------------------- | -------------------------------------------------------------------------------- | -| (LOCAL_ASN, 0, 665) | Prefix should only be announced, not written to our routing table | -| (LOCAL_ASN, 0, 666) | Prefix should be blackholed at our PoP | -| (LOCAL_ASN, 1, 0) | Prefix should not be exported to all upstream | -| (LOCAL_ASN, 1, 1) | Prefix should not be exported to all peers | -| (LOCAL_ASN, 1, 2) | Prefix should not be exported to all downstream | -| (LOCAL_ASN, 2, `ASN`) | Prefix should not be exported to all `ASN` BGP sessions | -| (LOCAL_ASN, 3, `this region`) | Prefix should not be exported outside 186526 Network in `this region` | -| (LOCAL_ASN, 115, 1) | Route should be prepend 1x outside 186526 Network | -| (LOCAL_ASN, 115, 3) | Route should be prepend 3x outside 186526 Network | -| (LOCAL_ASN, 115, 5) | Route should be prepend 5x outside 186526 Network | -| (LOCAL_ASN, 125, `this PoP`) | Route should not be exported on `this PoP` to other PoPs in 186526 Network | -| (LOCAL_ASN, 126, `this region`) | Route should not be exported in `this region` to other regions in 186526 Network | +| (200536, 0, 665) | Prefix should only be announced, not written to our routing table | +| (200536, 0, 666) | Prefix should be blackholed at our PoP | +| (200536, 1, 0) | Prefix should not be exported to all upstream | +| (200536, 1, 1) | Prefix should not be exported to all peers | +| (200536, 1, 2) | Prefix should not be exported to all downstream | +| (200536, 2, `ASN`) | Prefix should not be exported to all `ASN` BGP sessions | +| (200536, 3, `this region`) | Prefix should not be exported outside 186526 Network in `this region` | +| (200536, 115, 1) | Route should be prepend 1x outside 186526 Network | +| (200536, 115, 3) | Route should be prepend 3x outside 186526 Network | +| (200536, 115, 5) | Route should be prepend 5x outside 186526 Network | +| (200536, 125, `this PoP`) | Route should not be exported on `this PoP` to other PoPs in 186526 Network | +| (200536, 126, `this region`) | Route should not be exported in `this region` to other regions in 186526 Network | ## Region & PoP @@ -107,7 +107,7 @@ To get in touch with me, please send mail to the following mailboxes. | us-sjc1 | Fremont, CA, US | 221 | Core | | us-lax1 | Los Angeles, CA, US | 222 | Edge | | us-sea1 | Seattle, CA, US | 223 | Core | -| br-gru1 | Sao Paulo, BR | 241 | Edge | +| br-sao1 | Sao Paulo, BR | 241 | Edge | | APAC | ---- | ---- | | cn-hkg1 | Hong Kong SAR | 401 | Core | | cn-tpe1 | Taipei, CN | 402 | Edge |