Changes between Version 26 and Version 27 of GENIExperimenter/Tutorials/OpenFlowOVS/Execute


Ignore:
Timestamp:
09/20/13 14:29:10 (11 years ago)
Author:
lnevers@bbn.com
Comment:

--

Legend:

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

    v26 v27  
    6363
    6464=== 2c. Point your switch to a controller ===
     65
    6566An !OpenFlow switch will not forward any packet, unless instructed by a controller. Basically the forwarding table is empty, until an external controller inserts forwarding rules. The !OpenFlow controller communicates with the switch over the control network and it can be anywhere in the! Internet as long as it is reachable by the OVS host. For the purpose of this tutorial and in order to minimize the resources we have reserved we are going to run OpenFlow controller at the same host as the OVS switch. This is '''merely''' for convenience reasons, the controller could have been anywhere on the Internet.
    6667
     
    118119
    119120DEBUG:forwarding.l2_learning:installing flow for 02:c7:e8:a7:40:65.1 -> 02:f1:ae:bb:e3:a8.2
    120 ^C
     121 ^C
    121122INFO:core:Going down...
    122123INFO:openflow.of_01:[3a-51-a1-ab-c3-43 1] disconnected
     
    201202
    202203=== 3d. Run a port forward Controller ===
     204
    203205Now 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.
    204206
    205207Under the `/loca/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.
    206208
    207 To run the controller do (while at /local/pox directory)
    208 {{{
    209 ./pox.py --verbose myPortForwarding
    210 }}}
    211 
    212209To test your controller we are going to use netcat. Go to the two terminals of host2. In one terminal run:
    213210{{{
     
    220217}}}
    221218
    222 Now first start the simple layer 2 forwarding controller:
     219Now, first start the simple layer 2 forwarding controller:
    223220{{{
    224221./pox.py --verbose forwarding.l2_learning
     
    232229Type something and you should see it at the the terminal of host2 at port 5000.
    233230
    234 Start your controller and do the same, now your text should appear on the other terminal of host2.
     231Now stop the simple layer 2 forwarding controller:
     232{{{
     233DEBUG:forwarding.l2_learning:installing flow for 02:d4:15:ed:07:4e.3 -> 02:ff:be:1d:19:ea.2
     234 ^C
     235INFO:core:Going down...
     236INFO:openflow.of_01:[36-63-8b-d7-16-4b 1] disconnected
     237INFO:core:Down.
     238ovs:/local/pox%
     239}}}
     240
     241Now start your port forwarding controller:
     242{{{
     243./pox.py --verbose myPortForwarding
     244}}}
     245
     246Repeat the netcat scenario described above. Now, your text should appear on the other terminal of host2.
     247
     248
     249Stop your port forwarding controller:
     250{{{
     251DEBUG:myPortForwarding:Got a packet : [02:aa:a3:e8:6c:db>33:33:ff:e8:6c:db IPV6]
     252 ^C
     253INFO:core:Going down...
     254INFO:openflow.of_01:[36-63-8b-d7-16-4b 1] disconnected
     255INFO:core:Down.
     256ovs:/local/pox%
     257}}}
    235258
    236259=== 3e. Run a server proxy Controller ===
     260
    237261As 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.
    238262
     
    251275  ./pox.py --verbose myProxy
    252276  }}}
    253   6. Go back to the terminal of `host1` and try to connect to `host2` port 5000
     277  4. Go back to the terminal of `host1` and try to connect to `host2` port 5000
    254278  {{{
    255279  nc 10.10.1.2 5000