Re: [nox-dev] what is the difference between pyswitch and routing module?

2011-11-10 Thread Murphy McCauley
How did you implement rate limiting with pyswitch, and how are you trying to do 
it with routing?

I'm not sure exactly what you mean about the modules of NOX.  They're all in 
the various coreapps/netapps/webapps directories in the NOX source repository.  
Not all of them are documented on the wiki (or anywhere, necessarily, except 
maybe the doxygen).

-- Murphy

On Nov 10, 2011, at 1:35 PM, Shan Hu wrote:

 Thank you very much for the explanation, Murphy.
 
 Right now,I try to reserve bandwidth and limit rate with the queue table, it 
 works great with pyswitch component,but it doesnt work with routing 
 component.What reason could it be?
 
 And another question,where can i find all the modules of NOX?There are not 
 much in the noxwiki.Or, those in noxwiki already include all existing modules?
 
 regards,
 Shan  
 
 - Original Message -
 From: Murphy McCauley jam...@nau.edu
 To: Shan Hu shan...@utdallas.edu
 Cc: nox-dev nox-dev@noxrepo.org
 Sent: Thursday, November 3, 2011 11:44:33 AM
 Subject: Re: [nox-dev] what is the difference between pyswitch and routing 
 module?
 
 pyswitch is intended to be a very simple demo and does something along the 
 lines of making each switch in the network a standalone L2 learning switch.  
 Each switch gets no insight about the topology from its neighbors.  routing 
 actually uses a global view of the topology, and can just generate optimal 
 paths between any two endpoints.
 
 A major result of this is that when running pyswitch, each switch needs to 
 learn which port to use for each destination.  Before it learns, each switch 
 will need to flood packets for destinations it doesn't know yet -- a lot of 
 packets will get sent the wrong way.  With routing, once ANY switch can 
 determine where a destination is, the entire system knows.  Additionally, 
 pyswitch's reliance on flooding is problematic for topologies with loops -- 
 it's easy for packets to unknown destinations to loop indefinitely.
 
 Hope that helps clear things up.
 
 -- Murphy
 
 On Nov 2, 2011, at 11:34 AM, Shan Hu wrote:
 
 I'm wondering what's the different between routing module and pyswitch 
 module?
 
 I can find from wiki that routing is basically a forwarding module. but what 
 about pyswitch?
 
 Because after i connected 3 openvswitchs(like this:host1 -- ovs1 -- ovs2 -- 
 ovs3 --host2),i firstly ran pyswitch module,then host1 can ping host2, 
 however,i tried to run UDP traffic test,and found that the larger bandwidth 
 i use, the more packet loss there are.
 Then i stopped pyswitch module and ran routing module, then host1 still can 
 ping host2, and the UDP traffic test works well, almost all the packets are 
 transfered from host1 to host2.
 
 why this happened?
 
 Shan 
 ___
 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

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


Re: [nox-dev] what is the difference between pyswitch and routing module?

2011-11-10 Thread Shan Hu
I has this topology as follows:

host2
 |
   [eth2] 
ovs2
   /\
  /  \
 host1--ovs1 ovs3--host3

i set queue tables on ovs2,created two queues,assigned queue0 with rate 
400mbps~500mbps,and queue1 with rate 600mbps~700mbps.

Then on controller i run command: ./nox_core -ptcp:6633 pyswitch

At last on ovs2 i run command: ./ovs-ofctl add flow br0 in_port=1(note:ovs1) 
ip nw_dst=xx.xx.xx.xx(note:host2 ip) idle_timeout=0 actions=enqueue:4:0(note:to 
make flows from port1 follow queue0 rule)

Then i push data from host1 to host2, the rate is limited to 400mbps~500mbps.

However,i do the same as above except that i changed command on controller to: 
./nox_core -ptcp:6633 routing, the rate is not limited at all.

I thought it might be the routing module problem since the rate is limited with 
pyswitch.

Shan 

- Original Message -
From: Murphy McCauley jam...@nau.edu
To: Shan Hu shan...@utdallas.edu
Cc: nox-dev nox-dev@noxrepo.org
Sent: Thursday, November 10, 2011 3:41:04 PM
Subject: Re: [nox-dev] what is the difference between pyswitch and routing 
module?

How did you implement rate limiting with pyswitch, and how are you trying to do 
it with routing?

I'm not sure exactly what you mean about the modules of NOX.  They're all in 
the various coreapps/netapps/webapps directories in the NOX source repository.  
Not all of them are documented on the wiki (or anywhere, necessarily, except 
maybe the doxygen).

-- Murphy

