Projects:RCP router

From NetFPGAWiki

Jump to: navigation, search

This project provides an implementation of an RCP router on the NetFPGA. It is designed for use by anyone who wants to test RCP using the NetFPGA in a network.

Contents

Project summary

Status
Release Pending
Version
1.1 (Bitfile reported as release 2)
Authors
Sara Bolouki, Nandita Dukkipati, Jiang Zhu
NetFPGA source (required only for project source release)
1.2

Download

Install from NetFPGA Yum repository

  1. Install the NetFPGA Base Package
  2. Install RCP router
yum install netfpga-rcp_router

Obtain Tarball from NetFPGA Distributions

Login account for the NetFPGA required for download. For a new account go to: http://netfpga.org/netfpgawiki/index.php?title=Special:UserLogin&type=signup

Download from NetFPGA beta distributions website (http://netfpga.org/beta/distributions/netfpga_rcp_router_1_0.tar.gz).

Description

This is a release of RCP on the NetFPGA system. The release has three parts:

Part I: The data path of RCP implemented on NetFPGA

The RCP functionality is split between the hardware data path and the software control path. The per-packet data-path processing in hardware are summarized below:

  1. Identifying whether an incoming packet is an RCP packet
  2. Updating a running RTT sum of the outgoing interface, if the packet carries a valid RTT
  3. Updating the aggregate traffic destined to the outgoing interface
  4. Stamping the RCP rate in the outgoing packet

RCP's data-path is described in greater detail in [1].

Part II: RCP's control path in a user-level program

The control path performs periodic rate and RTT computations, and since these are performed infrequently they are implemented in software. In our implementation this software runs on the host in which the NetFPGA board is installed.

The control path only performs work at initialization when each port of the RCP router is brought online, and at the expiration of each timeslot. Upon expiration of a timer the control path reads the hardware registers to retrieve the RCP statistics, performs the necessary rate and RTT computations, writes the updated RCP rate to the hardware registers, resets the statistics in the hardware registers, and then restarts the timeslot timer.

The following are calculated approximately once per average RTT of traffic transiting the router:

  1. The bandwidth, R(t), allocated to the average data flow.
  2. The moving round-trip time average

The exact computations involved in the control path are articulated in [2].

Part III: RCP end-host in the Linux kernel

RCP at the end-hosts is implemented as its own protocol layer between IP and transport layers. There are two parts: the RCP layer between transport and IP layer, which carries congestion information from network to the end-system, and the congestion control component in transport layer which adapts the flow-rate based on network feedback. [1] describes an RCP end-host implementation in greater detail.

Regression Tests

The regression tests verify the functionality of the packet generator. In order to run the tests, you need to have the machine connected for the regression tests as stated in the Run Regression Tests section of the Guide.

After connecting the cables. Run the following command to run the regression tests.

nf21_regression_tests.pl --project rcp_router

Regression Tests

The regression tests from the RCP router are the same as the reference router. The only difference is the addition of the RCP simple test. The definition of the reference router regression tests can be found on Router Tests wiki page.

Test 1: RCP simple

Name
test_rcp_simple
Description
Tests the functionality of the RCP router by sending and receiving packets and verifying the registers.
  1. Initialize netfpga hardware
  2. Send packets
  3. Check RCP registers and verify the values are correct.
Location

projects/rcp_router/regress/test_rcp_simple

Output
SUCCESS!

Usage

Preparation

Stand-alone package

Run the following command:

rcp_router_setup.pl

NetFPGA source package

  1. Ensure that the NetFPGA kernel driver is loaded and that the CPCI has been reprogrammed.
  2. Download the RCP router bitfile:
nf2_download rcp_router.bit

RCP User Program

The RCP router is controlled via the sr_router command:

  Usage: ./sr_router [RCP MAC Index: 0~3]

RCP Router Sanity Tests

Test One

In this test packets carrying an RCP rate higher than the line-rate are sent out to MAC 1 on NetFPGA, while the user-program is running. You should expect to see packets at the output carrying a rate set by the user-program. To run this test, first run the user-program with the following command:

       sudo ./sr_router 1

then go to the regress folder of the netfpga directory and run test_rcp_simple test by doing

       sudo ./run.pl

The outgoing expected packets should carry the rate sets by sr_router (user-program)

Test Two

The second test injects RCP packets at less than the line rate. The user-program will converge to 95\% of the line-rate (118750 Bytes/msec), and the outgoing RCP packets will carry this rate. To perform this test, change test_rcp_simple to send hundreds of packets carrying rates smaller than the line-rate, and start the RCP user program:

       sudo ./sr_router 1 > rcp_mac1.log

Run grep for the flow rate in the log:

       tail -f rcp_mac1.log | grep "flow rate="

The output should be like this:

 flow rate=118750

Notes on Setup and Experiments

To try out the RCP implementation, you will need to have at least 3 machines, a sender (PC1), a router (R) and a receiver (PC2). The RCP host implementation is used for sending and receiving RCP traffic. The RCP NetFPGA router implementation needs a NetFPGA card installed and configured on the router machine R.

The end hosts and router can set up in the following topology with the address assignments:

 PC1 [eth0] <--------> [NetFGPA port 0] Router [NetFPGA port1] <------> [eth0] PC2
PC1:
    eth0: 10.0.1.100/24 
Router: 
    NetFPGA port #0: 10.0.1.1/24 
    NetFPGA port #1: 10.0.2.1/24  
PC2:
    eth0: 10.0.2.100/24

You can specify a static route on PC1/PC2 to the rest of the network.

Sanity Test #1: A single flow

On PC1, you can use the following script to inject RCP traffic to the network using iperf.

    iperf -c 10.0.2.100 -t 100 -p 5001 -i 1 > sanity_test_1.PC1.log

On PC2, you can use the following command line to serve as a traffic sink

    iperf -s -p 5001 -i 1 > sanity_test_1.pc2.log

On router, start the RCP daemon:

    sr_router 0 > sanity_test_1_mac0.log
    sr_router 1 > sanity_test_1_mac1.log 

You can monitor the output of iperf utilities on PC1 and PC2 and the logs of rcpd on router.

Sanity Test #2: Multiple flows with different starting times

Keep the configuration on router as sanity test #1.

On PC2, run the following script to start the iperf sink

    #!/bin/bash
    for i in 1 2 3 4 5
    do
        port=`expr $i + 5000`
        iperf -s -i 1 -p $port > sanity_test_2_pc2_$i.log &
    done

On PC1, run the following script to start 5 RCP flows staggered at different time points.

    #!/bin/bash
    for i in 1 2 3 4 5
        do
        port=`expr $i + 5000`
        length=`expr 100 - $i \* 10` 
        iperf -c 10.0.2.100 -i 1 -p $port -t $length > sanity_test_2_pc1_$i.log &
        sleep 10 
    done

This script generates 5 RCP flows from the sender to receiver. Each flow starts 10 seconds apart, and also ramp down 10 seconds apart. This creates 5 flows that first ramp up and then ramp down the load on the router.

References

[1] "Building a RCP (Rate Control Protocol) Test Network"; Nandita Dukkipati, Glen Gibb, Nick McKeown and Jiang Zhu; Hot Interconnects, Stanford, August 2007

[2] Implementing RCP in the IPv6 Hop-by-Hop Options Header; Internet Draft, September 2006

Personal tools