Changes between Version 125 and Version 126 of GENIExperimenter/Tutorials/OpenFlowOVS/Execute


Ignore:
Timestamp:
03/04/15 14:39:04 (9 years ago)
Author:
rrhain@bbn.com
Comment:

--

Legend:

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

    v125 v126  
    237237   
    238238  To see that duplication is happening, on the ovs host, run: 
    239   {{{
     239{{{
    240240sudo tcpdump -i <data_interface_name>  [using the data_interface to host2]
    241241sudo tcpdump -i <data_interface_name>  [using the data_interface to host3]
    242   }}}
     242}}}
    243243
    244244You 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.
     
    249249
    250250  3. Run your newly written controller on the <data_interface_name> that corresponds to ''OVS:if2'' (which is connected to `host3`): 
    251   {{{
     251{{{
    252252cd /tmp/pox
    253253./pox.py --verbose myDuplicateTraffic --duplicate_port=<data_interface_name>
    254   }}}
     254}}}
    255255   
    256256  4. To test it go to the terminal of host1 and try to ping host2:
    257   {{{
     257{{{
    258258ping 10.10.1.2
    259   }}}
     259}}}
    260260  If your controller is working, your packets will register in both terminals running tcpdump.
    261261
    262262  5. Stop the POX controller:
    263   {{{
     263{{{
    264264  DEBUG:myDuplicateTraffic:Got a packet : [02:f1:ae:bb:e3:a8>02:c7:e8:a7:40:65 IP]
    265265  DEBUG:SimpleL2Learning:installing flow for 02:f1:ae:bb:e3:a8.2 -> 02:c7:e8:a7:40:65.[1, 2]
     
    269269  INFO:core:Down.
    270270  controller:/tmp/pox%
    271   }}}
     271}}}
    272272
    273273=== 3d. Run a port forward Controller ===
     
    278278
    279279  2. To test your controller we are going to use netcat. Go to the two terminals of host2. In one terminal run:
    280   {{{
     280{{{
    281281nc -l 5000
    282   }}}
     282}}}
    283283
    284284  and in the other terminal run
    285   {{{
     285{{{
    286286nc -l 6000
    287   }}}
     287}}}
    288288
    289289  3. Now, start the simple layer 2 forwarding controller. We are doing this to see what happens with a simple controller.
    290   {{{
     290{{{
    291291cd /tmp/pox
    292292./pox.py --verbose forwarding.l2_learning
    293   }}}
     293}}}
    294294
    295295  4. Go to the terminal of host1 and connect to host2 at port 5000:
    296   {{{
     296{{{
    297297nc 10.10.1.2 5000
    298   }}}
     298}}}
    299299   
    300300  5. Type something and you should see it at the the terminal of host2 at port 5000.
    301301
    302302  6. Now, stop the simple layer 2 forwarding controller:
    303   {{{
     303{{{
    304304  DEBUG:forwarding.l2_learning:installing flow for 02:d4:15:ed:07:4e.3 -> 02:ff:be:1d:19:ea.2
    305305  ^C
     
    308308  INFO:core:Down.
    309309  controller:/tmp/pox%
    310   }}}
     310}}}
    311311
    312312  7. And start your port forwarding controller:
    313   {{{
     313{{{
    314314./pox.py --verbose myPortForwarding
    315   }}}
     315}}}
    316316
    317317  8. Repeat the netcat scenario described above. Now, your text should appear on the other terminal of host2 which is listening to port 6000.
     
    319319
    320320  9. Stop your port forwarding controller:
    321   {{{
     321{{{
    322322  DEBUG:myPortForwarding:Got a packet : [02:aa:a3:e8:6c:db>33:33:ff:e8:6c:db IPV6]
    323323  ^C
     
    325325  INFO:openflow.of_01:[36-63-8b-d7-16-4b 1] disconnected
    326326  INFO:core:Down.
    327   }}}
     327}}}
    328328
    329329=== 3e. Run a Server Proxy Controller ===
     
    334334
    335335  2. On the terminal of `host3` run a netcat server:
    336   {{{
     336{{{
    337337nc -l 7000
    338   }}}
     338}}}
    339339
    340340  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.
     
    345345 
    346346  4. To test your proxy controller run:
    347   {{{
     347{{{
    348348cd /tmp/pox
    349349./pox.py --verbose myProxy
    350   }}}
     350}}}
    351351
    352352
    353353  5. Go back to the terminal of `host1` and try to connect netcat to `host2` port 5000
    354   {{{
     354{{{
    355355nc 10.10.1.2 5000
    356   }}}
     356}}}
    357357
    358358  6. If your controller works correctly, you should see your text showing up on the terminal of `host3`.