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


Ignore:
Timestamp:
08/13/14 17:57:09 (10 years ago)
Author:
zwang@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • JoeSandbox/OpenFlowOVS/Execute

    v3 v4  
    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/pox/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 `ext/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:
     
    287287
    288288  3. Now, start the simple layer 2 forwarding controller. We are doing this to see what happens with a simple controller.
    289   {{{
    290   cd /tmp/pox
    291   ./pox.py --verbose forwarding.l2_learning
     289   {{{
     290  cd /tmp/ryu
     291  PYTHONPATH=. ./bin/ryu-manager ryu/ext/simple_switch.py
    292292  }}}
    293293
     
    299299  5. Type something and you should see it at the the terminal of host2 at port 5000.
    300300
    301   6. Now, stop the simple layer 2 forwarding controller:
    302   {{{
    303   DEBUG:forwarding.l2_learning:installing flow for 02:d4:15:ed:07:4e.3 -> 02:ff:be:1d:19:ea.2
    304   ^C
    305   INFO:core:Going down...
    306   INFO:openflow.of_01:[36-63-8b-d7-16-4b 1] disconnected
    307   INFO:core:Down.
    308   controller:/tmp/pox%
    309   }}}
     301  6. Now, stop the simple layer 2 forwarding controller by `Ctrl-C`:
    310302
    311303  7. And start your port forwarding controller:
    312304  {{{
    313   ./pox.py --verbose myPortForwarding
     305  PYTHONPATH=. ./bin/ryu-manager ryu/ext/PortForwarding.py
    314306  }}}
    315307
     
    317309
    318310
    319   9. Stop your port forwarding controller:
    320   {{{
    321   DEBUG:myPortForwarding:Got a packet : [02:aa:a3:e8:6c:db>33:33:ff:e8:6c:db IPV6]
    322   ^C
    323   INFO:core:Going down...
    324   INFO:openflow.of_01:[36-63-8b-d7-16-4b 1] disconnected
    325   INFO:core:Down.
    326   }}}
     311  9. Stop your port forwarding controller.
    327312
    328313=== 3e. Run a Server Proxy Controller ===