Changes between Version 69 and Version 70 of GENIExperimenter/Tutorials/OpenFlowOVS/Execute
- Timestamp:
- 07/22/14 08:26:40 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GENIExperimenter/Tutorials/OpenFlowOVS/Execute
v69 v70 167 167 INFO:openflow.of_01:[3a-51-a1-ab-c3-43 1] disconnected 168 168 INFO:core:Down. 169 ovs:/local/pox%170 169 }}} 171 170 … … 191 190 192 191 In 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.192 These functions are locates at `/tmp/pox/ext/utils.py`, so while you write your controller consult this file for details. 194 193 195 194 Functions that are implemented include: … … 220 219 }}} 221 220 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: 223 222 224 223 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. … … 227 226 3. Run your newly written controller on the <data_interface_name> that corresponds to ''OVS:if2'' (which is connected to `host3`): 228 227 {{{ 229 cd / local/pox228 cd /tmp/pox 230 229 ./pox.py --verbose myDuplicateTraffic --duplicate_port=<data_interface_name> 231 230 }}} … … 245 244 INFO:openflow.of_01:[3a-51-a1-ab-c3-43 1] disconnected 246 245 INFO:core:Down. 247 ovs:/local/pox%246 controller:/tmp/pox% 248 247 }}} 249 248 … … 252 251 Now 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. 253 252 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. 255 254 256 255 2. To test your controller we are going to use netcat. Go to the two terminals of host2. In one terminal run: … … 266 265 3. Now, start the simple layer 2 forwarding controller. We are doing this to see what happens with a simple controller. 267 266 {{{ 268 cd / local/pox267 cd /tmp/pox 269 268 ./pox.py --verbose forwarding.l2_learning 270 269 }}} … … 284 283 INFO:openflow.of_01:[36-63-8b-d7-16-4b 1] disconnected 285 284 INFO:core:Down. 286 ovs:/local/pox%285 controller:/tmp/pox% 287 286 }}} 288 287 … … 302 301 INFO:openflow.of_01:[36-63-8b-d7-16-4b 1] disconnected 303 302 INFO:core:Down. 304 ovs:/local/pox%305 303 }}} 306 304 … … 316 314 }}} 317 315 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. 319 317 * Is it enough to just change the IP address? 320 318 * Is it enough to just modify the TCP packets? 321 319 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. 323 321 324 322 4. To test your proxy controller run: 325 323 {{{ 326 cd / local/pox324 cd /tmp/pox 327 325 ./pox.py --verbose myProxy 328 326 }}}