Lab OpenFlow switches

The first category is my favorite, which we can call the hacker category. This typically consists of hardware specifications that pale in comparison to datacenter switches, but are easy to obtain and do not break your wallet. In the SimpleRouter project (https://github.com/ttsubo/simpleRouter), you can see how Toshiki Tsuboi uses a USD 35 Raspberry Pi 2 device (https://www.raspberrypi.org/) with 3 USB-Ethernet interfaces to run Open vSwitch and Ryu and demonstrate MP-BGP and VPN to external BGP devices.

Small, budget-friendly switches are also available in this category. Home routers and switches, such as TP-LINK TL-WR1043ND or Cisco-Linksys WRT54GL, have OpenWRT images that enable them to be quick OpenFlow 1.0 or 1.3 switches. For roughly USD 35 (at the time of writing), you can install an OpenFlow switch in your home and run live traffic control by your controller. Imagine a small switch that costs less than a few cups of coffee, running BGP protocol. How cool is that!

The following picture shows my first physical OpenFlow switch at home in 2011, which is a Linksys WRT54GL running OpenFlow 1.0 with a Raspberry Pi 1 acting as a controller:

My First OpenFlow Switch


The small consumer-based switches typically contain a small Linux implementation, such as BusyBox:

ssh [email protected]
BusyBox v1.15.3 (2010-05-28 12:28:17 PDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
Backfire (10.03, r23206) --------------------------
* 1/3 shot Kahlua In a shot glass, layer Kahlua
* 1/3 shot Bailey's on the bottom, then Bailey's,
* 1/3 shot Vodka then Vodka.
---------------------------------------------------
root@OpenWrt:~#

The OpenFlow configuration can be manually examined or manipulated under pre-defined category:

root@OpenWrt:/etc/config# cat openflow
config 'ofswitch'
option 'dp' 'dp0'
option 'ofports' 'eth0.0 eth0.1 eth0.2 eth0.3'
option 'ofctl' 'tcp:192.168.1.7:6633'
option 'mode' 'outofband'

The switch can associate with the controller normally:

ubuntu@sdnhubvm:~/ryu[10:24] (master)$ bin/ryu-manager --verbose ryu/app/simple_switch.py
loading app ryu/app/simple_switch.py
loading app ryu.controller.ofp_handler
...
switch features ev version: 0x1 msg_type 0x6 xid 0x4498ae12 OFPSwitchFeatures(actions=3839,capabilities=199,datapath_id=150863439593,n_buffers=256,n_tables=2,ports={1: OFPPhyPort(port_no=1,hw_addr='c0:c1:c0:0d:36:63',name='eth0.0',config=0,state=0,curr=648,advertised=3599,supported=527,peer=0), 2: OFPPhyPort(port_no=2,hw_addr='c0:c1:c0:0d:36:63',name='eth0.1',config=0,state=0,curr=648,advertised=3599,supported=527,peer=0), 3: OFPPhyPort(port_no=3,hw_addr='c0:c1:c0:0d:36:63',name='eth0.2',config=0,state=0,curr=648,advertised=3599,supported=527,peer=0), 4: OFPPhyPort(port_no=4,hw_addr='c0:c1:c0:0d:36:63',name='eth0.3',config=0,state=0,curr=648,advertised=3599,supported=527,peer=0)})
move onto main mode

I have put this switch in my work lab a few times for quick tests. It is a very low cost, low friction way to get started when you are ready to step outside of software switches.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.254.61