<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Hello,</span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">My name is Amauri and I am a Master degree student at TU-Berlin. I'm developing an interface between a system (<a href="http://stratosphere.eu/" target="_blank">stratosphere.eu</a>) and POX in order to allow the system set flow on the fly in a fattree topology. I decided to use POX to test the concepts, so I have made all tutorial on mininet and implemented some basic controllers using POX. After that I created a component in POX which accepts commands from the client to set flows. The following is happening. When I set the flow using the client (using my component), the flow is installed fine (according to the command dpctl ), but the switch does not work. When I use the l2_pairs component, the same flow is set and everything works fine. Am I missing something? Here is the code and the logs for the tests. I appreciate any help.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Best regards</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
Amauri</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Code</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
<div>def setFlow(self, IP,outport,switch,macsrc,macdst):</div><div>        #find the connection for switch</div><div>        for conn in core.openflow.connections:</div><div>            id=dpid_to_str(conn.dpid)</div><div>
            if id in switch:        </div><div>                msg=of.ofp_flow_mod()</div><div>                #msg.priority=30000</div><div>                #msg.match.dl_type=0x8100</div><div>                #msg.match.nw_dst=IPAddr(IP)</div>
<div>                mcrc=EthAddr(macsrc)</div><div>                mcdst=EthAddr(macdst)</div><div>                msg.match.dl_src=mcrc</div><div>                msg.match.dl_dst=mcdst</div><div>                portout=int(outport)                </div>
<div>                msg.actions.append(of.ofp_action_output(port=portout))</div><div>                conn.send(msg)</div></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">Tests</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><div>#######</div><div>
#using manual flow setting - my code</div><div>#######</div><div><br></div><div>mininet@mininet-vm:~$ dpctl dump-flows tcp:<a href="http://127.0.0.1:6634/" target="_blank">127.0.0.1:6634</a></div><div>stats_reply (xid=0x49a204a7): flags=none type=1(flow)</div>
<div>mininet@mininet-vm:~$ dpctl dump-flows tcp:<a href="http://127.0.0.1:6634/" target="_blank">127.0.0.1:6634</a></div><div>stats_reply (xid=0x2c2ca5ce): flags=none type=1(flow)</div><div>  cookie=0, duration_sec=15s, duration_nsec=786000000s, table_id=0, priority=32768, n_packets=0, n_bytes=0, idle_timeout=0,hard_timeout=0,<b>dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,actions=output:2</b></div>
<div>  cookie=0, duration_sec=3s, duration_nsec=248000000s, table_id=0, priority=32768, n_packets=0, n_bytes=0, idle_timeout=0,hard_timeout=0,<b>dl_src=00:00:00:00:00:02,dl_dst=00:00:00:00:00:01,actions=output:1</b></div>
<div>mininet@mininet-vm:~$</div><div><br></div><div>#Testing ping</div><div><br></div><div>mininet> h1 ping h2</div><div>PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.</div><div>From 10.0.0.1 icmp_seq=1 Destination Host Unreachable</div>
<div>From 10.0.0.1 icmp_seq=2 Destination Host Unreachable</div><div>From 10.0.0.1 icmp_seq=3 Destination Host Unreachable</div><div>^C</div><div>--- 10.0.0.2 ping statistics ---</div><div>6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4999ms</div>
<div>pipe 3</div><div><br></div><div><br></div><div><br></div><div>#######</div><div>#using l2_pairs code</div><div>#######</div><div><br></div><div>mininet@mininet-vm:~$ dpctl dump-flows tcp:<a href="http://127.0.0.1:6634/" target="_blank">127.0.0.1:6634</a></div>
<div>stats_reply (xid=0xc38bf354): flags=none type=1(flow)</div><div>  cookie=0, duration_sec=7s, duration_nsec=415000000s, table_id=0, priority=32768, n_packets=5, n_bytes=434, idle_timeout=0,hard_timeout=0,<b>dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,actions=output:2</b></div>
<div>  cookie=0, duration_sec=7s, duration_nsec=377000000s, table_id=0, priority=32768, n_packets=6, n_bytes=476, idle_timeout=0,hard_timeout=0,<b>dl_src=00:00:00:00:00:02,dl_dst=00:00:00:00:00:01,actions=output:1</b></div>
<div>mininet@mininet-vm:~$</div><div><br></div><div>Testing ping</div><div><br></div><div>mininet>  h1 ping h2</div><div>PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.</div><div>64 bytes from <a href="http://10.0.0.2/" target="_blank">10.0.0.2</a>: icmp_req=1 ttl=64 time=1027 ms</div>
<div>64 bytes from <a href="http://10.0.0.2/" target="_blank">10.0.0.2</a>: icmp_req=2 ttl=64 time=17.5 ms</div><div>64 bytes from <a href="http://10.0.0.2/" target="_blank">10.0.0.2</a>: icmp_req=3 ttl=64 time=0.084 ms</div>
<div>64 bytes from <a href="http://10.0.0.2/" target="_blank">10.0.0.2</a>: icmp_req=4 ttl=64 time=0.080 ms</div><div>^C</div><div>--- 10.0.0.2 ping statistics ---</div><div>4 packets transmitted, 4 received, 0% packet loss, time 3010ms</div>
</div></div>