Skip to content

Category: Ubuntu

Visualizing Sflow data with Ntop and Nprobe on Ubuntu 16.04

Open Source tools can be useful if you need to put something together easily.

I was able to use Nprobe to visualize real time traffic observed via Sflow. Here is how you install it on Ubuntu 16.04.

wget http://apt.ntop.org/16.04/all/apt-ntop.deb
dpkg -i apt-ntop.deb

apt-get clean all
apt-get update
apt-get install pfring nprobe ntopng ntopng-data n2disk cento

Nprobe works as a Sflow collector and consumes the data generated by the switches. Nprobe, then, exports the data to Ntop.

To start Nprobe run:

sudo nprobe –collector-port 6343 –zmq “tcp://127.0.0.1:5556” -i none -n none

To start Ntop make sure you properly configured:

–interface=tcp://127.0.0.1:5556
–http-port=4000

Then restart the service:

sudo service ntopng restart

Then access http://127.0.0.1:4000, login with admin, admin and you can see something like this:

Screen Shot 2017-04-28 at 2.53.27 PM

 

1 Comment

Easiest way to install OpenVswitch and Mininet on Ubuntu 12.04

I’ve been struggling trying to set up the OVS 2.0 with Mininet 2.2 on Ubuntu 12.04.

Apparently the installation script from Mininet is not fully working on Ubuntu 12.04.

What did I do to fix it?

The easiest way to install it is to use the Mininet installation script and then do a small fix.

I did this exactly to install:

sudo apt-get update
sudo apt-get install -y git
git clone git://github.com/mininet/mininet
cd mininet
git checkout -b 2.2.0 2.2.0
util/install.sh -nf
util/install.sh -V 2.3.0

After this you will some weird errors. It should look like this:

Setting up openvswitch-switch (2.3.0-1) ...
 * Inserting openvswitch module
 * /etc/openvswitch/conf.db does not exist
 * Creating empty database /etc/openvswitch/conf.db
 * Starting ovsdb-server
2015-01-02T00:57:50Z|00002|stream_unix|WARN|/usr/local/var/run/openvswitch/db.sock: connection failed (No such file or directory)
2015-01-02T00:57:50Z|00003|reconnect|WARN|unix:/usr/local/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)
2015-01-02T00:57:51Z|00004|stream_unix|WARN|/usr/local/var/run/openvswitch/db.sock: connection failed (No such file or directory)

You should interrupt the script now with ctrl+C. Next do this:

cd ~/openvswitch/openvswitch-2.3.0/
sudo -s
ovsdb-tool create /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema
ovsdb-server -v --remote=punix:/usr/local/var/run/openvswitch/db.sock \
--remote=db:Open_vSwitch,Open_vSwitch,manager_options \
--private-key=db:Open_vSwitch,SSL,private_key \
--certificate=db:Open_vSwitch,SSL,certificate \
--pidfile --detach --log-file
ovs-vsctl --no-wait init
ovs-vswitchd --pidfile --detach
ovs-vsctl show

This partially solves the problem. Let’s go ahead and test it: sudo mn --test pingall.

If you reboot you are going to have the same error. What you can do is to run this everytime you reboot:

cd ~/openvswitch/openvswitch-2.3.0/
sudo -s
ovsdb-tool convert /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema
ovsdb-server -v --remote=punix:/usr/local/var/run/openvswitch/db.sock \
--remote=db:Open_vSwitch,Open_vSwitch,manager_options \
--private-key=db:Open_vSwitch,SSL,private_key \
--certificate=db:Open_vSwitch,SSL,certificate \
--pidfile --detach --log-file
ovs-vsctl --no-wait init
ovs-vswitchd --pidfile --detach
ovs-vsctl show

If you find a best solution or this does not work for you, please report me your issue. I will do my best to help you!

Regards,

Leave a Comment

Setting up OpenVswitch and Mininet 2.2 on Ubuntu 14.04

In this tutorial I’ll briefly describe how to perform a standard installation of Mininet. This tutorial should work on Ubuntu 14.04.

sudo apt-get update
sudo apt-get install -y git
git clone git://github.com/mininet/mininet
cd mininet
git checkout -b 2.2.0 2.2.0
util/install.sh -nfv

Do install.sh -h to explore additional options.

3 Comments