Changes between Version 3 and Version 4 of JoeSandbox/OpenFlowOVS/Execute
- Timestamp:
- 08/13/14 17:57:09 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
JoeSandbox/OpenFlowOVS/Execute
v3 v4 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/ 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. 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: … … 287 287 288 288 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/ pox291 ./pox.py --verbose forwarding.l2_learning289 {{{ 290 cd /tmp/ryu 291 PYTHONPATH=. ./bin/ryu-manager ryu/ext/simple_switch.py 292 292 }}} 293 293 … … 299 299 5. Type something and you should see it at the the terminal of host2 at port 5000. 300 300 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`: 310 302 311 303 7. And start your port forwarding controller: 312 304 {{{ 313 ./pox.py --verbose myPortForwarding305 PYTHONPATH=. ./bin/ryu-manager ryu/ext/PortForwarding.py 314 306 }}} 315 307 … … 317 309 318 310 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. 327 312 328 313 === 3e. Run a Server Proxy Controller ===