Version 4 (modified by Nabeel Akhtar, 5 years ago) (diff)


NFV Tutorial Part II: Execute

Experiment 1: Load Balancing using Round Robin Control

In the first experiment, we will look at a Round Robin load balancer for a VNF Snort application.

Snort will be running as IDS on VNF1 and VNF2 and we will try to balance the load across the two VNF instances by directing each new flow request to one of the two VNF instances in a round robin fashion.

We will use the Netcat application to generate traffic between a source and destination.

Netcat is a useful application for network debugging and investigation. It is used for reading from and writing to network connections using TCP or UDP. In other words, it is like talking on the phone. One (a node) talks and another one, on the other side, listens and talks back. Using netcat, you can see the communication between a source and destination.

  1. Open the controller window and execute the following:
        cd /tmp/pox/ext
        nano port.config

Here change the controller_type to RR as shown below:

  1. Run the NFV_controller in the controller window:
        cd /tmp/pox/
        python --verbose NFV_controller

  1. Open the VNF1 and VNF2 windows and run Snort IDS on each of the VNFs as shown below:
        sudo /usr/local/bin/snort -A console -v -c / -i eth1

You should see the window shown below on the VNF1 and VNF2 windows.

  1. In the destination window, run the netcat server:
        nc -u -l 5000

  1. In the s1 window, run the netcat client to send traffic to the destination node:
        nc -u destination 5000
  1. Type something on the s1 window and you should see it on the destination window. Now if you look at the VNF1 and VNF2 windows running Snort IDS, you could see packets arriving at the VNF1 and VNF2 nodes in a Round Robin fashion. An example of such an output is shown below on the VNF window running Snort IDS.

In the controller window, you can see that the controller chooses VNF1 and VNF2 in a Round Robin fashion as shown below:

OPTIONAL: Review the RR Controller Code:

The Round Robin code is based on the following algorithm:

If you want to see the code for the Round Robin load balancer, you can see it by executing:

        cd /tmp/pox/ext

The code that corresponds to Round Robin control is shown below:

Here if the VNF selected for the previous flow was VNF1, VNF2 is selected for the next flow, and vice versa. Once a VNF is selected, packets are sent to the selected VNF:

Back to Part II: Execute
Experiment 2: Load Balancing using Proportional Integral (PI) Control

Next: Finish