Changes between Version 35 and Version 36 of GENIExperimenter/Tutorials/OpenFlowOVS-Floodlight/Execute
- Timestamp:
- 01/25/17 16:50:42 (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GENIExperimenter/Tutorials/OpenFlowOVS-Floodlight/Execute
v35 v36 208 208 209 209 We 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 212 214 curl -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 }}} 213 216 }}} 214 217 [[BR]] … … 269 272 4. Now, we insert the flow for a Port Forwarding Controller: 270 273 {{{ 274 #!div style="background: #ffd; border: 3px ridge; width: 800px;" 275 {{{ 276 #!sh 271 277 curl -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 272 278 }}} 279 }}} 273 280 274 281 275 282 5. 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. 276 283 {{{ 284 #!div style="background: #ffd; border: 3px ridge; width: 800px;" 285 {{{ 286 #!sh 277 287 curl -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 }}} 278 289 }}} 279 290 … … 300 311 3. Insert the following flow in the Controller terminal to implement a Server Proxy Controller: 301 312 {{{ 313 #!div style="background: #ffd; border: 3px ridge; width: 800px;" 314 {{{ 315 #!sh 302 316 curl -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 303 317 }}} 318 }}} 304 319 305 320 306 321 4. 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. 307 322 {{{ 323 #!div style="background: #ffd; border: 3px ridge; width: 800px;" 324 {{{ 325 #!sh 308 326 curl -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 309 327 328 }}} 310 329 }}} 311 330