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


Ignore:
Timestamp:
05/31/17 14:15:49 (2 years ago)
Author:
Nabeel Akhtar
Comment:

--

Legend:

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

    v1 v1  
     1= [http://groups.geni.net/geni/wiki/GENIExperimenter/Tutorials/NFV NFV Tutorial: Managing a Virtual Network Function using SDN and Control Theory] =
     2
     3{{{
     4#!html
     5
     6<div style="text-align:center; width:495px; margin-left:auto; margin-right:auto;">
     7<img id="Image-Maps_5201305222028436" src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/Setup.jpg?format=raw" usemap="#Image-Maps_5201305222028436" border="0" width="495" height="138" alt="" />
     8<map id="_Image-Maps_5201305222028436" name="Image-Maps_5201305222028436">
     9<area shape="rect" coords="18,18,135,110" href="http://groups.geni.net/geni/wiki/GENIExperimenter/Tutorials/NFV/DesignSetup" alt="" title=""    />
     10<area shape="rect" coords="180,18,297,111" href="http://groups.geni.net/geni/wiki/GENIExperimenter/Tutorials/NFV/Execute" alt="" title=""    />
     11<area shape="rect" coords="344,17,460,110" href="http://groups.geni.net/geni/wiki/GENIExperimenter/Tutorials/NFV/Finish" alt="" title=""    />
     12<area shape="rect" coords="493,136,495,138" href="http://www.image-maps.com/index.php?aff=mapped_users_5201305222028436" alt="Image Map" title="Image Map" />
     13</map>
     14<!-- Image map text links - End - -->
     15
     16</div>
     17}}}
     18
     19= Part II: Execute =
     20
     21First 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.
     22
     23== 1.     Login to the hosts ==
     24We need to ssh to all our hosts. Again, if you don't know how to login into a node, click here to learn.
     25
     26Open the following windows:
     27
     28  -      one window with ssh into the controller
     29  -      one window with ssh into OVS
     30  -      one window with ssh into s1
     31  -      one window with ssh into VNF1
     32  -      one window with ssh into VNF2
     33  -      one window with ssh into destination
     34'''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.
     35
     36 
     37== 2.     Configure and Initialize services ==
     38
     39'''2.1. Use A Learning Switch Controller'''
     40
     41 This is a very simple example where we are going to run a learning switch control to forward traffic from s1 to VNF1.[[BR]]
     42    1.     First start a ping from s1 to VNF1, which should timeout, since there is no controller running.[[BR]]
     43  {{{
     44#!html 
     45  <span style="background:#c0c0c0; font-size: 9pt" ><b> ping vnf1 -c 10 </b>
     46  </span> 
     47}}}   
     48
     49    2.     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:[[BR]]
     50     {{{
     51#!html
     52    &nbsp;&nbsp;&nbsp;<span style="background:#c0c0c0; font-size: 9pt"><b>cd /tmp/pox <br></b> </span>
     53    &nbsp;&nbsp;&nbsp;<span style="background:#c0c0c0; font-size: 9pt"><b>python pox.py --verbose forwarding.l2_learning <br></b> </span>
     54
     55}}}
     56 
     57       {{{
     58#!html
     59<table id="Table_02" width = "1150" border="0" cellpadding="0" cellspacing="10" align="center" >
     60 <tr>
     61<td> <img src = "http://csr.bu.edu/rina/grw-bu2016/tutorial_files/image022.gif"> </td>
     62<td> '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. </td> </tr></table>
     63}}}
     64 The output should look like this:
     65 {{{
     66#!html
     67<img src="http://csr.bu.edu/rina/grw-bu2016/tutorial_files/image034.gif" hspace=100>
     68 }}}
     69    3.     In the terminal of ''s1'', ping ''VNF1'':
     70 Now the ping should work and the output should look like this:
     71{{{
     72#!html
     73<img src="http://csr.bu.edu/rina/grw-bu2016/tutorial_files/image036.gif" hspace=100>
     74 }}}
     75    4.     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.
     76
     77     {{{
     78#!html
     79<table id="Table_02" width = "1100" border="0" cellpadding="0" cellspacing="10" align="center">
     80 <tr>
     81<td> <img src = "http://csr.bu.edu/rina/grw-bu2016/tutorial_files/image026.gif"> </td>
     82<td> In case the controller and OVS are not communicating, you may try changing the port of your controller, this is the command:<br>
     83<b> sudo ./pox.py --verbose openflow.of_01 --port=443 forwarding.l2_learning</b> <br>
     84
     85Then tell the ovs switch that the controller will be listening on this new port, i.e. change 6633 to 443: <br>
     86
     87<span style="background:#c0c0c0; font-size: 9pt" ><b>sudo ovs-vsctl set-controller br0 tcp:&lt;controller_ip&gt;:443</b> </span> 
     88
     89</td> </tr></table>
     90}}}
     91
     92     
     93'''2.2 NFV OVS controller'''
     94
     95 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.
     96
     97{{{
     98#!html
     99<img src="http://csr.bu.edu/rina/grw-bu2016/tutorial_files/image040.gif" hspace=100>
     100 }}}
     101
     102== 3.     Execute Experiments: ==
     103
     104First we need to load the configuration files for the NFV !OpenFlow controller.
     105
     106- We will first remove the default files for the controller and replace them with our controller files. Execute the following:
     107
     108{{{
     109#!html
     110    &nbsp;&nbsp;&nbsp;<span style="background:#c0c0c0; font-size: 9pt"><b>cd /tmp/pox/ext <br></b> </span>
     111    &nbsp;&nbsp;&nbsp;<span style="background:#c0c0c0; font-size: 9pt"><b>sudo chmod 777 ../ext/  <br></b> </span>
     112    &nbsp;&nbsp;&nbsp;<span style="background:#c0c0c0; font-size: 9pt"><b>sudo rm *  <br></b> </span>
     113    &nbsp;&nbsp;&nbsp;<span style="background:#c0c0c0; font-size: 9pt"><b>wget http://csr.bu.edu/rina/grw-bu2016/nfv/OVS_files.tar.gz  <br></b> </span>
     114    &nbsp;&nbsp;&nbsp;<span style="background:#c0c0c0; font-size: 9pt"><b>tar -xvf OVS_files.tar.gz  <br></b> </span>
     115}}}
     116 
     117- 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.
     118{{{
     119#!html 
     120  &nbsp;&nbsp;&nbsp;<span style="background:#c0c0c0; font-size: 9pt" ><b>  nano port.config </b> </span> 
     121 }}}   
     122
     123- 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 '''[wiki:GENIExperimenter/Tutorials/NFV/DesignSetup Design/Setup]''' section of this tutorial. These values will tell the controller which interfaces are connected to VNF1 and VNF2.
     124{{{
     125#!html
     126<img src="http://csr.bu.edu/rina/grw-bu2016/tutorial_files/image042.gif" hspace=100>
     127 }}}
     128
     129'''[wiki:GENIExperimenter/Tutorials/NFV/Execute/LoadBalanceRR Experiment 1:  Load Balancing using Round Robin Control]'''[[BR]]
     130'''[wiki:GENIExperimenter/Tutorials/NFV/Execute/LoadBalancePI Experiment 2:  Load Balancing using Proportional Integral (PI) Control]'''
     131== [wiki:GENIExperimenter/Tutorials/NFV/Finish Next: Finish] ==
     132
     133
     134
     135----
     136Author: Nabeel Akhtar
     137
     138Supervised by: Ibrahim Matta
     139
     140Boston University