-
Notifications
You must be signed in to change notification settings - Fork 5
Real time Monitoring
BGP Explorer can monitor for BGP anomalies in real-time using bgp-radar.
Real-time monitoring requires bgp-radar to be installed:
# If you used install-deps, it's already installed
uv run bgp-explorer install-deps
# Or install manually (requires Go)
go install github.com/hervehildenbrand/bgp-radar/cmd/bgp-radar@latest> /monitor start
BGP Monitoring Started
Now watching for anomalies from collectors: rrc00
Events (hijacks, route leaks, blackholes) will be displayed in real-time.
> Start monitoring for BGP anomalies
> Watch for hijacks in real-time
> /monitor start rrc00,rrc01,rrc10
Or via CLI:
uv run bgp-explorer --collectors rrc00,rrc01,rrc10 chat> /monitor status
Monitoring: Active
Collectors: rrc00, rrc01
Events detected: 7
> /monitor stop
BGP Monitoring Stopped
bgp-radar detects three types of anomalies:
An unauthorized AS is announcing a prefix it doesn't own.
Indicators:
- RPKI status is INVALID
- Origin ASN differs from expected
- Multiple Origin AS (MOAS) detected
Example output:
🔴 HIJACK - 203.0.113.0/24
Affected ASN: AS64496
Detected: 2024-01-15T10:30:00Z
expected_origin: 64496
observed_origin: 65001
collector: rrc00
A prefix is being announced to places it shouldn't be (e.g., customer routes leaked to peers).
Indicators:
- Unusual AS path
- Prefix seen from unexpected vantage points
- Path length anomalies
Example output:
🟡 LEAK - 198.51.100.0/24
Affected ASN: AS64497
Detected: 2024-01-15T10:31:00Z
leaker_asn: 65002
path_anomaly: true
collector: rrc01
A prefix has been withdrawn or announced to a blackhole.
Indicators:
- Sudden visibility drop
- Withdrawal messages
- Blackhole community attached
Example output:
🟢 BLACKHOLE - 192.0.2.0/24
Affected ASN: AS64498
Detected: 2024-01-15T10:32:00Z
visibility_drop: 85%
collector: rrc00
| Level | Indicator | Description |
|---|---|---|
| High | 🔴 | Immediate attention needed (confirmed hijack, RPKI invalid) |
| Medium | 🟡 | Potential issue requiring investigation |
| Low | 🟢 | Minor anomaly or informational |
> Show me only hijacks detected
> Are there any route leaks right now?
Claude will call get_anomalies(event_type="hijack") or similar.
> Are there any anomalies affecting 8.8.8.0/24?
> Show anomalies affecting AS15169
Even without bgp-radar running, you can check for hijack indicators:
> Check if 203.0.113.0/24 is being hijacked
This uses check_prefix_anomalies() which checks:
- MOAS (Multiple Origin AS)
- RPKI validation
- Recent origin changes
- Visibility analysis
The anomaly check provides a risk level:
| Risk | Meaning |
|---|---|
| 🟢 LOW | No significant indicators found |
| 🟡 MEDIUM | One indicator present, investigate |
| 🔴 HIGH | Multiple indicators or RPKI invalid |
Common risk factors reported:
- "MOAS: Multiple origins (N ASes)"
- "RPKI Invalid: ASN not authorized"
- "New origin(s) in last 7 days: ASXXXX"
- "Low visibility: Only N collectors"
RIPE RIS collectors provide different vantage points:
| Collector | Location | Good for |
|---|---|---|
| rrc00 | Amsterdam | European events |
| rrc01 | London | UK/European events |
| rrc10 | Milan | Southern Europe |
| rrc14 | Palo Alto | US West Coast |
| rrc15 | Sao Paulo | South America |
| rrc19 | Johannesburg | Africa |
| rrc20 | Zurich | Central Europe |
| rrc21 | Tokyo | Asia Pacific |
Using multiple collectors improves detection coverage.
- Start with one or two collectors - More collectors = more data to process
- Filter by your prefixes - Focus on what matters to your network
-
Correlate with on-demand checks - Use
check_prefix_anomaliesto verify -
Have contacts ready - Use
get_network_contactsif you need to coordinate
- Not comprehensive - bgp-radar monitors RIS Live, not all BGP data
- Detection delay - Events are detected as they're announced, not predicted
- False positives - Legitimate MOAS, route changes can trigger alerts
- Requires verification - Always verify with multiple tools
- Data Sources - Learn about bgp-radar and RIPE RIS
- Examples - See monitoring examples
- Troubleshooting - Common monitoring issues