Changes between Version 4 and Version 5 of JoeSandbox/OpenFlowOVS/Execute


Ignore:
Timestamp:
08/13/14 17:59:15 (5 years ago)
Author:
zwang@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • JoeSandbox/OpenFlowOVS/Execute

    v4 v5  
    274274Now 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.
    275275
    276   1. Under the `/tmp/ryu/ryu/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`. Use myPortForwarding.py to write your own port forwarding controller.
     276  1. Under the `/tmp/ryu/ryu/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 `port_forward.config`. Use myPortForwarding.py to write your own port forwarding controller.
    277277
    278278  2. To test your controller we are going to use netcat. Go to the two terminals of host2. In one terminal run:
     
    315315As 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.
    316316
    317   1. Under the `/tmp/pox/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 the configuration file `proxy.config`. Use myProxy.py to write your own proxy controller.
     317  1. Under the `/tmp/ryu/ryu/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 the configuration file `proxy.config`. Use myProxy.py to write your own proxy controller.
    318318
    319319  2. On the terminal of `host3` run a netcat server:
     
    322322  }}}
    323323
    324   3. On your controller host open the /tmp/pox/ext/myProxy.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.
     324  3. On your controller host open the /tmp/ryu/ryu/ext/myProxy.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.
    325325     * Is it enough to just change the IP address?
    326326     * Is it enough to just modify the TCP packets?
    327327
    328    If you want to see the solution, it's available in file /tmp/pox/ext/Proxy.py file. 
     328   If you want to see the solution, it's available in file /tmp/ryu/ryu/ext/Proxy.py file. 
    329329 
    330330  4. To test your proxy controller run:
    331331  {{{
    332   cd /tmp/pox
    333   ./pox.py --verbose myProxy
     332  cd /tmp/ryu
     333  PYTHONPATH=. ./bin/ryu-manager ryu/ext/Proxy.py
    334334  }}}
    335335