Changes between Initial Version and Version 1 of GENIExperimenter/Tutorials/NFV/Pox/Execute/LoadBalanceRR


Ignore:
Timestamp:
05/31/17 14:16:37 (7 years ago)
Author:
Nabeel Akhtar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIExperimenter/Tutorials/NFV/Pox/Execute/LoadBalanceRR

    v1 v1  
     1= [wiki:GENIExperimenter/Tutorials/NFV/Execute NFV Tutorial Part II: Execute] =
     2
     3== Experiment 1:  Load Balancing using Round Robin Control ==
     4
     5In the first experiment, we will look at a Round Robin load balancer for a VNF Snort application.
     6
     7Snort 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.
     8
     9
     10We will use the '''Netcat''' application to generate traffic between a source and destination.
     11
     12Netcat 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.
     13
     14 1.     Open the ''controller'' window and execute the following:
     15
     16 {{{
     17#!html
     18    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background:#c0c0c0; font-size: 9pt"><b>cd /tmp/pox/ext <br></b> </span>
     19    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background:#c0c0c0; font-size: 9pt"><b>nano port.config <br></b> </span>
     20}}}
     21
     22
     23
     24 Here change the controller_type to '''RR''' as shown below:
     25{{{
     26#!html
     27<img src="http://csr.bu.edu/rina/grw-bu2016/tutorial_files/image044.gif" hspace=5>
     28 }}}
     29 2.     Run the NFV_controller in the ''controller'' window:
     30
     31{{{
     32#!html
     33    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background:#c0c0c0; font-size: 9pt"><b>cd /tmp/pox/ <br></b> </span>
     34    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background:#c0c0c0; font-size: 9pt"><b>python pox.py --verbose NFV_controller<br></b> </span>
     35}}}
     36
     37
     38 
     39 3.     Open the ''VNF1'' and ''VNF2'' windows and run Snort IDS on each of the VNFs as shown below:
     40
     41{{{
     42#!html
     43    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background:#c0c0c0; font-size: 9pt"><b>sudo /usr/local/bin/snort -A console -v -c / -i eth1 <br></b> </span>
     44}}}
     45
     46 You should see the window shown below on the ''VNF1'' and ''VNF2'' windows.
     47{{{
     48#!html
     49<img src="http://csr.bu.edu/rina/grw-bu2016/tutorial_files/image046.gif" hspace=5>
     50 }}}
     51
     52 4.     In the destination window, run the netcat server:
     53
     54{{{
     55#!html
     56    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background:#c0c0c0; font-size: 9pt"><b>nc -u -l 5000 <br></b> </span>
     57}}}
     58
     59 
     60 5.     In the ''s1'' window, run the netcat client to send traffic to the ''destination'' node:
     61
     62{{{
     63#!html
     64    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background:#c0c0c0; font-size: 9pt"><b>nc -u destination 5000 <br></b> </span>
     65}}}
     66
     67 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 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.
     68
     69{{{
     70#!html
     71<img src="http://csr.bu.edu/rina/grw-bu2016/tutorial_files/image048.gif" hspace=50>
     72 }}}
     73
     74 In the ''controller'' window, you can see that the controller chooses VNF1 and VNF2 in a Round Robin fashion as shown below:
     75
     76{{{
     77#!html
     78<img src="http://csr.bu.edu/rina/grw-bu2016/tutorial_files/image050.gif" hspace=50>
     79 }}}
     80
     81
     82[[BR]][[BR]][[BR]]
     83
     84 {{{
     85#!html
     86<table id="Table_02" width = "700" border="0" cellpadding="0" cellspacing="10" >
     87 <tr>
     88<td> <img src = "http://csr.bu.edu/rina/grw-bu2016/tutorial_files/image022.gif"> </td>
     89<td> <b>OPTIONAL: Review the RR Controller Code:</b> </td> </tr></table>
     90}}}
     91 The Round Robin code is based on the following algorithm:
     92
     93{{{
     94#!html
     95<img src="http://csr.bu.edu/rina/grw-bu2016/tutorial_files/image054.gif" hspace=50>
     96 }}}
     97
     98 If you want to see the code for the Round Robin load balancer, you can see it by executing:
     99
     100{{{
     101#!html
     102    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background:#c0c0c0; font-size: 9pt"><b>cd /tmp/pox/ext <br></b> </span>
     103    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background:#c0c0c0; font-size: 9pt"><b>cat NFV_controller.py<br></b> </span>
     104}}}
     105
     106 The code that corresponds to Round Robin control is shown below:
     107
     108{{{
     109#!html
     110<img src="http://csr.bu.edu/rina/grw-bu2016/tutorial_files/image056.gif" hspace=50>
     111 }}}
     112
     113
     114 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:
     115
     116{{{
     117#!html
     118<img src="http://csr.bu.edu/rina/grw-bu2016/tutorial_files/image058.gif" hspace=50>
     119 }}}
     120
     121'''[wiki:GENIExperimenter/Tutorials/NFV/Execute Back to Part II: Execute]'''[[BR]]
     122'''[wiki:GENIExperimenter/Tutorials/NFV/Execute/LoadBalancePI Experiment 2:  Load Balancing using Proportional Integral (PI) Control]'''[[BR]]
     123
     124== [wiki:GENIExperimenter/Tutorials/NFV/Finish Next: Finish] ==