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¶
- sources/2026-01-08-cloudflare-a-closer-look-at-a-bgp-anomaly-in-venezuela — the post teaches BGP semantics as the setup for its route- leak forensic argument. Intended scope, customer-provider vs peer-peer, valley-free rule, Type 1 hairpin, AS-path prepending, BGP community tags, IRR-derived prefix lists, origin vs path validation are all introduced or exercised.
- sources/2025-07-16-cloudflare-1111-incident-on-july-14-2025 — BGP as the global-withdrawal primitive; a misconfigured service topology → a single global withdrawal → a 62-minute anycast outage.
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)
Related¶
- concepts/autonomous-system
- concepts/bgp
- concepts/valley-free-routing
- customer-provider-relationship
- peer-peer-relationship
- concepts/anycast
- rpki
- route-origin-validation
- concepts/bgp
- first-as-enforcement
- concepts/bgp
- forged-as-path
- concepts/bgp
- concepts/bgp
- concepts/bgp
- concepts/bgp
- only-to-customer
- route-server
- systems/aspa
Merged aliases¶
bgp-communitybgp-export-policybgp-monitoring-protocolbgp-origin-attributebgp-path-selectionbgp-rolebgp-route-hijack-as-rankpath-huntingrouter-peer-bgp-route-withdrawalipv6-withdrawal-as-shutdown-signalroute-leaktreat-as-withdraw