Version 39 (modified by 14 years ago) ( diff ) | ,
---|
Setting up NetFPGA hosts: Ubuntu 10.04
Current Ubuntu NetFPGAs run Ubuntu version 8.04 and OpenFlow ver. 1.0. Here we try to move to newer distributions w/ OpenFlow Ver. 1.0. The hardware we use here is the NetFPGA cube, another version of the NetFPGA pre-built solution. A user named 'test' with root privs was added for this purpose.
Setup of the NetFPGA using earlier distributions can be found in the Diaries.
Linux distro:
Ubuntu Server 10.04, w/ xfce4 WM, openssh-server
kernel: 2.6.32-21-generic-pae
Packages:
NetFPGA base 2.1.0
Tunneling OpenFlow NetFPGA 1.0.0
Host info:
node1-1: 192.168.202.8
node1-2: 192.168.202.164
Installing Ubuntu.
- set boot priority of CD drive to 1st in BIOS
- If desktop edition, boot as a live CD and install from there. Trying direct install just results in the system proceeding to live CD Mode (10.04). Server edition can be installed directly w/out issues.
I: Setup - NetFPGA drivers.
1. dependencies.
There is an updated dependency list:
- ncurses-dev
- libnet1-dev
- libxml-simple-perl
- libio-interface-perl
- liblist-moreutils-perl
- liberror-perl
- libnet-rawip-perl
- sun-java6-jre
- sun-java6-jdk
- libpcap0.8-dev
Installing java packages. In 10.04, sun-java6-jre, jdk are obsoleted and moved to the partner repository. This repository can be added w/ the following (ref: https://help.ubuntu.com/community/Repositories/CommandLine):
- copy "deb http://archive.canonical.com/ lucid partner" sans quotes to /etc/apt/sources.list
- run apt-get update.
- run apt-get as usual for the packages.
2. Kernel memory allocation.
Ubuntu versions beyond 8.04 (assume anything w/ kernels beyond v 2.6.28) use GRUB 2. GRUB 2 gets rid of menu.lst, so kernel memory must be allocated via the following method (ref. http://ohioloco.ubuntuforums.org/showthread.php?p=8229620):
Add "vmalloc=512m" to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub so it looks like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash vmalloc=512m"
Then run update-grub
to regenerate /boot/grub/grub.cfg with the new parameter (you never want to modify grub.cfg directly).
3. Symlinks.
The steps are the same as before. Download libpcap.so.0.9.4, found below. Make sure to slap it into /usr/lib before linking.
ln /usr/bin/lspci /sbin/lspci ln /usr/bin/setpci /sbin/setpci ln -s /usr/lib/libpcap.so.0.9.4 /usr/lib/libpcap.so.0.9 ln -s /usr/lib/libpcap.so.0.9.4 /usr/lib/libpcap.so.0 ln -s /usr/lib/libpcap.so.0.9.4 /usr/lib/libpcap.so
also check for /sbin/setpci. If it doesn't exist, create another link from /usr/bin/setpci:
ln -s /usr/bin/setpci /sbin/setpci
4. Edit files.
- edit "usleep 250" to "sleep 0.00025" in /test_loopback_drop/run.pl
- edit /home/netfpga/NF2/projects/router_kit/sw/rkd.cc to include limits.h
5. Setting Variables.
Scripts seemed broken, so manually export'd all of them. Specifics of variables pulled from README in base package root directory.
export NF_ROOT=/home/test/netfpga #(wherever your netfpga base files are) export NF_DESIGN_DIR="${NF_ROOT}/projects/reference_router" #(whatever directory project is in) export PERL5LIB="${NF_DESIGN_DIR}/lib/Perl5:${NF_ROOT}/lib/Perl5:${PERL5LIB}" #(from ${NF_ROOT}/bin/nf_profile)
6. Moment of truth.
make
then make install
.
Then, check for nf2 module with lsmod | grep nf2
:
nf2 13425 0
and for nf2cn, n=0:3 with ifconfig -a
.
nf2c0 Link encap:Ethernet HWaddr 00:4e:46:32:43:00 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:16 nf2c1 Link encap:Ethernet HWaddr 00:4e:46:32:43:01 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:16 nf2c2 Link encap:Ethernet HWaddr 00:4e:46:32:43:02 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:16 nf2c3 Link encap:Ethernet HWaddr 00:4e:46:32:43:03 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:16
7. modifications for the cpci reprogrammer
In Debian, the command lspci
is located under /usr/bin/, and ifconfig
under /sbin/. cpci_reprogram.pl must reflect these differences. Edit lines 24 and 25 in the file (under /usr/local/sbin, and ./netfpga/lib/scripts/cpci_reprogram/) as such:
# System binaries my $lspci = '/usr/bin/lspci'; my $ifconfig = '/sbin/ifconfig';
Then add cpci_reprogram.pl to the startup routine. Add the following to /etc/rc.local:
/home/test/netfpga/lib/scripts/cpci_reprogram/cpci_reprogram.pl --all
The selftest does not work in Ubuntu. so don't try it.
II: Setup - OpenFlow components.
The OpenFlow wiki on CentOS NetFPGA setup were followed in conjunction with the netfpga site wiki for the Tunneling OpenFlow NetFPGA. Stes are reiterated here since nothing is permanent.
1. dependencies.
- autoconf
- libtool
- pkg-config
- linux-source-2.6.32
- git-core
- automake
- m4
Attachments (3)
- libpcap.so.0.9.4.tar.gz (72.3 KB ) - added by 15 years ago.
-
ubuntu_setup.sh
(346 bytes
) - added by 14 years ago.
Ubuntu compatibility symlinks
-
bitfiles.tgz
(1.7 MB
) - added by 14 years ago.
netfpga cpci/tunnel bitfiles
Download all attachments as: .zip