BGP Roles and OTC: Preventing Route Leaks
Resumo
Pixel shares how RFC 9234 makes BGP relationship policy visible through session roles and the Only to Customer (OTC) attribute. Learn how these mechanisms help detect route leaks across providers, peers, and customers—and why they complement, rather than replace, prefix filters and RPKI origin validation.
DEV Community
BGP roles make route-leak policy visible in the protocol
BGP roles make route-leak policy visible in the protocol Route leaks and route hijacks are different failures. A hijack advertises a prefix that the origin is not authorized to announce. A leak sends a route to a relationship where it should never travel, such as exporting a route learned from one peer to another peer or upstream. RFC 9234 adds BGP roles and the Only to Customer attribute so routers can enforce relationship intent in the protocol rather than relying only on local filters. The design starts with the relationship each eBGP session represents: provider, customer, peer, route server, route-server client, or a complex relationship that cannot use roles. The routers exchange a BGP Role capability during session establishment and confirm the pair is consistent. For example, a customer expects its provider to advertise a provider role, and the provider expects the customer role in return. The OTC attribute is the enforcement mechanism. It is an optional transitive path attribute with a value that carries an autonomous system number. Once a route is sent to a customer, peer, or route-server client, the procedures keep it from later moving to a provider, peer, or route server. RFC 9234 defines exact ingress and egress conditions, including insertion when the attribute is absent and treating a route from a customer or route-server client that still carries OTC as a leak. Distinguish roles from route policy The role describes the commercial relationship. It does not describe every prefix policy. An operator still needs prefix filters, maximum-prefix limits, RPKI origin validation, and a documented export policy. OTC adds relationship awareness and can detect a leak several autonomous systems away, but it does not prove that a prefix has a valid origin. This distinction matters during incident response. A route can pass RPKI origin validation and still be leaked into a transit path. A route can carry a valid OTC value and still contain a hijacked prefix. The investigation should record the role, OTC value, AS path, origin validation state, and the policy that accepted the route. Deploy in stages RFC 9234 allows the local AS to add OTC when received from a non-compliant neighbor, which helps early deployment. It also warns that malformed OTC attributes are handled as treat-as-withdraw. A partial rollout should initially log the role confirmation and the expected OTC behavior, then enforce it on a subset of sessions with known peer cooperation. Complex peering relationships should not be assigned a role. If a single BGP session mixes provider, peer, and customer behavior, split it into sessions that each have one relationship before using OTC. The router should reject an unsupported or inconsistent role pair and should export a route only to sessions whose relationship allows it. Operate the new signal Inventory every external session with local role, remote role, negotiated capability, export policy, and enforcement status. Alert on role mismatch, a role disappearing after a session reset, an unexpected OTC value from a customer, and a sudden change in the fraction of routes with OTC. During a route-leak investigation, correlate OTC state with BGP Monitoring Protocol data and configuration history. If a session was reset and came back without role enforcement, the path may look normal while the safety control is absent. RFC 9234 is most useful when operators can show both that the relationship was negotiated and that the resulting attribute was preserved. References RFC 9234: Route Leak Prevention and Detection Using Roles Current Options for Securing Global Routing RFC 4271: A Border Gateway Protocol 4

Powered by Readybot.io