BGP implemented in the Rust Programming Language
The mission is to develop a high-performance, low-memory-footprint, and safe BGP implementation; an experiment to implement aged and rusty BGP protocol in a modern language.
RustyBGP supports the gRPC APIs same as GoBGP; your code to manage GoBGP via the APIs should work with RustyBGP. If you need CLI, GoBGP's CLI command allows you to manage RustyBGP.
You can easily build RusyBGP on any system that has Docker running. You don't need Rust development environment. You can build the x86_64 statically-linked binary as follows:
$ git clone https://github.com/osrg/rustybgp.git $ cd rustybgp $ docker run --rm -it -v "$(pwd)":/home/rust/src ekidd/rust-musl-builder cargo build --release $ ls -hl target/x86_64-unknown-linux-musl/release/daemon -rwxr-xr-x 2 fujita fujita 8.1M Dec 6 12:26 target/x86_64-unknown-linux-musl/release/daemon
No configuration file support; only via the gRPC API. You can use GoBGP's CLI command.
$ sudo ./target/debug/daemon Hello, RustyBGP!
Then you can manage the daemon on a different terminal.
$ gobgp global as 65001 router-id 18.104.22.168 $ gobgp neighbor add 10.0.0.2 as 65002 $ gobgp neighbor Peer AS Up/Down State |#Received Accepted 10.0.0.2 65002 never Idle | 0 0
If you just want to check out the performance, start the daemon with
--any-peersoption. The daemon accepts any peers without configuration.
$ sudo ./target/debug/daemon --as-number 65001 --router-id 22.214.171.124 --any-peers Hello, RustyBGP!
Currently, the very basic BGP features are supported; eBGP and iBGP, acstive/passive connection, etc with the following gRPC APIs.
|API |Relevant CLI | Note | |--------------|-------------------------------------------------------|-------------| |startbgp|
gobgp global as router-id|| |getbgp|
gobgp global|| |addpeer|
gobgp neighbor add as router-id| only v4/v6 families supported, no fancy capabilities like addpath| |deletepeer|
gobgp neighbor del|| |listpeer|
gobgp neighbor|| |enablepeer|
gobgp neighbor enable|| |disablepeer|
gobgp neighbor disable|| |addpath|
gobgp global rib add|| |deletepath|
gobgp global rib del|| |listpath|
gobgp global rib/
gobgp neighbor [adj-in\|adj-out]|| |addpathstream|
gobgp mrt global inject [FILE]|| |gettable|
gobgp global rib summary|| |addbmp|
gobgp bmp add|| |addrpki|
gobgp rpki server add|| |listrpki|
gobgp rpki server|| |listrpkitable|
gobgp rpki table||