Hats Network | LogoHats Network
BGP Communities

Internal BGP Communities

Internal BGP communities for AS203314 indicating route origin types, PoP locations, and geographic regions.

Internal communities indicate where routes are learned from and whether they are uniquely announced. These communities help you identify the source and path of routes received from AS203314.

Community Format: 203314:XXX:YY where XXX is the category and YY is the specific value.

Route Origin

These communities indicate how a route was learned by Hats Network:

CommunityDescriptionUnique
203314:110:10Route learned from UpstreamYes
203314:110:20Route learned from DownstreamYes
203314:110:30Route learned from PeeringYes
203314:110:110Route originated within Hats NetworkYes

Unique means this route is only announced via this method-if you see 203314:110:30, the route is exclusively available via peering.

PoP-Based Communities

These communities identify which PoP a route was learned at or passed through:

Routes learned at a specific PoP (entry point):

CommunityDescriptionUnique
203314:120:XXXRoute learned at PoP XXXYes

Example: 203314:120:101 means the route was learned at Hong Kong (HKG1).

Routes that passed through a PoP (transit):

CommunityDescriptionUnique
203314:125:XXXRoute passed through PoP XXXNo

Example: 203314:125:101 means the route passed through Hong Kong (HKG1).

Region-Based Communities

These communities identify which region a route was learned in or passed through:

Routes learned within a specific region:

CommunityDescriptionUnique
203314:130:XXRoute learned in Region XXYes

Example: 203314:130:100 means the route was learned in Asia (West).

Routes that passed through a region:

CommunityDescriptionUnique
203314:135:XXRoute passed through Region XXNo

Example: 203314:135:100 means the route passed through Asia (West).

Usage Examples

Identify Route Source

Determine if a route comes from peering, upstream, or our customers:

# These large communities are attached by AS203314 on routes you receive.
# You typically match them in your import policy:
filter import_prefer_peering_v4 {
  if (203314, 110, 30) ~ bgp_large_community then bgp_local_pref = 200; # prefer peering-learned routes
  if (203314, 110, 10) ~ bgp_large_community then bgp_local_pref = 80; # de-prioritize upstream-learned routes
  accept;
}

Identify Entry Location

Determine where a route entered our network:

filter import_prefer_asia_pops_v4 {
  if (203314, 120, 101) ~ bgp_large_community then bgp_local_pref = 200; # entered at HKG1 (Hong Kong)
  if (203314, 120, 131) ~ bgp_large_community then bgp_local_pref = 180; # entered at TYO2 (Tokyo)
  accept;
}

Filter by Region

Accept routes only from specific regions:

# Only accept routes learned in Asia West
filter import_only_asia_west_v4 {
  if (203314, 130, 100) ~ bgp_large_community then accept;
  reject;
}

# Reject routes that passed through Europe (both West=200 and East=250)
filter import_reject_europe_transit_v4 {
  if (203314, 135, 200) ~ bgp_large_community then reject;
  if (203314, 135, 250) ~ bgp_large_community then reject;
  accept;
}

Policy Examples (JunOS / BIRD2)

Internal communities are also BGP Large Communities. You can match them in your import policy to influence local preference, selection, or filtering.

Prefer routes learned in Asia West (203314:130:100)

set policy-options community HATS-REGION-ASIA-W members large:203314:130:100

set policy-options policy-statement IMPORT-FROM-HATS term ASIA-W from community HATS-REGION-ASIA-W
set policy-options policy-statement IMPORT-FROM-HATS term ASIA-W then local-preference 200
set policy-options policy-statement IMPORT-FROM-HATS term ASIA-W then accept

Reject routes learned from Upstream (203314:110:10)

set policy-options community HATS-ORIGIN-UPSTREAM members large:203314:110:10

set policy-options policy-statement IMPORT-FROM-HATS term NO-UPSTREAM from community HATS-ORIGIN-UPSTREAM
set policy-options policy-statement IMPORT-FROM-HATS term NO-UPSTREAM then reject

Prefer routes learned in Asia West (203314:130:100)

filter import_from_hats_v4 {
  if (203314, 130, 100) ~ bgp_large_community then {
    bgp_local_pref = 200;
    accept;
  }
  accept;
}

Reject routes learned from Upstream (203314:110:10)

filter import_from_hats_v4 {
  if (203314, 110, 10) ~ bgp_large_community then reject;
  accept;
}

Tip: Internal communities are automatically attached to routes we announce to you. Use them to make informed routing decisions based on route origin and location.

On this page