This guide is for installing on Ubuntu 16.04.2 LTS


Ensure packages are up-to-date

sudo apt-get update
sudo apt-get upgrade

Install Debian Packages

The following command installs these packages:

  • pip (Python package manager)
  • git (version control system)
  • git flow (branching model for Git)
  • python-pytest (used to run unit tests)
  • python-yaml (YAML parser for Python)
sudo apt-get install python-pip git git-flow python-pytest python-yaml

Install Python Packages

Ensure pip (Python package manager) is latest version:

pip install --upgrade pip

Nmeta requires Python version 2.7.x, does not run on Python 3.x (yet)

The following command installs these Python packages:

  • Ryu (OpenFlow Software-Defined Networking (SDN) controller application that handles communications with the switch)
  • dpkt (library is used to parse and build packets)
  • mock (Testing library)
  • Requests (HTTP library)
  • simplejson (JSON encoder and decoder)
  • eve (REST API framework)
  • coloredlogs (Add colour to log entries in terminal output)
  • voluptuous (data validation library)
pip2.7 install ryu dpkt mock requests simplejson eve coloredlogs voluptuous --user

Install MongoDB

MongoDB is the database used by nmeta. Install MongoDB as per their instructions (Note: Ubuntu 16.04 specific)

Import the MongoDB public GPG Key:

sudo apt-key adv --keyserver hkp:// --recv 0C49F3730359A14518585931BC711F9BA15703C6

Create a list file for MongoDB:

echo "deb [ arch=amd64,arm64 ] xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list

Reload local package database:

sudo apt-get update

Install MongoDB:

sudo apt-get install -y mongodb-org

Set MongoDB to autostart:

systemctl enable mongod.service

Start MongoDB (if required) with:

sudo service mongod start

Install nmeta

Clone nmeta

git clone

Test nmeta

Tests should all pass:

cd ~/nmeta/tests/; py.test

Run nmeta

Run nmeta in a terminal window:

ryu-manager ~/nmeta/nmeta/

Run the external API (necessary for WebUI) in a separate terminal window:


Test WebUI

In a browser on the same machine that nmeta is installed on, navigate to:


Configure Switches

Next, we need OpenFlow switches configured to Ryu/nmeta as their controller and app.

Configure OpenFlow

Switches will need to be configured to use Ryu/nmeta as their controller. The configuration details will differ depending on the type of switch.

Here is an example configuration for Open vSwitch to use a controller at IP address on TCP port 6633:

sudo ovs-vsctl set-controller br0 tcp:

You will need to work out setting that are appropriate for your topology and switches.

Configure QoS Queues

To run Quality of Service (QoS), switches will need to be configured with QoS queues.

See the documentation for your switch(es) for how to configure QoS queues.

Be aware that using a queue number that is not configured on the switch may result in the switch dropping the packet.


Aliases can be used to make it easier to run common commands. To add the aliases, edit the .bash_aliases file in your home directory:

sudo vi .bash_aliases

Paste in the following:

# Test nmeta:
alias nmt='cd ~/nmeta/tests/; py.test'
# Run nmeta:
alias nm="ryu-manager ~/nmeta/nmeta/"
# Run nmeta external API:
alias nma='~/nmeta/nmeta/'
# Retrieve Packet-In rate via external API:
alias nma_pi_rate='curl http://localhost:8081/v1/infrastructure/controllers/pi_rate/ | python -m json.tool'