Building a Reference SDN Controller – Part 2 – Cable and Configure

The Machine is Built – Now Lets Set it Up!

If all went well with building the machine from my first post, you should have a functional system running on a bootable ProjectW iso.  For the next steps we will cable up the controller and make some changes to ProjectW to send traffic across the switches.

The Router Analysis Reference SDN Controller Quick Setup Guide

Reference Controller Quick Start Guide (1)


If you click on the page, it should expand if needed, go ahead and print it, do whatever you would like.  This is the first revision of the document, essentially if you follow the directions here, all of the cabling should be correct when we reconfigure ProjectW.

Here is another picture of the actual devices with each spot labeled

Reference Controller and Pronto 3290


Again, just connect each port to switch to the correct port on the controller and everything will work once we make the changes to ProjectW.

From an earlier post, I have copied the directions over:

Starting the Pronto

You will want to be on the console of the Pronto switch and tell it to use option 3 (boot to shell).  Once you are at the shell you can then create a like the one I show below: for the Pronto 3290:

VSCTL="ovs-vsctl --db=tcp:$MYIP:9999"
cd /
ifconfig eth0 $MYIP netmask
route add -net default gw $GWIP
rm -f /ovs/ovs-vswitchd.conf.db
ovsdb-tool create /ovs/ovs-vswitchd.conf.db /ovs/bin/vswitch.ovsschema
ovsdb-server /ovs/ovs-vswitchd.conf.db --remote=ptcp:9999:$MYIP &
ovs-vswitchd tcp:$MYIP:9999 --pidfile=pica8 -- &
$VSCTL add-br switch1
$VSCTL set bridge switch1 datapath_type=pronto
for i in seq 1 $DPPORTS ; do
$VSCTL add-port switch1 $PORT -- set Interface $PORT type=pronto $OPTS
$VSCTL set Bridge switch1 other-config:datapath-id=0000000000000099
$VSCTL set-controller switch1 tcp:$CTLIP:6633

I will go through this a bit, basically, we are setting up some static information such as the IP of the switch ( the IP of the OpenFlow controller ( and then starting OVS using that information on port 9999.

Put this script in your / directory. Then you can simply execute it and everything will work. I have defined 2 interfaces to be used, ge-1/1/1 and ge-1/1/2. You could define more. Also if you are using a 10G Pica8 switch, you can change the $EP variable to te.

The physical machine setup

Boot the machine using the projectwv04.iso and do the following:

Once the boot cd is up, do the following:

ifconfig eth0

You should now be able to ping which is the pronto switch.

You will need to now run which will expand the lxc files onto the file system.

I have modified the config files for b1 and b2 in /var/lib/lxc/bx/config with the following for network:


lxc.utsname = b1 = phys = up = eth0 = eth2


lxc.utsname = b2 = phys = up = eth0 = eth3

Again, pretty simple stuff, I am simply telling the lxc containers to use physical intefaces eth2 and eth3.

for the script you need to change a few lines:


The first one defines the switches DPID which is in Hex, the second tells the system not to start the b1/b2 VMs.

Also you need to delete references to the b1 and b2 machines :

# lxc-stop -n b1 &> /dev/null;
# lxc-stop -n b2 &> /dev/null;

# rm -rf $LXCDIR/b1/rootfs/var/run/network/ifstate;
# rm -rf $LXCDIR/b2/rootfs/var/run/network/ifstate;

These lines will stop the from killing the b1/b2 machines and removing their network state.

At this point, you can run “ –nox”.  It will start up NOX, the RouteFlow processes and the VM running Quagga.

You will then need to start the b1/b2 LXCs by doing the following:

lxc-start -n b1 -d
lxc-start -n b2 -d

Now you should be able to attach to b1 “lxc-console -n b1” login root/root and ping (router) and (b2).

If you will want to ssh into the machine at some point, you will need to add a host key:

ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key

Hit enter twice and it will complete.


At this point you have a running testbed.  The only issue is, if you reboot, power off, reset, crash or if anything else happens to the controller, you will have to start over with the modifications.




Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.