OSNTC.052 explains a routing failure that can divert Internet traffic without any cable breaking: a network announces a route learned from one transit provider or peer to another provider or peer. A BGP route leak violates the intended distribution policy between autonomous systems (ASes). The lesson follows OSNTC.051 on RPKI origin validation, which authenticates an announcement’s permitted origin but does not establish whether every intermediate AS should propagate it.
Learning objectives
- Define an autonomous system, BGP route leak, bilateral peering role, and valley-free route propagation.
- Distinguish the five roles defined by RFC 9234 and identify compatible neighbor-role pairs.
- Explain the BGP OPEN role capability and the Only to Customer (OTC) path attribute.
- Classify permitted and prohibited route advertisements from sample routing evidence.
- Design a read-only validation checklist and identify production change-control requirements.
Prerequisites and boundaries
Learners should understand IP prefixes, autonomous system numbers, eBGP neighbors, and route advertisements. Review BGP fundamentals and RPKI route-origin validation before starting. The exercises below use only fictional documentation addresses and a hypothetical routing table. No live network access, configuration changes, or packet transmission is necessary.
Elementary overview: routes follow relationships
The Internet consists of independently administered networks called autonomous systems. External Border Gateway Protocol (eBGP) exchanges reachability information between those systems. Operators generally label an eBGP neighbor as a customer, transit provider, or lateral peer. Internet exchange points may also use route servers and route-server clients. Those labels describe propagation policy, not necessarily who pays whom.
Under the conventional valley-free policy model, a network may advertise its own prefixes or customer-learned routes to its providers, peers, and customers, subject to filtering. A route learned from a provider or lateral peer should be exported only to customers. Announcing peer-learned traffic to a second peer, for example, can turn an unsuspecting network into an unintended transit path. RFC 7908 formalizes route-leak categories; RFC 9234 specifies a cooperative means of reducing several important classes of mistakes.
| Route source | Toward provider/peer | Toward customer |
|---|---|---|
| Locally originated | Usually allowed | Usually allowed |
| Learned from customer | Usually allowed | Usually allowed |
| Learned from provider | Prohibited under normal policy | Usually allowed |
| Learned from lateral peer | Prohibited under normal policy | Usually allowed |
Table note: simplified normal eBGP propagation policy, not an export instruction. Route-server handling, contract-specific filtering, and exceptional complex relationships require separate analysis. See RFC 9234, Section 3.1.
Architecture: mutually confirmed BGP Roles
RFC 9234 defines five local roles: Provider, Customer, Peer, Route Server (RS), and Route Server Client (RS-Client). The two ends of an eBGP session should agree on a complementary pair: Provider ↔ Customer, Peer ↔ Peer, or RS ↔ RS-Client. A role is encoded in BGP Capability 9 during the OPEN exchange. When both speakers advertise incompatible roles, the RFC requires rejecting the connection with a Role Mismatch notification (OPEN error code 2, subcode 11).
An older neighbor may omit the capability. Non-strict behavior permits session establishment for backward compatibility while the locally configured role can still influence OTC processing. Strict role negotiation requires a matching capability from both neighbors; enabling strictness without assessing peer support can keep a formerly healthy session down. RFC 9234 also excludes assigning a single role to a complex relationship with different policies for different prefix sets.
Mechanism: Only to Customer (OTC)
The OTC attribute is an optional, transitive BGP UPDATE path attribute, type code 35, carrying a four-octet ASN. Its purpose is to restrict a route that has been sent toward a customer, peer, or route-server client so that subsequent propagation is permitted only toward customers. The ASN in OTC identifies the AS specified by RFC 9234’s ingress or egress procedures; it is not proof that the complete AS path is trustworthy.
Ingress: receiving a route
- An OTC-marked route received from a customer or RS-Client is a leak and must be considered ineligible.
- An OTC-marked route received from a peer is ineligible when its OTC ASN does not equal the remote peer’s ASN.
- When a route received from a provider, peer, or RS lacks OTC, a compliant receiver adds OTC containing the remote AS number.
Egress: advertising a route
- An OTC-marked route must not be propagated to a provider, lateral peer, or route server.
- When an eligible route without OTC is sent to a customer, peer, or an RS-Client by its RS, the advertising AS adds OTC containing its own ASN.
- OTC must remain unchanged once assigned. RFC 9234 applies these procedures by default only to IPv4/IPv6 unicast address families.
An implementation that detects a leak makes the affected route ineligible for normal BGP selection; it does not require stopping every BGP session. An incorrectly configured role or malformed attribute can suppress legitimate reachability. Read the exact ingress/egress conditions in RFC 9234, Section 5 rather than relying on abbreviated diagrams or vendor marketing.
Worked example: a route that must not climb upstream
Illustrative scenario only: AS64496 originates documentation prefix 192.0.2.0/24 and advertises it to its provider AS64497. AS64497 advertises the customer-learned route to a lateral peer, AS64498. On receipt, AS64498 associates the route with OTC=64497 if the attribute is absent. AS64498 may pass the route to its own customers; it must not advertise it to a separate upstream provider AS64499. If a misconfigured AS nevertheless forwards the OTC-marked route to a provider, the receiving provider classifies the advertisement as ineligible because OTC arrived from a customer.
Numbers AS64496–AS64511 are within the documentation ASN range specified by RFC 5398; 192.0.2.0/24 belongs to the TEST-NET-1 documentation block under RFC 5737. No public incident, measured latency, or operational route table is implied.
Practical workflow: read-only route-leak audit
An authorized observer can assess a proposed routing policy without altering a router. Record evidence from the network owner’s topology inventory, approved BGP session records, peer contracts, and existing route-policy exports. If device show commands or a route collector are used, follow the organization’s permission and data-handling rules; command syntax and OTC visibility vary by product and software release.
- Step 1, inventory: list local and remote ASNs, neighbor purpose, address family, and whether each session is Provider/Customer, Peer/Peer, or RS/RS-Client.
- Step 2, capability check: inspect recorded OPEN capabilities or approved device output for BGP Role 9; mark both-supported, one-sided, and unsupported sessions separately.
- Step 3, policy comparison: compare candidate prefix exports against the route-source rules above. Flag provider- or peer-learned paths offered to another provider or peer.
- Step 4, OTC evidence: where software exposes OTC, record its ASN and the neighbor role. Use the ingress and egress decision rules instead of assuming any OTC-marked route is globally invalid.
- Step 5, correlation: compare suspected leaks with change records, route-monitor alerts, AS-path observations, and packet-drop telemetry. Separate correlation from proof of a specific incident.
- Step 6, escalation: document suspected misclassification, expected neighbor relationships, vendor capability support, affected prefixes, evidence timestamps, and the designated routing owner.
Operational safety, security, and limitations
All exercises here are read-only or paper-based. Live changes to BGP roles, import/export filters, neighbor settings, or strict mode require explicit authorization, peer coordination, maintenance planning, a baseline, a rollback path, and post-change reachability checks. An incorrectly paired role can reject a session; an incorrect OTC policy can remove legitimate routes from selection. Never use a production BGP session for failure injection without owner approval.
BGP Roles and OTC address route propagation; they do not cryptographically validate origin authority or every AS-path element. Use them alongside RPKI origin validation, route filtering, monitoring, and appropriate routing security controls. A malicious transit system can modify or strip attributes; asymmetric support and complex peering may also limit coverage. BFD failure detection and data-center fabric design solve different problems and do not replace leak prevention.
Glossary
- AS / ASN: an autonomous system and its identifying number in interdomain routing.
- eBGP: BGP routing exchange between different autonomous systems.
- Route leak: propagation of a learned route against the intended neighbor relationship policy.
- BGP Role: negotiated local label identifying the propagation relationship to an eBGP neighbor.
- OTC: Only to Customer, a transitive route attribute restricting further propagation.
- Ineligible route: a route excluded from Loc-RIB selection under applicable BGP rules.
- RS / RS-Client: an Internet exchange route server and a network using its route distribution service.
Exercises: independent practice
Exercise A, role pairing: A router identifies itself as Provider. What role should the other end advertise? What happens if both sides send Provider?
Exercise B, export: A route came from a lateral peer and carries OTC=64497. A network considers advertising it to a customer and to an upstream provider. Classify both proposals.
Exercise C, ingress: A provider receives an OTC-marked route from one of its customers. Classify eligibility. Separately, a network receives an OTC-marked route from a peer with remote ASN 64498 but OTC=64497. Classify eligibility.
Exercise D, evidence: Build a five-column worksheet headed Neighbor ASN, Role, Prefix Source, OTC ASN, and Allowed Export. Use fictional ASNs only. Flag one suspicious export and identify the missing evidence needed before escalating.
Knowledge check and answer key
1. What does RPKI origin validation establish that OTC does not? RPKI can establish whether an origin ASN is authorized for a prefix; OTC addresses propagation through relationship-defined paths, not origin authorization.
2. Which BGP Role pairs are valid? Provider/Customer, RS/RS-Client, and Peer/Peer (with direction reversed as appropriate).
3. What happens when two participating peers advertise incompatible roles? The connection is rejected with a Role Mismatch notification as defined by RFC 9234.
4. May an OTC-marked route be sent to an upstream provider? No, RFC 9234 prohibits propagating OTC-marked routes to providers, peers, and route servers.
5. Answer key for exercises: A: Customer; incompatible Provider/Provider fails role negotiation when both advertise the capability. B: Customer export can be allowed; upstream export must be blocked. C: Both received routes are ineligible: first because OTC arrived from a customer, second because the peer’s OTC ASN differs from the peer ASN. D: a complete worksheet identifies the peer relationship and source of each route, plus capability support, actual advertisement evidence, and an escalation owner. Answers are model classifications, not observed network results.
Primary references and further reading
- IETF RFC 9234, Route Leak Prevention and Detection Using Roles in UPDATE and OPEN Messages (2022), Sections 3–8.
- IETF RFC 7908, Problem Definition and Classification of BGP Route Leaks (2016).
- IETF RFC 5398, Autonomous System Number Documentation Use.
- IETF RFC 5737, IPv4 Address Blocks Reserved for Documentation.
- APNIC: BGP route-leak prevention and detection with RFC 9234, supplementary technical discussion and figures. External video playback and Gutenberg embeds were not independently tested; therefore no video embed is asserted as operational.
We volunteer daily to ensure the credibility of the information on this platform is Verifiably True. If you would like to support to help further secure the integrity of our research initiative, please scan the QR code below.


Leave a Reply