This is the Virtual Network Platform 1.0 which allows you to construct and manage VXLAN-based virtual networks with a single centralized management point. The centralized management point provides a REST-based interface for managing the virtual networks.
Don't abbreviate Virtual Network Platform as VNP.
VXLAN-based virtual networks are managed with the following system architecture and software packages.
Virtual Network Controller consists of the following tree subcomponents.
Virtual Network Manager is an application responsible for managing virtual networks. It retrieves configuration from the backend database (see below for details) and make necessary changes in OpenFlow switches and VXLAN tunnel endpoints. It acts as an OpenFlow controller. It is developed on top of Trema which is an OpenFlow framework for developing OpenFlow controllers and switches.
Backend Database stores virtual network configuration and operational states of OpenFlow switches and Virtual Network Manager. It is a database created on MySQL.
Configuration Frontend provides a REST interface for managing virtual networks. It works as a web server and allows you to create/delete virtual networks, attach/detach switch ports to/from virtual networks, associate/detach MAC addresses with/from switch ports via the REST interface.
Virtual Network Agent receives requests from Virtual Network Manager to configure VXLAN tunnel endpoint and OpenFlow switch. It runs on the same host as VXLAN tunnel endpoint and OpenFlow switch are running.
VXLAN Tunnel End-Point is a VXLAN tunnel endpoint implementation. It can be a user space implementation included in this software suite or standard Linux kernel implementation available on Linux 3.7.
OpenFlow Switch is unmodified Open vSwitch (version 1.4.X). It is not included in this software suite. For detailed information on Open vSwitch, please visit http://openvswitch.org/.
At least, one host that runs Virtual Network Controller and two hosts for Virtual Network Agent, VXLAN Tunnel End-Point, and OpenFlow switch are required. The following operating system is only supported.
- Ubuntu 12.04.1 LTS Desktop (amd64)
Operating systems other than above are totally not tested and may not work expectedly.
You can retrieve a copy of the source code as follows:
$ sudo apt-get install git
$ git clone --recurse-submodules \
git://github.com/trema/virtual-network-platform.git
$ cd virtual-network-platform
If you prefer to use HTTP, follow the instructions below:
$ git clone https://github.com/trema/virtual-network-platform.git
$ cd virtual-network-platform
$ git config submodule.trema.url https://github.com/trema/trema.git
$ git submodule init
$ git submodule update
We assume that the software suite is installed in the following environment.
Since Virtual Network Manager is developed on top of Trema, you need to build Trema before building Virtual Network Manager.
-
Build Trema
$ sudo apt-get install gcc make git ruby rubygems ruby-dev libpcap-dev \ libsqlite3-dev libglib2.0-dev $ sudo gem install rubygems-update -v 2.1.11 $ sudo update_rubygems _2.1.11_ $ sudo gem install --remote bundler $ cd trema $ bundle config --local path vendor/bundle $ bundle install $ ./build.rb $ mkdir -p tmp/log tmp/sock tmp/pid $ cd ..
-
Build Virtual Network Manager
$ sudo apt-get install libcurl4-gnutls-dev libjson0-dev \ libmysqlclient-dev $ cd virtual_network_manager/src $ make $ cd ../..
-
Setup init script
$ sudo cp virtual_network_manager/init/virtual_network_manager \ /etc/init.d $ sudo update-rc.d virtual_network_manager defaults $ sudo cp virtual_network_manager/init/trema /etc/init.d $ sudo update-rc.d trema defaults
-
Copy configuration files
$ sudo cp virtual_network_manager/config/virtual_network_manager \ /etc/default $ sudo chown root.root /etc/default/virtual_network_manager $ sudo chmod 600 /etc/default/virtual_network_manager $ sudo cp virtual_network_manager/config/trema /etc/default
-
Set the directory that the Virtual Network Manager executable exists
Specify the directory that you have installed Virtual Network Manager executable in /etc/default/virtual_network_manager like follows:
VIRTUAL_NETWORK_MANAGER_DIR="/somewhere/virtual_network_manager/src"
-
Set the directory that Trema exists
Specify the directory that you have installed Trema executable in /etc/default/trema like follows:
TREMA_HOME="/somewhere/trema"
-
Install MySQL server and client
$ sudo apt-get install mysql-server mysql-client
During the installation process, you may be asked to set password for the MySQL "root" user. We assume here that the password is set to "root123".
-
Add privileges to "root"
$ mysql -u root --password=root123 mysql> grant all privileges on *.* to root@localhost identified by 'root123' with grant option; mysql> flush privileges; mysql> quit
-
Create database and tables
$ cd backend_database $ ./create_database.sh $ cd ..
-
Install Sinatra and ActiveRecord
$ sudo apt-get install ruby ruby-json ruby-sinatra ruby-activerecord \ ruby-mysql
-
Setup init script
$ sudo cp configuration_frontend/init/configuration_frontend \ /etc/init.d $ sudo update-rc.d configuration_frontend defaults
-
Copy configuration file
$ sudo cp configuration_frontend/config/configuration_frontend \ /etc/default
-
Set the directory that the Configuration Frontend executable exists
Specify the directory that you have installed Configuration Frontend in /etc/default/configuration_frontend like follows:
CONFIGURATION_FRONTEND_DIR="/somewhere/configuration_frontend"
$ sudo service trema start
$ sudo service virtual_network_manager start
$ sudo service configuration_frontend start
-
Install Open vSwitch
DKMS version: $ sudo apt-get install openvswitch-switch openvswitch-datapath-dkms module-assistant version: $ sudo apt-get install openvswitch-switch openvswitch-datapath-source $ sudo module-assistant auto-install openvswitch-datapath
-
Create switch instance and add switch ports
$ sudo ovs-vsctl add-br br0 $ sudo ovs-vsctl add-port br0 eth1 $ sudo ovs-vsctl add-port br0 eth2
-
Set datapath identifier and OpenFlow controller
$ sudo ovs-vsctl set Bridge br0 \ other-config:datapath-id=[datapath id in hex] $ sudo ovs-vsctl set-controller br0 tcp:192.168.1.254:6653 \ -- set controller br0 connection-mode=out-of-band $ sudo ovs-vsctl set-fail-mode br0 secure
Datapath id must be a 64-bit unique identifier for specifying the switch instance. You need to assign a unique identifier for each switch instance. Note hat datapath id may be specified with 16 digits hexadecimal without "0x" prefix (e.g. 0000000000000001).
-
Restart Open vSwitch
$ sudo service openvswitch-switch restart
-
Build VXLAN Tunnel End-Point
$ sudo apt-get install gcc make $ cd vxlan_tunnel_endpoint/src $ make $ cd ../..
-
Setup init script
$ sudo cp vxlan_tunnel_endpoint/init/vxland /etc/init.d $ sudo update-rc.d vxland defaults
-
Setup configuration file
$ sudo cp vxlan_tunnel_endpoint/config/vxland /etc/default
Edit the configuration file (/etc/default/vxland). Set the directory that the executable (vxland) exists.
VXLAND_DIR="/somewhere/vxlan_tunnel_endpoint/src"
-
Start VXLAN Tunnel End-Point
$ sudo service vxland start
-
Install Sinatra
$ sudo apt-get install ruby ruby-json ruby-sinatra ruby-rest-client \ ruby-systemu
-
Setup init script
$ sudo cp virtual_network_agent/init/virtual_network_agent \ /etc/init.d $ sudo update-rc.d virtual_network_agent defaults 30 10
-
Setup configuration file
$ sudo cp virtual_network_agent/config/virtual_network_agent \ /etc/default
-
Edit configuration files
Specify the directory that you have installed Virtual Network Agent in /etc/default/virtual_network_agent like follows:
VIRTUAL_NETWORK_AGENT_DIR="/somewhere/virtual_network_agent"
Set the Configuration Frontend URL, Virtual Network Agent URL and Tunnel endpoint address in virtual_network_agent/tunnel_endpoint_configure.yml.
controller_uri: http://192.168.1.254:8081/ uri: http://192.168.1.16:8082/ tunnel_endpoint: 192.168.1.16:4789
-
Start Virtual Network Agent
$ sudo service virtual_network_agent start
Here are simple examples that show how to manage virtual networks. Please see files under doc/api for extended examples.
$ curl -v \
-H "Accept: application/json" \
-H "Content-type: application/json" \
-X POST \
-d '{ "id": 128, "description": "Virtual network #128" }' \
http://192.168.1.254:8081/networks
$ curl -v \
-H "Accept: application/json" \
-H "Content-type: application/json" \
-X POST \
-d '{ "id": 1, "datapath_id": "1", "name": "eth1",
"vid": 65535, "description": "eth1 on switch #1" }' \
http://192.168.1.254:8081/networks/128/ports
$ curl -v \
-H "Accept: application/json" \
-H "Content-type: application/json" \
-X POST \
-d '{ "address" : "00:00:00:00:00:01" }' \
http://192.168.1.254:8081/networks/128/ports/1/mac_addresses
Copyright (C) 2012-2013 NEC Corporation
All software packages distributed here are licensed under the GNU General Public License version 2.0: