Changes between Version 4 and Version 5 of JoeSandbox/OpenFlowOVS/Execute
- Timestamp:
- 08/13/14 17:59:15 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
JoeSandbox/OpenFlowOVS/Execute
v4 v5 274 274 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. 275 275 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. 277 277 278 278 2. To test your controller we are going to use netcat. Go to the two terminals of host2. In one terminal run: … … 315 315 As 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. 316 316 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. 318 318 319 319 2. On the terminal of `host3` run a netcat server: … … 322 322 }}} 323 323 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. 325 325 * Is it enough to just change the IP address? 326 326 * Is it enough to just modify the TCP packets? 327 327 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. 329 329 330 330 4. To test your proxy controller run: 331 331 {{{ 332 cd /tmp/ pox333 ./pox.py --verbose myProxy332 cd /tmp/ryu 333 PYTHONPATH=. ./bin/ryu-manager ryu/ext/Proxy.py 334 334 }}} 335 335