REF OpenFlowSwitch SWFT - MeshSr/ONetSwitch GitHub Wiki

###Intro
The OpenFlowSwitch(SWFT, Software Flow Table ONLY) reference design provides a set of board-specific projects.
This design runs cross-compiled OpenFlow 1.3 Software Switch (CPqD ofsoftswitch13) simply on a Linux host with NICs.

Demo runs at Linux level.

###Features

Feature Description
Network STD. IEEE 802.3, IEEE 802.3u, IEEE 802.3ab
Physical Layer 1. 1000/100/10Mbps Copper RJ45
2. support Auto MDIX, support Auto Neg.
DataLink Layer 1. RGMII(ONS45 ONS20)/SGMII(ONS30)
2. support Promiscuous Mode (default promiscuous)
3. support MDIO management to all PHYs
Switch Method Store-and-Forward
Switch Rate ~200Mbps(by CPU single core@800MHz)
OpenFlow v1.3
Flow Table Multiple, pipelined, default 64
Meter Table Supported
Match Fields All OF1.3 fields

###Project List

Board Project
ONetSwitch20 ons20-app51-ref_ofssw
ONetSwitch30 ons30-app51-ref_ofssw
ONetSwitch45 ons45-app51-ref_ofssw

###Pre-Built Images

  • For quick start demo.
File ONetSwitch20 ONetSwitch30 ONetSwitch45
boot.bin Download Download Download
devicetree Download Download Download
kernel Download Download Download
rootfs (EXT) Download Download Download
sw-lib Download Download Download
sw-app Download Download Download
  • For image assembling.
File ONetSwitch20 ONetSwitch30 ONetSwitch45
system.bit Download Download Download
dt source Download Download Download
fsbl Download Download Download
u-boot (FAT) Download Download Download
u-boot (EXT) Download Download Download
rootfs (FAT) Download Download Download
  • Additional init./config. script.
File ONetSwitch20 ONetSwitch30 ONetSwitch45
script Download Download Download

###Design Outline

  • System hardware and software
    The original ofsoftswitch13 runs as an application on the Linux host - no additional requirements on the system hardware and software.
    Reuse the images from Reference NIC project.

  • Application and dependencies The ofsoftswitch13 is an OF1.3 compatible user-space software switch implementation. This application and the dependent libraries need to be cross-compiled for ARM architecture.
    Find the instructions to make the cross-compilation here.

    • the libraries need to be taken care of since the multi-level dependency. You can find the pre-built ones here.
    • given the libs, ofsoftswitch13 is easy to be ported to ONetSwitch platform - download the source code repo to build a new one, or use the pre-built one.
  • Initialization script The init.sh is called by Linux rcS. This is a very important startup script configuring your own OpenFlow switch in certain topo/scenario.
    You can find the init.sh in every ready-to-download folder for belows

    • OpenFlow switches and controller IP settings, dpid(OpenFlow datapath ID) auto generation, MAC address auto generation
    • configure then start the ofdatapath for ofsoftswitch13 data plane implementation, i.e., switching
    • configure then start the ofprotocol for ofsoftswitch13 control plane implementation
    • optionally send pro-active entries to the flow tables using dpctl for user specific cases

###Demo
This is a demo without any controller in the scenario. Here's another page showing how to run with RYU applications.

  • Prepare the images in SD/TF card, following the instructions here.
  • Setup the topo like below.

  • Without connecting to any controller, manually send entries to enable the bidirectional communication between the two PCs.
*** example ***

zynq> <ofsoftswitch-path>/utilities/dpctl tcp:127.0.0.1:6632 flow-mod cmd=add,table=0,prio=1 in_port=1 apply:output=2
zynq> <ofsoftswitch-path>/utilities/dpctl tcp:127.0.0.1:6632 flow-mod cmd=add,table=0,prio=0 in_port=2 apply:output=1

  • Ping each other, should get the response.