c3f7713965b6dcf38e6e64821f9fc0fa30567445
Phase 2 of the teaching demo: everything the status page will need is now reachable over HTTP. - New crate crates/web (axum). JSON endpoints for status, peers, local routes (announce / withdraw), received routes, the exact UPDATE bytes a local route produces per session, and well-known community names. Communities are accepted as ASN:VALUE or by name (NO_EXPORT, BLACKHOLE, ...); large communities as A:B:C. Policy errors map to 403/409/422. - GET /api/events is a server-sent event stream merging session up/down, local route and Adj-RIB-In changes, with lag notifications. - GET /metricz serves Prometheus metrics; the server crate now counts messages sent/received by type and sessions established. - The runnable main moves from crates/server to bin/bgp so it can depend on both server and web without a cycle. `cargo run -- config.textpb`. - Config gains http_endpoint; unset disables the API. - Integration tests drive the API against a live server with a real BGP peer, including verifying the wire view matches the bytes the peer got. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
BGP
The bgp crate is an implementation of the Border Gateway Protocol, which is used to exchange routing and control plane information between Autonomous Systms.
The aim of this project is to provide a modern, high performance, secure and programatic and customizable software package that can be useful to network operators, researchers, and people interested in Internet.
Current status.
The project is currently being rewritten from scratch to be more modular and maintainable, as well as to fix deeper issues with the previous implementation.
⚠️ Warning: This is currently a work in progress and not ready for use.
🛣️ Roadmap to v1.0
We aim for the 1.0 release to be functional and stable to operate peering sessions, and to install routes in the Linux Kernel.
- ☐ Implement basic parsers for the fundamental types required
- ✅ Path Attributes from RFC4271
- ✅ Open message
- ✅ Capabilities from RFC4271
- ✅ Update message
- ☐ Notification message
- ☐ Implement scaffolding required to start and configure a server
- ☐ Implement connection logic to establish sessions with peers
- ☐ Implement an efficient data structure for storing prefixes (e.g. Poptrie)
- ☐ Filtering for peer RIB in / out
- ☐ Main / auxillary RIBs for exchanging routes between peers
Languages
Rust
92.3%
Shell
4.2%
HTML
3.5%