Changes between Version 6 and Version 7 of GENIExperimenter/Tutorials/OpenFlowOVS-Floodlight/Execute


Ignore:
Timestamp:
10/30/16 22:36:53 (7 years ago)
Author:
pjayanth@bbn.com
Comment:

--

Legend:

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

    v6 v7  
    4444
    4545The output should look like this:
    46 {{{
    47 POX 0.1.0 (betta) / Copyright 2011-2013 James McCauley, et al.
    48 DEBUG:core:POX 0.1.0 (betta) going up...
    49 DEBUG:core:Running on CPython (2.7.3/Apr 20 2012 22:39:59)
    50 DEBUG:core:Platform is Linux-3.2.0-56-generic-x86_64-with-Ubuntu-12.04-precise
    51 INFO:core:POX 0.1.0 (betta) is up.
    52 DEBUG:openflow.of_01:Listening on 0.0.0.0:6633
    53 INFO:openflow.of_01:[9e-38-3e-8d-42-42 1] connected
    54 DEBUG:forwarding.l2_learning:Connection [9e-38-3e-8d-42-42 1]
    55 }}}
    56 
    57 
    58 {{{
    59 #!html
    60 
    61 <table id="Table_01" border="0" cellpadding="5" cellspacing="0">
    62     <tr>
    63         <td>
    64             <img src="http://trac.gpolab.bbn.com/gcf/raw-attachment/wiki/Graphics/4NotesIcon_512x512.png" width="50" height="50" alt="Note">
    65                </td>
    66 <td>In the event that you need to move the port of your controller, this is the command -
    67 <pre>
    68 sudo ./pox.py --verbose openflow.of_01 --port=443 forwarding.l2_learning
    69 </pre>
    70   Do not forget to tell the ovs switch that the controller will be listening on this new port, i.e change 6633 to 443 in Step 2c.
    71 </td>
    72         </tr>
    73 </table>
    74 }}}
     46
     47[[Image(GENIExperimenter/Tutorials/OpenFlowOVS-Floodlight/Execute:Open vSwitch.png, 50%)]]
    7548
    7649 3. In the terminal of `host1`, ping `host2`:
    7750{{{
    78 [experimenter@host1 ~]$ ping host2
    79 PING host2-lan1 (10.10.1.2) 56(84) bytes of data.
    80 From host1-lan0 (10.10.1.1) icmp_seq=2 Destination Host Unreachable
    81 From host1-lan0 (10.10.1.1) icmp_seq=3 Destination Host Unreachable
    82 From host1-lan0 (10.10.1.1) icmp_seq=4 Destination Host Unreachable
    83 64 bytes from host2-lan1 (10.10.1.2): icmp_req=5 ttl=64 time=23.9 ms
    84 64 bytes from host2-lan1 (10.10.1.2): icmp_req=6 ttl=64 time=0.717 ms
    85 64 bytes from host2-lan1 (10.10.1.2): icmp_req=7 ttl=64 time=0.654 ms
    86 64 bytes from host2-lan1 (10.10.1.2): icmp_req=8 ttl=64 time=0.723 ms
    87 64 bytes from host2-lan1 (10.10.1.2): icmp_req=9 ttl=64 time=0.596 ms
    88 }}}
    89 
    90   Now the ping should work.
    91 
    92   4. Go to your controller host and take a look at the print outs. You should see that your controller installed flows based on the mac addresses of your packets. 
    93 
    94 {{{
    95 #!html
    96 
    97 <table id="Table_01" border="0" cellpadding="5" cellspacing="0">
    98     <tr>
    99         <td>
    100             <img src="http://trac.gpolab.bbn.com/gcf/raw-attachment/wiki/Graphics/4NotesIcon_512x512.png" width="50" height="50" alt="Note">
    101                </td>
    102 <td>There is no way to get this information from the OpenFlow-capable hardware switch.
    103 </td>
    104         </tr>
    105 </table>
     51[pjayant@host1:~$ ping 10.0.0.2
     52PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
     5364 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=327 ms
     5464 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=23.2 ms
     5564 bytes from 10.0.0.2: icmp_seq=3 ttl=64 time=2.08 ms
     5664 bytes from 10.0.0.2: icmp_seq=4 ttl=64 time=1.71 ms
     5764 bytes from 10.0.0.2: icmp_seq=5 ttl=64 time=1.77 ms
     5864 bytes from 10.0.0.2: icmp_seq=6 ttl=64 time=1.74 ms
     5964 bytes from 10.0.0.2: icmp_seq=7 ttl=64 time=1.69 ms
     6064 bytes from 10.0.0.2: icmp_seq=8 ttl=64 time=1.55 ms
     6164 bytes from 10.0.0.2: icmp_seq=9 ttl=64 time=1.60 ms
     6264 bytes from 10.0.0.2: icmp_seq=10 ttl=64 time=1.67 ms
     6364 bytes from 10.0.0.2: icmp_seq=11 ttl=64 time=1.73 ms
     6464 bytes from 10.0.0.2: icmp_seq=12 ttl=64 time=1.50 ms
     6564 bytes from 10.0.0.2: icmp_seq=13 ttl=64 time=1.82 ms
     6664 bytes from 10.0.0.2: icmp_seq=14 ttl=64 time=1.69 ms
     67^C
     68--- 10.0.0.2 ping statistics ---
     6914 packets transmitted, 14 received, 0% packet loss, time 13019ms
     70rtt min/avg/max/mdev = 1.501/26.489/327.007/83.532 ms}}}
     71
     72  Now the ping should work. You can see that the time for the first ICMP packet is longer than the rest of the ICMP packets. This is because the Open vSwitch consults the controller the first time a packet-in event occurs. The controller then inserts the flow in the Open vSwitch and the switch consults this flow for further packet-in events.
     73
     74  4. Go to your Open vSwitch host and take a look at the flows. You should see that your controller installed flows based on the mac addresses of your packets. Enter the following command:
     75
     76{{{
     77pjayant@switch:~$ sudo ovs-ofctl dump-flows br0
     78NXST_FLOW reply (xid=0x4):
     79 cookie=0x20000005000000, duration=4.782s, table=0, n_packets=4, n_bytes=392, idle_timeout=5, idle_age=0, priority=1,ip,in_port=2,dl_src=02:55:0d:1e:32:8d,dl_dst=02:bd:52:92:0e:86,nw_src=10.0.0.2,nw_dst=10.0.0.1 actions=output:1
     80 cookie=0x20000004000000, duration=4.790s, table=0, n_packets=4, n_bytes=392, idle_timeout=5, idle_age=0, priority=1,ip,in_port=1,dl_src=02:bd:52:92:0e:86,dl_dst=02:55:0d:1e:32:8d,nw_src=10.0.0.1,nw_dst=10.0.0.2 actions=output:2
     81 cookie=0x0, duration=1275.644s, table=0, n_packets=6, n_bytes=512, idle_age=4, priority=0 actions=CONTROLLER:65535
     82
    10683}}}
    10784