[nox-dev] nox-gui.py only shows one flow entry
Hi All, I am using nox-destiny branch and NEC IP8800 openflow-enabled switch. nox-gui.py only shows one flow entry information even though there are more than one flow entries on the openflow switch. And I found that it is because the openflow switch replied each flow statistics in individual packet. In other word, if there are two flow entries on the openflow switch, then two flow statistics reply messages are sent to NOX. Instead of putting two flow entries information in one flow statistics reply messages, it caused nox-gui.py always showing one flow entry result. Also, it is the same situation on port statistics request. nox-gui.py only shows one port information. The openflow spec doesn't restrict the openflow switch to put the whole statistics in ONE reply message. Any suggestion? Thanks, MinChi ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] nox-gui.py only shows one flow entry
Hi Kyriakos, Yes, with port stats request, NEC switch also send back one message per port. Actually, NEC switch uses flags (in ofp_stats_reply struct) to indicate if there is a subsequent message to statistics reply message. When there is a subsequent message to Statistics Reply message, 1 is set to the flags of the Statics Reply message. Otherwise, 0 is set. Then, I am trying to modify monitoring component in nox-destiny branch to merge the messages and send them to nox-gui as one. MinChi From: Kyriakos Zarifis [mailto:kyr.zari...@gmail.com] Sent: Tuesday, February 08, 2011 9:28 AM To: MinChi Tseng Cc: nox-dev@noxrepo.org Subject: Re: [nox-dev] nox-gui.py only shows one flow entry Hi MinChi, thanks for reporting this, we haven't actually had the chance to play around with a NEC switch and hadn't come across this so far. So just to clarify, when you request port stats, does the NEC switch send back one message per port? It looks like we should tweak it to multiplex the messages and parse/present them as one. On Mon, Feb 7, 2011 at 5:13 PM, MinChi Tseng min...@cht.com.twmailto:min...@cht.com.tw wrote: Hi All, I am using nox-destiny branch and NEC IP8800 openflow-enabled switch. nox-gui.py only shows one flow entry information even though there are more than one flow entries on the openflow switch. And I found that it is because the openflow switch replied each flow statistics in individual packet. In other word, if there are two flow entries on the openflow switch, then two flow statistics reply messages are sent to NOX. Instead of putting two flow entries information in one flow statistics reply messages, it caused nox-gui.py always showing one flow entry result. Also, it is the same situation on port statistics request. nox-gui.py only shows one port information. The openflow spec doesn't restrict the openflow switch to put the whole statistics in ONE reply message. Any suggestion? Thanks, MinChi ___ nox-dev mailing list nox-dev@noxrepo.orgmailto:nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] Installing flows by NOX
Hi Marcelo, There is a wildcards field on struct ofp_match. You should take care the wildcards field if you intend to ignore some fields. If no wildcards are set, it means exact match over the entire 11-tuple(10-tuple/12-tuple). Hope it helps Regards, MinChi -Original Message- From: nox-dev-boun...@noxrepo.org [mailto:nox-dev-boun...@noxrepo.org] On Behalf Of Marcelo Ribeiro Nascimento Sent: Monday, April 26, 2010 10:44 PM To: nox-dev@noxrepo.org Subject: [nox-dev] Installing flows by NOX Hi all, I have recently started working with NOX development and I am facing problems installing flows by NOX into switch table. I would like to install a flow to forward UDP packets with a specific IP destination address (i.e. 192.168.0.1) to controller. My problem is: I don't care about the others fields (vlanid, port_in, dl_src, dl_dst and so on), so how should I fill the struct ofp_match? My code is bellow: ofp_flow_mod* ofm; size_t size = sizeof *ofm + sizeof(ofp_action_output); boost::shared_arraychar raw_of(new char[size]); ofm = (ofp_flow_mod*) raw_of.get(); ofm-header.version = OFP_VERSION; ofm-header.type = OFPT_FLOW_MOD; ofm-header.length = htons(size); ofm-header.xid = 0; std::memset((ofm-match), 0, sizeof(struct ofp_match)); ofm-match.dl_type = ethernet::IP; /* IP Protocol*/ ofm-match.nw_proto = 0x11;/* UDP IP Protocol*/ ofm-match.nw_dst = inet_addr(192.168.0.1); /* Dest. IP Addr */ ofm-cookie = htonl(0); ofm-out_port = OFPP_NONE; ofm-command = htons(OFPFC_ADD); ofm-buffer_id = htonl(UINT32_MAX); ofm-idle_timeout = htons(OFP_FLOW_PERMANENT); ofm-hard_timeout = htons(OFP_FLOW_PERMANENT); ofm-priority = htons(OFP_DEFAULT_PRIORITY); ofm-flags = htons(ofd_flow_mod_flags()); ofp_action_output action = *((ofp_action_output*) ofm-actions); memset(action, 0, sizeof(ofp_action_output)); action.type = htons(OFPAT_OUTPUT); action.len = htons(sizeof(ofp_action_output)); action.port = htons(OFPP_CONTROLLER); action.max_len = htons(ETH_DATA_LEN); /*Send up to 1500 bytes*/ send_openflow_command(dj.datapath_id, ofm-header, true); This code doesn't work. That packets are forwarded to controller but with reason OFPR_NO_MATCH. NOX message: 00637|my_program|INFO:handle_packet_in: A packet has been received (port: 1, reason: 0, len=200, buf_size=128) The output of dpctl dump-flows command: #./dpctl dump-flows unix:/var/run/sp0.sock stats_reply (xid=0xd14d1b1c): flags=none type=1(flow) cookie=0, duration_sec=4s, duration_nsec=85700s, table_id=0, priority=65535, n_packets=0, n_bytes=0, idle_timeout=0, hard_timout=0, udp, in_port=0, dl_vlan=0, dl_vlan_pcp=0, dl_src=00:00:00:00:00:00, dl_dst=00:00:00:00:00:00,nw_src=0.0.0.0, nw_dst=192.168.0.1, nw_tos=0x00, tp_src=0, tp_dst=0, actions=CONTROLLER:1500 I think the problem is the fields filled with ZERO. When I set the flow by dpctl, it seems to work! But in this case I don't know how to specify max_len and ZERO bytes are sent to controller. #./dpctl add-flow unix:/var/run/dp0.sock dl_type=0x0800,nw_proto=0x11,nw_dst=192.168.0.1,actions=CONTROLLER #./dpctl dump-flows unix:/var/run/sp0.sock stats_reply (xid=0x96173c8e): flags=none type=1(flow) cookie=0, duration_src=2s, durations_nsec=8s, table_id=1, priority=32768, n_packets=0, n_bytes=0, idle_timoue=60, hard_timout=0, upd, nw_dst=192.168.0.1, actions=CONTROLLER:all Unlike the flow installed by NOX, here I have the fields that were specified only. NOX messages: 00463|my_program|INFO:handle_packet_in: A packet has been received (port: 1, reason: 1, len=200, buf_size=0) 00464|flow|ERR:Packet length 0 less than minimum Ethernet packet 14: port0100:vlan:pcp:0 mac00:00:00:00:00:00-00:00:00:00:00:00 proto ip0.0.0.0-0.0.0.0 port0-0 I would be very grateful for any help! Best Regards, Marcelo ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
[nox-dev] aggregate flow statistics always return 0
Hi all, I am using NOX Virtual Test Environment The topology is one OpenFlow switch and two hosts. Host 1 and host2 continually ping each other. In monitor component, the aggregate statistics always show 0. But, if I dump the aggregate statistics on OpenFlow switch, OpenFlow switch did print aggregate statistics which is non-zero. My question is why OpenFlow switch always returned 0 for aggregate stats to NOX. OpenFlow version is 0.8.9~1 NOX version is 0.6.0 On NOX, I issued: ./nox_core -v -i ptcp:2525 pyswitch monitor On OpenFlow, I issued: ./secchan nl:0 tcp:10.0.2.2:2525 = some NOX log message 00140|openflow-event|DBG:received stats reply from 002320c72f83 Table stats in from datapath 00:23:20:c7:2f:83 hash2 : 4 linear : 0 00141|openflow-event|DBG:received stats reply from 002320c72f83 Port stats in from datapath 00:23:20:c7:2f:83 0 : 167 1 : 165 00142|openflow-event|DBG:received stats reply from 002320c72f83 Aggregate stats in from datapath 00:23:20:c7:2f:83 {'packet_count': 0L, 'byte_count': 0L, 'flow_count': 0L} 00143|openflow-event|DBG:received stats reply from 002320c72f83 Table stats in from datapath 00:23:20:c7:2f:83 hash2 : 4 linear : 0 00144|openflow-event|DBG:received stats reply from 002320c72f83 Port stats in from datapath 00:23:20:c7:2f:83 0 : 173 1 : 171 00145|openflow-event|DBG:received stats reply from 002320c72f83 Aggregate stats in from datapath 00:23:20:c7:2f:83 {'packet_count': 0L, 'byte_count': 0L, 'flow_count': 0L} dump aggregate statistics from Openflow == hda:/cdrom# ./dpctl dump-aggregate nl:0 stats_reply (xid=0xbf8b2f94): flags=none type=2(aggregate) packet_count=310 byte_count=30380 flow_count=4 hda:/cdrom# ./dpctl dump-aggregate nl:0 stats_reply (xid=0xe7b9f769): flags=none type=2(aggregate) packet_count=318 byte_count=31164 flow_count=4 Thanks, MinChi ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] aggregate flow statistics always return 0
No, the OF is get via NOX Virtual Test Environment setup instruction. http://noxrepo.org/manual/vm_environment.html wget http://noxrepo.org/openflow_mod.ko wget http://noxrepo.org/dpctl wget http://noxrepo.org/secchan MinChi -Original Message- From: Martin Casado [mailto:cas...@nicira.com] Sent: Friday, January 15, 2010 2:34 PM To: MinChi Tseng Cc: nox-dev@noxrepo.org Subject: Re: [nox-dev] aggregate flow statistics always return 0 Are you using the OF reference code from Stanford? Hi all, I am using NOX Virtual Test Environment The topology is one OpenFlow switch and two hosts. Host 1 and host2 continually ping each other. In monitor component, the aggregate statistics always show 0. But, if I dump the aggregate statistics on OpenFlow switch, OpenFlow switch did print aggregate statistics which is non-zero. My question is why OpenFlow switch always returned 0 for aggregate stats to NOX. OpenFlow version is 0.8.9~1 NOX version is 0.6.0 On NOX, I issued: *./nox_core -v -i ptcp:2525 pyswitch monitor* On OpenFlow, I issued: *./secchan nl:0 tcp:10.0.2.2:2525 * = some NOX log message 00140|openflow-event|DBG:received stats reply from 002320c72f83 Table stats in from datapath 00:23:20:c7:2f:83 hash2 : 4 linear : 0 00141|openflow-event|DBG:received stats reply from 002320c72f83 Port stats in from datapath 00:23:20:c7:2f:83 0 : 167 1 : 165 00142|openflow-event|DBG:received stats reply from 002320c72f83 *Aggregate stats in from datapath 00:23:20:c7:2f:83* * {'packet_count': 0L, 'byte_count': 0L, 'flow_count': 0L}* 00143|openflow-event|DBG:received stats reply from 002320c72f83 Table stats in from datapath 00:23:20:c7:2f:83 hash2 : 4 linear : 0 00144|openflow-event|DBG:received stats reply from 002320c72f83 Port stats in from datapath 00:23:20:c7:2f:83 0 : 173 1 : 171 00145|openflow-event|DBG:received stats reply from 002320c72f83 *Aggregate stats in from datapath 00:23:20:c7:2f:83* * {'packet_count': 0L, 'byte_count': 0L, 'flow_count': 0L}* * * dump aggregate statistics from Openflow == hda:/cdrom# *./dpctl dump-aggregate nl:0* stats_reply (xid=0xbf8b2f94): flags=none type=2(aggregate) *packet_count=310 byte_count=30380 flow_count=4* hda:/cdrom# *./dpctl dump-aggregate nl:0* stats_reply (xid=0xe7b9f769): flags=none type=2(aggregate) *packet_count=318 byte_count=31164 flow_count=4* * * * * Thanks, MinChi ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] aggregate flow statistics always return 0
I am using monitor component in NOX. nox-0.6.0/src/noxcoreapps/examples/monitor.py = def aggregate_timer(self, dpid): flow = ofp_match() flow.wildcards = 0x self.ctxt.send_aggregate_stats_request(dpid, flow, 0xff) self.post_callback(MONITOR_TABLE_PERIOD, lambda : self.aggregate_timer(dpid)) Thanks, MinChi -Original Message- From: Martin Casado [mailto:cas...@nicira.com] Sent: Friday, January 15, 2010 3:16 PM To: MinChi Tseng Cc: nox-dev@noxrepo.org Subject: Re: [nox-dev] aggregate flow statistics always return 0 Can you paste the code which is doing the query? No, the OF is get via NOX Virtual Test Environment setup instruction. http://noxrepo.org/manual/vm_environment.html wget http://noxrepo.org/openflow_mod.ko wget http://noxrepo.org/dpctl wget http://noxrepo.org/secchan MinChi -Original Message- From: Martin Casado [mailto:cas...@nicira.com] Sent: Friday, January 15, 2010 2:34 PM To: MinChi Tseng Cc: nox-dev@noxrepo.org Subject: Re: [nox-dev] aggregate flow statistics always return 0 Are you using the OF reference code from Stanford? Hi all, I am using NOX Virtual Test Environment The topology is one OpenFlow switch and two hosts. Host 1 and host2 continually ping each other. In monitor component, the aggregate statistics always show 0. But, if I dump the aggregate statistics on OpenFlow switch, OpenFlow switch did print aggregate statistics which is non-zero. My question is why OpenFlow switch always returned 0 for aggregate stats to NOX. OpenFlow version is 0.8.9~1 NOX version is 0.6.0 On NOX, I issued: *./nox_core -v -i ptcp:2525 pyswitch monitor* On OpenFlow, I issued: *./secchan nl:0 tcp:10.0.2.2:2525 * = some NOX log message 00140|openflow-event|DBG:received stats reply from 002320c72f83 Table stats in from datapath 00:23:20:c7:2f:83 hash2 : 4 linear : 0 00141|openflow-event|DBG:received stats reply from 002320c72f83 Port stats in from datapath 00:23:20:c7:2f:83 0 : 167 1 : 165 00142|openflow-event|DBG:received stats reply from 002320c72f83 *Aggregate stats in from datapath 00:23:20:c7:2f:83* * {'packet_count': 0L, 'byte_count': 0L, 'flow_count': 0L}* 00143|openflow-event|DBG:received stats reply from 002320c72f83 Table stats in from datapath 00:23:20:c7:2f:83 hash2 : 4 linear : 0 00144|openflow-event|DBG:received stats reply from 002320c72f83 Port stats in from datapath 00:23:20:c7:2f:83 0 : 173 1 : 171 00145|openflow-event|DBG:received stats reply from 002320c72f83 *Aggregate stats in from datapath 00:23:20:c7:2f:83* * {'packet_count': 0L, 'byte_count': 0L, 'flow_count': 0L}* * * dump aggregate statistics from Openflow == hda:/cdrom# *./dpctl dump-aggregate nl:0* stats_reply (xid=0xbf8b2f94): flags=none type=2(aggregate) *packet_count=310 byte_count=30380 flow_count=4* hda:/cdrom# *./dpctl dump-aggregate nl:0* stats_reply (xid=0xe7b9f769): flags=none type=2(aggregate) *packet_count=318 byte_count=31164 flow_count=4* * * * * Thanks, MinChi ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] dhclient issue on Virtual Testing Environment
Hi all, I found the root cause. It is because my DNS setting is missing from /etc/resolve.conf. Then the “slirpvde –daemon –socket /path/vm/vde/ctls3 -dhcp” cannot be brought up successfully. As a result, the openflow1 cannot receive DHCPOFFER packet. After setting DNS back to /etc/resolve.conf, openflow1 works fine again. For your information! Regards, MinChi From: nox-dev-boun...@noxrepo.org [mailto:nox-dev-boun...@noxrepo.org] On Behalf Of MinChi Tseng Sent: Monday, November 09, 2009 4:10 PM To: nox-dev@noxrepo.org Subject: [nox-dev] dhclient issue on Virtual Testing Environment Hi, I am using http://noxrepo.org/manual/vm_environment.html instructions to setup virtual testing environment. It works fine. But now, when I applied “dhclient” on openflow1, there is no “DHCPOFFERS” received. I am not sure what I have done. The dhclient is not working now. Any idea? BTW, I am using Ubuntu 9.0.4 on VirtualBox Thanks!! Please refer to attached file for complete openflow1.log Here is the dhclient message = hda:/cdrom# dhclient Internet Systems Consortium DHCP Client V3.0.4 Copyright 2004-2006 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ eth2: link up, 100Mbps, full-duplex, lpa 0x05E1 eth1: link up, 100Mbps, full-duplex, lpa 0x05E1 eth0: link up, 100Mbps, full-duplex, lpa 0x05E1 Listening on LPF/eth2/50:54:00:00:00:04 Sending on LPF/eth2/50:54:00:00:00:04 Listening on LPF/eth1/50:54:00:00:00:03 Sending on LPF/eth1/50:54:00:00:00:03 Listening on LPF/eth0/50:54:00:00:00:02 Sending on LPF/eth0/50:54:00:00:00:02 Sending on Socket/fallback DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 7 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5 DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 4 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12 DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 6 DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 19 DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 7 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11 DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 11 DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 16 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 18 DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 15 DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 11 DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 15 DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 8 DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 10 No DHCPOFFERS received. No working leases in persistent database - sleeping. hda:/cdrom# -- 0:vdeq -- time-stamp -- 11月/09/09 15:20:43 -- -- 0:vdeq -- time-stamp -- 11月/09/09 15:54:09 – === Regards, MinChi ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org