Changes between Version 35 and Version 36 of GENIExperimenter/Tutorials/OpenFlowOVS-Floodlight/Execute


Ignore:
Timestamp:
01/25/17 16:50:42 (6 years ago)
Author:
pjayanth@bbn.com
Comment:

--

Legend:

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

    v35 v36  
    208208
    209209We are going to duplicate IPv4 traffic from Host1 destined to Host2 on Host3. Open a new ''Controller'' terminal and type the following flow:
    210 
    211 {{{
     210{{{
     211#!div style="background: #ffd; border: 3px ridge; width: 800px;"
     212{{{
     213#!sh
    212214curl -X POST -d '{"switch":"<DPID OF OPEN vSWITCH>","name":"flow-1","priority":"32768","in_port":"<PORT OF 10.0.0.1>","active":"true", "eth_type":"0x0800", "eth_src":"<MAC OF 10.0.0.1>", "eth_dst":"<MAC OF 10.0.0.2>",  "ipv4_src":"10.0.0.1", "ipv4_dst":"10.0.0.2", "actions":"set_field=eth_dst-><MAC OF 10.0.0.2>,set_field=ipv4_dst->10.0.0.2,output=<PORT OF 10.0.0.2>,set_field=eth_dst-><MAC OF 10.0.0.3>,output=<PORT OF 10.0.0.3>"}' http://localhost:8080/wm/staticflowpusher/json
     215}}}
    213216}}}
    214217    [[BR]]
     
    2692724. Now, we insert the flow for a Port Forwarding Controller:
    270273{{{
     274#!div style="background: #ffd; border: 3px ridge; width: 800px;"
     275{{{
     276#!sh
    271277curl -X POST -d '{"switch":"<DPID OF OPEN vSWITCH>","name":"flow-2","priority":"32768","in_port":"<PORT OF 10.0.0.1>","active":"true", "eth_type":"0x0800", "ip_proto":"0x06", "eth_src":"<MAC OF 10.0.0.1>", "eth_dst":"<MAC OF 10.0.0.2>", "tcp_dst":"5000", "ipv4_src":"10.0.0.1", "ipv4_dst":"10.0.0.2", "actions":"set_field=tcp_dst->6000,output=<PORT OF 10.0.0.2>"}' http://localhost:8080/wm/staticflowpusher/json
    272278}}}
     279}}}
    273280
    274281 
    2752825. In the previous step, we inserted a flow to forward TCP traffic  from Host1 destined to Host2 at port 5000 to port 6000. But Host1 still thinks it is speaking to Host2 at port 5000. So we need to insert a flow to handle traffic from Host2 Port 6000 for a seamless transition.
    276283{{{
     284#!div style="background: #ffd; border: 3px ridge; width: 800px;"
     285{{{
     286#!sh
    277287curl -X POST -d '{"switch":"<DPID OF OPEN vSWITCH>","name":"flow-3","priority":"32768","in_port":"<PORT OF 10.0.0.2>","active":"true", "eth_type":"0x0800", "ip_proto":"0x06", "eth_src":"<MAC OF 10.0.0.2>", "eth_dst":"<MAC OF 10.0.0.1>", "tcp_src":"6000", "ipv4_src":"10.0.0.2", "ipv4_dst":"10.0.0.1", "actions":"set_field=tcp_src->5000,output=<PORT OF 10.0.0.1>"}' http://localhost:8080/wm/staticflowpusher/json
     288}}}
    278289}}}
    279290
     
    3003113. Insert the following flow in the Controller terminal to implement a Server Proxy Controller:
    301312{{{
     313#!div style="background: #ffd; border: 3px ridge; width: 800px;"
     314{{{
     315#!sh
    302316curl -X POST -d '{"switch":"<DPID OF OPEN vSWITCH>","name":"flow-4","priority":"32768","in_port":"<PORT OF 10.0.0.1>","active":"true", "eth_type":"0x0800", "ip_proto":"0x06", "eth_src":"<MAC OF 10.0.0.1>", "eth_dst":"<MAC OF 10.0.0.2>", "tcp_dst":"5000", "ipv4_src":"10.0.0.1", "ipv4_dst":"10.0.0.2", "actions":"set_field=eth_dst-><MAC OF 10.0.0.3>,set_field=tcp_dst->6000,set_field=ipv4_dst->10.0.0.3,output=<PORT OF 10.0.0.3>"}' http://localhost:8080/wm/staticflowpusher/json
    303317}}}
     318}}}
    304319
    305320
    3063214. In the previous step, we inserted a flow to forward TCP traffic  from Host1 destined to Host2 at port 5000 to Host 3 at port 6000. But Host1 still thinks it is speaking to Host2 at port 5000. So we need to insert a flow to handle traffic from Host3 Port 6000 for a seamless transition.
    307322{{{
     323#!div style="background: #ffd; border: 3px ridge; width: 800px;"
     324{{{
     325#!sh
    308326curl -X POST -d '{"switch":"<DPID OF OPEN vSWITCH>","name":"flow-5","priority":"32768","in_port":"<PORT OF 10.0.0.3>","active":"true", "eth_type":"0x0800", "ip_proto":"0x06", "eth_src":"<MAC OF 10.0.0.3>", "eth_dst":"<MAC OF 10.0.0.1>", "tcp_src":"6000", "ipv4_src":"10.0.0.3", "ipv4_dst":"10.0.0.1", "actions":"set_field=eth_src-><MAC OF 10.0.0.2>,set_field=ipv4_src->10.0.0.2,set_field=tcp_src->5000,output=<PORT OF 10.0.0.1>"}' http://localhost:8080/wm/staticflowpusher/json
    309327
     328}}}
    310329}}}
    311330