Skip to content

Setting up OpenVswitch 2.0 + Mininet 2.1+ Ubuntu 13.04

I’ve been struggling trying to set up the OVS 2.0 with Mininet 2.1 on Ubuntu 13.04 and after installing it, it would work fine but after rebooting the OS the OVS didn’t work I don’t know why yet.

So, What did I do to fix it? This:

After searching around the internet a found this article which didn’t work completely, but after I found this one with a few changes in the OVS-something syntax I thought it would work fine but it still didn’t.

I did this exactly to install:

sudo -s
apt-get update
apt-get install -y git automake autoconf gcc uml-utilities libtool build-essential git pkg-config linux-headers-`uname -r`
wget http://openvswitch.org/releases/openvswitch-2.0.1.tar.gz
tar zxvf openvswitch-2.0.1.tar.gz
cd openvswitch-2.0.1
./boot.sh
./configure --with-linux=/lib/modules/`uname -r`/build
make && make install
insmod datapath/linux/openvswitch.ko
mkdir -p /usr/local/etc/openvswitch
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

So, finally I decided to do this everytime I perform a reboot:

sudo -s
cd openvswitch-2.0.1
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

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

Regards,

Published inOpenFlow 1.3SDN

4 Comments

  1. Hi there,

    I want to remove OVS now because it gives me error every time I try to use mininet to emulate —
    $ sudo mn

    I am still getting this error:
    ____________________________________________
    2013-1115T03:04:29Z|00001|reconnect|WARN|unix:/usr/local/var/run/openvswitch/db.sock:
    connection attempt failed (No such file or directory)
    ovs-vsctl: unix:/usr/local/var/run/openvswitch/db.sock: database connection
    failed (No such file or directory)
    ovs-vsctl exited with code 1
    *** Error connecting to ovs-db with ovs-vsctl
    Make sure that Open vSwitch is installed, that ovsdb-server is running, and
    that
    “ovs-vsctl show” works correctly.
    You may wish to try “service openvswitch-switch start”.

    what can I do to fix it or remove OVS completely HELP!

  2. Hi Mlson,

    Can you just try to delete the OVS folder and execute the following code step by step?

    sudo -s
    cd openvswitch-2.0.1
    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

    Please let me know if that does not work.

  3. M M

    root@mininet-vm:/home/mininet/openvswitch-2.0.1# insmod datapath/linux/openvswitch.ko
    insmod: error inserting ‘datapath/linux/openvswitch.ko’: -1 Unknown symbol in module

    Any idea?

Leave a Reply