Wednesday, June 27, 2012

8. Running the Java GUI

1. Replace the GUI folder in the location root/netfpga/lib/java/gui by the GUI folder in the location from filesystem /usr/local/netfpga/lib/java/gui

2. To run the Java GUI, we use the command ./ from root/netfpga/lib/java/gui

3. If the GUI fails to run, use the commands :
make clean
and then repeat step 2.

4. If the GUI fails to run even after step 3, you can run the GUI from the folder /usr/local/netfpga/lib/java/gui using the command ./

7. Installing Packages and Kernel Updation

1. Find the kernel version you are currently running using :  uname -r
Sample Output : 2.6.9-42.el5

2. Install the packages for compiler, cursor movement and network library :
yum -y install gcc  
yum -y install ncurses-devel  
yum -y install libnet  
yum -y install compat-libstdc++-296.i386  
yum -y install libpcap-devel

3. Install packages for packet capture, raw IP packet sending and error reporting in Perl.
yum -y install perl-Net-Pcap  
yum -y install perl-Net-RawIP.i386   
yum -y install perl-Error.noarch  
yum -y install perl-XML-Simple

Make sure that kernel devels of the system are updated.

4. Check the list of kernel and kernel related packages installed on your system using the command :
rpm -qa | grep -i kernel

5. Install the latest kernel-devel packages using the commands :
yum -y install kernel-devel*
yum -y install kernel-PAE*

6. Uninstall the older version using the command :
rpm -e kernel-$(uname -r)

7. Reboot your machine in order to update the kernel-devels.

6. Install NetFPGA Base Package

1.  Install the NetFPGA yum repository and GPG key using the following command :
rpm -Uhv
2. Then run the following command to install the NetFPGA Base Package (if you are trying to implement any routers mentioned in step 3, do not run this command) :
yum install netfpga-base
(This command installs the latest version of the netfpga-base which is currently 3.0.1)

3. Different types of routers that I have tried implementing are as follows and mentioned in the brackets is the version of teh NetFPGA Base Package required for that router :
  a - IPv4 Reference Router (v2.1.1)
  b - DRAM Router (v2.1.1)
  c - Fast Reroute & Multipath Router (v2.0)
  d - PTP-Enabled Router (v2.0)
  e - Promiscuous Reference Router (v2.0)
  f - Flexible Router (v2.0)
  g - Deficit Round Robin Router Backplane (v2.2)
  h - RCP Router (v2.0)

For v2.0, use the command :
yum install netfpga-full-2.0.0-beta_full.i386

For v2.1.1, use the command :
yum install netfpga-base-2.1.1-full

For v2.2, use the command :
yum install netfpga-base-2.2.0-full

5. Installing the RPMForge YUM Repository

1. Use the following links to download the packages :

2. Install DAG's GPG key using the command :
rpm --import

3. Verify the package you have downloaded using the command :
rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpm

4. Install the package using the command : 
rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm
This command will add a yum repository config file and import the appropriate GPG keys.

5. Then use the following command : yum install htop

4. Installing Java GUI

1. Use the link to download the Java 1.6 :
2. Download the package "Linux RPM in self-extracting file".
3. Change directories using the 'cd' command to reach the directory where the downloaded package is located.
4. Add execute permission to the JDK file (the downloaded package) using the command :
chmod +x jdk-6u6-linux-i586-rpm.bin

5. Install JDK using the command : ./jdk-6u6-linux-i586-rpm.bin. Scroll down and type 'y' when prompted.6. Install the key for the JPackage repository.
rpm --import

7. Install the JPackage repsoitory information for yum.
cd /etc/yum.repos.d

8. Install the Java RE using :
yum -y --enablerepo=jpackage-generic-nonfree install java-1.6.0-sun-compat.i586

9. Set default Java path to the new JRE, i.e., select number corresponding to jre-1.6.0-sun using the command : /usr/sbin/alternatives --config java

3. Software Installation

Follow the link to download the NetFPGA packet supported by the NetFPGA board :

Wednesday, June 20, 2012

2. After the installation of the OS

After the installation is done, you need to modify your grub.conf file so that the kernel will be able to allocate memory space for the NetFPGA. This is done as follows :

1. Log into the computer as root
2. Type : gedit /boot/grub/grub.conf
3. Add the line : uppermem 524288 before the kernel line
4. Add the following text at the end the kernel line : vmalloc=256M

5. Save the file and exit
6. Reboot the computer
7. Log in as root and type : lspci
8. You could get an output like this : ##:##.# Ethernet controller: Unknown device feed:0001

9. This string identifies that there's a NetFPGA device on the PCI slot.

Tuesday, June 19, 2012

1. Installation of OS

I used CentOS 5.5 for working on the NetFPGA. I haven't tried Fedora but the same commands should work for Fedora too (atleast for Fedora14). For installing the OS, you can follow the instructions here :
The different pages on this link give an idea to install the CentOS step-wise and following these instructions can make the installation simpler.
Note the following while the installation is in progress :
1. Do not install Virtualization as we require a full installation of OS on hard drive.
2. Set SELinux to : Not Enforcing (otherwise you will need to adjust the security settings manually)
3. Disable the firewall
4. Attach your eth0 (motherboard's primary interface) to the external network
5. It is easiesr to use DHCP to set the IP address, gateway, DNS
After the installation, the Package Updater will prompt for an update. Ignore it as installing the updates now will result in missing dependency issues later while installing the Java GUI.