[pox-dev] question about output ports

Murphy McCauley murphy.mccauley at gmail.com
Wed Nov 25 18:17:58 PST 2015


On Nov 25, 2015, at 12:02 PM, Kostas Chartsias <kchartsias at yahoo.gr> wrote:
> 
> 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??
> for example mininet links output for a switch with 3 hosts is 
> s1-eth1
> s2-ethe2
> s3-eth3
> 
> but the output numbers may be different thant 1,2,3 
> (i'd like to try a loop topology with switches,so dpctl dump-flows won't be very helpfull cause of possible broadcast storms)

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.

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).

> Secondly is there a way to send a packet from a switch to anothr switch using dpid?
> trying to figure out a way to create static routes and i don't want to use spanning tree protocol

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. :)

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.

> Thanks in advance!

-- Murphy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.noxrepo.org/pipermail/pox-dev-noxrepo.org/attachments/20151125/b313cb9b/attachment-0001.html>


More information about the pox-dev mailing list