Skip to content

CONCEPT Cited by 5 sources

Border Gateway Protocol (BGP)

BGP is the path-vector routing protocol that glues the Internet together. Each Autonomous System (AS) speaks BGP with its neighbors to exchange reachability information — "I can reach the following prefixes via the following AS path." The global Internet routing table is the emergent, per-router outcome of all these pairwise sessions and their locally-applied policies.

Core semantics

  • Path-vector: advertisements carry the full sequence of ASes the route traverses (the AS path). Loops are prevented by rejecting any route whose AS path already contains the receiving AS.
  • Policy, not shortest-path. BGP routers pick a best path per prefix via a deterministic tiebreaker ladder (local preference → AS-path length → MED → origin → eBGP vs iBGP → router ID). Local preference usually wins, which means business policy (prefer customer over peer over provider) routinely overrides shorter path.
  • Trust-based. BGP has historically no cryptographic enforcement of who may originate a prefix or who may appear on a path. RPKI / ROV added origin validation in the 2010s; ASPA + OTC are adding path validation in the late 2020s.

Relationships shape advertisements

Pairwise relationships drive export policy:

  • customer→ provider: the customer pays the provider for Internet transit. The customer advertises only its own routes + its own customers' routes upstream. The provider advertises the full Internet downstream.
  • peer↔peer (settlement- free): each peer advertises only its own routes + its own customers' routes to the other.

The emergent well-formedness property is valley-free routing — a path should never go customer → provider → customer.

Why it breaks

  • Route leaks — an AS advertises routes beyond their intended scope, e.g. takes routes from one provider and redistributes them to another (Type 1 hairpin).
  • Route hijacks — an AS originates a prefix it doesn't own. Fixed structurally by ROV.
  • Route withdrawals — unadvertising a prefix makes it globally unreachable at Internet speed; load-bearing failure primitive for anycast services.

Seen in

First AS enforcement

First AS enforcement (RFC 4271 §6.3) verifies that the leftmost AS in a received AS_PATH matches the configured peer ASN. This simple check prevents forged-origin and path-shortening hijacks that bypass both ROV and ASPA. Cloudflare's 2026 measurement found half of Tier 1 networks fail to enforce it, primarily due to vendor defaults. (Source: sources/2026-06-03-cloudflare-enforcing-the-first-as-in-bgp-as-paths)

ORIGIN attribute manipulation

The ORIGIN attribute (IGP/EGP/INCOMPLETE) is evaluated at step 3 of the path selection ladder — before MED and the eBGP/iBGP preference. RFC 4271 §5.1.1 states it SHOULD NOT be modified by intermediate speakers, but Cloudflare's 2026 controlled experiment found ~70% of observed AS_PATHs have ORIGIN rewritten to IGP by transit providers seeking a traffic-engineering advantage. 26% of the top-50 ASes (by CAIDA AS Rank) participate. The manipulation is a revenue-driven arms race — once one Tier-1 rewrites, competitors follow. The community has proposed deprecating ORIGIN's role in path selection via draft-marenamat-idr-scrub-bgp-origin. (Source: sources/2026-07-24-cloudflare-bgp-origin-attribute-manipulation)

RFC 9234 Roles + OTC adoption

BGP Roles (RFC 9234) move route-leak prevention into the protocol: a negotiated Role capability makes neighbors agree on their relationship at session setup, and the OTC path attribute (type code 35, optional transitive) marks a route so it can only propagate downward — a router rejects a leaked route with no operator-written policy. Roles also select which ASPA validation variant runs, so the two are configured together. Cloudflare's 2026 adoption study measured 67 OTC-setter ASes via BMP (route servers adopt fastest), and — mirroring its ORIGIN finding — discovered two Tier-1s (GTT/AS3257, Arelion/AS1299) stripping OTC, present in >92% of OTC-absent paths, defeating leak prevention several hops away. Arelion began preserving OTC after outreach; GTT still strips. (Source: sources/2026-08-18-cloudflare-bgp-role-model-tracking-the-adoption-of-rfc-9234)

Merged aliases

  • bgp-community
  • bgp-export-policy
  • bgp-monitoring-protocol
  • bgp-origin-attribute
  • bgp-path-selection
  • bgp-role
  • bgp-route-hijack- as-rank
  • path-hunting
  • router-peer- bgp-route-withdrawal
  • ipv6-withdrawal-as-shutdown-signal
  • route-leak
  • treat-as-withdraw
Last updated · 766 distilled / 2,225 read