NetFPGA

From Sb
Jump to: navigation, search

Contents

NetFPGA Configuration

Useful links

http://netfpga.org/foswiki/bin/view/NetFPGA/OneGig/OpenFlowNetFPGA100
http://netfpga.org/foswiki/bin/view/NetFPGA/OneGig/InstallSoftware#Software_Installation
http://www.openflow.org/wk/index.php
http://yuba.stanford.edu/foswiki/bin/view/OpenFlow/Deployment/HOWTO/LabSetup/CentOS_NetFPGA_Install
http://wiki.arl.wustl.edu/onl/index.php/NetFPGA_Overview

CentOS Install

1. CentOS install (http://mirrors.kernel.org/centos/5.3/isos/i386/CentOS-5.3-i386-bin-DVD.iso)

2. Installation's instructions: http://netfpga.org/CentOS_Install.pdf

3. Login as root (username: openflow, password: openflow)

4. Refresh the system (If no refresh is available, later it will be available)

5. Reboot

RPMFORGE Install

6. http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm (save to /tmp directory)

7. rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt

8. cd /tmp - rpm -K rpmforge-release-0.5.2-2.el5.rf.i386.rpm

9. rpm -i rpmforge-release-0.5.2-2.el5.rf.i386.rpm

NetFPGA install

10. rpm -Uhv http://netfpga.org/yum/el5/RPMS/noarch/netfpga-repo-1-1_CentOS5.noarch.rpm

11. yum install netfpga-base (Complete!)

Java install (If it's necessary)

12. http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u6-linux-   i586-rpm.bin?BundledLineItemUUID=78aJ_hCyC_MAAAEv.3kITaBb&OrderID=wuWJ_hCyCdoAAAEv03kITaBb&ProductID=VXZIBe.ootIAAAEZTrBAkQve&FileName=/jdk-6u6-linux-i586-rpm.bin (save to /tmp)

13. cd /tmp - chmod +x jdk-6u6-linux-i586-rpm.bin

14. ./jdk-6u6-linux-i586-rpm.bin - (If you want to schroll, use the space button and write "yes" (Done.))

15. rpm --import http://jpackage.org/jpackage.asc

16. cd /etc/yum.repos.d

     wget http://www.jpackage.org/jpackage17.repo

17. yum -y --enablerepo=jpackage-generic-nonfree install java-1.6.0-sun-compat.i586 (Complete!)

18. /usr/sbin/alternatives --config java (Choose this line: jre-1.6.0-sun)

19. yum install netfpga-gui (Complete!)

Copy the NetFPGA Settings

20. /usr/local/netfpga/lib/scripts/user_account_setup/user_account_setup.pl

21. Reboot

The next line needs, if your project needs memory moduls

22. netfpga/lib/scripts/fetch_mem_models

NetFPGA Driver install

23. cd ~/netfpga

     make

     make install

24. Reboot

25. Verify the installation:

lsmod | grep nf2 (If the result is something like that "nf2 28428 0" the driver is working)

NetFPGA card setup

26. cd /boot/grub/

gedit grub.conf

27. You need to modify two paraneters: uppernem and vmalloc (it's not always necessary)

28. Now you need to setup the grup (it depends of the NetFPGA version, the next lines just an example):

     title CentOS (2.6.18-238.9.1.el5)
     uppermem 524288
     root (hd0,0)
     kernel /vmlinuz-2.6.18-238.9.1.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet vmalloc=256M
     initrd /initrd-2.6.18-238.9.1.el5.img

29. reboot

30. Verify the setup: ifconfig -a | grep nf2

     You need to see something like that:

     nf2c0 Link encap:Ethernet HWaddr 00:4E:46:32:43:00
     nf2c1 Link encap:Ethernet HWaddr 00:4E:46:32:43:01
     nf2c2 Link encap:Ethernet HWaddr 00:4E:46:32:43:02
     nf2c3 Link encap:Ethernet HWaddr 00:4E:46:32:43:03

31. Reprogramming: /usr/local/sbin/cpci_reprogram.pl --all

32. Reboot.

Openflow install

You can find the full installation guide here: http://www.openflow.org/wk/index.php/CentOS_NetFPGA_Install


NetFPGA Usage

Program NetFPGA card as OpenFlow switch:

    /root/NF2/lib/scripts/cpci_reprogram/cpci_reprogram.pl 
    /usr/local/netfpga/lib/C/download/nf_download /home/openflow/openflow/hw-lib/nf2/openflow_switch.bit

If you want to use the NetFPGA with fix Datapath ID, use the next command in the next library:

   /home/openflow/openflow
   ./udatapath/ofdatapath --detach punix:/var/run/dp0 -d 000000000001 -i nf2c0,nf2c1,nf2c2,nf2c3

and then start the NetFPGA with a controller:

   ./secchan/ofprotocol unix:/var/run/dp0 tcp:192.168.213.10:6633

The NetFPGA communicates with the controller with its eth port, and you can connect hosts to the next interfaces: nf2c0,nf2c1,nf2c2,nf2c3.

If you use the greedy implementation of Nox or the dpctl command, the port assigment in the config file is the next:

nf2c0 - 1
nf2c1 - 2
nf2c2 - 3
nf2c3 - 4
Personal tools