[pox-dev] Forwarding L2 Learning Example Behavior

William Emmanuel Yu wyu at ateneo.edu
Tue Sep 11 00:54:20 PDT 2012


Hi,
  
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.

openflow at mininet-vm:~$ curl -i -X POST -d '{"method":"get_switches"}'
http://127.0.0.1:8000/OF/
HTTP/1.1 200 OK
Server: BaseHTTP/0.3 Python/2.7.2+
Date: Tue, 11 Sep 2012 07:34:13 GMT
Content-Type: application/json
Content-Length: 3

""

openflow at mininet-vm:~$ curl -i -X POST -d
'{"method":"get_switch_desc","params":{"dpid":"00-00-00-00-00-01"}}'
http://127.0.0.1:8000/OF/
HTTP/1.1 200 OK
Server: BaseHTTP/0.3 Python/2.7.2+
Date: Tue, 11 Sep 2012 07:32:32 GMT
Content-Type: application/json
Content-Length: 3

""

openflow at mininet-vm:~$ curl -i -X POST -d
'{"method":"get_flow_stats","params":{"dpid":"00-00-00-00-00-01"}}'
http://127.0.0.1:8000/OF/
HTTP/1.1 200 OK
Server: BaseHTTP/0.3 Python/2.7.2+
Date: Tue, 11 Sep 2012 07:35:37 GMT
Content-Type: application/json
Content-Length: 3

""

I ran this using:
./pox.py log.level --DEBUG openflow.webservice web.webcore

However, if I have the log.debug() display the contents of the query
then it does return an appropriate JSON message.

DEBUG:openflow.webservice:_exec_get_flow_stats: returns {'result':
{'flowstats': [{'packet_count': 0, 'hard_timeout': 0, 'byte_count': 0,
'duration_sec': 1, 'actions': [{'max_len': 0, 'type': 'OFPAT_OUTPUT',
'port': 'OFPP_ALL'}], 'duration_nsec': 808000000, 'priority': 32768,
'idle_timeout': 0, 'cookie': 0, 'table_id': 0, 'match': {'get_nw_dst':
'None', 'get_nw_src': 'None'}}], 'dpid': '00-00-00-00-00-01'}}

DEBUG:openflow.webservice:_exec_get_switches: returns [{'n_tables': 1,
'ports': [{'hw_addr': '72:e2:a0:dd:c4:e2', 'name': 's1-eth1', 'port_no':
1}, {'hw_addr': '0a:00:7f:e4:27:b6', 'name': 's1-eth2', 'port_no': 2},
{'hw_addr': '92:d3:95:bf:41:58', 'name': 's1-eth3', 'port_no': 3},
{'hw_addr': '00:23:20:ca:0d:10', 'name': 'dp0', 'port_no': 65534}],
'dpid': '00-00-00-00-00-01'}]

Must be something with the JSONRequestHandler stuff. But, now I know
what types of stats are available. 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?

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