How quickly would your operations team spot a routing anomaly if it happened right now? Researchers at Universidad Autónoma de Madrid built a Border Gateway Protocol (BGP) anomaly detector powered by public data from the RIPE NCC's Routing Information Service (RIS) and put it to the test on a network they had never monitored before. Over three days, the system generated four alerts within an hour on the second morning. When the operations team checked their own logs, they found an upstream routing change had triggered a burst of withdrawals, followed by successful reconvergence with no service impact.

The same detector also captured the routing breakdown during the Iberian blackout on 28 April 2025, when Spain and Portugal lost power. While routers initially stayed quiet on backup power, BGP began to destabilize around 16:00 UTC. The detector raised its first alert ten minutes later, flagging 75% of the disrupted windows over the next seven hours without any prior knowledge of the event.

Why Detection Matters When Prevention Is Improving

Routing security has strengthened considerably. According to IPinfo, 70.3% of routed prefixes were valid under the Resource Public Key Infrastructure (RPKI) by the end of September 2026, up from 54% a year earlier (68% of IPv4 and 79% of IPv6 prefixes). Autonomous System Provider Authorisation (ASPA) is beginning to add path validation, though Hurricane Electric's data showed only around 4% of routed ASNs had published ASPA records by November 2026.

Detection serves a different purpose. It cannot prevent an incident but can alert operators early that routing behavior has become abnormal, whether the cause is an attack, misconfiguration or outage. Most existing monitoring relies on rules. Tools such as BGPalerter and ARTEMIS watch specific prefixes and alert on origin or path violations, which works well when operators know exactly what to monitor.

Unusual routing takes many forms, however, and normal behavior varies from network to network. This detector learns what normal looks like around a specific network without requiring a prefix list, then flags deviations. It is designed to complement rule-based monitoring, not replace it.

How the Detector Works

The detector examines two perspectives when troubleshooting routing problems: what is changing and the topology map. A burst of withdrawals means something different on a small network with two upstreams than on a transit network with hundreds of peers.

The system receives statistics from BGP UPDATE messages collected by RIS, such as changes in Autonomous System (AS) path length, duplicate announcement counts, prefix announcements and withdrawal bursts. It also builds an AS-level topology map from RIS snapshots of the Routing Information Base (RIB), AS-relationship data from CAIDA and Internet Exchange Point (IXP) membership information from PeeringDB. All inputs are public; no traffic flows, interface counters, router logs or traceroutes are used.

Every five minutes the detector produces a score. When the score crosses a threshold, it raises an alert along with the signals that triggered it. Processing one five-minute window takes approximately 11 seconds on a single server (24-core AMD EPYC) using one NVIDIA A100 GPU, fast enough to follow the RIS stream in near real time.

A key design choice: there is no single model for all networks. Around a sparse network with few upstreams, the topology barely changes, so a simple model working on update statistics suffices. Around a densely meshed network, the topology itself shifts when something goes wrong, requiring a model that reads AS connections. The system therefore considers two model families: flat classifiers operating on statistics (multi-layer perceptron, Random Forest, XGBoost and LSTM), and graph neural networks that also read AS connections. For each network, candidates are trained on one month of its own routing data, and the best performer is selected.

Blind Test Results with a National Research Network

The test network was a national research and education network in Europe that had no involvement in building the detector. One month of routing data was collected from a RIS collector at an IXP where the network peers, providing the closest public view available. The topology around the network showed a clear star shape: most connections pass through the network itself, with neighbors only weakly connected to one another. A Random Forest classifier, one of the flat models, performed best for this sparse topology.

The trained model ran unchanged on three consecutive days from the following month, processing 864 five-minute windows it had never seen. It raised six alerts. Four fell within 65 minutes on the morning of the second day. The other two were single windows on the first and third days at similar times, attributed to regular collector activity and not passed to operators.

For the 65-minute episode, operators received only timestamps with no scores or explanation and were asked whether anything had occurred. They confirmed it. Their monitoring showed an increase in withdrawals caused by an upstream routing change, after which routing reconverged with no traffic or service effects.

After confirmation, the detector's explanation was shared. About 60% of all updates in the flagged windows involved the network's neighborhood, compared with about 26% in normal conditions. Two windows contained between 229 and 245 route flaps against a normal average of about 40. The detector had described a routing event, not an outage, matching what operators observed.

The test has a stated limit: operators were asked only about the flagged episode, so the alert's accuracy is confirmed, but whether the model missed anything during those three days remains unknown.

The Iberian Blackout Through BGP

On 28 April 2025, Spain and Portugal lost power at 10:33 UTC. The detector examined that day from Telefónica's network perspective (AS3352) using data from RIS collector rrc04. AS3352 is densely connected, requiring the topology-aware model. It had been trained on one month of routing data from November 2025, a month with no major incidents. The blackout was not part of its training data, and it was not retrained or tuned for it.

