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

Hats Network (AS203314) uses a comprehensive BGP community structure to help network operators manage their routing policies effectively.

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)

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

Keep 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
}
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