Changes between Version 5 and Version 6 of GENIExperimenter/Tutorials/NSDI13/OpenFlowTutorial/Execute


Ignore:
Timestamp:
03/12/13 11:17:38 (11 years ago)
Author:
nriga@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIExperimenter/Tutorials/NSDI13/OpenFlowTutorial/Execute

    v5 v6  
    200200  nc -l 6000
    201201  }}}
     202  3. On your OVS host:
     203  {{{
     204  cd /tmp/pox/ext
     205  }}}
     206  4. Open the port_deflection.py file, and edit it to implement a controller that will change the port on the packets and deflect traffic to host2 port 5000 to host2 port 6000. If you want to see the solution, its in file port_deflection_sol.py file.
     207  5. Once you are done coding test your controller:
     208  {{{
     209  cd /tmp/pox
     210  }}}
     211  {{{
     212  pox.py port_deflection
     213  }}}
     214  6. Go back to the terminal of `host1` and try to connect to `host2` port 5000
     215  {{{
     216  nc 10.10.1.2 5000
     217  }}}
     218  If your controller works correctly you should see your text showing up on the terminal of `host2` port 6000.
     219
     220Congratulations, you wrote an OpenFlow controller!
    202221
    203222== Run a server deflection Controller ==
     223As a second exercise, instead of diverging the traffic to a different server running on the same host, we will diverge the traffic to a server running on a different host.
     224  1. Open a second terminal on `host3`
     225  2. On the terminal of `host3` run a netcat server:
     226  {{{
     227  nc -l 5000
     228  }}}
     229  3. On your OVS host open the server_deflection.py file, and edit it to implement a controller that will diverge traffic destined for `host2` to `host3`. Before you start implementing think about what are the side effects of diverging traffic to a different host.
     230     * Is it enough to just change the IP address?
     231     * Is it enough to just modify the TCP packets?
     232   If you want to see the solution, its in file server_deflection_sol.py file. 
     233  4. Once you are done coding test your controller:
     234  {{{
     235  cd /tmp/pox
     236  }}}
     237  {{{
     238  pox.py server_deflection
     239  }}}
     240  6. Go back to the terminal of `host1` and try to connect to `host2` port 5000
     241  {{{
     242  nc 10.10.1.2 5000
     243  }}}
     244  If your controller works correctly you should see your text showing up on the terminal of `host3`.
    204245
    205246= [wiki:GENIExperimenter/Tutorials/NSDI13/OpenFlowTutorial/Finish Next : Finish the experiment] =