Hats Network | LogoHats Network
BGP Communities

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

AS203314 uses BGP Large Communities to label route origins and accept customer routing controls. Internal tags describe received routes; control communities request an export action.

Community System Overview

AS203314 Community SystemThe community space is split into route-origin signals, policy controls, and reference codebooks for PoPs and regions.Internal SignalsRoute Origin 110Upstream 10Downstream 20Peering 30Hats Origin 110PoP ScopeLearned At 120Passed Through 125Region ScopeLearned In 130Passed Through 135Control ActionsBlackhole / Filtering203314:0:666Propagation Control203314:1:0203314:1:1203314:1:2Geographic Restrictions203314:2:1203314:2:2203314:201:XX203314:202:XXXAS-Path Prepend203314:220:1~5Reference CodesPoP CodesXXX formatRegion CodesXX format

Quick Reference

CategoryCommunityPurposeDetails
Origin203314:110:XXRoute source typeSee Origin →
PoP203314:120:XXXLearned at PoPSee PoP-Based →
PoP Pass203314:125:XXXPassed through PoPSee PoP-Based →
Region203314:130:XXLearned in regionSee Region-Based →
Region Pass203314:135:XXPassed through regionSee Region-Based →
Blackhole203314:0:666Do not announceSee Blackhole →
No Upstream203314:1:0Do not send to upstreamSee Propagation →
No Peering203314:1:1Do not send to peeringSee Propagation →
No Customer203314:1:2Do not send to downstreamSee Propagation →
No Cross-Region203314:2:1Keep within regionSee Geo Restrictions →
No Cross-PoP203314:2:2Keep within PoPSee Geo Restrictions →
No Region203314:201:XXExclude regionSee Geo Restrictions →
No PoP203314:202:XXXExclude PoPSee Geo Restrictions →
Prepend 1x203314:220:1Prepend AS 1 timeSee Path Prepending →
Prepend 2x203314:220:2Prepend AS 2 timesSee Path Prepending →
Prepend 3x203314:220:3Prepend AS 3 timesSee Path Prepending →
Prepend 4x203314:220:4Prepend AS 4 timesSee Path Prepending →
Prepend 5x203314:220:5Prepend AS 5 timesSee Path Prepending →

Community Categories

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 AMS

Configuration Examples (JunOS / BIRD2)

These examples attach AS203314 large communities to prefixes announced to us.

Export Policy Safety Default (Strongly Recommended)

These are export policies. End BIRD2 filters with reject; and JunOS policies with term REJECT-ALL then reject so unmatched routes are not exported.

Documentation Prefixes

The examples use RFC 5737 and RFC 3849 documentation prefixes, including 203.0.113.0/24 and 2001:db8::/32. Substitute only prefixes you are authorized to announce.

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 reject

Deprioritize 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 reject

IPv6 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 reject
Common Community WorkflowOperators identify routing goals, then apply the minimal community set to shape propagation effectively.Check origin, locality, or policy needsRead RouteInternal tags for analysis, control for shapingPick FamilyAnnounce with only needed communitiesApply TagsCheck export scope and path changesVerify

On this page