[pox-dev] Forwarding L2 Learning Example Behavior
William Emmanuel S. Yu
wyu at ateneo.edu
Tue Sep 11 01:59:23 PDT 2012
Splendid. Obviously I don't know my JSON-RPC.
On the switch information, let me check the specification then.
Thanks!
"Sent on the move."
-----Original Message-----
From: Murphy McCauley <murphy.mccauley at gmail.com>
Date: Tue, 11 Sep 2012 01:11:47
To: William Emmanuel Yu<wyu at ateneo.edu>
Cc: <pox-dev at lists.noxrepo.org>
Subject: Re: [pox-dev] Forwarding L2 Learning Example Behavior
On Sep 11, 2012, at 12:54 AM, William Emmanuel Yu wrote:
> I am now running the webservices code from your fork. I was able to
> successfully run it as a hub using the example.
>
> curl -i -X POST -d '{"method":"set_table","params":{"dpid":
> "00-00-00-00-00-01","flows":[{"actions":[{"type":"OFPAT_OUTPUT",
> "port":"OFPP_ALL"}],"match":{}}]}}' http://127.0.0.1:8000/OF/
>
> However, for the other commands, I just get a blank.
This is by design. According to the JSON-RPC spec, you have to include an "id" key if you want a response. It's best if it's an integer. If you don't care about it, just drop id:0 in there. Try:
curl -i -X POST -d '{"method":"get_switches", "id":0}'
> On a note, do these refer to traffic
> that Packet_in to the controller right or do switches update these stats
> regularly? I presume the latter?
OpenFlow stats are kept by the switches. I don't remember if there are guarantees on how often they're updated. I think there might be. Should be in the spec. When the web service gets a request, it polls the switch before returning the response.
-- Murphy
>
> On Fri, 2012-09-07 at 00:12 -0700, Murphy McCauley wrote:
>> On Sep 7, 2012, at 12:03 AM, William Emmanuel Yu wrote:
>>
>>> I think I understand what you are saying. It does keep registered flows.
>>> Anyway, here is what I tested it on. Then I also did a version of hub
>>> that registered flow instead. Now when running iperf I can see the
>>> throughput difference between the hub and switch implementations. Hope
>>> its ok.
>>
>> This version doesn't suffer from the problem I was referring to because it installs exact-match rules (or something close), not MAC-only rules. It does this using ofp_match.from_packet().
>>
>>> On monitoring, I found your fork and am going to take a look at the
>>> webservices bit.
>>
>> It may not be the best example, but at least it shows how to create the packet, I think. It's openflow.webservice that I'm referring to.
>>
>> -- Murphy
>
> --
> -------------------------------------------------------
> William Emmanuel S. Yu, Ph.D. (杨怀义)
> Department of Information Systems and Computer Science
> Ateneo de Manila University
> email : wyu at ateneo dot edu
> blog : http://hip2b2.yutivo.org/
> web : http://CNG.ateneo.edu/cng/wyu/
> phone : +63(2)4266001 loc. 4186
> GPG : http://CNG.ateneo.net/cng/wyu/wyy.pgp
>
> Confidentiality Issue: This message is intended only for the use of the
> addressee and may contain information that is privileged and
> confidential. If you are not the intended recipient, you are hereby
> notified that any use or dissemination of this communication is strictly
> prohibited. If you have received this communication in error, please
> notify us immediately by reply and delete this message from your system.
>
More information about the pox-dev
mailing list