โ† Tutorials
๐ŸŒ Networking

BGP route leaks: investigate partial outages and check routing policy

Trace an accidental transit path, interpret RPKI states, and collect routing evidence your provider can use.

By The Downtime ยท ยทUpdated 6 days ago
BGP route leaks: investigate partial outages and check routing policy

A BGP route leak can make a healthy website unreachable from some networks while it keeps working from others. The leak sends a learned route beyond its intended scope. Traffic can then cross a network that never agreed to carry it. An HTTP timeout alone cannot identify that cause; you need routing observations tied to the affected address and time.

BGP exchanges routes between independently operated networks called autonomous systems, or ASes. Each applies its own policy. Use this guide to read a suspected leak, separate what each diagnostic tool proves, and send your provider evidence it can investigate.

Read the announcement path in the diagram

The arrows show route announcements, not user traffic. In this hypothetical example, Provider A advertises a destination route to its customer. That customer also buys connectivity from Provider B.

The mistake is exporting A's route to B. If B accepts it, B can send traffic for the destination through the customer toward A. The customer has become unintended transit. It may lack the capacity or forwarding policy to deliver that traffic. Some packets may still arrive; a leak does not require a total outage.

This provider-to-customer-to-provider pattern is one of the leak types in RFC 7908. Leaks can also cross peer relationships. The defining error is a violation of the intended export policy. A changed origin AS can raise a different concern, such as an unauthorized origin announcement, but a leak can preserve the legitimate origin. Confirm the relationship with the operators before calling an unfamiliar path a leak.

These arrows show BGP announcements. A customer learns a route from Provider A, then improperly exports it to Provider B. If B selects it, traffic can pass through a customer that was never meant to provide transit. View full size โ†—

Why a longer path can win

BGP does not simply choose the fewest AS hops. Local policy determines preference; AS-path length participates in later tie breaking. A network can prefer a customer route over a peer route even when the customer's advertised path is longer. RFC 4271 describes the decision process, and RFC 7908 explains how customer preference can help a leak spread.

Prefix length is a separate issue. Packet forwarding uses the most specific matching installed route. Comparing two paths for the same prefix is different from choosing between an aggregate and a more specific destination prefix. Record the prefix length with the AS path so those cases remain distinguishable.

Different networks may select different routes. Investigate from a working network and an affected network, and keep IPv4 and IPv6 results separate. A city label on a probe does not tell you which AS supplied its connectivity.

What RPKI validation tells you

A Route Origin Authorization, or ROA, authorizes an AS to originate a prefix within a permitted prefix length. Route origin validation compares an announcement against validated RPKI data. The states below follow RFC 6811.

State Meaning Limit
Valid A record permits this prefix, length and origin. Does not check who may carry the route.
Invalid A record covers it; none permits this origin and length. Check origin and length. Intent is still unknown.
Not found No record covers the route. No origin check result that permits the route.

The RFC names the third state NotFound. Record the validator's observation time with the state. A provider-to-customer-to-provider leak can remain Valid because it preserves the authorized origin. Keep origin validation in place, but investigate export policy as well. The state and the router's decision to accept a route are separate: check the configured validation policy.

Build a useful incident record

Start with the application failure. Save the hostname, resolved destination address, address family and UTC timestamps. Note whether the failure occurred during DNS resolution, connection setup, TLS negotiation or the HTTP request. If two probes resolved different destinations, investigate that difference before comparing their paths.

Use this worksheet for each observation. It is a collection plan, not a report of a measured outage.

Record Capture Why it helps
Source Probe ID, source AS and location Separates geography from network coverage.
Target Hostname, IP and IP family Keeps tests aimed at the same endpoint.
Time UTC start, last success and recovery Aligns symptoms with route updates.
BGP view Prefix, AS path, collector and peer Identifies who observed the route.
Result HTTP stage, error and trace output Separates routing clues from application evidence.

For a CDN, the public address may belong to the edge network. Evidence about that prefix describes the path to the edge. Add origin-side logs before concluding that the edge-to-origin connection failed. Keep the intended hostname in application tests so the TLS and HTTP request still address the right service.

Compare route history from named observers

RIPEstat BGP State returns routes observed by RIS collectors at a requested time. Query the affected prefix before the incident and during it. Compare each collector peer separately, retaining the target prefix, AS path and source identifier. Its documented path format runs from the collector's direct neighbor to the origin AS.

A newly observed path is a clue. A collector reports what its peers advertised; it does not prove that every affected user selected that route. Ask the affected provider for its selected route and relevant import policy at the incident time. If a collector shows no change, keep investigating the user's network rather than treating that single view as a global all-clear.

Read traceroute without blaming the last reply

Traceroute records responses to probes with increasing hop limits. An asterisk means the probe did not receive the expected response in time. Filtering and ICMP rate limits can hide replies while forwarding continues. Juniper documents both missing traceroute responses and ICMP error rate limits.

Save the probe protocol and destination with the trace. Compare it with end-to-end application results; a silent intermediate hop does not establish the failure location. RIPE Atlas can supply distributed traceroute and DNS measurements. Choose probes in the affected AS where available, and save the measurement IDs so the provider can inspect the same evidence.

Controls for the network operator

Explicit import and export policies define what each customer, provider and peer may announce. RFC 8212 specifies that routes must not be used from an eBGP session without an explicit import policy, or advertised without an explicit export policy. Verify the behavior of your router release and configuration before relying on that default.

Maintain customer prefix and AS-path filters as assignments and relationships change. Prefix-count limits can contain unusually large announcements, but a small leak can stay below the threshold. Decide in advance what exceeding the limit does and how the session recovers. RFC 7454 covers prefix filtering, AS-path filtering and maximum-prefix controls. Review generated filter changes before deployment; stale filters can reject legitimate routes.

BGP Roles and the Only-to-Customer attribute add relationship checks and route marking. A route carrying OTC must not be exported to providers or peers. Receiving an OTC-marked route from a customer makes it ineligible under the RFC's rules. Roles describe the local side of a session, so provider/customer settings must be complementary.

Coordinate adoption with the neighbor. Strict role negotiation rejects a session if the neighbor does not advertise a role, and mismatched roles also reject it. Test intended routes, forbidden exports and session recovery in an isolated lab using the deployed software version. Preserve a management path and a rollback procedure before production changes.

Escalate, then check the same users again

Send the provider the affected prefix, UTC interval, working and failing source ASes, route observations and application results. Label a suspected policy violation as a hypothesis until the operators confirm it. Request the change they made and its time so you can compare recovery evidence.

After the correction, repeat tests from the affected networks across both address families. Check the application's expected response and any user operation that failed. A corrected collector view alone is insufficient to close an application incident. Retain the before-and-after observations with the provider's explanation; they give the next investigation a concrete baseline.

๐Ÿ’ฌ Comments (0)

No comments yet โ€” be the first to weigh in.

Join the conversation.