Running an OpenFlow Network with OpenStack Quantum & Floodlight

Introduction

While Quantum is still incubating in OpenStack Essex, we can see Open-Source plugins compatible with differents technologies.

For remind, a Plugin makes possible the communication between Networking technologies & Networking features in OpenStack, like virtual NICs and virtual Bridges. Most of the features we can find today are L2. In a close future, we will see extended L3 features and other stuffs.

Today, I’m interesting about OpenFlow which becomes a standard in the network technologies. Recently, OpenFlow community released an OpenFlow Plugin for Quantum.

After playing with it, I decided to write some words about its implementation. Let’s go.

 

Prepare the Network Controller

We are going to use Floodlight Network Controller which is free & Open-Source.

There is two ways to install it :

  • by downloading the ready-to-use VM here. If you run it, you should enable Quantum feature with this command :
    touch /opt/floodlight/floodlight/feature/quantum

    and also reboot the VM.

  • by building from scratch the appliance.

I’m going to show you the second one :

  • Prepare an Ubuntu 12.04 LTS Server clean and up to date.
  • Download this required packages :
    sudo apt-get install build-essential default-jdk ant python-dev git
  • Download the last version of FloodlightSoftware :
    git clone git://github.com/floodlight/floodlight.git
  • Run Ant in the Floodlight directory :
    cd floodlight; ant
  • Finally, run the controller :
    java -jar target/floodlight.jar -cf src/main/resources/quantum.properties
  • You can check if the controller is working well :
    curl 127.0.0.1:8080/quantum/v1.0
    {"status":"ok"}

The Controller is ready, we can now configure OpenStack Services to run the plugin correctly.

 

Prepare the Quantum Server

  • Install Quantum-Server :
    sudo apt-get install quantum-server git
  • Get the last version of the Plugin here :
    git clone git://github.com/floodlight/quantum-restproxy.git
  • Copy the quantum-restproxy files in /usr/lib/python2.7/dist-packages/quantum/plugins/restproxy directory. You should take care that the plugin directory name is “restproxy” if you want running Quantum-Server !
  • We can configure the Quantum-Server with the script provided in scriptsdir (after editing it with mysql username/password):
    ./install-plugin.sh network-controller:8080
  • And run the service :
    service quantum-server restart

 

Prepare Nova-Network

Configure nova-network to use quantum network manager. In nova.conf add:

--network_manager=nova.network.quantum.manager.QuantumManager
--quantum_connection_host=quantum-server
--quantum_use_dhcp=True

 

Prepare Nova-Compute node(s)

  • Configure the vif driver, and libvirt/vif type to use OVS. In nova-compute.confadd:
    --connection_type=libvirt
    --libvirt_ovs_bridge=br-int
    --libvirt_vif_type=ethernet
    --libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtOpenVswitchDriver
    --linuxnet_interface_driver=nova.network.linux_net.LinuxOVSInterfaceDriver
  • Edit /etc/libvirt/qemu.conf:
    cgroup_device_acl = ["/dev/null", "/dev/full", "/dev/zero","/dev/random", "/dev/urandom","/dev/ptmx", "/dev/kvm", "/dev/kqemu","/dev/rtc", "/dev/hpet", "/dev/net/tun",]
  • And restart libvirt service :
    service libvirt-bin restart

 

Prepare Open-vSwitch

Open-vSwitch must be installed and configured on each nova-compute & nova-network node.

  • Install Open-vSwitch packages :
    sudo apt-get install openvswitch-switch
  • Prepare the OS for OVS :
    apt-get install -y openvswitch-datapath-source
    modprobe openvswitch_mod
    echo "openvswitch_mod">>/etc/modules
  • To prepare the virtual bridge, we must run :
    ovs-vsctl --no-wait --if-exists del-br br-int
    ovs-vsctl --no-wait add-br br-int
    ovs-vsctl --no-wait br-set-external-id br-int bridge-id br-int
    ovs-vsctl set-controller br-int "tcp:network-controller:6633"
    ovs-vsctl add-port br-int eth1

 

That’s all !

You can now run common commands to create private networks. More about that here.

 

Conclusion

We can hear more and more about SDN Technologies and also OpenFlow. That’s really great to have several plugins which can be run with OpenStack Software and we can say that OpenStack is going to be ready to provide a full Networking As A Service with Standards Ecosystems.

Note : If you need more help to run OpenStack in development environment, maybe you will like my documentation.

 

Source

  • http://adnsec.blogspot.com Chambelant

    Good news. Keep going in this way!!

  • http://atuljha.com koolhead17

    keep more coming!! :)

  • Pingback: Link Dump 10/5/12 | Professional OpenStack

  • Rashmi

    Hi,

    WHen I try to run the script for configuring the quantum-server i et the following error. WHat could I be missing?

    root@openstack-controller:/usr/lib/python2.7/dist-packages/quantum/plugins/restproxy/scripts# ./install-plugin.sh 127.0.0.1:8080
    ERROR: Did not find the Quantum INI file: /etc/quantum/plugins.ini

  • othmane douiri

    thinks emilien for this post, actually im interesting in using Nova APIs in an Java application over Floodlight. but i was wondering if this can be done because floodlight only communicate with switchs using Openflow. if i use the Quantum plugin, do you thinks its correct?