[nox-dev] For help

2012-03-01 Thread bbs
 Hi,
I want to let the packets send to the local machine, how could I write the 
command, and what is the output port?
actions = [[openflow.OFPAT_OUTPUT, [0, ?]]]

Thank you very much!

John
   
___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


Re: [nox-dev] For help

2012-03-01 Thread Murphy McCauley
I'm not clear on what you want to do…

What do you mean by the local machine?  The controller?
Where do you want to output them?  Out of an ethernet adapter?

-- Murphy

On Mar 1, 2012, at 2:43 AM, bbs wrote:

  Hi,
 I want to let the packets send to the local machine, how could I write 
 the command, and what is the output port? 
 actions = [[openflow.OFPAT_OUTPUT, [0, ?]]]
 
 Thank you very much!
 
 John
 
 
 
 ___
 nox-dev mailing list
 nox-dev@noxrepo.org
 http://noxrepo.org/mailman/listinfo/nox-dev

___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


Re: [nox-dev] For help

2012-03-01 Thread bbs
Hi,
I am writing a component for the nox controller, which can guid the 
openflow-switch to decide which port to send the packets. But, when I want the 
packet to be sent to the local port in the openflow-switch, I didn't know how 
to write the actions list( using python),  Is the following  right?
  actions = [[openflow.OFPAT_OUTPUT, [0, OFPP_LOCAL]]]

Thank you for your replay!

John



在 2012-03-01 21:54:23,Murphy McCauley jam...@nau.edu 写道:

I'm not clear on what you want to do…


What do you mean by the local machine?  The controller?
Where do you want to output them?  Out of an ethernet adapter?


-- Murphy


On Mar 1, 2012, at 2:43 AM, bbs wrote:


 Hi,
I want to let the packets send to the local machine, how could I write the 
command, and what is the output port?
actions = [[openflow.OFPAT_OUTPUT, [0, ?]]]

Thank you very much!

John
   



___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


Re: [nox-dev] For help

2012-03-01 Thread Murphy McCauley
Yeah, I think that looks right.

-- Murphy

On Mar 1, 2012, at 7:26 AM, bbs wrote:

 Hi,
 I am writing a component for the nox controller, which can guid the 
 openflow-switch to decide which port to send the packets. But, when I want 
 the packet to be sent to the local port in the openflow-switch, I didn't 
 know how to write the actions list( using python),  Is the following  right?
   actions = [[openflow.OFPAT_OUTPUT, [0, OFPP_LOCAL]]]
 
 Thank you for your replay!
 
 John
 
 
 在 2012-03-01 21:54:23,Murphy McCauley jam...@nau.edu 写道:
 I'm not clear on what you want to do…
 
 What do you mean by the local machine?  The controller?
 Where do you want to output them?  Out of an ethernet adapter?
 
 -- Murphy
 
 On Mar 1, 2012, at 2:43 AM, bbs wrote:
 
  Hi,
 I want to let the packets send to the local machine, how could I write 
 the command, and what is the output port? 
 actions = [[openflow.OFPAT_OUTPUT, [0, ?]]]
 
 Thank you very much!
 
 John
 
 
 
 ___
 nox-dev mailing list
 nox-dev@noxrepo.org
 http://noxrepo.org/mailman/listinfo/nox-dev
 
 
 

___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


Re: [nox-dev] FW: Help: LAVI and NOX's nox-gui.py

2011-12-05 Thread Aaron Rosen
Anyone know if you can obtain the host information via json?

(sorry for re-post I didn't want my question to get overlooked in the
middle here).

Thanks,

Aaron

On Sun, Dec 4, 2011 at 3:16 PM, Aaron Rosen aro...@clemson.edu wrote:
 Hi, I'm curious about how to get these hosts via lavi.

 I've tried running:

  ./nox_core  -i ptcp:6633 jsonmessenger=tcpport=11222,sslport=0
 lavi_switches lavi_swlinks   lavi_host2sw pyswitch trackhost_pktin

 Then using nox-console with:

 python nox-console.py -n localhost -p 11222 getnodes all

 Though, that doesn't seem to return anything with hosts. How do I get
 this information?

 Thanks,

 Aaron

 On Fri, Dec 2, 2011 at 2:29 PM, Kyriakos Zarifis kyr.zari...@gmail.com 
 wrote:
 Oh, also, there is one component that is responsible for tracking host
 traffic, and that's what feeds the host information to LAVI and eventually
 to the GUI
 I can't remember if it is there as a dependency, so you might need to run
 that manually. I think the name is trackhost_pktin (can't check right now
 unfortunately). So maybe try adding that too after monitoring and
 pyswitch ?

 On Fri, Dec 2, 2011 at 11:24 AM, Kyriakos Zarifis kyr.zari...@gmail.com
 wrote:

 Hi,

 the hosts should appear when they talk to the network. Did you try
 generating some traffic? A simple ping should do it

 (btw, I think lavi is not required as an argument as IIRC it's a
 dependency of monitoring anyway)

 On Fri, Dec 2, 2011 at 1:21 AM, ztom switch@hotmail.com wrote:


 Hi~ alls,
 I used LAVI and nox-gui.py(another front-end as ENVI), and tested some
 cases with NOX and openvswitch, one switch links to one host,  my cmd is $
 ./nox_core -v -i ptcp:6633 monitoring pyswitch lavi , but there's no host
 icon and hs2sw link in nox-gui's view, just swicth icon.  Could someone 
 help
 me...

 ---
 thanks a lot

 ___
 nox-dev mailing list
 nox-dev@noxrepo.org
 http://noxrepo.org/mailman/listinfo/nox-dev




 ___
 nox-dev mailing list
 nox-dev@noxrepo.org
 http://noxrepo.org/mailman/listinfo/nox-dev




 --
 Aaron O. Rosen
 Masters Student - Network Communication
 306B Fluor Daniel



