RaspberryPi based Wired/Wireless switch for ONOS based SDN networking testbed.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc create doc folder and upload SDN Testbed(ONOS & OVX).PDF May 22, 2015
img add component and process image May 8, 2015
README.md Update README.md Feb 23, 2016

README.md

#Pi-Switch

 

 

##What is Pi-Switch? Pi-Switch is cost-effective switch for SDN networking testbed using Raspberry Pi2 and Open vSwitch. Pi-Switch can be controlled via the OpenFlow protocol because it is based on the Open vSwitch. Then, It is made with low-cost single board computer called Raspberry Pi. If you have Raspberry Pi and USB to Ethernet adapter, you can build easily your own testing environment for SDN networking. Raspberry Pi2 supports basically four USB ports. You can add USB to Ethernet adapter for expanding Ethernet ports(Network interfaces). As a result Pi-Switch has single built-in Ethernet port and four expanded Ethernet ports, total five Ethernet ports. If you need more Ethernet ports, you can use self-powered USB hub.

   

##Pi Stack Switch Single Pi-Switch has limitation of Ethernet port number and lack of processing power. If you test network performance with just single Pi-Switch that supports 4 or more Ethernet port using self-powered USB hub, you may experience performance degradation due to bottleneck situation in chip of Raspberry Pi. This is problem of hardware. So, We propose Pi Stack Switch for solving these problems. If you want to test network with 4 or more Ethernet ports, we recommend Pi Stack Switch. Pi Stack Switch is made of stacked Pi-Switch and comprised of single main switch and 3 or 4 sub switch. Classification of main switch and sub switch is based on physical position.

SlideShare about Pi Stack Switch : Building SDN Testbed

   

##Hardware Component of Pi Stack Switch

      

##Deployment of Main / Sub switch ###Single main switch and three sub switch

      

##Process

[Caution] It may not function due to the difference in power consumption according to the type of the adapter's chipset.


##Installation

  1. Set prerequisites

    $ sudo rpi-update

    $ sudo apt-get update

  2. Install OpenvSwitch

    $ sudo apt-get install openvswitch-switch openvswitch-controller openvswitch-common

  3. Add Network Interface(Hardware device) at Raspberry Pi. ex> USB to Ethernet adaptor

  4. Check connection between Network Interface and Raspberry Pi

    $ ifconfig

  5. Configure OVS in Raspberry Pi

    $ sudo ovs-vsctl add-br <BridgeName>

    $ sudo ifconfig <BridgeName> up

    $ sudo ovs-vsctl add-port <BridgeName> eth0

    $ sudo ovs-vsctl add-port <BridgeName> eth1

    ...

  6. If Your Pis are allocated IP address, Set IP address/netmask on bridge. And deallocate eth0.

    $ sudo ifconfig <BridgeName> <IP address/subnet>

    $ sudo ifconfig eth0 0

    [example]

    $ sudo ifconfig <BridgeName> 192.168.0.101/24

    $ sudo ifconfig eth0 0

  7. Edit MAC address of Pi-eth0 and bridge's MAC address (Pi-eth0 MAC addr == Bridge MAC addr)

    $ sudo ifconfig <BridgeName> hw ether <MAC Address of Pi-eth0>

    [example]

    $ sudo ifconfig <BridgeName> hw ether 00:00:00:00:00:00

  8. Set controller of Pi Switch

    $ sudo ovs-vsctl set-controller <BridgeName> tcp:000.000.000.000:6633