ONOS
Download the ONOS source code using github.
clone -b onos-spring ssh://<username>@gerrit.onosproject.org:29418/ONOS
Compile the codes.
cd ~/ONOS mvn clean mvn complie
Controller-CLI
Dell Hardware Switches
How to configure openflow
Setup CAM
#configure (conf)#cam-acl l2acl 2 ipv4acl 2 ipv6acl 0 ipv4qos 0 l2qos 1 l2pt 0 ipmacacl 0 vman-qos 0 ecfmacl 0 openflow 8 (conf)#cam-acl-vlan vlanopenflow 1 vlaniscsi 1 vlanaclopt 0 (conf)#exit
Reboot the switch
#reload
Create openflow instance
#configure (conf)#openflow of-instance 1 (conf-of-instance-1)#controller 1 10.11.44.5 tcp [ change to your controller ip ] (conf-of-instance-1)#flow-map l2 enable (conf-of-instance-1)#flow-map l3 enable (conf-of-instance-1)#interface-type any (conf-of-instance-1)#multiple-fwd-table enable (conf-of-instance-1)#of-version 1.3 (conf)#exit
Setup interfaces
(conf)#interface TenGigabitEthernet 0/0 [ change to your network ports] (conf-if-te-0/0)#of-instance 1 (conf-if-te-0/0)#no switch-port (conf-if-te-0/0)#no shutdown (conf)#exit
Enable the openflow instance
(conf)#openflow of-instance 1 (conf-of-instance-1)#not shutdown (conf-of-instance-1)#exit
CPqD Software Switches
The CPqD 1.3 software switch cannot be compiled out of the box on recent versions of Ubuntu (>= 13.10 I believe).
In fact, the issue is not with the switch code itself but the netbee library it depends on which also needs to be compiled. The library cannot be compiled if your bison version is greater than 2.5. Unfortunately, since Ubuntu 13.10 the lowest available bison version is greater than 2.5, so the compilation doesn't work.
So, somehow you have to get an old version of bison on your system. There are multiple ways to do this, but I've detailed the approach I used below.
First, use the mininet script to download and try to install the ofsoftswitch13. The compile should fail at some point:
mininet/util/install.sh -3f
Now we need to downgrade our bison version so that we can finish compiling the code. Add the sources from an old version of ubuntu to your apt sources. I created a file called raring.list
in /etc/apt/sources.list.d/
containing:
deb http://old-releases.ubuntu.com/ubuntu/ raring main restricted deb-src http://old-releases.ubuntu.com/ubuntu/ raring main restricted
Now update your apt cache and install the old version of bison:
sudo apt-get update sudo apt-get remove bison libbison-dev sudo apt-get install bison=2:2.5.dfsg-3ubuntu1 libbison-dev=2:2.5.dfsg-3ubuntu1
Double-check you have bison 2.5 installed:
jono@ubuntu:~$ bison --version bison (GNU Bison) 2.5 Written by Robert Corbett and Richard Stallman. ...
The mininet install script should have placed the netbee source in your home directory. I'm assuming the directory is ~/nbeesrc-jan-10-2013, but you can adapt if it's different. We'll go there and finish compiling it (credit to the mininet install script):
export NBEESRC=~/nbeesrc-jan-10-2013 cd ${NBEESRC}/src make clean cmake . make sudo cp ${NBEESRC}/bin/libn*.so /usr/local/lib sudo ldconfig sudo cp -R ${NBEESRC}/include/ /usr/
Now netbee is installed on the system and you can go ahead and compile the CPqD software switch. Hopefully the mininet script has already cloned the repo for you at ~/ofsoftswitch13:
cd ~/ofsoftswitch13 ./boot.sh ./configure make sudo make install
Done.
jono@ubuntu:~$ dpctl --version dpctl 1.3.0 compiled Jul 30 2014 22:20:00
Optional: if you care, you can upgrade bison back to the latest version. You may also want to remove the raring.list file you created earlier so there's no chance of accidentally installing old software.
sudo apt-get install bison