Okay, once I installed CentOS 6.3 in my N40L, it’s time to prepare the tools for my virtual lab environment.
I’m willing to test openvswitch so I read the documentation from the project’s webpage.
I’m goint to use openvswitch as a bridge module replacement. The documentation is easy to read and quite clear, just browse it slowly so you don’t miss important things. These are the notes I took during the installation…
- First of all, check if the bridge kernel module is loaded with “lsmod | grep bridge”, it it’s loaded remove it with “rmmod bridge”.
- Let’s install some packages with yum (I’m using epel repository just in case!):
yum install make gcc pkgconfig openssl openssl-devel glibc-devel iproute kernel-devel git python python-zope-interface python-twisted-conch PyQt4 wget
- Warning #1: I tried to build the latest release (1.7.1 at the time of writing) and the long-term support release with no success. Compilation failed, complaining about skb_frag_page() was redefined, and here you can find the problem with Red Hat / CentOS 6.3. I had to use the source code from their git repository.
- Warning #2:You’ll need autoconf > 2.63 if you want to build the latest openvswitch from git. Sorry… you’ll have to download and compile autoconf first:
wget http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz ./configure make make install
- Then I created a non-root user to build openvswitch and I got into /home/ovswitch:
adduser ovswitch cd /home/ovswitch
- I downloaded the source from the project’s git repository. Then inside openvswitch directory, and as your non-root user let’s compile Openvswitch:
git clone git://openvswitch.org/openvswitch ./boot.sh ./configure --with-linux=/lib/modules/`uname -r`/build make
- And now as root user:
- Ok. As openvswitch’s documentation suggests, let’s try to load the module:
cd datapath/linux insmod openvswitch.ko
- If no error was shown…
And that’s all!, now I’m going to learn how to use openvswitch…