-- 
Aaron O. Rosen
Masters Student - Network Communication
306B Fluor Daniel
___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


[nox-dev] FW: Help: LAVI and NOX's nox-gui.py

2011-12-02 Thread ztom


Hi~ alls,
I used LAVI and nox-gui.py(another front-end as ENVI), and 
tested some cases with NOX and openvswitch, one switch links to one 
host,  my cmd is $ ./nox_core -v -i ptcp:6633 monitoring pyswitch lavi 
, but there's no host icon and hs2sw link in nox-gui's view, just 
swicth icon.  Could someone help me...

---
thanks a lot
  ___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


Re: [nox-dev] FW: Help: LAVI and NOX's nox-gui.py

2011-12-02 Thread Kyriakos Zarifis
Hi,

the hosts should appear when they talk to the network. Did you try
generating some traffic? A simple ping should do it

(btw, I think lavi is not required as an argument as IIRC it's a
dependency of monitoring anyway)

On Fri, Dec 2, 2011 at 1:21 AM, ztom switch@hotmail.com wrote:


 Hi~ alls,
 I used LAVI and nox-gui.py(another front-end as ENVI), and tested some
 cases with NOX and openvswitch, one switch links to one host,  my cmd is $
 ./nox_core -v -i ptcp:6633 monitoring pyswitch lavi , but there's no host
 icon and hs2sw link in nox-gui's view, just swicth icon.  Could someone
 help me...

 ---
 thanks a lot

 ___
 nox-dev mailing list
 nox-dev@noxrepo.org
 http://noxrepo.org/mailman/listinfo/nox-dev


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


Re: [nox-dev] FW: Help: LAVI and NOX's nox-gui.py

2011-12-02 Thread Kyriakos Zarifis
Oh, also, there is one component that is responsible for tracking host
traffic, and that's what feeds the host information to LAVI and eventually
to the GUI
I can't remember if it is there as a dependency, so you might need to run
that manually. I think the name is trackhost_pktin (can't check right now
unfortunately). So maybe try adding that too after monitoring and
pyswitch ?

On Fri, Dec 2, 2011 at 11:24 AM, Kyriakos Zarifis kyr.zari...@gmail.comwrote:

 Hi,

 the hosts should appear when they talk to the network. Did you try
 generating some traffic? A simple ping should do it

 (btw, I think lavi is not required as an argument as IIRC it's a
 dependency of monitoring anyway)

 On Fri, Dec 2, 2011 at 1:21 AM, ztom switch@hotmail.com wrote:


 Hi~ alls,
 I used LAVI and nox-gui.py(another front-end as ENVI), and tested some
 cases with NOX and openvswitch, one switch links to one host,  my cmd is $
 ./nox_core -v -i ptcp:6633 monitoring pyswitch lavi , but there's no host
 icon and hs2sw link in nox-gui's view, just swicth icon.  Could someone
 help me...

 ---
 thanks a lot

 ___
 nox-dev mailing list
 nox-dev@noxrepo.org
 http://noxrepo.org/mailman/listinfo/nox-dev



___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


Re: [nox-dev] Need help

2011-08-16 Thread Surendran P
ok. Thanks.

On Tue, Aug 16, 2011 at 8:56 PM, Murphy McCauley jam...@nau.edu wrote:

 Hi.

 This list is mostly for questions directly related to NOX.  I think your
 question is probably a better fit for openflow-discuss.
 https://mailman.stanford.edu/mailman/listinfo/openflow-discuss

 -- Murphy

 On Aug 16, 2011, at 7:50 AM, Surendran P wrote:

  Hello People,
 I am new to this group and Open Flow. Hence, started learning stuffs
 about Nox. so, got some doubts.
  To begin with, could someone please guide me on how Open Flow could be
 implemented on packet core networks ? say for eg if im interested with gtp
 packets.
  I know it is a huge topic to discuss. but it will be helpful for me if
 someone can help me. :)
 
  Thanks,
  Surendran


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


Re: [nox-dev] Install_datapath_flow help

2011-06-17 Thread Giorgio Mazza
Thank you very much Murphy,  your hint about the  OFPAT_SET_NW_SRC and 
OFPAT_SET_NW_DST really helps me, because I am still a bit confused on 
how to set rule parameters I want to insert into the switch's table.
In particular, I am trying to learn how to pass all the parameters I 
would need in the future to install particular flow-entry.
Unfortunately, for the moment, I did not understand if I have to specify 
them into the attrs dictionary I pass to the install_datapath_flow 
function and use a simple action list (with the OFPAT_OUTPUT action), of 
if I have to put them into the action list. Could someone please help me?


However, now I am trying to solve the ILLEGAL and ERROR problem, because 
I get it also without sending traffic between the two hosts, but just 
when the switch joins the network. Maybe solving this problem would help 
me also in inserting the entry properly.

