wiki:GENIExperimenter/Tutorials/NFV/Pox/Execute

Version 2 (modified by Nabeel Akhtar, 23 months ago) (diff)

--

NFV Tutorial: Managing a Virtual Network Function using SDN and Control Theory

Image Map

Part II: Execute

First thing we are doing in the experiment is pinging the VMs. By now, our switch is already configured, so we start working on the controller. As mentioned earlier, we are using a POX controller and it is already installed on the controller host.

1. Login to the hosts

We need to ssh to all our hosts. Again, if you don't know how to login into a node, click here to learn.

Open the following windows:

  • one window with ssh into the 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

Note: when you need to open more windows on the same host, it may be convenient to open a new tab in the same window/terminal, e.g., by using Command + "T" on a Mac, and ssh there.

2. Configure and Initialize services

2.1. Use A 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. First start a ping from s1 to VNF1, which should timeout, since there is no controller running.
    ping vnf1 -c 10
  1. The POX controller is installed under /tmp/pox on the controller host. POX comes with a set of example modules that you can use. One of the modules is a learning switch. Start the learning switch controller which is already available by running the following two commands:
       cd /tmp/pox
       python pox.py --verbose forwarding.l2_learning

'l2' above uses the letter 'l' as in level and is not the number one. In addition, you should wait for the "INFO ... connected" line to ensure that the switch and the controller are communicating.

The output should look like this:

  1. In the terminal of s1, ping VNF1:

Now the ping should work and the output should look like this:

  1. Go to your controller host and take a look at the printouts. You should see that your controller installed flows based on the mac addresses of your packets.
In case the controller and OVS are not communicating, you may try changing the port of your controller, this is the command:
sudo ./pox.py --verbose openflow.of_01 --port=443 forwarding.l2_learning
Then tell the ovs switch that the controller will be listening on this new port, i.e. change 6633 to 443:
sudo ovs-vsctl set-controller br0 tcp:<controller_ip>:443

2.2 NFV OVS controller

Now we are going to run a different controller that will install OpenFlow rules to support NFV load balancing. In 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:

First we need to load the configuration files for the NFV OpenFlow controller.

  • We will first remove the default files for the controller and replace them with our controller files. Execute the following:
   cd /tmp/pox/ext
   sudo chmod 777 ../ext/
   sudo rm *
   wget http://csr.bu.edu/rina/grw-bu2016/nfv/OVS_files.tar.gz
   tar -xvf OVS_files.tar.gz

  • Now you should have different files for the controller. Open port.config file to configure the system parameters. You can use any editor to edit the file. We will use nano here as an example.     nano port.config
  • You will see a window as shown below. 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
Experiment 2: Load Balancing using Proportional Integral (PI) Control

Next: Finish


Author: Nabeel Akhtar

Supervised by: Ibrahim Matta

Boston University