Changes between Version 52 and Version 53 of GEC16Agenda/OpenFlow/Instructions/Execute


Ignore:
Timestamp:
03/21/13 05:26:31 (11 years ago)
Author:
nriga@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC16Agenda/OpenFlow/Instructions/Execute

    v52 v53  
    207207
    208208== Run a port forward Controller ==
    209 In the above example we ran a very simple controller. The power of OpenFlow comes from the fact that you can decide to forward the packet anyway you want based on the supported OpenFlow actions.
     209Now 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.
     210
     211Under the `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`.
     212
     213To run the controller do (while at /local/pox directory)
     214    {{{
     215    ./pox.py --verbose myPortForwarding.py
     216    }}}
     217
     218To test your controller we are going to use netcat. Go to the two terminals of host2. In one terminal run:
     219{{{
     220nc -l 5000
     221}}}
     222
     223and in the other terminal run
     224{{{
     225nc -l 6000
     226}}}
     227
     228Now first start the simple layer 2 forwarding controller:
     229{{{
     230ovs:/local/pox% ./pox.py --verbose forwarding.l2_learning
     231}}}
     232
     233Go to the terminal of host1 and connect to host2 at port 5000:
     234{{{
     235nc 10.10.1.2 5000
     236}}}
     237   
     238Type something and you should see it at the the terminal of host2 at port 5000.
     239
     240Start your controller and do the same, now your text should appear on the other terminal of host2.
    210241
    211242== Run a server proxy Controller ==