Changes between Version 20 and Version 21 of Internal/OpenFlow/HostSetup


Ignore:
Timestamp:
Feb 13, 2010, 8:53:04 PM (15 years ago)
Author:
yasaswiv
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/OpenFlow/HostSetup

    v20 v21  
    354354  * libpcap0.8-dev
    355355
    356 2. Download the base package. The newest is netfpga_base_beta_2_0_0. Untar:
     3562. Download the base package from http://netfpga.org/beta/distributions/. The page will prompt you  for your !FosWiki username and password. The newest is netfpga_base_beta_2_0_0. Untar:
    357357{{{
    358358tar xvf netfpga_base_beta_2_0_0.tar.gz
     
    438438
    439439== 4. Installing !OpenFlow components ==
    440        
     440   
     441'''Prequisite packages'''
     442 * autoconf
     443 * libtool
     444 * pkg-config
     445 * linux-source (2.6.28)
     446
     447Following the instructions of [http://www.openflowswitch.org/foswiki/bin/view/OpenFlow/Deployment/HOWTO/LabSetup Labsetup]
     448we cloned the 0.8.9 branch of the their git repository, I'll include the steps because their pages don't stay up very long.
     449
     450{{{
     451 $ git clone git://openflowswitch.org/openflow.git
     452 $ cd openflow
     453 $ git checkout -b openflow_089_rev4 origin/release/0.8.9
     454}}}
     455
     456Assuming all the prerequisites are installed, the next step is to compile the source. We're trying to make two kernel objects, and a bit file for the netfpga.
     457
     458{{{
     459 $ ./boot.sh
     460 $ ./configure --with-l26=/lib/modules/`uname -r`/ --enable-hw-tables=nf2 
     461 $ make
     462}}}
     463
     464boot.sh will fail to run if the listed prerequisites are not installed (there may be more preqs based on what was installed prior, build-tools, kernel headers, etc...).
     465
     466The original configure line read "./configure --with-l26=--with-l26=/lib/modules/`uname -r`/build --enable-hw-tables=nf2", while the extra --with-l26 is an obvious error, there are others. The configure script stuffs the argument of --wtih-l26 into a $path variable, then looks for the subdirectories $path/build and $path/source. Specifying --with-l26 as ../`uname -r`/build causes configure to fail, since there is no source directory in the build directory. Instead what they wanted was the directory 1 level up.
     467
     468In our first attempt we just ran make and went on to the next step, however when we tried to insert the modules one of them failed. The problem was with the ofdatapath_netfpga.ko module. When we tried to insert it (with insmod) it would complain about a missing symbol.
     469Dmesg would show an even every time you tried to insert the module that said
     470
     471{{{
     472WARNING: "nf2k_reg_read"
     473WARNING: "nf2k_reg$ ./boot.sh
     474}}}
     475
     476Consulting a reference from the Stanford [$ https://mailman.stanford.edu/pipermail/openflow-discuss/2009-January/000051.html mailing list] on netfpga, we determined that the Module.symvers file needed to be edited. We needed to copy the entries from the ~/NF2/lib/c/kernel/Modules.symvers into the ~/openflow/datapath/linux-2.6/Modules.symvers. The NF2 directory comes from two tar files:
     477 * netfpga_base_beta_2_0_0_0.tar.gz
     478 * netfpga_openflow_switch.0_8_9-1.tar.gz - This file was chosen to match the version of the Netfpga openflow source we're compling.
     479Go to http://netfpga.org/beta/distributions/ in order to download these packages (you'd need your !FosWiki account).
     480
     481Making this change produces the bits files and modules that will be needed in the next section.
     482
     483After a sucessfull complie we needed to load the openflow bitfile onto the netfpga
     484{{{
     485 # cpci_reprogram.pl
     486 # nf2_download ~/openflow/datapath/hwtable_nf2/openflow_switch.bit
     487}}}
     488
     489The actual paths may vary but the basic process is the same. This is fairly straight forward assuming the netfpga tools were already built.
     490
     491Once that was done we inserted the modules (required root privileges)
     492{{{
     493# /sbin/insmod ./openflow/datapath/linux-2.6/ofdatapath.ko
     494# /sbin/insmod ./openflow/datapath/linux-2.6/ofdatapath_netfpga.ko
     495}}}
     496
     497At this point we're ready to try testing the netfpga as a open flow switch. I'm going to pause here and rearrange the networks that the specfic netfpgas belong to.
     498
     499The host has been renamed to of1 and was given an official place in the WINLAB network with IP addr. 192.168.200.86
     500
     501Next, you create the OpenFlow datapaths. What they refer to as ./utilities can be found under your openflow directory. We didn't assign a MAC address to the interface like they did in the tutorial.
     502{{{
     503# ./utilities/dpctl adddp nl:0
     504}}}
     505
     506Then, add the NetFPGA interfaces. Here we encounter another typo in the instructions - there is no nf2c4.
     507{{{
     508# ./utilities/dpctl addif nl:0 nf2c0
     509# ./utilities/dpctl addif nl:0 nf2c1
     510# ./utilities/dpctl addif nl:0 nf2c2
     511# ./utilities/dpctl addif nl:0 nf2c3
     512}}}
     513
     514
     515
     516