Control BGP Communities
Control BGP communities for AS203314 traffic engineering, including blackhole, propagation control, and path prepending.
Attach control communities to the prefixes you announce to AS203314. They request export restrictions or changes to path attributes as listed below.
Traffic Engineering
The actions below affect propagation beyond Hats Network.
Blackhole & Filtering
| Community | Action |
|---|---|
203314:0:666 | Do not announce this route (blackhole) |
Usage: Stop announcement of a prefix (e.g., during DDoS mitigation or IP address deprecation).
Note: Equivalent to standard blackhole community 65535:65281.
Propagation Control
Select the peer types that may receive your routes:
| Community | Action |
|---|---|
203314:1:0 | Do not send to Upstream |
203314:1:1 | Do not send to Peering |
203314:1:2 | Do not send to Downstream |
Example Use Cases:
- Use
203314:1:0to prevent transit from carrying your prefix - Use
203314:1:1to keep traffic limited to IX route servers - Use
203314:1:2to prevent customer leakage
Geographic Restrictions
Restrict export by location:
| Community | Action |
|---|---|
203314:2:1 | Do not send to other regions (Disable Cross Region) |
203314:2:2 | Do not send to other PoPs (Disable Cross PoP) |
203314:201:XX | Do not send to Region XX |
Examples:
# Keep traffic within Asia only
203314:2:1 # Disable cross-region
203314:201:300 # Exclude North America
203314:201:200 # Exclude EuropePath Prepending
Request AS-path prepending on external advertisements:
Scope: Path prepending only affects routes announced to external peers (upstream, peering, customers)-not internal routing.
| Community | Action |
|---|---|
203314:220:1 | Prepend 1x outside Hats Network |
203314:220:2 | Prepend 2x outside Hats Network |
203314:220:3 | Prepend 3x outside Hats Network |
203314:220:4 | Prepend 4x outside Hats Network |
203314:220:5 | Prepend 5x outside Hats Network |
Usage: Deprioritize specific prefixes for inbound traffic engineering.
Community Decision Flow
Usage Examples
Example 1: Local Traffic Only
Announce a prefix only within a specific region:
# Announce to Asia West only
203314:2:1 # Disable cross-regionExample 2: Deprioritize Backup Prefix
Make a backup prefix less attractive:
# Deprioritize via path prepending
203314:220:3 # Prepend 3x AS203314Example 3: Selective Peering
Announce only to specific peer types:
# Announce to peering and customers only
203314:1:0 # Do not send to upstreamExample 4: Exclude Location
Prevent announcement via specific location:
# Exclude PoP-specific announcement
203314:202:301 # Do not send via SeattleExample 5: Combined Control
Combine multiple communities for complex policies:
# Deprioritized, Asia-only, no upstream
203314:1:0 # No upstream
203314:2:1 # Asia only
203314:220:2 # Prepend 2xImplementation Notes
Best Practices:
- Test before production: Use
203314:220:1(1x prepend) to verify communities work - Monitor impact: Check route servers and looking glasses after applying changes
- Document your policies: Keep track of which prefixes use which communities
- Use conservative prepends: 3x prepend is usually sufficient; 5x is extreme
Configuration Examples (JunOS / BIRD2)
These are BGP Large Communities under RFC 8092. JunOS uses the large: prefix, for example large:203314:0:666. BIRD2 uses bgp_large_community tuples such as (203314, 0, 666).
Export Policy Safety Default (Strongly Recommended)
These are export filters. End BIRD2 filters with reject; and JunOS policies with term REJECT-ALL then reject to prevent unmatched routes from being announced.
Example: Blackhole (203314:0:666)
set policy-options community HATS-BLACKHOLE members large:203314:0:666
set policy-options policy-statement EXPORT-TO-HATS term BLACKHOLE from route-filter 203.0.113.0/24 exact
set policy-options policy-statement EXPORT-TO-HATS term BLACKHOLE then community add HATS-BLACKHOLE
set policy-options policy-statement EXPORT-TO-HATS term BLACKHOLE then accept
set policy-options policy-statement EXPORT-TO-HATS term REJECT-ALL then rejectExample: No Upstream (203314:1:0) + Prepend 3x (203314:220:3)
set policy-options community HATS-NO-UPSTREAM members large:203314:1:0
set policy-options community HATS-PREPEND-3X members large:203314:220:3
set policy-options policy-statement EXPORT-TO-HATS term BACKUP from route-filter 203.0.113.0/24 exact
set policy-options policy-statement EXPORT-TO-HATS term BACKUP then community add [ HATS-NO-UPSTREAM HATS-PREPEND-3X ]
set policy-options policy-statement EXPORT-TO-HATS term BACKUP then accept
set policy-options policy-statement EXPORT-TO-HATS term REJECT-ALL then rejectExample: Keep in-region + Exclude a PoP (203314:2:1 + 203314:202:253)
set policy-options community HATS-NO-CROSS-REGION members large:203314:2:1
set policy-options community HATS-NO-AMS members large:203314:202:253
set policy-options policy-statement EXPORT-TO-HATS term LOCAL-ONLY from route-filter 203.0.113.0/24 exact
set policy-options policy-statement EXPORT-TO-HATS term LOCAL-ONLY then community add [ HATS-NO-CROSS-REGION HATS-NO-AMS ]
set policy-options policy-statement EXPORT-TO-HATS term LOCAL-ONLY then accept
set policy-options policy-statement EXPORT-TO-HATS term REJECT-ALL then rejectRelated Information
- PoP Codes - Reference for PoP numbers (XXX) in geographic restrictions
- Region Codes - Reference for region numbers (XX) in geographic restrictions
- Internal Communities - Communities we attach to routes we announce
Important: Control communities are applied to routes you announce to AS203314. They do not affect routes we announce to you.
Internal BGP Communities
Internal BGP communities for AS203314 indicating route origin types, PoP locations, and geographic regions.
PoP Codes
Point of Presence (PoP) codes used in AS203314 BGP communities for location-based routing across 16+ PoPs in Hong Kong, Tokyo, Singapore, Amsterdam, Frankfurt, London, Los Angeles, New York, and more.