<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">On Nov 25, 2015, at 12:02 PM, Kostas Chartsias <<a href="mailto:kchartsias@yahoo.gr" class="">kchartsias@yahoo.gr</a>> wrote:<br class=""><div><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><div class=""><div style="background-color: rgb(255, 255, 255); font-family: 'times new roman', 'new york', times, serif; font-size: 16px;" class=""><div id="yui_3_16_0_1_1448479997978_3776" dir="ltr" class="">Fisrtly i know this is most likely a mininet question, but is there an easy way to define which port number is assigned to switch ports other than dpctl dump-flows??</div><div id="yui_3_16_0_1_1448479997978_3818" dir="ltr" class="">for example mininet links output for a switch with 3 hosts is <br class=""></div><div id="yui_3_16_0_1_1448479997978_3826" dir="ltr" class="">s1-eth1</div><div id="yui_3_16_0_1_1448479997978_3834" dir="ltr" class="">s2-ethe2</div><div id="yui_3_16_0_1_1448479997978_3835" dir="ltr" class="">s3-eth3</div><div id="yui_3_16_0_1_1448479997978_3862" dir="ltr" class=""><br class=""></div><div id="yui_3_16_0_1_1448479997978_3836" dir="ltr" class="">but the output numbers may be different thant 1,2,3 <br class=""></div><div id="yui_3_16_0_1_1448479997978_3837" dir="ltr" class="">(i'd like to try a loop topology with switches,so dpctl dump-flows won't be very helpfull cause of possible broadcast storms)<br class=""></div></div></div></div></blockquote><div><br class=""></div><div>Yes, you can do this.  IIRC, core.openflow.ports is a collection, and the values are OpenFlow port descriptions which contain the interface name as well as the OpenFlow port number.  Should be more on this in the manual.</div><div><br class=""></div><div>By the way, the openflow.discovery POX component demonstrates one way of detecting the topology (and therefore letting you avoid loops -- like the spanning_tree component does... which, incidentally, does not use the Spanning Tree Protocol at all).</div><div><br class=""></div><blockquote type="cite" class=""><div class=""><div class=""><div style="background-color: rgb(255, 255, 255); font-family: 'times new roman', 'new york', times, serif; font-size: 16px;" class=""><div id="yui_3_16_0_1_1448479997978_3891" dir="ltr" class="">Secondly is there a way to send a packet from a switch to anothr switch using dpid?</div><div id="yui_3_16_0_1_1448479997978_3899" dir="ltr" class="">trying to figure out a way to create static routes and i don't want to use spanning tree protocol</div></div></div></div></blockquote><div><br class=""></div><div>Well, there's a way to send a packet from a switch out of a port.  Whether this goes to another switch or not depends. :)</div><div><br class=""></div><div>I don't full understand your intended use at this point, but the simple answer is that you just create and send an ofp_packet_out from the switch in question.  There are multiple ways to do this, most of them require getting the switch's Connection object (which there are multiple ways to do; discussed in the manual).  There's also core.openflow.sendToDPID(), which just lets you send a message (e.g., an ofp_packet_out) to a specific switch.  The manual has various examples of this, and the discovery component does this to send the discovery messages that it uses to piece together the topology.</div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><div style="background-color: rgb(255, 255, 255); font-family: 'times new roman', 'new york', times, serif; font-size: 16px;" class=""><div id="yui_3_16_0_1_1448479997978_3907" dir="ltr" class="">Thanks in advance!<br class=""></div></div></div></div></blockquote></div><br class=""><div class="">-- Murphy</div></body></html>