State of OpenFlow Notes Day 4 – More RouteFlow

What is the state of OpenFlow at the end of 2012?

A quick note about participants.  I made an early call that Brocade would be able to participate, they have determined that they will not be able to.  I want to thank all of the people at Brocade who worked hard to be involved in the project.

And now onto my post.

Today I am going to post some specific information regarding the use of the projectwv03.iso live cd.  ProjectW is a live cd built by Josh Bailey of Google which you can download from me directly.  It includes a fully functional RouteFlow installation and configured VMs. The ISO is 1.3G so I am sending it via a CDN.  I’ve made some slight modifications to parts of it with the help of my friend Martin and I feel it is useful to release them at this time.

NOTE: There is a newer version of ProjectW available here: projectwv04.iso 

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 bootovs.sh like the one I show below:

bootovs.sh for the Pronto 3290:


MYIP=192.168.1.100
CTLIP=192.168.1.17
GWIP=192.168.1.1
DPPORTS=2
EP=ge
VSCTL="ovs-vsctl --db=tcp:$MYIP:9999"
cd /
ifconfig eth0 $MYIP netmask 255.255.255.0
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
PORT=$EP-1/1/$i
$VSCTL add-port switch1 $PORT -- set Interface $PORT type=pronto $OPTS
done
$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 (192.168.1.100) the IP of the OpenFlow controller (192.168.1.17) 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

My setup is a machine with 4 NICs, eth0 is connected to the mgmt 1 interface on the Pronto. eth1 is connected to my network and gets a dhcp ip. eth2 and 3 are connected to ports ge-1/1/1 and ge-1/1/2 on the pronto.

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

Once the boot cd is up, do the following:

ifconfig eth0 192.168.1.17/24

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

You will need to now run bootstrap-lxc.sh 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:


/var/lib/lxc/b1/config

lxc.utsname = b1
lxc.network.type = phys
lxc.network.flags = up
lxc.network.name = eth0
lxc.network.link = eth2

/var/lib/lxc/b2/config

lxc.utsname = b2
lxc.network.type = phys
lxc.network.flags = up
lxc.network.name = eth0
lxc.network.link = eth3

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

for the projectw.sh script you need to change two lines:

SWITCH1DPID=0x99
STARTBVMS=0

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

At this point, you can run “projectw.sh –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 172.31.1.1 (router) and 172.31.2.2 (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.

Hopefully that all makes sense (or at least works).

Leave a Reply

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