Friday, January 31, 2014

Installing CPqD switch, invoke using Mininet and OpenFlow 1.3 for Communication

Installing CPqD switch on Mininet instead of OVSK.

If OVSK is already installed remove it using below commands


sudo kill `cd /usr/local/var/run/openvswitch && cat ovsdb-server.pid ovs-vswitchd.pid`
sudo /etc/init.d/openvswitch-switch stop
sudo apt-get remove openvswitch-common openvswitch-datapath-dkms openvswitch-controller openvswitch-pki openvswitch-switch


Git clone mininet
Below git command will check out the latest Mininet
git clone git://github.com/mininet/mininet.git

If you want to run the last tagged/released version of Mininet, use
git clone git://github.com/mininet/mininet
git checkout -b 2.1.0 2.1.0

Install CPqD
cd mininet/util
sudo ./install.sh -n3fx

Start CPqD Switch
sudo mn --topo single,2 --controller remote,ip=192.168.1.8 --switch user,protocols=OpenFlow13

CPqD works in User space and OVS works in kernel space.

To get the dpid of CPqD switch
sudo dpctl tcp:127.0.0.1:6634 features

To get the stats and flow rule for CPqD switch:
dpctl tcp:127.0.0.1:6634 stats-flow

dpctl doc
https://github.com/CPqD/ofsoftswitch13/wiki/Dpctl-Documentation