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


Experiment 1: Load Balancing using Round Robin Control with Ryu Controller


In this 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 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.

Note: another version of this experiment using POX controller can be found here?.


1. Open the controller window and execute the following:

  • nano ~/ryu/ryu/app/nfv.conifg

and change the controller_type to RR.

2. Run the NFV_controller in the controller window:

  • ~/ryu/bin/ryu-manager --verbose ~/ryu/ryu/app/

3. Open the VNF1 and VNF2 windows and run Snort IDS on each of the VNFs as shown below:

  • sudo /usr/local/bin/snort -A full -dev -i eth1

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

4. In the destination window, run the netcat server:

  • nc -u -l 5000

5. In the s1 window, run the netcat client to send traffic to the destination node:

  • nc -u destination 5000

6. 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 should 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:

7. Stop the controller by typing Ctrl + c.

Next Experiment

Experiment 2: Load Balancing using Proportional Integral (PI) Control with Ryu Controller