Thank you very much.
Regards,
Giorgio


 Il 16/06/2011 21:01, Murphy McCauley ha scritto:

Just a couple quick observations to help you get started here:

If this flow is static, you shouldn't need to wait for a packet_in to install
it.  You should be able to install it proactively when the switch connects
(aka when the datapath joins).

The OFPAT_SET_NW_SRC and OFPAT_SET_NW_DST actions *change the addresses in the
packet*.  But you're already setting the flow to only match these same
addresses.  So there's no point changing them.

Your switch seems to think something is ILLEGAL and is sending an ERROR
before it even gets the flow_mod from install_datapath_flow().  You might want
to know what this is.  Additionally, it might help to actually look at the
flow_mod that gets sent to see if it's sensible.  For both of these, the
easiest thing to do is probably install the OpenFlow WireShark plugin and
watch the traffic on the wire.

Hope something in there helps. :)

-- Murphy

On Thursday, June 16, 2011 08:34:22 AM Giorgio Mazza wrote:

Hi,
I'm new in NOX and python and, to start, I am trying to write a simple
component that inserts a static entry in the switch flow-table.
To handle the packet-in event, I wrote this code, in order to send out
of port 25 all the packets arriving from port 26 (these are the two port
connected with my hosts).

  def packet_in_callback(self,dp_id, inport, ofp_reason,
total_frame_len, buffer_id, captured_data):
  if inport == 26:
  outport = 25
  dp_id = 1
  attrs = { core.IN_PORT : 26,
core.DL_TYPE :
ethernet.ethernet.IP_TYPE,
core.NW_PROTO :
ipv4.ipv4.UDP_PROTOCOL,
core.NW_SRC : '192.168.1.3',
core.NW_DST : '192.168.1.2' }
  idle_timeout = openflow.OFP_FLOW_PERMANENT
  hard_timeout = openflow.OFP_FLOW_PERMANENT
  actions = [[openflow.OFPAT_SET_NW_SRC,
attrs[core.NW_SRC]],[openflow.OFPAT_SET_NW_DST, attrs[core.NW_DST]],
[openflow.OFPAT_OUTPUT, [0,
outport]]]
  self.install_datapath_flow(dp_id,
 attrs,

idle_timeout,

hard_timeout,

actions)

  return CONTINUE
  return CONTINUE


To test my configuration I generate some UDP traffic from host
192.168.1.3 (connected to switch's port 26) to host 192.168.1.2
(connected to port 25), but I didn't receive anything.
All my packets, instead of going to the second host, were sent to the
controller, as if it was no entry in the table.
So, I checked the OF table and I saw that there was an entry with
in_port  = 26 and noout_port  field.
Looking at the controller-session, from the switch side, I saw these
messages:


02:47:12.833936 OFS( 1) SENT192.168.0.31.6633 : HELLO
02:47:12.844890 OFS( 1) RECV192.168.0.31.6633 : HELLO
02:47:12.856572 OFS( 1) RECV192.168.0.31.6633 : FEATURES_REQUEST
02:47:12.860060 OFS( 1) SENT192.168.0.31.6633 : FEATURES_REPLY
02:47:12.863689 OFS( 1) RECV192.168.0.31.6633 : SET_CONFIG
02:47:12.868494 OFS( 1) RECV192.168.0.31.6633 : ILLEGAL
02:47:12.868531 OFS( 1) SENT192.168.0.31.6633 : ERROR
02:47:12.871919 OFS( 1) RECV192.168.0.31.6633 : FLOW_MOD
02:47:13.611462 OFS( 1) SENT192.168.0.31.6633 : PACKET_IN
02:47:13.613926 OFS( 1) RECV192.168.0.31.6633 : FLOW_MOD


Could someone please explain to me where I am wrong in the code, so that
I get these illegal and error messages and I am not able to make the
switch has the desired behaviour?
Sorry for bothering with dummy questions.
Thanks a lot.
Regards,
Giorgio


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


Re: [nox-dev] Install_datapath_flow help

2011-06-17 Thread Murphy McCauley
Things in the attrs dictionary describe packets you want to operate on (attrs 
eventually becomes an ofp_match, essentially).  If you want to operate on all 
UDP traffic from a specific source IP address, for example, you would describe 
that here.

The actions list, on the other hand, says what you want to DO with packets 
that match the description given in attrs.  For example, you may want to send 
them all out a certain port (probably the most common case), or you may want 
to change their IP or ethernet addresses or something else more exotic.

Hope that helps.

-- Murphy

On Friday, June 17, 2011 02:25:36 AM Giorgio Mazza wrote:
 Thank you very much Murphy,  your hint about the  OFPAT_SET_NW_SRC and
 OFPAT_SET_NW_DST really helps me, because I am still a bit confused on
 how to set rule parameters I want to insert into the switch's table.
 In particular, I am trying to learn how to pass all the parameters I
 would need in the future to install particular flow-entry.
 Unfortunately, for the moment, I did not understand if I have to specify
 them into the attrs dictionary I pass to the install_datapath_flow
 function and use a simple action list (with the OFPAT_OUTPUT action), of
 if I have to put them into the action list. Could someone please help me?
 
 However, now I am trying to solve the ILLEGAL and ERROR problem, because
 I get it also without sending traffic between the two hosts, but just
 when the switch joins the network. Maybe solving this problem would help
 me also in inserting the entry properly.
 Thank you very much.
 Regards,
 Giorgio
 
   Il 16/06/2011 21:01, Murphy McCauley ha scritto:
  Just a couple quick observations to help you get started here:
  
  If this flow is static, you shouldn't need to wait for a packet_in to
  install it.  You should be able to install it proactively when the
  switch connects (aka when the datapath joins).
  
  The OFPAT_SET_NW_SRC and OFPAT_SET_NW_DST actions *change the addresses
  in the packet*.  But you're already setting the flow to only match these
  same addresses.  So there's no point changing them.
  
  Your switch seems to think something is ILLEGAL and is sending an
  ERROR before it even gets the flow_mod from install_datapath_flow(). 
  You might want to know what this is.  Additionally, it might help to
  actually look at the flow_mod that gets sent to see if it's sensible. 
  For both of these, the easiest thing to do is probably install the
  OpenFlow WireShark plugin and watch the traffic on the wire.
  
  Hope something in there helps. :)
  
  -- Murphy
  
  On Thursday, June 16, 2011 08:34:22 AM Giorgio Mazza wrote:
  Hi,
  I'm new in NOX and python and, to start, I am trying to write a simple
  component that inserts a static entry in the switch flow-table.
  To handle the packet-in event, I wrote this code, in order to send out
  of port 25 all the packets arriving from port 26 (these are the two port
  connected with my hosts).
  