A detector of this kind cannot see a power cut. It sees BGP, and for several hours after the grid failed, BGP remained quiet because routers ran on backup power with UPS. Routing began to break down around 16:00 UTC, and the first alert followed ten minutes later, at 16:10 UTC. Kentik observed routing changes among Starlink's Spanish network upstreams at 16:11 UTC, and a study of the four largest Iberian IXPs found that a partial failure of backup generators in a major data centre, hours into the blackout, disturbed global routing more than the blackout itself.

What triggered the alert was the peering structure around AS3352 coming apart, a signal from the topology map rather than from update counts. Over the seven hours of disruption (16:00 to 23:00 UTC), the model flagged 63 of 84 five-minute windows, or 75%. In the 395 windows outside that period it raised five alarms (1.3%): shortly before the breakdown around 14:50 UTC, just after 23:00 UTC as routing recovered, and on the evening of 29 April. Every alarm outside the event window is counted as a false alarm, including those close to the event when routing was not yet fully stable. The 1.3% figure is therefore a conservative upper bound.

Where the Approach Breaks Down

Both test cases involved a model trained on one network and used on that same network. Difficulty emerges when a model moves to a different network.

Testing compared two networks of contrasting shape: AS3352 (Telefónica, Spain) with its dense peering mesh, and AS12880 (TCI, Iran) with a sparse, gateway-like topology. Each was observed from two RIS collectors, rrc04 and rrc05. Results used a macro-F1 score from 0 to 1, where higher values mean more real anomalies caught with fewer false alerts.

When a model trained on data from one collector was tested on the other for the same network, the score remained around 0.87. The vantage point made little difference. When a model trained on one network was tested on the other, the score fell to between 0.40 and 0.70. A model that learned a sparse network does not understand a dense peering mesh, and the reverse is equally true. Network shape, not collector distance, separates the two cases.

The practical lesson is that a detector tuned on one network should not be relied on for another until tested there. This means one model per network, fitted to its structure. Currently that fitting is done by hand. The next phase aims to automate it with a tool that generates traffic matching a network's topology and selects a suitable detector without manual tuning.

What Comes Next: Seeking Operator Input

RIS data has taken the work this far, but remaining gaps require help from operators. The researchers see three ways the community could contribute.

The first is evaluation on more networks. Operator validation so far covers a single network over three days, and the rule for choosing a model by network shape rests on three networks. They want to repeat the blind test on other ASNs. It uses public RIS data only: alert timestamps are sent, and teams check them against their own monitoring. No network access is needed, and any ASN can participate using the RIS collector with the best view of it. The check itself is small. For the first network it meant examining one episode from three days of data. In return, teams receive a report of alerts for their network with the signals behind each one, and feedback helps improve the pipeline. Results are shared only with participants, and no network is named without consent.

The second is better ground truth. Training labels are produced automatically, not from confirmed incidents. The blind test confirmed an alert but could not show what was missed, and during the blackout a quarter of disrupted windows went unflagged. Timelines of incidents confirmed on a network, with prefix, ASN and time window, would provide a much firmer basis.

The third is guidance on what matters in practice. They want to know which types of anomaly are most important to operations, and how many alerts per day a network operations centre (NOC) would consider acceptable. The answers will shape the next phase.

Two further limits are inherent to the approach. Each test relies on a single RIS collector, so the model cannot see what that collector does not see. The model also observes BGP only; in the blackout case it detected the routing breakdown and not the power failure.

Those interested in participating can write to shadi.motaali@uam.es.

Technical Details for Deeper Understanding

In this work, an anomaly is a five-minute window in which routing around the network departs clearly from its usual pattern. Confirmed incident labels do not exist at this resolution, so training labels are generated automatically. Five unsupervised detectors (Isolation Forest, Local Outlier Factor, robust statistical thresholds, Elliptic Envelope and HDBSCAN) examine the same data independently, and windows flagged by several are labelled anomalous. In a month without major incidents, this marks roughly 4% to 8% of windows.

The detector is the final part of a four-phase PhD project. In the first phase, 48 candidate UPDATE features were reduced to 25 on which six selection methods agreed, improving accuracy and making each decision more than a third faster (ICCIDA 2025). In the second, a BGP traffic generator was built directly from RFC 4271 using Scapy to obtain correctly labelled anomalies, and in the process a KEEPALIVE encoding bug in Scapy was found and fixed (NOMS 2026). In the third, 13 methods for generating synthetic BGP traffic were benchmarked, finding that a detector with a near-perfect score on its home collector missed 35 to 41% of anomalies on a different collector (EuCNC/6G Summit 2026). That result led to the topology-aware approach. The detector described here is published in full in Information Sciences, and its code is available on GitHub.