![]() |
ViewsCentOS NetFPGA InstallFrom OpenFlow Wiki
CentOSInstall CentOSSources for CentOS are available at http://www.centos.org. These instructions were tested with CentOS 5.2, on i386. To minimize the size of your install, we recommend using the net install .iso, with no additional packages selected.
Also, you will need a quad-port GbE NIC installed on your machine and four Ethernet cables in order to run the regression tests.
/usr/sbin/adduser openflow Set a password for this account: passwd openflow Add superuser privileges for this account: /usr/sbin/visudo Add this line below the line 'root ALL=(ALL) ALL': openflow ALL=(ALL) NOPASSWD:ALL Login as openflow: exit ssh -X openflow@<machine_name> The '-X' turns on X forwarding, so that wireshark can be displayed locally. Install RPMForge for required packages: wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm sudo rpm -Uhv rpmforge-release-0.3.6-1.el5.rf.i386.rpm Preparation for install OpenFlowInstall from the Stanford Git repository: sudo yum -y install git automake pkgconfig libtool gcc [Git install only] Autoconf 2.60 or later is required. This must currently be installed from source to build from the git repo: wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.63.tar.gz tar xvzf autoconf-2.63.tar.gz cd autoconf-2.63 ./configure --prefix=/usr make sudo make install cd [Git install only] Download git repo with OpenFlow code and history. git clone git://openflowswitch.org/openflow cd openflow ./boot.sh Or, to install from tarball (not recommended - harder to pull new updates and contribute code): wget http://openflowswitch.org/downloads/openflow-0.9.1.tar.gz tar xvzf openflow-0.9.1.tar.gz cd openflow-0.9.1 Download required packages for compiling OpenFlow and building kernel modules: sudo yum -y install kernel-`uname -r` kernel-headers-`uname -r` kernel-devel-`uname -r` Workaround for CentOS5.3, CentOS5.4[CentOS5.3, CentOS5.4 only] In order to adapt to CentOS's backporting, edit two files. Firstly: cd (your openflow directory)/datapath/linux-2.6/compat-2.6/include/net vi checksum.h Comment out a portion as follows. /*
static inline __wsum csum_unfold(__sum16 n)
{
return (__force __wsum)n;
}
*/
And secondly: cd (your openflow directory)/datapath/linux-2.6/compat-2.6/include/linux vi skbuf.h Comment out a portion as follows. /*
static inline int __skb_cow(struct sk_buff *skb, unsigned int headroom, int cloned)
{
int delta = 0;
if (headroom < NET_SKB_PAD)
headroom = NET_SKB_PAD;
if (headroom > skb_headroom(skb))
delta = headroom - skb_headroom(skb);
if (delta || cloned)
return pskb_expand_head(skb, ALIGN(delta, NET_SKB_PAD), 0, GFP_ATOMIC);
return 0;
}
static inline int skb_cow_head(struct sk_buff *skb, unsigned int headroom)
{
return __skb_cow(skb, headroom, skb_header_cloned(skb));
}
*/
Install OpenFlow[For all the platform from here] Build OpenFlow user-space and kernel-space switches: cd (your openflow directory) ./configure --with-l26=/lib/modules/`uname -r`/build --enable-hw-tables=nf2 make sudo make install If make does not succeed, it may be that Red Hat backported changes into the CentOS/RHEL kernel to support newer features, which sometimes breaks the OpenFlow code, which assumes that the kernel version uniquely specifies the features. If you come across a compilation error, please report the error on the bug tracking page. Install Wireshark DissectorThe OpenFlow Wireshark Dissector is included in the standard OpenFlow distribution. It requires one additional library, plus the Wireshark package. Install Wireshark and glib: sudo yum -y groupinstall "X Window System" sudo yum -y install wireshark wireshark-gnome glib2-devel Make and install: cd utilities/wireshark_dissectors/openflow make sudo make install cd Install Regression SuiteThe OpenFlow Regression Suite is also included in the standard OpenFlow distribution. It requires a few additional packages and some environment variables. sudo yum -y install perl-Convert-Binary-C perl-Data-HexDump perl-Net-Pcap perl-Net-RawIP.i386 perl-Error.noarch wget http://www.cpan.org/authors/id/J/JV/JV/Getopt-Long-2.38.tar.gz tar xvf Getopt-Long-2.38.tar.gz cd Getopt-Long-2.38 perl Makefile.PL make all test sudo make install Update the OF_ROOT environment variable and PERL5LIB environment variable: cd ~/ cp openflow/regress/scripts/env_vars . vim env_vars You should see the following line: export OF_ROOT=/home/yourname/openflow Change yourname to the name of your home directory. If you are following this instruction, it should be openflow: export OF_ROOT=/home/openflow/openflow Also, find the following line: export PERL5LIB=${OFT_ROOT}/lib/Perl5:${PERL5LIB}
Remove :${PERL5LIB} as follows since PERL5LIB in NetFPGA directory will cause the failure of the tests: export PERL5LIB=${OFT_ROOT}/lib/Perl5
Then save env_vars file.
sudo /sbin/chkconfig avahi-daemon off sudo /etc/rc.d/init.d/avahi-daemon stop
sudo /sbin/chkconfig ip6tables off Then edit modprobe.conf file. sudo vim /etc/modprobe.conf Add the following lines on modprobe.conf. alias ipv6 off alias net-pf-10 off Edit network file. sudo vim /etc/sysconfig/network On the file, the line mentioning "NETWORKING_IPV6=", and if NETWORKING_IPV6=yes, change it to "no". NETWORKING_IPV6=no
Verify InstallNote: The regression tests require you to have completed the steps outlined in the section Install Regression Suite. Connect Ethernet cables in the following arrangement: <NIC> -- <NetFPGA> eth1 to nf2c0 eth2 to nf2c1 eth3 to nf2c2 eth4 to nf2c3 Login as root: su Load environment variables: source /home/openflow/env_vars These can be automatically sourced upon login, by appending the preceding line to the ~/.bashrc file. Start Wireshark. If using X forwarding, you'll have to spawn the windows from the same user account that originally logged in. If you logged in as openflow and used 'su' to become root, spawn another terminal session to launch Wireshark: ssh -X openflow@<machine_name> wireshark In the Filter bar at the top, enter: of || tcp.flags.reset == 1 Starting recording packets: go to Capture->Interfaces and select the lo (loopback) interface. Then run OpenFlow-NetFPGA tests: of_nf2_test.pl You should now see OpenFlow packets going between the switch and the controller while the test suite runs. TCP reset packets separate each test. You can click on the OpenFlow portion of each packet and identify its fields. At this point, you've verified the installation. |
Quick NavigationOpenFlow White PaperOpenFlow Demo Video![]() Watch the Demo that received the best demo award at SIGCOMM 2008. About OpenFlow OpenFlow is supported bythe Stanford Clean Slate Program. Wiki ToolsPersonal toolsProjects |