[wiki:Internal/OpenFlow/ return to OpenFlow index] = 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:''' [[BR]] Ubuntu Server 10.04, w/ xfce4 WM, openssh-server [[BR]] kernel: 2.6.32-21-generic-pae '''Packages:''' [[BR]] NetFPGA base 2.1.0 [[BR]] Tunneling OpenFlow NetFPGA 1.0.0 '''Host info:''' [[BR]] node1-1: 192.168.202.8 [[BR]] node1-2: 192.168.202.164 === Installing Ubuntu. === 1. set boot priority of CD drive to 1st in BIOS 2. 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. === 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): 1. copy "deb !http://archive.canonical.com/ lucid partner" sans quotes to /etc/apt/sources.list 1. run apt-get update. 1. 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 }}} ==== 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`. [[BR]] 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 }}} [[BR]] [[BR]] [[BR]] [wiki:Internal/OpenFlow/ return to OpenFlow index]