NetBricks is a Rust based framework for NFV development. Please refer to the paper for information about the architecture and design. Currently NetBricks requires a relatively modern Linux version.
NetBricks can be built either using a Rust nightly build or using Rust built from the current Git head. In the later
case we also build musl
and statically link to things. Below we provide basic
instructions for both.
First obtain Rust nightly. I use rustup, in which case the following works
curl https://sh.rustup.rs -sSf | sh # Install rustup
rustup install nightly
Then clone this repository and run build.sh
./build.sh
This should download DPDK, and build all of NetBricks.
The instructions for doing so are simple, however building takes significantly longer in this case (and consumes tons of memory), so do this only if you have lots of time and memory. Building is as simple as
export RUST_STATIC=1
./build.sh
Building NetBricks requires libcurl
with support for gnutls
. On Debian these dependencies can be installed using:
apt-get install libgnutls30 libgnutls-openssl-dev libcurl4-gnutls-dev
NetBricks also supports using SCTP as a control protocol. SCTP support requires the use of libsctp
(this is an
optional dependency) which can be installed on Debian using:
apt-get install libsctp-dev
Changing some Linux parameters, including disabling C-State, and P-State; and isolating CPUs can greatly benefit NF performance. In addition to these boot-time settings, runtime settings (e.g., disabling uncore frequency scaling and setting the appropriate flags for Linux power management QoS) can greatly improve performance. The energy.sh in scripts/tuning will set these parameter appropriately, and it is recommended you run this before running the system.
This repository includes a set of example NFs under the test
directory. A complete list of example can be found by
running
./build.sh run
The build script can be used to run these examples as
./build.sh run <example name> <options>
Passing -h
will provide a list of options. All of these examples accept one or more ports as input. Ports can be
specified as one of:
- PCI ID of a NIC
dpdk:<PMD spec>
where PMD spec can be something likedpdk:eth_pcap0,rx_pcap=$HOME/tcpflow/tests/udp.pcap,tx_pcap=out.pcap
which specifies a PCAP file should be used. See DPDK source for other PMD drivers that are available.ovs:<integer>
to connect to an OpenVSwitch DPDK ring port (dpdkr
).bess:<port name>
to connect to a BESSZeroCopyVPort
Support for futures
for control plane functionality.