BGP Communities
Complete reference for BGP community strings for AS203314 traffic engineering. Internal communities for route origin, PoP, region tagging, and control communities for blackhole, propagation, prepending. and path manipulation.
AS203314 BGP Communities
Hats Network (AS203314) uses a comprehensive BGP community structure to help network operators manage their routing policies effectively.
Community System Overview
Quick Reference
| Category | Community | Purpose | Details |
|---|---|---|---|
| Origin | 203314:110:XX | Route source type | See Origin → |
| PoP | 203314:120:XXX | Learned at PoP | See PoP-Based → |
| PoP Pass | 203314:125:XXX | Passed through PoP | See PoP-Based → |
| Region | 203314:130:XX | Learned in region | See Region-Based → |
| Region Pass | 203314:135:XX | Passed through region | See Region-Based → |
| Blackhole | 203314:0:666 | Do not announce | See Blackhole → |
| No Upstream | 203314:1:0 | Do not send to upstream | See Propagation → |
| No Peering | 203314:1:1 | Do not send to peering | See Propagation → |
| No Customer | 203314:1:2 | Do not send to downstream | See Propagation → |
| No Cross-Region | 203314:2:1 | Keep within region | See Geo Restrictions → |
| No Cross-PoP | 203314:2:2 | Keep within PoP | See Geo Restrictions → |
| No Region | 203314:201:XX | Exclude region | See Geo Restrictions → |
| No PoP | 203314:202:XXX | Exclude PoP | See Geo Restrictions → |
| Prepend 1x | 203314:220:1 | Prepend AS 1 time | See Path Prepending → |
| Prepend 2x | 203314:220:2 | Prepend AS 2 times | See Path Prepending → |
| Prepend 3x | 203314:220:3 | Prepend AS 3 times | See Path Prepending → |
| Prepend 4x | 203314:220:4 | Prepend AS 4 times | See Path Prepending → |
| Prepend 5x | 203314:220:5 | Prepend AS 5 times | See Path Prepending → |
Community Categories
Internal Communities
Route origin types, PoP locations, and region codes for identifying where routes are learned.
Control Communities
Traffic engineering communities for blackhole, propagation control, and path prepending.
PoP Codes
3-digit codes for each Point of Presence used in location-based communities.
Region Codes
2-digit geographic region codes for area-based routing policies.
Usage Examples
Common Scenarios
- Keep traffic local:
bgp_large_community.add((203314, 2, 1)); # Do not send to other regions- Deprioritize upstream:
bgp_large_community.add((203314, 220, 3)); # Prepend 3x to upstream routes- Exclude specific PoP:
bgp_large_community.add((203314, 202, 253)); # Do not send to AMSConfiguration Examples (JunOS / BIRD2)
Below are minimal snippets showing how to attach AS203314 large communities to the prefixes you announce to us.
Export Policy Safety Default (Strongly Recommended)
These snippets are export policies. For BIRD2, use reject; as the default action to prevent
route leaks.
For JunOS, add a final term REJECT-ALL then reject as a safety catch-all.
Documentation Prefixes
These examples use documentation-only prefixes from RFC 5737 / RFC 3849 (e.g. 203.0.113.0/24,
2001:db8::/32). Replace them with your real announced prefixes.
Keep traffic local (203314:2:1)
set policy-options community HATS-NO-CROSS-REGION members large:203314:2:1
set policy-options policy-statement EXPORT-TO-HATS term LOCAL from route-filter 203.0.113.0/24 exact
set policy-options policy-statement EXPORT-TO-HATS term LOCAL then community add HATS-NO-CROSS-REGION
set policy-options policy-statement EXPORT-TO-HATS term LOCAL then accept
set policy-options policy-statement EXPORT-TO-HATS term REJECT-ALL then rejectDeprioritize a backup prefix (203314:220:3)
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-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 rejectIPv6 variant
set policy-options community HATS-NO-CROSS-REGION members large:203314:2:1
set policy-options policy-statement EXPORT-TO-HATS term LOCAL-V6 from route-filter 2001:db8:203:113::/48 exact
set policy-options policy-statement EXPORT-TO-HATS term LOCAL-V6 then community add HATS-NO-CROSS-REGION
set policy-options policy-statement EXPORT-TO-HATS term LOCAL-V6 then accept
set policy-options policy-statement EXPORT-TO-HATS term REJECT-ALL then rejectKeep traffic local (203314:2:1)
filter export_to_hats_v4 {
if net = 203.0.113.0/24 then {
bgp_large_community.add((203314, 2, 1));
accept;
}
reject; # Safety default
}Deprioritize a backup prefix (203314:220:3)
filter export_to_hats_v4 {
if net = 203.0.113.0/24 then {
bgp_large_community.add((203314, 220, 3));
accept;
}
reject; # Safety default
}IPv6 variant
filter export_to_hats_v6 {
if net = 2001:db8:203:113::/48 then {
bgp_large_community.add((203314, 2, 1));
accept;
}
reject; # Safety default
}