Re: [pox-dev] How to get switch name set in Mininet in POX

2013-10-29 Thread Sulabh Bista
Thanks Murphy. That helped.

I noticed (with the dpctl show command in Mininet CLI) that two switches s1
and r1 have the same DPID. Should DPID be unique or is this behaviour ok?

I checked the source where dpid is being generated automatically and it
shows that the dpid is derived from the number in the switch's name. So, s1
and r1 has the same dpid '0001'.


On Tue, Oct 29, 2013 at 8:14 PM, Murphy McCauley
murphy.mccau...@gmail.comwrote:

 I don't think that switch name is communicated in a particularly direct
 way over OpenFlow.   That is, I don't think it's set as one of the fields
 in the switch stats or anything.  However, you can take advantage of the
 fact that this name is used as the name of the internal port on the
 switch, since port names are communicated from switch to controller.  Each
 OpenFlow Connection object attempts to keep track of the ports, so you just
 need to check the name of the internal port.  Try print
 event.connection.ports[of.OFPP_LOCAL].name in your packet handler.

 There may be configurations where this doesn't work, but one doesn't
 immediately come to mind (at least for OVS).

 For what it's worth, it's usually better to track switches by their DPID
 rather than a name.

 -- Murphy

 On Oct 29, 2013, at 4:55 PM, Sulabh Bista sul...@gmail.com wrote:

  Hello:
 
  I wanted to know if we can fetch the name assigned to an OVSwitch in
 Mininet in POX. I am listening to PacketIn event and found noting relating
 to the switch name in the 'event' object.
 
  I am new to all of this. Sorry if my question sounds too dumb.
 
  Regards,
  Sulabh Bista




Re: [pox-dev] How to get switch name set in Mininet in POX

2013-10-29 Thread Sulabh Bista
Thanks for the clarification.


On Tue, Oct 29, 2013 at 8:31 PM, Murphy McCauley
murphy.mccau...@gmail.comwrote:

 On Oct 29, 2013, at 5:23 PM, Sulabh Bista sul...@gmail.com wrote:

 Thanks Murphy. That helped.

 I noticed (with the dpctl show command in Mininet CLI) that two switches
 s1 and r1 have the same DPID. Should DPID be unique or is this behaviour ok?


 Nope, not okay.  They're supposed to be unique and it says so in the spec.

 I checked the source where dpid is being generated automatically and it
 shows that the dpid is derived from the number in the switch's name. So, s1
 and r1 has the same dpid '0001'.


 Yeah.  It's convenient to have them match up when it works out nicely
 (e.g., when all your switches are named s*).  When it doesn't work out
 nicely, it's just wrong.  You should override the default DPID selection.
  (And Mininet should really refuse to do this in the first place!)

 -- Murphy

 On Tue, Oct 29, 2013 at 8:14 PM, Murphy McCauley 
 murphy.mccau...@gmail.com wrote:

 I don't think that switch name is communicated in a particularly direct
 way over OpenFlow.   That is, I don't think it's set as one of the fields
 in the switch stats or anything.  However, you can take advantage of the
 fact that this name is used as the name of the internal port on the
 switch, since port names are communicated from switch to controller.  Each
 OpenFlow Connection object attempts to keep track of the ports, so you just
 need to check the name of the internal port.  Try print
 event.connection.ports[of.OFPP_LOCAL].name in your packet handler.

 There may be configurations where this doesn't work, but one doesn't
 immediately come to mind (at least for OVS).

 For what it's worth, it's usually better to track switches by their DPID
 rather than a name.

 -- Murphy

 On Oct 29, 2013, at 4:55 PM, Sulabh Bista sul...@gmail.com wrote:

  Hello:
 
  I wanted to know if we can fetch the name assigned to an OVSwitch in
 Mininet in POX. I am listening to PacketIn event and found noting relating
 to the switch name in the 'event' object.
 
  I am new to all of this. Sorry if my question sounds too dumb.
 
  Regards,
  Sulabh Bista






Re: [pox-dev] host unreachable

2013-11-13 Thread Sulabh Bista
You can start pox with layer 2 learning algorithm. Try this:
./pox.py forwarding.l2_learning




On Wed, Nov 13, 2013 at 1:42 PM, farshad tajedin
farshad.taje...@gmail.comwrote:

 hi
 when i run mininet by like sudo mn --controller remote and run
 ./pox.py and ping h2 from h1 i get destination host unreachable, while
 before it dose ping. can any body help me?

 --
 Best Regards

 Farshad Tajedin



Re: [pox-dev] TCP unreachability

2013-12-11 Thread Sulabh Bista
 input port % (dpid, inport, str(dstaddr)))


Looks like you missed the formatting symbols.

input port %s %s %s % (str(dpid), str(inport), str(dstaddr)))


Re: [pox-dev] Getting counter values in POX controller

2015-02-28 Thread Sulabh Bista
Hey,

A generic method would be:

   1. Requesting statistics from a switch (see:
   
https://openflow.stanford.edu/display/ONL/POX+Wiki#POXWiki-ofp_stats_request-Requestingstatisticsfromswitches
   )
   2. Listening to statistics events (see:
   https://openflow.stanford.edu/display/ONL/POX+Wiki#POXWiki-StatisticsEvents
   )

Hope it was helpful.


On Sat, Feb 28, 2015 at 2:25 PM, Sandesh Shrestha sande...@ualberta.ca
wrote:

 Dear All,

 Could you help me with getting the values of counters from open vswitch
 into the
 POX controller ie number of bytes sent per flow or per port.

 If there is any link where I can find that, can you please guide me to the
 link.


 Thanks,
 Sandesh Shrestha



Re: [pox-dev] Set Priority on Flow Rules

2015-06-28 Thread Sulabh Bista
You can find some clues in the documentation here:
https://openflow.stanford.edu/display/ONL/POX+Wiki#POXWiki-OpenFlowMessages

Straight from the documentation:
priority (int) - the priority at which a rule will match, higher numbers
higher priority. Note: Exact matches will have highest priority.

On Sun, Jun 28, 2015 at 8:12 PM, Talal Alharbi tal...@hotmail.com wrote:

 Dear All,

 I need to a high priority to the rules I would like to preformed first. I
 have tried different values but none of them work. Could you please advise
 me ?

 Cheers,
 Talal