Changes between Version 53 and Version 54 of GEC16Agenda/OpenFlow/Instructions/Execute


Ignore:
Timestamp:
03/21/13 05:30:37 (6 years ago)
Author:
nriga@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC16Agenda/OpenFlow/Instructions/Execute

    v53 v54  
    209209Now let's do a slightly more complicated controller. OpenFlow gives you the power to overwrite fields of your packets at the switch, for example the TCP source or destination port and do port forwarding. You can have clients trying to contact a server at port 5000, and the OpenFlow switch can redirect your traffic to a service listening on port 6000.
    210210
    211 Under the `ext` directory there are two files PortForwarding.py and myPortForwarding.py that are similar like the previous exercise. Both of these controller are configured by a configuration file at `ext/port_forward.config`.
     211Under the `ext` directory there are two files !PortForwarding.py and myPortForwarding.py that are similar like the previous exercise. Both of these controller are configured by a configuration file at `ext/port_forward.config`.
    212212
    213213To run the controller do (while at /local/pox directory)
     
    241241
    242242== Run a server proxy Controller ==
     243As our last 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 and on a different port.
     244
     245Under the `ext` directory there are two files Proxy.py and myProxy.py that are similar like the previous exercise. Both of these controllers are configured by a configuration file at `ext/proxy.config`.
     246 
     247  1. On the terminal of `host3` run a netcat server:
     248  {{{
     249  nc -l 7000
     250  }}}
     251  2. 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.
     252     * Is it enough to just change the IP address?
     253     * Is it enough to just modify the TCP packets?
     254   If you want to see the solution, its in file server_deflection_sol.py file. 
     255  3. To test your controller run:
     256  {{{
     257  ./pox.py --verbose myProxy.py
     258  }}}
     259  6. Go back to the terminal of `host1` and try to connect to `host2` port 5000
     260  {{{
     261  nc 10.10.1.2 5000
     262  }}}
     263  If your controller works correctly you should see your text showing up on the terminal of `host3`.