Rayhaan JaufeerallyandClaude Fable 5.1 92e013ca01 Carry IPv4 routes over IPv6 sessions with IPv6 next hops (RFC 8950)
For a link that has only IPv6 addresses.

- The Extended Next Hop capability is offered on every session over IPv6
  whose families include IPv4 unicast, and used if the peer offers it too.
  Nothing to configure.
- On such a session our IPv4 routes go out in MP_REACH_NLRI with the
  session's IPv6 address as next hop, and are withdrawn in
  MP_UNREACH_NLRI. Without the agreement they are not sent, as before.
- IPv4 routes are read with an IPv6 next hop, global or global with
  link-local.
- The kernel installer resolves an IPv4 route's IPv6 next hop like any
  other and installs it: by way of an IPv6 nexthop object, or with RTA_VIA
  where routes carry their own gateway.

Tested against a real kernel in both modes, with a link-local next hop
too, and in the lab against FRR and BIRD: the new `v6only` phase takes
the IPv4 addresses off the exchange LAN, runs one IPv6 session with each
router for both families, and pings IPv4 across.

Sessions between link-local addresses are not supported yet.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-02 17:58:03 +02:00

BGP

The bgp crate is an implementation of the Border Gateway Protocol, which is used to exchange routing and control plane information between Autonomous Systems.

The aim of this project is to provide a modern, high performance, secure, programmatic 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)
  • ✅ Routes originated from the configuration, with communities, announced to all peers
  • ✅ Read-only HTTP API, status page and Prometheus metrics
  • ☐ Implement an efficient data structure for storing prefixes (e.g. Poptrie)
  • ☐ Filtering for peer RIB in / out
  • ☐ Main / auxiliary RIBs for exchanging routes between peers

Development

CI runs these three on every push, and fails on any warning:

cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace

Lints are configured once, under [workspace.lints] in the root Cargo.toml. unsafe code is forbidden throughout.

cargo test includes property tests: generated messages must survive being written and read back, and no input, however damaged, may make a parser panic. They take about a second; for a longer hunt:

PROPTEST_CASES=1000000 cargo test --release -p bgp-packet --test properties

Coverage-guided fuzz targets for the same parsers are in fuzz/; see fuzz/README.md. CI runs each of them for a minute.

License

Apache License 2.0; see LICENSE.

S
Description
Ferrix BGP Speaker
Readme
5 MiB
0 Stars 0 Watchers 0 Forks
Languages
Rust 92.3%
Shell 4.2%
HTML 3.5%