Changes between Version 125 and Version 126 of GENIExperimenter/Tutorials/OpenFlowOVS/Execute
- Timestamp:
- 03/04/15 14:39:04 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GENIExperimenter/Tutorials/OpenFlowOVS/Execute
v125 v126 237 237 238 238 To see that duplication is happening, on the ovs host, run: 239 239 {{{ 240 240 sudo tcpdump -i <data_interface_name> [using the data_interface to host2] 241 241 sudo tcpdump -i <data_interface_name> [using the data_interface to host3] 242 242 }}} 243 243 244 244 You should see traffic from host1 to host2 showing up in the tcpdump window for host3. As a comparison, you will notice that no traffic shows up in that window when the controller is running the learning switch. … … 249 249 250 250 3. Run your newly written controller on the <data_interface_name> that corresponds to ''OVS:if2'' (which is connected to `host3`): 251 251 {{{ 252 252 cd /tmp/pox 253 253 ./pox.py --verbose myDuplicateTraffic --duplicate_port=<data_interface_name> 254 254 }}} 255 255 256 256 4. To test it go to the terminal of host1 and try to ping host2: 257 257 {{{ 258 258 ping 10.10.1.2 259 259 }}} 260 260 If your controller is working, your packets will register in both terminals running tcpdump. 261 261 262 262 5. Stop the POX controller: 263 263 {{{ 264 264 DEBUG:myDuplicateTraffic:Got a packet : [02:f1:ae:bb:e3:a8>02:c7:e8:a7:40:65 IP] 265 265 DEBUG:SimpleL2Learning:installing flow for 02:f1:ae:bb:e3:a8.2 -> 02:c7:e8:a7:40:65.[1, 2] … … 269 269 INFO:core:Down. 270 270 controller:/tmp/pox% 271 271 }}} 272 272 273 273 === 3d. Run a port forward Controller === … … 278 278 279 279 2. To test your controller we are going to use netcat. Go to the two terminals of host2. In one terminal run: 280 280 {{{ 281 281 nc -l 5000 282 282 }}} 283 283 284 284 and in the other terminal run 285 285 {{{ 286 286 nc -l 6000 287 287 }}} 288 288 289 289 3. Now, start the simple layer 2 forwarding controller. We are doing this to see what happens with a simple controller. 290 290 {{{ 291 291 cd /tmp/pox 292 292 ./pox.py --verbose forwarding.l2_learning 293 293 }}} 294 294 295 295 4. Go to the terminal of host1 and connect to host2 at port 5000: 296 296 {{{ 297 297 nc 10.10.1.2 5000 298 298 }}} 299 299 300 300 5. Type something and you should see it at the the terminal of host2 at port 5000. 301 301 302 302 6. Now, stop the simple layer 2 forwarding controller: 303 303 {{{ 304 304 DEBUG:forwarding.l2_learning:installing flow for 02:d4:15:ed:07:4e.3 -> 02:ff:be:1d:19:ea.2 305 305 ^C … … 308 308 INFO:core:Down. 309 309 controller:/tmp/pox% 310 310 }}} 311 311 312 312 7. And start your port forwarding controller: 313 313 {{{ 314 314 ./pox.py --verbose myPortForwarding 315 315 }}} 316 316 317 317 8. Repeat the netcat scenario described above. Now, your text should appear on the other terminal of host2 which is listening to port 6000. … … 319 319 320 320 9. Stop your port forwarding controller: 321 321 {{{ 322 322 DEBUG:myPortForwarding:Got a packet : [02:aa:a3:e8:6c:db>33:33:ff:e8:6c:db IPV6] 323 323 ^C … … 325 325 INFO:openflow.of_01:[36-63-8b-d7-16-4b 1] disconnected 326 326 INFO:core:Down. 327 327 }}} 328 328 329 329 === 3e. Run a Server Proxy Controller === … … 334 334 335 335 2. On the terminal of `host3` run a netcat server: 336 336 {{{ 337 337 nc -l 7000 338 338 }}} 339 339 340 340 3. On your controller host, open the /tmp/pox/ext/myProxy.py file, and edit it to implement a controller that will divert traffic destined for `host2` to `host3`. Before you start implementing think about what are the side effects of diverting traffic to a different host. … … 345 345 346 346 4. To test your proxy controller run: 347 347 {{{ 348 348 cd /tmp/pox 349 349 ./pox.py --verbose myProxy 350 350 }}} 351 351 352 352 353 353 5. Go back to the terminal of `host1` and try to connect netcat to `host2` port 5000 354 354 {{{ 355 355 nc 10.10.1.2 5000 356 356 }}} 357 357 358 358 6. If your controller works correctly, you should see your text showing up on the terminal of `host3`.