def packet_in_callback(self,dp_id, inport, ofp_reason,
  
  total_frame_len, buffer_id, captured_data):
if inport == 26:
outport = 25
dp_id = 1
attrs = { core.IN_PORT : 26,

  core.DL_TYPE :
  ethernet.ethernet.IP_TYPE,
  
  core.NW_PROTO :
  ipv4.ipv4.UDP_PROTOCOL,
  
  core.NW_SRC : '192.168.1.3',
  core.NW_DST : '192.168.1.2' }

idle_timeout = openflow.OFP_FLOW_PERMANENT
hard_timeout = openflow.OFP_FLOW_PERMANENT
actions = [[openflow.OFPAT_SET_NW_SRC,
  
  attrs[core.NW_SRC]],[openflow.OFPAT_SET_NW_DST, attrs[core.NW_DST]],
  
  [openflow.OFPAT_OUTPUT, [0,
  
  outport]]]
  
self.install_datapath_flow(dp_id,

   
attrs,
  
  idle_timeout,
  
  hard_timeout,
  
  actions)
  
return CONTINUE

return CONTINUE
  
  To test my configuration I generate some UDP traffic from host
  192.168.1.3 (connected to switch's port 26) to host 192.168.1.2
  (connected to port 25), but I didn't receive anything.
  All my packets, instead of going to the second host, were sent to the
  controller, as if it was no entry in the table.
  So, I checked the OF table and I saw that there was an entry with
  in_port  = 26 and noout_port  field.
  Looking at the controller-session, from the switch side, I saw these
  messages:
  
  
  02:47:12.833936 OFS( 1) SENT192.168.0.31.6633 : HELLO
  02:47:12.844890 OFS( 1) RECV192.168.0.31.6633 : HELLO
  02:47:12.856572 OFS( 1) RECV

Re: [nox-dev] Please help me about NOX in Mininet

2010-10-29 Thread kk yap
Hi Anh,

cc-ed the mailing list where you can get more help.

00027|nox|DBG:No switch auth module registered, auto-approving switch

This line is benign .  You can safely ignore it.

Regards
KK


On 29 October 2010 02:17, Anh Nguyen nna4...@gmail.com wrote:
 Dear KK,
 I'm using mininet to simulation a simple testbed.I started with the guide at
 http://www.openflowswitch.org/wk/index.php/HOTITutorial2010, Everything seem
 like OK, but when I try to modify pytutorial.py in
 ~/noxcore/src/nox/coreapps/tutorial/  (to build a simple learning switch),
 and run :
  ./nox_core -v -i ptcp: pytutorial.
 after run this command, I try ping host 2 to host 3 but 100% packet is loss,
 and in the NOX screen:

 00016|nox|DBG:python:
     Current state: INSTALLED
     Required state: INSTALLED
     Dependencies:

 00017|openflow|DBG:Passive tcp interface bound to port 6633
 00018|nox|INFO:nox bootstrap complete
 00019|openflow|DBG:Passive tcp interface received connection
 00020|openflow|DBG:stream: negotiated OpenFlow version 0x01 (we support
 versions 0x01 to 0x01 inclusive, peer no later than version 0x01)
 00021|nox|DBG:Success sending in 'sending switch config'
 00022|nox|DBG:Success sending in 'receiving features reply'
 00023|nox|DBG:Success receiving in 'receiving features reply'
 00024|nox|DBG:Success sending in 'receiving ofmp capability reply'
 00025|nox|DBG:Success receiving in 'receiving ofmp capability reply'
 00026|nox|DBG:Datapath 0001 sent error in response to capability
 reply, assuming no management support
 00027|nox|DBG:No switch auth module registered, auto-approving switch
 00028|nox|DBG:Registering switch with DPID = 1

 I think the problem is in the red line, isn't it?
 Can you tell me some guides or the code of the learning switch which can run
 in mininet?
 Thank you very much !

 P.S: I have refer some code which edit the pytutorial.py to the learning
 swicth at http://yuba.stanford.edu/cs244wiki/index.php/Learning_Switch and
 http://www.openflowswitch.org/wk/index.php/OpenFlow_Sigmetrics_2009_Hands-on_Tutorial_Instructionshttp://www.openflowswitch.org/wk/index.php/OpenFlow_Sigmetrics_2009_Hands-on_Tutorial_Instructions
 but unfotunaly , it not work in  mininet :((

___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


Re: [nox-dev] Need help regarding querying statistics from switches

2009-12-17 Thread Guanyao Huang
We are recently confirmed the switch itself has some bug, it cant
collect byte statistics. Thanks all.

On Thu, Dec 10, 2009 at 6:02 PM, Guanyao Huang gyhu...@ucdavis.edu wrote:
 Hello
 Sorry to bother others. I one question regarding querying flow
 statistics from switches through struct ofp_stats_request. I am using
 nox 5.0

 In my topology I periodically ping between hosts. However, I find the
 packet_count and byte_count from the switch are always 0. I am
 confirmed that I successfully received ofp_flow_stats from the desired
 switch. The central controller maintains flow information and I query
 flows with desired nw_proto, nw_src, nw_dst, tp_src, tp_dst, and
 in_port. Other fields I use wildcard.

 When I use tcpreplay to replay some big packets, I find that the
 returned size are not always 0. However, flows in pcap file expire
 quickly and it is not easy to debug.

 Is it true that the returned size will always be 0 if the packet is small?


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


Re: [nox-dev] Need help regarding querying statistics from switches

2009-12-15 Thread Guanyao Huang
Nox version is 5.0. It works for the version of OpenFlow on the switch (0.8.9).

I used the same function to print ofp_match field and compare the
ofp_match value in the flow statistics request and flow statistics
reply. They are exactly the same for the 10 fields (wildcards=0). But
the returned value is still always 0.
If I use wildcards=0x, then two flows returns (one is for ICMP
reply), still with byte_no 0.

On Sun, Dec 13, 2009 at 3:55 PM, Keith Amidon ke...@nicira.com wrote:
 I apologize if you stated this already and I missed it, but what
 versions NOX and switch software are you using?

          Thanks, Keith


 On Sun, 13 Dec 2009 11:17:01 -0800, Guanyao Huang gyhu...@ucdavis.edu wrote:
 I dont think the flow table entries expire quickly, because I find out
 only initially the new packet is sent to the controller. Later packets
 already have entries.

 It seems I dont have priority to use dpctl dump-flows command. I can
 telnet to the switches and run showflow command, which shows the flows
 are correct, with increasing size.

 Even if I use wildcards=0x to get all flow entries and use a
 short interval to query flow statistics (500 ms), the returned sizes
 are still always 0.

 Now, even reading port statistics doesnt work. Returned value is 0.

 The code is already posted to this email.


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


Re: [nox-dev] Need help regarding querying statistics from switches

2009-12-15 Thread Guanyao Huang
I find that I can not query port statistics either when pinging. The
returned value is also 0. But if I tcpreplay, the returned value is
obviously larger than 0 (for port load). Is it that ping is too small?
But obviously it can not be 0.

On Sun, Dec 13, 2009 at 3:55 PM, Keith Amidon ke...@nicira.com wrote:
 I apologize if you stated this already and I missed it, but what
 versions NOX and switch software are you using?

          Thanks, Keith


 On Sun, 13 Dec 2009 11:17:01 -0800, Guanyao Huang gyhu...@ucdavis.edu wrote:
 I dont think the flow table entries expire quickly, because I find out
 only initially the new packet is sent to the controller. Later packets
 already have entries.

 It seems I dont have priority to use dpctl dump-flows command. I can
 telnet to the switches and run showflow command, which shows the flows
 are correct, with increasing size.

 Even if I use wildcards=0x to get all flow entries and use a
 short interval to query flow statistics (500 ms), the returned sizes
 are still always 0.

 Now, even reading port statistics doesnt work. Returned value is 0.

 The code is already posted to this email.


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


Re: [nox-dev] Need help regarding querying statistics from switches

2009-12-11 Thread Keith Amidon
On Thu, 10 Dec 2009 18:02:57 -0800, Guanyao Huang gyhu...@ucdavis.edu wrote:
 In my topology I periodically ping between hosts. However, I find the
 packet_count and byte_count from the switch are always 0. I am
 confirmed that I successfully received ofp_flow_stats from the desired
 switch. The central controller maintains flow information and I query
 flows with desired nw_proto, nw_src, nw_dst, tp_src, tp_dst, and
 in_port. Other fields I use wildcard.

How frequent are the pings and how are the flows being installed.  One
possibility here is that the flows are being installed with a timeout
shorter than the interval between pings.  If that is the scenario, the
behavior could be:

   1. ping arrives at switch 
   2. switch does not find a matching flow, forwards to controller for
  decision.  
   3. controller installs flow in switch to match future pings with a
  soft timeout.  The controller may not count the stats from the
  initial ping packet received in step 2 as being part of this new
  flow.
   4. nothing matches flow for the soft timeout.  flow is removed from
  switch.
   5. goto step 1

Might this be what is happening?

   --- Keith



 

___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


[nox-dev] Need help regarding querying statistics from switches

2009-12-10 Thread Guanyao Huang
Hello
Sorry to bother others. I one question regarding querying flow
statistics from switches through struct ofp_stats_request. I am using
nox 5.0

In my topology I periodically ping between hosts. However, I find the
packet_count and byte_count from the switch are always 0. I am
confirmed that I successfully received ofp_flow_stats from the desired
switch. The central controller maintains flow information and I query
flows with desired nw_proto, nw_src, nw_dst, tp_src, tp_dst, and
in_port. Other fields I use wildcard.

When I use tcpreplay to replay some big packets, I find that the
returned size are not always 0. However, flows in pcap file expire
quickly and it is not easy to debug.

Is it true that the returned size will always be 0 if the packet is small?

___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


Re: [nox-dev] Need help regarding querying statistics from switches

2009-12-10 Thread Guanyao Huang
Sorry, I was wrong in saying my program can query flow statistics of
large flows. It cant query statistics of flows, no matter large or
small.
But I can query statistics of port. That is successful.
Below is my code to query flow statistics:

size_t size = sizeof(ofp_stats_request) + sizeof(ofp_flow_stats_request);
boost::shared_arraychar raw_of(new char[size]);
ofp_stats_request *ost = (ofp_stats_request*)raw_of.get();
ost-header.version = OFP_VERSION;
ost-header.type = OFPT_STATS_REQUEST;
ost-header.length = htons(size);
ost-header.xid = htonl(STATS_DETAIL_ID);
ost-type = htons(OFPST_FLOW);
ost-flags = htons(0);
ofp_flow_stats_request* ofsr =
(ofp_flow_stats_request*)(((uint8_t*)ost-body)+0);
ofsr-table_id = 0xff; //request for all flow table
ofsr-out_port = OFPP_NONE;

for(.){//some loop code
ofp_match tmpmatch;
tmpmatch.nw_src=itflow-first.nw_src;
tmpmatch.nw_dst=itflow-first.nw_dst;
tmpmatch.tp_src=itflow-first.tp_src;
tmpmatch.tp_dst=itflow-first.tp_dst;
tmpmatch.nw_proto=itflow-first.nw_proto;
tmpmatch.in_port=itflow-first.in_port;
tmpmatch.wildcards=htonl(OFPFW_DL_VLAN | OFPFW_DL_SRC |
OFPFW_DL_DST | OFPFW_DL_TYPE | OFPFW_TP_SRC | OFPFW_TP_DST );
memcpy(ofsr-match, tmpmatch, sizeof(ofp_match));
if( 0 != send_openflow_command((it-first), ost-header, false) ){
;
}
}

When parsing struct ofp_flow_stats, I find it is exactly the flow I
want to query. But the packet_count and byte_count are always 0.

Is this some setting problem?

On Thu, Dec 10, 2009 at 6:02 PM, Guanyao Huang gyhu...@ucdavis.edu wrote:
 Hello
 Sorry to bother others. I one question regarding querying flow
 statistics from switches through struct ofp_stats_request. I am using
 nox 5.0

 In my topology I periodically ping between hosts. However, I find the
 packet_count and byte_count from the switch are always 0. I am
 confirmed that I successfully received ofp_flow_stats from the desired
 switch. The central controller maintains flow information and I query
 flows with desired nw_proto, nw_src, nw_dst, tp_src, tp_dst, and
 in_port. Other fields I use wildcard.

 When I use tcpreplay to replay some big packets, I find that the
 returned size are not always 0. However, flows in pcap file expire
 quickly and it is not easy to debug.

 Is it true that the returned size will always be 0 if the packet is small?


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


Re: [nox-dev] Need help regarding querying statistics from switches

2009-12-10 Thread Martin Casado
Have you verified that the counter is correct on the switch via dpctl 
dump-flows?



Sorry, I was wrong in saying my program can query flow statistics of
large flows. It cant query statistics of flows, no matter large or
small.
But I can query statistics of port. That is successful.
Below is my code to query flow statistics:

size_t size = sizeof(ofp_stats_request) + sizeof(ofp_flow_stats_request);
boost::shared_arraychar raw_of(new char[size]);
ofp_stats_request *ost = (ofp_stats_request*)raw_of.get();
ost-header.version = OFP_VERSION;
ost-header.type = OFPT_STATS_REQUEST;
ost-header.length = htons(size);
ost-header.xid = htonl(STATS_DETAIL_ID);
ost-type = htons(OFPST_FLOW);
ost-flags = htons(0);
ofp_flow_stats_request* ofsr =
(ofp_flow_stats_request*)(((uint8_t*)ost-body)+0);
ofsr-table_id = 0xff; //request for all flow table
ofsr-out_port = OFPP_NONE;

for(.){//some loop code
ofp_match tmpmatch;
tmpmatch.nw_src=itflow-first.nw_src;
tmpmatch.nw_dst=itflow-first.nw_dst;
tmpmatch.tp_src=itflow-first.tp_src;
tmpmatch.tp_dst=itflow-first.tp_dst;
tmpmatch.nw_proto=itflow-first.nw_proto;
tmpmatch.in_port=itflow-first.in_port;
tmpmatch.wildcards=htonl(OFPFW_DL_VLAN | OFPFW_DL_SRC |
OFPFW_DL_DST | OFPFW_DL_TYPE | OFPFW_TP_SRC | OFPFW_TP_DST );
memcpy(ofsr-match, tmpmatch, sizeof(ofp_match));
if( 0 != send_openflow_command((it-first), ost-header, false) ){
;
}
}

When parsing struct ofp_flow_stats, I find it is exactly the flow I
want to query. But the packet_count and byte_count are always 0.

Is this some setting problem?

On Thu, Dec 10, 2009 at 6:02 PM, Guanyao Huang gyhu...@ucdavis.edu wrote:
  

Hello
Sorry to bother others. I one question regarding querying flow
statistics from switches through struct ofp_stats_request. I am using
nox 5.0

In my topology I periodically ping between hosts. However, I find the
packet_count and byte_count from the switch are always 0. I am
confirmed that I successfully received ofp_flow_stats from the desired
switch. The central controller maintains flow information and I query
flows with desired nw_proto, nw_src, nw_dst, tp_src, tp_dst, and
in_port. Other fields I use wildcard.

When I use tcpreplay to replay some big packets, I find that the
returned size are not always 0. However, flows in pcap file expire
quickly and it is not easy to debug.

Is it true that the returned size will always be 0 if the packet is small?




___
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] Fwd: help! i have problem wiht testing 'nox_core tests'

2009-07-15 Thread Dan Wendlandt

Hi Noah,

It looks like the problem might be that the instructions are somewhat 
unclear.  The following line should be run as a single command:


apt-get install autoconf automake g++ libtool python python-twisted swig 
libboost1.35-dev libxerces-c2-dev libssl-dev make


On the webpage, there is a line-break between python-twisted and swig 
packages, and it seem that you may have interpreted this as starting a 
new command.


There is no need for you to run 'swig' yourself. Once 'swig' is 
installed by apt-get, it will be invoked by the build system when you 
type 'make'.


Dan


Noah wrote:

Hi Dan,

I'm really thank your reply.

As you said, I checked both files are exist and build is complete.

I found out that build is incomplete. When I checked using 'make
check', they show me some error.

 Test suite NOX failed with:
 25 assertions out of 96 passed
 71 assertions out of 96 failed
 3 test cases out of 74 passed
 71 test cases out of 74 failed
 71 test cases out of 74 aborted

 FAIL: nox.test
 
 1 of 1 test failed
 Please report to cont...@noxrepo.org
 
 make[3]: *** [check-TESTS] error 1
 make[3]: Leaving directory `/root/noxcore/build/src'
 make[2]: *** [check-am] error 2
 make[2]: Leaving directory `/root/noxcore/build/src'
 make[1]: *** [check-recursive] error1
 make[1]: Leaving directory `/root/noxcore/build/src'
 make: *** [check] error 2


When I build nox, I didn't know how to handle swig libboost1.35-dev
libxerces-c2-dev libssl-dev make' ,
because I typed that command, is didn't work in terminal,

just show

 r...@nox-desktop:~# swig libboost1.35-dev libxerces-c2-dev libssl-dev make
 swig error : Unrecognized option libboost1.35-dev
 swig error : Unrecognized option libxerces-c2-dev
 swig error : Unrecognized option libssl-dev
 Use 'swig -help' for available options.


so, I just install like 'apt-get install libboost1.35-dev
libxerces-c2-dev libssl-dev'

does it make some problem?
and if I had to use swig, how can I handle it?


2009/7/14 Dan Wendlandt d...@nicira.com:
  

Hi Noah,

From what directory are you running ./nox_core tests?   From that
directory, does the file nox/netapps/user_event_log/pyuser_event_log.py
exist?  If not, does the file nox/netapps/switchstats/pycswitchstats.py
exist?  I assume the build completely successfully with no errors.
dan

Noah wrote:


Hi,

I need to run the noxrepo scripts for OpenFlow Switch.

So, following the NOX installation, I installed nox.

After that i tried to ./nox_core tests.

Then there's an error message like below

1|sqlite3-impl|WARN:Transactional storage file not given in the
command line; defaulting to 'testing.sqlite'
2|nox|ERR:Cannot change the state of 'tests' to INSTALLED:
'tests' has an unmet dependency:
   'pyuser_event_log' ran into an error:
   cannot import a Python module
'nox.netapps.user_event_log.pyuser_event_log':
   ImportError: No module named
netapps.user_event_log.pyuser_event_log

can you tell me what's the problem??

i'm working on Ubuntu 9.04.

___
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 mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


Re: [nox-dev] Fwd: help! i have problem wiht testing 'nox_core tests'

2009-07-15 Thread Noah
Hi Dan.

Thank your help,

But, unfortunately, I build with that one line command there's still
same problem,

2009/7/16 Dan Wendlandt d...@nicira.com:
 Hi Noah,

 It looks like the problem might be that the instructions are somewhat
 unclear.  The following line should be run as a single command:

 apt-get install autoconf automake g++ libtool python python-twisted swig
 libboost1.35-dev libxerces-c2-dev libssl-dev make

 On the webpage, there is a line-break between python-twisted and swig
 packages, and it seem that you may have interpreted this as starting a new
 command.

 There is no need for you to run 'swig' yourself. Once 'swig' is installed by
 apt-get, it will be invoked by the build system when you type 'make'.

 Dan


 Noah wrote:

 Hi Dan,

 I'm really thank your reply.

 As you said, I checked both files are exist and build is complete.

 I found out that build is incomplete. When I checked using 'make
 check', they show me some error.

  Test suite NOX failed with:
  25 assertions out of 96 passed
  71 assertions out of 96 failed
  3 test cases out of 74 passed
  71 test cases out of 74 failed
  71 test cases out of 74 aborted

  FAIL: nox.test
  
  1 of 1 test failed
  Please report to cont...@noxrepo.org
  
  make[3]: *** [check-TESTS] error 1
  make[3]: Leaving directory `/root/noxcore/build/src'
  make[2]: *** [check-am] error 2
  make[2]: Leaving directory `/root/noxcore/build/src'
  make[1]: *** [check-recursive] error1
  make[1]: Leaving directory `/root/noxcore/build/src'
  make: *** [check] error 2


 When I build nox, I didn't know how to handle swig libboost1.35-dev
 libxerces-c2-dev libssl-dev make' ,
 because I typed that command, is didn't work in terminal,

 just show

  r...@nox-desktop:~# swig libboost1.35-dev libxerces-c2-dev libssl-dev make
  swig error : Unrecognized option libboost1.35-dev
  swig error : Unrecognized option libxerces-c2-dev
  swig error : Unrecognized option libssl-dev
  Use 'swig -help' for available options.


 so, I just install like 'apt-get install libboost1.35-dev
 libxerces-c2-dev libssl-dev'

 does it make some problem?
 and if I had to use swig, how can I handle it?


 2009/7/14 Dan Wendlandt d...@nicira.com:


 Hi Noah,

 From what directory are you running ./nox_core tests?   From that
 directory, does the file nox/netapps/user_event_log/pyuser_event_log.py
 exist?  If not, does the file nox/netapps/switchstats/pycswitchstats.py
 exist?  I assume the build completely successfully with no errors.
 dan

 Noah wrote:


 Hi,

 I need to run the noxrepo scripts for OpenFlow Switch.

 So, following the NOX installation, I installed nox.

 After that i tried to ./nox_core tests.

 Then there's an error message like below

 1|sqlite3-impl|WARN:Transactional storage file not given in the
 command line; defaulting to 'testing.sqlite'
 2|nox|ERR:Cannot change the state of 'tests' to INSTALLED:
 'tests' has an unmet dependency:
        'pyuser_event_log' ran into an error:
                cannot import a Python module
 'nox.netapps.user_event_log.pyuser_event_log':
                ImportError: No module named
 netapps.user_event_log.pyuser_event_log

 can you tell me what's the problem??

 i'm working on Ubuntu 9.04.

 ___
 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 mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


[nox-dev] Fwd: help! i have problem wiht testing 'nox_core tests'

2009-07-14 Thread Noah
Hi Dan,

I'm really thank your reply.

As you said, I checked both files are exist and build is complete.

I found out that build is incomplete. When I checked using 'make
check', they show me some error.

 Test suite NOX failed with:
 25 assertions out of 96 passed
 71 assertions out of 96 failed
 3 test cases out of 74 passed
 71 test cases out of 74 failed
 71 test cases out of 74 aborted

 FAIL: nox.test
 
 1 of 1 test failed
 Please report to cont...@noxrepo.org
 
 make[3]: *** [check-TESTS] error 1
 make[3]: Leaving directory `/root/noxcore/build/src'
 make[2]: *** [check-am] error 2
 make[2]: Leaving directory `/root/noxcore/build/src'
 make[1]: *** [check-recursive] error1
 make[1]: Leaving directory `/root/noxcore/build/src'
 make: *** [check] error 2


When I build nox, I didn't know how to handle swig libboost1.35-dev
libxerces-c2-dev libssl-dev make' ,
because I typed that command, is didn't work in terminal,

just show

 r...@nox-desktop:~# swig libboost1.35-dev libxerces-c2-dev libssl-dev make
 swig error : Unrecognized option libboost1.35-dev
 swig error : Unrecognized option libxerces-c2-dev
 swig error : Unrecognized option libssl-dev
 Use 'swig -help' for available options.


so, I just install like 'apt-get install libboost1.35-dev
libxerces-c2-dev libssl-dev'

does it make some problem?
and if I had to use swig, how can I handle it?


2009/7/14 Dan Wendlandt d...@nicira.com:
 Hi Noah,

 From what directory are you running ./nox_core tests?   From that
 directory, does the file nox/netapps/user_event_log/pyuser_event_log.py
 exist?  If not, does the file nox/netapps/switchstats/pycswitchstats.py
 exist?  I assume the build completely successfully with no errors.
 dan

 Noah wrote:

 Hi,

 I need to run the noxrepo scripts for OpenFlow Switch.

 So, following the NOX installation, I installed nox.

 After that i tried to ./nox_core tests.

 Then there's an error message like below

 1|sqlite3-impl|WARN:Transactional storage file not given in the
 command line; defaulting to 'testing.sqlite'
 2|nox|ERR:Cannot change the state of 'tests' to INSTALLED:
 'tests' has an unmet dependency:
        'pyuser_event_log' ran into an error:
                cannot import a Python module
 'nox.netapps.user_event_log.pyuser_event_log':
                ImportError: No module named
 netapps.user_event_log.pyuser_event_log

 can you tell me what's the problem??

 i'm working on Ubuntu 9.04.

 ___
 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