-
Notifications
You must be signed in to change notification settings - Fork 140
OpenFlowNetFPGA100
This project provides a hardware table implementation of an OpenFlow reference switch. Summary for the design (NetFPGA hardware and corresponding software) is described HERE.
- Status
- Released
- Version
- OpenFlow spec1.0
- Based on
- NetFPGA Base Package 2.2.0
- Authors
- Jad Naous, David Erickson, Tatsuya Yabe
- Maintainer
- Tatsuya Yabe
With the following process, the project will be installed in /usr/local/netfpga directory.
- Install the NetFPGA Base Package
- Install NetFPGA OpenFlow switch
sudo yum clean all sudo yum install netfpga-openflow_switch
As mentioned above, with this process the project will be installed in /usr/local/netfpga directory. In order to get them in your directory, run the following:
/usr/local/netfpga/lib/scripts/user_account_setup/user_account_setup.pl
Download from NetFPGA beta distributions website: OpenFlow Switch
This release is used as a hardware assist for OpenFlow reference switch. It consists of following functions:
- Off-chip SRAM-based 32768 exact match tables and their lookup function
- On-chip TCAM-based 32 wildcard match tables and their lookup function (When you use this design with openflow software, 28 entries are available for users.)
- Associated counters (per-table counters and per-port counters)
- Packet forwarding to specified ports
- Header modification when specified
Assuming that OpenFlow entry keys and the actions (e.g. which port(s) the packets should be sent to) has already been set in exact/wildcard tables on NetFPGA by the software, the process of packet forwarding is summarized below:
- Pulls an incoming packet, parses a header and concatenates them on header_parser module, and then sends it to wildcard_match module and exact_match module.
- Checks if the parsed header matches exact flow entry and wildcard entry in wildcard_match module and exact_match module, then both of them report the result to match_arbiter module.
- Decides which result to choose from, and reports it to related modules including opl_processor module. At this stage, wildcard_match module and exact_match module update their associated counters.
- Updates the DST_PORT field in NetFPGA module header of the packet in opl_processor module and sends it out to the specified port via output_queues module. Also, when software sets so as 'modify actions', it updates SRC/DST MAC Addresses, VLAN ID and PCP, SRC/DST IP addresses, IP TOS, SRC/DST UDP and TCP ports fields on the packets before transmitted.When network and transport layer fields have been changed, it recalculates their checksums.
The regression tests verify the functionality of the packet forwarding using both exact and wildcard match results. In order to run the tests, you need to have the machine connected for the regression tests as stated in the Run Regression Tests section of the Guide.
After connecting the cables, perform the following command to run the regression tests.
nf_regress_test.pl --project openflow_switch
Test 1-1
- Name :
- Description :
- Initialize NetFPGA hardware
- Populate an exact table
- Send packets from eth2
- Receive packets on eth1
- Check exact/wildcard table counters and per-port counters, and verify the values are correct.
- Verify the packets
- Location :
- Output :
SUCCESS!
Test 1-2
- Name :
- Description :
- Location :
- Output :
SUCCESS!
Test 2-1
- Name :
- Description :
- Initialize netfpga hardware
- Populate an wildcard table and its mask field.
- Send packets from eth2
- Receive packets on eth1
- Check exact/wildcard table counters, per-port counters and verify the values are correct.
- Verify the packets
- Location :
- Output :
SUCCESS!
Test 2-2
- Name :
- Description :
- Location :
- Output :
SUCCESS!
Please consult The OpenFlow Switch Consortium web site to learn about it including how you can use the switch.
In order to have an OpenFlow switch functionality, you need to download the archive from the OpenFlow Switch Consortium website and install it. (See OpenFlow reference switch installation section below.)
- We assume you are using NetFPGA on CentOS 5.4 and on the environment mentioned in chapters 2 to 4 of NetFPGA Guide. Also, if you want to run OpenFlow regression tests you need to mount a four-port GbE NIC (eth1-4) on your NetFPGA machine before running the tests.
- Copy following three shell script files on your home directory; regress.sh, of_start.sh, of_stop.sh
cp (your NF2 directory)/projects/openflow_switch/sw/*.sh ~/.
- Cd to your home directory and become Super user.
cd su (input password)
Please refer to CentOS NetFPGA installation guide on OpenFlow wiki page.
The basic idea of installations are:
- Obtain required packages and install them.
- Stop avahi-daemon and IPv6 service.
- Obtain OpenFlow archives via git and install it, also install wireshark and its addon.
- Modify OpenFlow environment files.
Connect a four-port NIC and NetFPGA as follows:
- nf2c0 - eth1
- nf2c1 - eth2
- nf2c2 - eth3
- nf2c3 - eth4
Run regress.sh.
./regress.sh
The script does the following:
- Initialize required variables.
- Run regression tests
After running the script above, all the tests should pass.
For more information up until this point, please consult CentOS NetFPGA Install page and http://www.openflowswitch.org/wk/index.php/OpenFlowNetFPGA1_0_0][OpenFlow-NetFPGA] on The OpenFlow Switch Consortium.http://www.openflowswitch.org/wk/index.php/OpenFlowNetFPGA1_0_0][OpenFlow-NetFPGA] on The OpenFlow Switch Consortium.
To start the switch, you will need to prepare a OpenFlow Switch controller such as NOX. Please consult INSTALL file in your openflow directory. Once you have IP address or hostname of your controller, run of_start.sh. (of_start.sh assumes your openflow directory name is "openflow". Modify the script to suit your openflow directory.)
./of_start.sh xxx.xxx.xxx.xxx:yyyy (xxx.xxx.xxx.xxx : IP address or hostname of your controller yyyy : Port number which your controller uses (by default it is 6633))
It sets up a datapath and associated interfaces, then runs OpenFlow Protocol to connect to your controller.
To stop the switch, run of_stop.sh as follows:
./of_stop.sh
It tears down ofprotocol, ofdatapath and associated interfaces.