On Nov 10, 2011, at 1:35 PM, Shan Hu wrote:

 Thank you very much for the explanation, Murphy.
 
 Right now,I try to reserve bandwidth and limit rate with the queue table, it 
 works great with pyswitch component,but it doesnt work with routing 
 component.What reason could it be?
 
 And another question,where can i find all the modules of NOX?There are not 
 much in the noxwiki.Or, those in noxwiki already include all existing modules?
 
 regards,
 Shan  
 
 - Original Message -
 From: Murphy McCauley jam...@nau.edu
 To: Shan Hu shan...@utdallas.edu
 Cc: nox-dev nox-dev@noxrepo.org
 Sent: Thursday, November 3, 2011 11:44:33 AM
 Subject: Re: [nox-dev] what is the difference between pyswitch and routing 
 module?
 
 pyswitch is intended to be a very simple demo and does something along the 
 lines of making each switch in the network a standalone L2 learning switch.  
 Each switch gets no insight about the topology from its neighbors.  routing 
 actually uses a global view of the topology, and can just generate optimal 
 paths between any two endpoints.
 
 A major result of this is that when running pyswitch, each switch needs to 
 learn which port to use for each destination.  Before it learns, each switch 
 will need to flood packets for destinations it doesn't know yet -- a lot of 
 packets will get sent the wrong way.  With routing, once ANY switch can 
 determine where a destination is, the entire system knows.  Additionally, 
 pyswitch's reliance on flooding is problematic for topologies with loops -- 
 it's easy for packets to unknown destinations to loop indefinitely.
 
 Hope that helps clear things up.
 
 -- Murphy
 
 On Nov 2, 2011, at 11:34 AM, Shan Hu wrote:
 
 I'm wondering what's the different between routing module and pyswitch 
 module?
 
 I can find from wiki that routing is basically a forwarding module. but what 
 about pyswitch?
 
 Because after i connected 3 openvswitchs(like this:host1 -- ovs1 -- ovs2 -- 
 ovs3 --host2),i firstly ran pyswitch module,then host1 can ping host2, 
 however,i tried to run UDP traffic test,and found that the larger bandwidth 
 i use, the more packet loss there are.
 Then i stopped pyswitch module and ran routing module, then host1 still can 
 ping host2, and the UDP traffic test works well, almost all the packets are 
 transfered from host1 to host2.
 
 why this happened?
 
 Shan 
 ___
 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

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


[nox-dev] [PATCH] discovery.py to handle LLDP packets with VLAN tag

2011-11-10 Thread Aaron Rosen
If an LLDP packet comes in and contains a vlan tag, lldp_input_handler()
did not handle this case.

Attached is a patch that adds this behavior.

Thanks,

Aaron


-- 
Aaron O. Rosen
Masters Student - Network Communication
306B Fluor Daniel
From 389163043d478a4131d129c9ce7b36eedf61411d Mon Sep 17 00:00:00 2001
From: Aaron Rosen aro...@clemson.edu
Date: Thu, 10 Nov 2011 21:09:00 -0500
Subject: [PATCH] lldp_input_handler() did not handle the case where an LLDP packet
 may have a vlan tag on it. This patch adds this check.

---
 src/nox/netapps/discovery/discovery.py |   16 ++--
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/nox/netapps/discovery/discovery.py b/src/nox/netapps/discovery/discovery.py
index a68e839..0575c79 100644
--- a/src/nox/netapps/discovery/discovery.py
+++ b/src/nox/netapps/discovery/discovery.py
@@ -247,15 +247,19 @@ class discovery(Component):
 
 def lldp_input_handler(self, dp_id, inport, ofp_reason, total_frame_len, buffer_id, packet):
 
-assert (packet.type == ethernet.LLDP_TYPE)
-
 if not packet.next:
 lg.error(lldp_input_handler lldp packet could not be parsed)
 return
-
-assert (isinstance(packet.next, lldp))
-
-lldph = packet.next
+
+if packet.type == ethernet.VLAN_TYPE:
+assert(packet.next.eth_type == ethernet.LLDP_TYPE)
+assert (isinstance(packet.next.next, lldp))
+lldph = packet.next.next
+else:
+assert (packet.type == ethernet.LLDP_TYPE)
+assert (isinstance(packet.next, lldp))
+lldph = packet.next
+
 if  (len(lldph.tlvs)  4) or \
 (lldph.tlvs[0].type != lldp.CHASSIS_ID_TLV) or\
 (lldph.tlvs[1].type != lldp.PORT_ID_TLV) or\
-- 
1.7.3.4

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


Re: [nox-dev] Getting flow table entries from switch

2011-11-10 Thread Aaron Rosen
Hi Theo,

Yup there is a Monitoring.send_flow_stats_request()

Cheers,

Aaron

P.S: here are some hints to get it working if it helps:

import nox.lib.pyopenflow as of


def send_flow_stats_request():
   global xid
   flows = of.ofp_match()
   flows.wildcards = of.OFPFW_ALL  ^ of.OFPFW_DL_SRC
   match_this_mac = 00:11:22:33:44:55
   flows.dl_src =  [int(a[0:2],
16),int(a[3:5],16),int(a[6:8],16),int(a[9:11],16),int(a[12:14],16),int(a[15:17],16)]
   inst.Monitoring.send_flow_stats_request(dpid, flows, 0xff, xid);
   xid +=1

def flow_stats_in_handler(dpid, flows, more, xid):
print str(dpid) +   + str(flows)
for i in flows:
print flows[i]



You also have to register it with:

inst.register_for_flow_stats_in(flow_stats_in_handler)






On Thu, Nov 10, 2011 at 9:30 PM, Theophilus Benson tben...@cs.wisc.eduwrote:

 Is it possible to programmatically get the flow table entries from a
 switch.  I know that aggregate flow stats gives that tells you the number
 of bytes sent/received, number of flows matched and match mask for each
 flow entries.  However, I wanted the actual flow table entry itself.

 Theo
 __**_
 nox-dev mailing list
 nox-dev@noxrepo.org
 http://noxrepo.org/mailman/**listinfo/nox-devhttp://noxrepo.org/mailman/listinfo/nox-dev




-- 
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