Changes between Version 69 and Version 70 of GENIExperimenter/Tutorials/OpenFlowOVS/Execute


Ignore:
Timestamp:
07/22/14 08:26:40 (10 years ago)
Author:
nriga@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIExperimenter/Tutorials/OpenFlowOVS/Execute

    v69 v70  
    167167  INFO:openflow.of_01:[3a-51-a1-ab-c3-43 1] disconnected
    168168  INFO:core:Down.
    169   ovs:/local/pox%
    170169  }}}
    171170
     
    191190
    192191In order to make this first experience of writing controller easier, we wrote some helpful functions that will abstract some of the particularities of POX away.
    193 These functions are locates at `/local/pox/ext/utils.py`, so while you write your controller consult this file for details.
     192These functions are locates at `/tmp/pox/ext/utils.py`, so while you write your controller consult this file for details.
    194193
    195194Functions that are implemented include:
     
    220219  }}}
    221220
    222   2. In the other OVS host directory `/local/pox/ext` you would see two files:
     221  2. In the contorller host directory `/tmp/pox/ext` you would see two files:
    223222
    224223       i. myDuplicateTraffic.py : this is the file that has instructions about how to complete the missing information, go ahead and try to implement your first controller.
     
    227226  3. Run your newly written controller on the <data_interface_name> that corresponds to ''OVS:if2'' (which is connected to `host3`):
    228227  {{{
    229   cd /local/pox
     228  cd /tmp/pox
    230229  ./pox.py --verbose myDuplicateTraffic --duplicate_port=<data_interface_name>
    231230  }}}
     
    245244  INFO:openflow.of_01:[3a-51-a1-ab-c3-43 1] disconnected
    246245  INFO:core:Down.
    247   ovs:/local/pox%
     246  controller:/tmp/pox%
    248247  }}}
    249248
     
    252251Now 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.
    253252
    254   1. Under the `/local/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.
     253  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.
    255254
    256255  2. To test your controller we are going to use netcat. Go to the two terminals of host2. In one terminal run:
     
    266265  3. Now, start the simple layer 2 forwarding controller. We are doing this to see what happens with a simple controller.
    267266  {{{
    268   cd /local/pox
     267  cd /tmp/pox
    269268  ./pox.py --verbose forwarding.l2_learning
    270269  }}}
     
    284283  INFO:openflow.of_01:[36-63-8b-d7-16-4b 1] disconnected
    285284  INFO:core:Down.
    286   ovs:/local/pox%
     285  controller:/tmp/pox%
    287286  }}}
    288287
     
    302301  INFO:openflow.of_01:[36-63-8b-d7-16-4b 1] disconnected
    303302  INFO:core:Down.
    304   ovs:/local/pox%
    305303  }}}
    306304
     
    316314  }}}
    317315
    318   3. On your OVS host open the /local/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.
     316  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.
    319317     * Is it enough to just change the IP address?
    320318     * Is it enough to just modify the TCP packets?
    321319
    322    If you want to see the solution, it's available in file /local/pox/ext/Proxy.py file. 
     320   If you want to see the solution, it's available in file /tmp/pox/ext/Proxy.py file. 
    323321 
    324322  4. To test your proxy controller run:
    325323  {{{
    326   cd /local/pox
     324  cd /tmp/pox
    327325  ./pox.py --verbose myProxy
    328326  }}}