Fast Packet Networking Toolkit: Snabb Switch

ID N0WHERE:76003
Type n0where
Reporter N0where
Modified 2015-12-11T01:34:47


Snabb Switch is open source software for solving novel problems in networking. Blending the latest techniques for high-performance x86 packet processing together with a high-level LuaJIT programming interface. The goal is to offer the easiest way to create and deploy new network functions in large scale networks.

Snabb Switch is written using these main techniques:

  • Lua, a high-level programming language that is easy to learn.
  • LuaJIT, a just-in-time compiler that is competitive with C.
  • Ethernet I/O with no kernel overhead (“kernel bypass” mode).

Snabb Switch compiles into a stand-alone executable called snabb . This single binary includes multiple applications and runs on any modern Linux distribution. (You could think of it as a busybox for networking.)

How is it being used?

The first generation of Snabb Switch applications include:


Snabb NFV makes QEMU/KVM networking performance practical for applications that require high packet rates, such as ISP core routers. This is intended for people who want to process up to 100 Gbps or 50 Mpps of Virtio-net network traffic per server. We originally developed Snabb NFV to support Deutsche Telekom’s TeraStream network.

You can deploy Snabb NFV stand-alone with QEMU or you can integrate it with a cloud computing platform such as OpenStack.


VPWS (Virtual Private Wire Service) is a Layer-2 VPN application being developed by Alexander Gall at SWITCH . His Github vpn branch is the master line of development.


packetblaster generates load by replaying a pcap format trace file onto any number of Intel 82599 10-Gigabit network interfaces. This is very efficient: only a small % of one core per CPU is required even for hundreds of Gbps of traffic. Because so little CPU resources are required you can run packetblaster on a small server or even directly on a Device Under Test.


snsh (Snabb Shell) is a tool for interactively experimenting with Snabb Switch. It provides direct access to all APIs using a Lua shell. You can operate snsh either from script files or from an interactive shell.

How do I get started?

Setting up a Snabb Switch development environment takes around one minute:

$ git clone
$ cd snabbswitch
$ make -j
$ src/snabb --help

The snabb binary is stand-alone, includes all of the applications, and can be copied between machines.

For example, to install on the local machine and use as a load generator:

$ cp src/snabb /usr/local/bin/
$ sudo snabb packetblaster capture.pcap 0000:01:00.0

Fast Packet Networking Toolkit: Snabb Switch documentation

Fast Packet Networking Toolkit: Snabb Switch download