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

05/31/17 14:15:49 (2 years ago)
Nabeel Akhtar



  • GENIExperimenter/Tutorials/NFV/Pox/Execute

    v1 v1  
     1= [ NFV Tutorial: Managing a Virtual Network Function using SDN and Control Theory] =
     6<div style="text-align:center; width:495px; margin-left:auto; margin-right:auto;">
     7<img id="Image-Maps_5201305222028436" src="" 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="" alt="" title=""    />
     10<area shape="rect" coords="180,18,297,111" href="" alt="" title=""    />
     11<area shape="rect" coords="344,17,460,110" href="" alt="" title=""    />
     12<area shape="rect" coords="493,136,495,138" href="" alt="Image Map" title="Image Map" />
     14<!-- Image map text links - End - -->
     19= Part II: Execute =
     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.
     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.
     26Open the following windows:
     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.
     37== 2.     Configure and Initialize services ==
     39'''2.1. Use A Learning Switch Controller'''
     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  {{{
     45  <span style="background:#c0c0c0; font-size: 9pt" ><b> ping vnf1 -c 10 </b>
     46  </span> 
     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     {{{
     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 --verbose forwarding.l2_learning <br></b> </span>
     57       {{{
     59<table id="Table_02" width = "1150" border="0" cellpadding="0" cellspacing="10" align="center" >
     60 <tr>
     61<td> <img src = ""> </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>
     64 The output should look like this:
     65 {{{
     67<img src="" 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:
     73<img src="" 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.
     77     {{{
     79<table id="Table_02" width = "1100" border="0" cellpadding="0" cellspacing="10" align="center">
     80 <tr>
     81<td> <img src = ""> </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 ./ --verbose openflow.of_01 --port=443 forwarding.l2_learning</b> <br>
     85Then tell the ovs switch that the controller will be listening on this new port, i.e. change 6633 to 443: <br>
     87<span style="background:#c0c0c0; font-size: 9pt" ><b>sudo ovs-vsctl set-controller br0 tcp:&lt;controller_ip&gt;:443</b> </span> 
     89</td> </tr></table>
     93'''2.2 NFV OVS controller'''
     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.
     99<img src="" hspace=100>
     100 }}}
     102== 3.     Execute Experiments: ==
     104First we need to load the configuration files for the NFV !OpenFlow controller.
     106- We will first remove the default files for the controller and replace them with our controller files. Execute the following:
     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  <br></b> </span>
     114    &nbsp;&nbsp;&nbsp;<span style="background:#c0c0c0; font-size: 9pt"><b>tar -xvf OVS_files.tar.gz  <br></b> </span>
     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.
     120  &nbsp;&nbsp;&nbsp;<span style="background:#c0c0c0; font-size: 9pt" ><b>  nano port.config </b> </span> 
     121 }}}   
     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.
     126<img src="" hspace=100>
     127 }}}
     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] ==
     136Author: Nabeel Akhtar
     138Supervised by: Ibrahim Matta
     140Boston University