Phase 4 of the teaching demo: the daemon now brings up its own sessions. - New dialer task per configured peer: connect with a timeout, run the same FSM as the passive side, back off exponentially (from connect_retry_seconds, capped at two minutes) and retry forever. Stays idle while a session with the same remote IP and ASN already exists. - The peer's OPEN must carry the configured ASN, otherwise the session is refused with a Bad Peer AS notification. Inbound connections from a configured peer's address get the same check plus the configured name and hold time. - SessionRegistry tracks configured peers and their dial state (Idle / Connecting / Backoff with last error and retry time). - /api/peers merges configured peers with live sessions so the page shows peers that are down, why, and when the next attempt is; unconfigured inbound sessions are listed after them. - fake_peer gains --listen so it can stand in for a router the daemon dials. - Integration tests: dial and establish, reconnect after the peer closes, wrong ASN refused, inbound from a configured address checked and named. Not implemented: RFC 4271 §6.8 collision detection; a real router on the other end resolves the rare race by closing one connection. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
30 lines
1.4 KiB
Markdown
30 lines
1.4 KiB
Markdown
# 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 (passive and active)
|
|
- ✅ Locally originated routes with communities, announced to all peers
|
|
- ✅ HTTP API, live status page and Prometheus metrics
|
|
- ☐ 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
|