OpenvSwitch Configure from Packages and Attaching to a Floodlight OpenFlow Controller

OpenvSwitch Configure from Packages and Attaching to a Floodlight OpenFlow Controller

Open Vswitch Lab

OpenvSwitch Configure from Packages and Attaching to a Floodlight OpenFlow Controller

OpenvSwitch Configure from Packages and Attaching to a Floodlight OpenFlow Controller: Couple folks have asked about installing OpenvSwitch from packages on Ubuntu 12.04 as opposed to from source. The default repos have v1.4 up so almost at the latest v1.4.1. OVS will be the de facto vSwitch in the hyper-scale providers in the future in my opinion. As Vmware’s Nicira acquisition merges it will percolate into the enterprise. So its a good time to learn software switching and OVS is the best platform to start with.

OpenvSwitch Configure from Packages

This is currently not building on Ubuntu 13.04 w/ 3.8.0-29-generic. Give installing from the tarball a run. Detailed instructions are located in the INSTALL file in the root of the release. A post covering the build and overlay tunnels can be found at the following link:

Configuring VXLAN and GRE Tunnels on OpenvSwitch

If running an Ubuntu 12.x distribution the following may still work.

Verify install

Processes should look something like this

Restart OVS (probably not necessary)

You can see the version of OVS and the configuration using the following.

Add your bridge, think of this as a subnet or container for VLAN IDs if you aren’t familiar with the term. Each DPID is a separate data plane that appears as a separate switch to something like an OpenFlow controller.

Add a physical interface to your virtual bridge for connectivity off box. If you don’t script this part you will probably clip your connection as you zero out eth0 and apply it to br0. You can pop the commands into a text file and make it executable with chmod +x.

You can edit the /etc/network/interfaces file for it to be persistent through reboots or use ifconfig from the CLI but it will be temporary. If learning, just use ifconfig, it is good to know Linux networking for the future.

This will add the physical port (eth0) to the logical bridge (br0).

Once you edit the file restart networking. *This will cut you off but you should be able to attach to the br0 (bridge) address you added on the same subnet.

After you restart networking your ifconfig and route -n should look something like this.

Manually using ifconfig if you didn’t edit /etc/network/interfaces

Zero out your eth0 interface and slap it on the bridge interface
(warning will clip you unless you script it)

Show the bridging tables

Connect OpenvSwitch to the the OpenFlow Controller

Attaching to a Floodlight OpenFlow Controller

Output from the Floodlight controller:

Any who, plug away with a hypervisor and build the next-gen of computing! No need to wait on someone to hand it to us. Get rich while you are at it :0 Make it rain and stuff.

Add KVM and build instances using taps from OVS:
Or Quantum and OpenStack for the more adventurous:

1 year 6 months ago

How to configure Openflow protocol on openvswitch?

1 year 6 months ago

There is one for that on the front page:


1 year 8 months ago

hi can OVS work on a ubuntu Virtual Machine that is installed on vmware?

1 year 9 months ago

Hi thank you for your good step by step instructions.
I follow the steps but when I use ovs-vsctl show command it shows the following text :


why is it like this? what should I do?

1 year 9 months ago

Take a look at the Bridge Table in the output of ovsdb-client dump. It is the _UUID of the Open_vSwitch table in OVSDB.


1 year 11 months ago

I blog quite often and I genuinely appreciate your content.
Your article has really peaked my interest. I will bookmark your blog and
keep checking for new information about once a week. I opted
in for your RSS feed too.

2 years 5 months ago

:) managed to post in this page now phewww :)

2 years 5 months ago

Hi Brent,

Many thanks for this page it was really useful, well it too me almost two days to configure and make it work anyway i’m happy that it is working. I have one question though, how come the port where floodlight is hooked up is being shown also as a host. Basically my eth2 ( uplink to floodlight) , my pc port and my vm port are being shown as hosts aswell. Is this normal ? i can’t ping them as it supposed to be because as i read the controller port doesnt allow that :/ Any ideas please ?


2 years 7 months ago

Hey Brent, I am at the stop where you change BRCOMPAT from no to yes, and when I do the command:
$ sudo /etc/init.d/openvswitch-switch restart
I get the error:
Could not open brcompat socket. Check “brcompat” kernel module.

Any ideas would be amazing!!

2 years 7 months ago

Hey Jerry, I totally managed to miss this comment. Sincerely apologize. In case anyone else had the question I wanted to go ahead and put out there that brcompat is being depreciated and not needed now that the OVS kernel module is upstreamed as of ~3.2 kernel .

I guess there could be an application for a userspace use but not really sure. It should be irrelevant as long as you are using the KO module.


2 years 9 months ago

Thanks Jroberts, will update the post w/ that reminder.