Homework 3: Intro to NFV and Virtual Switching

This assignment is due at 10:59 PM on Thursday, December 12th (12/12/19).

The purpose of this assignment is to give you hands on experience with Network Functions Virtualization (NFV) and Virtual Switching.

  1. First, this section details the CloudLab environment
  2. This section concludes with details about the assignment submission and grading

CloudLab Environment

For this homework, you will be using a cluster of servers on CloudLab. This section details how to configure the environment.

First, start by instantiating the CloudLab profile provided by the openNetVM project.

  • When parametrizing the profile, input 3 for Number of Hosts
  • Leave Host Type as c220g2
  • For Cluster, Select Cloudlab Wisconsin

WARNING: I have had this profile boot with different assignments of interfaces to test networks. In particular, I have had instances where the experimental network has been assigned to a 1Gbps interface. In this case, you should terminate your experiment and keep trying until you get an experiment with the right network assignment. Specifically, the experimental network IPs assigned by CloudLab are the 192.168.1.x IPs. One each of your nodes, the eth2 and eth3 interfaces should be the 10Gbps NIC. These interfaces (see ifconfig) should have the following IPs:

  • node1: eth2 -> 192.168.1.1
  • node2: eth2 -> 192.168.1.2
  • node2: eth3 -> 192.168.1.3
  • node3: eth2 -> 192.168.1.4

Also note that this profile is hiding important aspects of overlay routing from you. This is because the profile is configured such that CloudLab instantiates a virtual network for you where node2 will always be a man-in-the-middle between node1 and node3. In the case of CloudLab, this is accomplished with VLANs and/or Layer-1 switches (programmable patch panels). However, this homework will also explore creating our own overlay networks.

Next, run the provided environmental configuration scripts. On every server (or with ansible and/or parallel-ssh):

cd /local/onvm/onvm-tutorial
sudo ./setup.sh

Note that this script hides many aspects of configuring DPDK from the user. You are encouraged to look at the output of this script and dig into it to learn more about how to configure DPDK.

Also, depending on your cluster use case, you may also want to configure keyless SSH as was recommended in Homework 2. However, this is also already done for you as part of the onvm setup.

After this initial configuration, we will start configuring node2 to run the openNetVM platform on which you will run a few different experiments. For the most part, you will be following this guide:

/local/onvm/onvm-tutorial/README.md

However, there will be a few small differences. For example, because you are only using 3 nodes, the IP for the traffic sink will be 192.168.1.4.

Also, note that most of the commands in this guide only apply to node2. node1 will be generating traffic, and node3 will be receiving the traffic.

Importantly, the README references a script that does not exist. As such, we will have to do a bit more work to configure the interfaces on node2 that will be using DPDK.

First, set environment variables and bring down the interfaces on node2 that we will be binding instead to DPDK.

cd $ONVM_HOME
./scripts/setup_cloudlab.sh
ifconfig eth2 0.0.0.0
ifconfig eth3 0.0.0.0

Then, run the ./scripts/setup_environment.sh script, and answer y for every interface that it asks you to bind. After this point, eth2 and eth3 should no longer show up in the ifconfig command. This is because the kernel driver for these ports has been unloaded.

After this, you should be able to follow steps 2, 3, and 4 in the ONVM tutorial. Since the homework will be building upon these parts of the tutorial, you are recommended to do so.

Note: The command for starting the manager are misleading and possibly incorrect. The following arguments worked for me to start the manager:

./go.sh  0,1,2 3 0xFF0 -s stdout -a 0x100000000

Note that the 0xFF0 argument selects which cores are available for running on NFs! Also, the -a arugment deals with memory mapping problems in Linux/DPDK.

Similarly, to start the speed_tester program, you will also need to make a different invocation:

./go.sh 1 -d 1

And the bridge program can be invoked as follows:

./go.sh 1

After running both of these commands, you should be able to ping and use iperf between 192.168.1.1 and 192.168.1.4.

NFV Benchmarking

This part of the homework will consist of using and benchmarking different DPDK based network functions. To start with, you must configure the speed_tester program to benchmark two different network functions. To do this, you will need to setup chaining within a single server. This guide on chaining is a good place to start.

Specifically, you are encouraged to benchmark the basic_monitor and payload_scan NFs because they should be easy to configure. These can be found in the examples directory of $ONVM_HOME.

For each of your two NFs (A and B) that you choose, you should benchmark four different configurations of the functions within a single server:

  • A on its own
  • B on its own
  • A chain of A -> B
  • A chain of B -> A For each of these configurations, you should report packets per second achieved when sending and recieving with the speed_test application.

After this, the next step is to perform the same benchmarking but with end-to-end measurement with all three of the servers in the cluster. For this aspect, you should measure throughput and packet loss per second.

For this part of the homework, your submission includes two compontents:

  • A comprehensive list of commands run to perform the experiments
  • Bar charts presenting the experimental data.

Submission and Grading

Submission format

Your submission should be four folders that is in the same format as the starter code (code, env, exps, and writeup)

There should only be one writeup for this assignment. It should follow the formats specified in the individual sections.

Submission points

There are a total of 100 possible points for this assignment. TODO:

Submission Website:

This homework assignment will be submitted via github classroom.

If you have any problems, please make a post on the course discussion website.

This assignment is due at 10:59 PM on Thursday, December 12th (12/12/19).