wiki:GENIExperimenter/Tutorials/NFV/Ryu

Version 16 (modified by Nabeel Akhtar, 2 years ago) (diff)

--

NFV Tutorial using Ryu

Abstract

The virtualization of network functions (e.g., load balancer, intrusion detection system) has enabled the deployment of such functions anytime and anywhere. This tutorial addresses the deployment of a Virtual Network Function (VNF) and challenges associated with the cost and performance of delivering its service. Specifically, VNF instances can be dynamically deployed to meet changing conditions, i.e., more (less) instances to accommodate higher (less) traffic demand or more (less) stringent service requirements. To illustrate these issues, we present a basic set of GENI experiments on a topology that contains traffic sources, a destination, VNF instances of an intrusion detection system (i.e., Snort), an Open vSwitch (OVS), and a controller. The controller is used to steer traffic toward one or more Snort instances as needed so any intrusion can be detected reliably and in a timely fashion. OpenFlow, as a communication protocol standard of a Software Defined Networking (SDN) architecture, is used to install (update) controller-derived forwarding rules on the OVS switch. To measure load on Snort hosts, we leverage the distributed publish-subscribe architecture of our Recursive InterNetwork Architecture (RINA). These measurements (by sensor processes) are fed to the controller to make its decisions. We show results for both a load-independent controller and a load-dependent control-theoretic controller.

Overview

We provide another version of the NFV tutorial using the Ryu controller (besides the POX controller). The differences in the instructions compared to the POX version are included in this wiki page, and you may be referred to the POX version of the tutorial while doing this Ryu version.

Tools


Part I: Design/Setup

  • First complete steps 1-3 in this page?.
  • The Ryu controller should be installed on your controller node (reserved in Step 3.1). You can verify it by running the following command on the controller node.
    /tmp/ryu/bin/ryu-manager --verbose /tmp/ryu/ryu/app/simple_switch.py
    If Ryu is installed correctly, you should see an output like this:

  • Stop the Ryu controller by typing Ctrl + c.
  • Run the following command in the OVS window to flush all the forwarding rules installed on the OVS node.
    • sudo ovs-ofctl del-flows br0

Part II: Execute

1. Login to the hosts

Open the following windows:

  • one window with ssh into controller
  • one window with ssh into OVS
  • one window with ssh into s1
  • one window with ssh into VNF1
  • one window with ssh into VNF2
  • one window with ssh into destination

2. Configure and initialize services

2.1. Use a simple learning switch controller

This is a very simple example where we are going to run a learning switch control to forward traffic from s1 to VNF1.

  1. Start a ping from s1 to VNF1 in the window of s1, which should timeout, since there is no controller running.

ping vnf1 -c 10

  1. Run the following command in the controller window to start the simple learning controller:

/tmp/ryu/bin/ryu-manager --verbose /tmp/ryu/ryu/app/simple_switch.py

  1. Now ping again from s1 to VNF1, the ping should work.
  1. Stop the Ryu controller by typing Ctrl + c.
  1. Run the following command in the OVS window to flush all the forwarding rules installed on the OVS node.

sudo ovs-ofctl del-flows br0

2.2 NFV OVS controller

Next we are going to run a different Ryu controller that will install OpenFlow rules to support NFV load balancing as well as handling intrusion. With this controller, the traffic shall go from a source to destination, and duplicate packets are sent to one of the IDS nodes (VNF1 or VNF2) for intrusion detection. The picture below shows a red line representing traffic going from source1 to destination, and the green line represents the duplicate traffic that is sent to VNF1 for intrusion detection.

3. Execute Experiments:

3.1. First we need to download the source code and configuration files for the NFV Ryu controller onto the controller VM. In the window of controller, run the following:

  • wget http://csr.bu.edu/rina/grw-bu2016/nfv_ryu/setup_nfv_ryu_controller.sh
  • chmod 755 setup_nfv_ryu_controller.sh
  • ./setup_nfv_ryu_controller.sh

3.2. Now you should have all files needed for the NFV Ryu controller. Open nfv.config file to configure the system parameters. You can use any editor to edit the file, and we use nano here as an example.

  • nano /tmp/ryu/ryu/app/nfv.config

3.3. You will see the details of this configuration file as follows. Change the values of vnf1_interface and vnf2_interface to the values that you noted down in Section 3.3.1 in the Design/Setup? section of this tutorial. These values will tell the controller which interfaces are connected to VNF1 and VNF2.

Experiment 1: Load Balancing using Round Robin Control with Ryu Controller
Experiment 2: Load Balancing using Proportional Integral (PI) Control with Ryu Controller
Experiment 3: Handling Intrusion with Ryu Controller


Part III: Finish

Tear down Experiment and Release Resources:

After you are done with all experiments, close all your open windows and release your resources. In the GENI Portal, select the slice and click on the Delete button. Now you can start designing and running your own experiments!



Author: Yuefeng Wang and Nabeel Akhtar

Supervised by: Ibrahim Matta

Boston University

Attachments (1)

Download all attachments as: .zip