[nox-dev] The LLDP problem when using Extreme OpenFlow-enabled switch

2011-05-26 Thread Jen-Wei Hu
Hi,

Recently, we use the discovery and lavi applications in NOX. The experiment
environment contains two different switches, one is PC w/ NetFPGA and the
other is Extreme OpenFlow enabled-Switch. After starting the discovery app,
we got the complaint messages on the console. The messages are showed below:

00103|pyrt|ERR:unable to invoke a Python event handler:
Traceback (most recent call last):
  File ./nox/lib/util.py, line 116, in f
event.total_len, buffer_id, packet)
  File ./nox/netapps/discovery/discovery.py, line 163, in lambda
discovery.lldp_input_handler(self,dp,inport,reason,len,bid,packet),
  File ./nox/netapps/discovery/discovery.py, line 251, in
lldp_input_handler
assert (packet.type == ethernet.LLDP_TYPE)
AssertionError


After trying to debug these two days and check the ethernet frame, we print
received packet and find some hints from discovery.py

 [(Extreme Networks):51:a9:8501:23:20:00:00:01:VLAN](vlanid=10:
pcp=0)[LLDP]chassis ID:00:04:96:51:a9:85port ID:00:01ttl:120tlv end
 [(Nicira Network):a3:71:e301:23:20:00:00:01:LLDP]chassis
ID:00:23:20:a3:71:e3port ID:00:02ttl:120tlv end


The Extreme Switch will pack the VLAN info into the OFP packet, so we modify
a little parts of ethernet.py. This code just skip the VLAN part (4 bytes)
of ethernet frame. The attachment is our modified code. Although it works,
we are not sure doing this is right or not. We are not the python expert and
maybe you guys could provide better way for this.

Thanks,

Jen-Wei


ethernet.patch
Description: Binary data
___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


Re: [nox-dev] The LLDP problem when using Extreme OpenFlow-enabled switch

2011-05-26 Thread Jen-Wei Hu
Hi,

Thanks Murphy. It works and I also think your suggestion is a good way. And
thank again for how to use of packet.next. I think this is useful when the
packet also contains another ethernet type inside. Hope my thought is right.

Jen-Wei

On Thu, May 26, 2011 at 5:36 PM, Murphy McCauley jam...@nau.edu wrote:

 Hmm... I don't immediately know what the right thing to do in this
 situation
 is.  But if it's to ignore the vlan (which doesn't immediately seem
 completely
 unreasonable), I think maybe the right approach is to replace that assert
 at
 the start of lldp_input_handler() with something like:

 if packet.type == ethernet.VLAN_TYPE:
  if not packet.next:
lg.error(lldp_input_handler could not parse vlan frame)
return
  packet = packet.next
  assert (packet.eth_type == ethernet.LLDP_TYPE)
 else:
   assert (packet.type == ethernet.LLDP_TYPE)

 That's 100% untested, so if you wanted to give it a try, please let me know
 how it turns out. :)

 Anyone want to comment on whether that's the right approach?

 -- Murphy

 On Thursday, May 26, 2011 01:47:00 AM Jen-Wei Hu wrote:
  Hi,
 
  Recently, we use the discovery and lavi applications in NOX. The
 experiment
  environment contains two different switches, one is PC w/ NetFPGA and the
  other is Extreme OpenFlow enabled-Switch. After starting the discovery
 app,
  we got the complaint messages on the console. The messages are showed
  below: 
  00103|pyrt|ERR:unable to invoke a Python event handler:
  Traceback (most recent call last):
File ./nox/lib/util.py, line 116, in f
  event.total_len, buffer_id, packet)
File ./nox/netapps/discovery/discovery.py, line 163, in lambda
  discovery.lldp_input_handler(self,dp,inport,reason,len,bid,packet),
File ./nox/netapps/discovery/discovery.py, line 251, in
  lldp_input_handler
  assert (packet.type == ethernet.LLDP_TYPE)
  AssertionError
  
 
  After trying to debug these two days and check the ethernet frame, we
 print
  received packet and find some hints from discovery.py
  
   [(Extreme Networks):51:a9:8501:23:20:00:00:01:VLAN](vlanid=10:
  pcp=0)[LLDP]chassis ID:00:04:96:51:a9:85port ID:00:01ttl:120tlv
 end
   [(Nicira Network):a3:71:e301:23:20:00:00:01:LLDP]chassis
  ID:00:23:20:a3:71:e3port ID:00:02ttl:120tlv end
  
 
  The Extreme Switch will pack the VLAN info into the OFP packet, so we
  modify a little parts of ethernet.py. This code just skip the VLAN part
 (4
  bytes) of ethernet frame. The attachment is our modified code. Although
 it
  works, we are not sure doing this is right or not. We are not the python
  expert and maybe you guys could provide better way for this.
 
  Thanks,
 
  Jen-Wei

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


Re: [nox-dev] Have any application in NOX supports multicast?

2011-03-31 Thread Jen-Wei Hu
Dear Murphy  KK,

Thanks for your kindly reply and help. Just like KK mentioned, we might need
an IGMP multicast. So, in this point, we must do something on NOX. That is,
we need to implement a data structure that do the same thing as Group table
for recording which ports have IGMP request. Is is right, please clear me!

Thanks

Jen-Wei

On Mon, Mar 28, 2011 at 9:22 AM, kk yap yap...@stanford.edu wrote:

 Hi Jen-Wei,

 OpenFlow 1.1 (implemented) is released, so it is quite final for me.

 Also, if you are not constrained to using the group semantics (in
 OpenFlow 1.1), you can do multicast by listing all the ports you want
 to multicast to in the flow_mod command.

 If you are looking for IGMP multicast support, then you are looking
 for someone to do some work.

 Regards
 KK

 On 27 March 2011 17:41, James Murphy McCauley jam...@nau.edu wrote:
  So this is certainly not an official statement of any sort, but I would
  not expect to see OpenFlow 1.1 support in NOX for a while.  I believe
  there's some consensus that supporting both 1.0 and 1.1 well will
  require some nontrivial API changes (and we're due for some API changes
  anyway), and there will be a focus on getting some of that right rather
  than incrementally updating NOX as has been done for previous OpenFlow
  versions.
 
  And before we even have 1.1 compatibility, I really would not hazard a
  guess about what we'd be releasing supporting multicast.  Sorry!
 
  Hopefully we'll have more of an idea about this in the coming months, as
  well as more actual OpenFlow 1.1 implementations.
 
  (Also, as far as my limited understanding goes, OpenFlow 1.1 is still
  not final...)
 
  -- Murphy
 
  On Sat, 2011-03-26 at 11:33 +0800, Jen-Wei Hu wrote:
  Hi all,
 
  We are glad to hear the version 1.1 of OpenFlow is released because
  this version create a Group table for supporting multicast. Although
  we use the NOX that support OpenFlow 1.0, would any plan to develop an
  application or example which supports multicast? Or give us
  some advices to do it? Thank you!
 
  Bests,
 
  Jen-Wei
  ___
  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] Have any application in NOX supports multicast?

2011-03-31 Thread Jen-Wei Hu
Dear Kyriakos,

Thanks for your quickly help. Last week, I found in lib/packet have some
files, such as arp or icmp. That time, I think may not follow them to do
similar thing. But after your explanation, I think we are wrong and must to
do it. The other thing is we also record which ports contain vedio
streaming, is it right?

Thanks

Jen-Wei

On Thu, Mar 31, 2011 at 2:29 PM, Kyriakos Zarifis kyr.zari...@gmail.comwrote:

 Hi,

 although that would take some effort, it is perfectly doable to hold that
 information on your component. You wouldn't have to use v1.1 tables or
 anything like that, all the state would be on your controller. While there
 are several packet types of packets included in the packet parsing library
 of NOX, IGMP messages are unfortunately one of them. So in order to extract
 the Join/Leave Group information, you would have to parse them manually (or
 add a relevant igmp.py in lib/packet/, following the paradigm of the other
 packet classes. such an addition would be welcome).


 On Wed, Mar 30, 2011 at 11:20 PM, Jen-Wei Hu jenwe...@gmail.com wrote:

 Dear Murphy  KK,

 Thanks for your kindly reply and help. Just like KK mentioned, we might
 need an IGMP multicast. So, in this point, we must do something on NOX. That
 is, we need to implement a data structure that do the same thing as Group
 table for recording which ports have IGMP request. Is is right, please clear
 me!

 Thanks

 Jen-Wei

 On Mon, Mar 28, 2011 at 9:22 AM, kk yap yap...@stanford.edu wrote:

 Hi Jen-Wei,

 OpenFlow 1.1 (implemented) is released, so it is quite final for me.

 Also, if you are not constrained to using the group semantics (in
 OpenFlow 1.1), you can do multicast by listing all the ports you want
 to multicast to in the flow_mod command.

 If you are looking for IGMP multicast support, then you are looking
 for someone to do some work.

 Regards
 KK

 On 27 March 2011 17:41, James Murphy McCauley jam...@nau.edu wrote:
  So this is certainly not an official statement of any sort, but I would
  not expect to see OpenFlow 1.1 support in NOX for a while.  I believe
  there's some consensus that supporting both 1.0 and 1.1 well will
  require some nontrivial API changes (and we're due for some API changes
  anyway), and there will be a focus on getting some of that right rather
  than incrementally updating NOX as has been done for previous OpenFlow
  versions.
 
  And before we even have 1.1 compatibility, I really would not hazard a
  guess about what we'd be releasing supporting multicast.  Sorry!
 
  Hopefully we'll have more of an idea about this in the coming months,
 as
  well as more actual OpenFlow 1.1 implementations.
 
  (Also, as far as my limited understanding goes, OpenFlow 1.1 is still
  not final...)
 
  -- Murphy
 
  On Sat, 2011-03-26 at 11:33 +0800, Jen-Wei Hu wrote:
  Hi all,
 
  We are glad to hear the version 1.1 of OpenFlow is released because
  this version create a Group table for supporting multicast. Although
  we use the NOX that support OpenFlow 1.0, would any plan to develop an
  application or example which supports multicast? Or give us
  some advices to do it? Thank you!
 
  Bests,
 
  Jen-Wei
  ___
  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 mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


Re: [nox-dev] Cycles

2010-11-19 Thread Jen-Wei Hu
Hi, Niky

Thanks for your detail information. Currently, we also have same confusion.
We also find there is a basic spanning-tree on Openflow Wiki (
http://www.openflowswitch.org/wk/index.php/Basic_Spanning_Tree). Is it
included into NOX's apps? Does this spanning-tree app do the same thing
which you described?

Thanks,

Jen-Wei

On Wed, Nov 17, 2010 at 1:37 PM, Niky Riga nr...@bbn.com wrote:

 The problem might be triggered by broadcast packets.

 When the controller receives a packet that has as destination address the
 bcast MAC address
 (ff:ff:ff:ff:ff:ff),  an ARP packet for example,  it will send the packet
 to the special outport OFPP_FLOOD.
 OFPP_FLOOD is translated at the switch to all ports other than the input
 port.

 In your topology if End1 sends an ARP request packet then Openflow1 will
 send a copy to
 Openflow2 and Openflow3, both of which are going to send a copy to
 Openflow4.
 When Openflow4 receives a packet from Openflow2(3) then it will send a copy
 to
 End2 and to Openflow3(2) respectively. Openflow2(3) will give the packet
 back to
 Openflow1 and the loop starts again.

 The correct solution would be to implement a minimum spanning tree on the
 topology to disseminate
 broadcast packets. An easy way out, which I have used before, is to set the
 NO_FLOOD flag in some ports
 to break the loop. For example you can choose that Openflow1 will forward
 bcast packets only to Openflow2,
 and set the NO_FLOOD flag on the port that connects Openflow1 to Openflow3.
 This flag will basically
 exclude this port when the action specifies as outport the OFPP_FLOOD port.

 Note that if you are using a learning switch module then the loops will
 also cause multiple copies of the
 same packet to be delivered to the destination even for unicast packets.
 This happens because until
 the controller learns the mapping between mac addresses and ports, it will
 flood packets.

 Hope this helps,
 Niky


 Kyriakos Zarifis wrote:

 Are you running 'discovery'? If so, the events you see could be the LLDP
 packets sent by that component.

 On Tue, Nov 16, 2010 at 5:55 PM, Rohit Manohar rdman...@ncsu.edumailto:
 rdman...@ncsu.edu wrote:

I am trying to build the following topology in Nox:
   Openflow2
   
  
 --
  -
End1 --
Openflow1
 Openflow4  End2
 -
-
  -
  -
 Openflow3

When I register Openflow4 with NOX, some sort of traffic loop is
getting created. NOX is continuously registering packet-in events
even when I haven't set up any flows.
Are cycles not supported by NOX? If yes, do I need to indicate it
in the .conf file?

Regards,
-- Rohit Manohar
Graduate Student
North Carolina State University
Raleigh, US.


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


Re: [nox-dev] The conversation between two NOXs

2010-03-26 Thread Jen-Wei Hu
Hi martin,

Thanks again! We still ask some questions inline.

On Fri, Mar 26, 2010 at 9:56 AM, Martin Casado cas...@nicira.com wrote:

 Inline:


  Dear martin,

 Thanks for your reply. We just think when the network environment contains
 more than 2 NOXs, what is the behavior between them? So, NOX do not do the
 load balance currently?

 Correct, Nox does not support multiple instances working together.  For
 that, you will have to extend Nox.

If we want to modify, which source code is the good starting point?



 By the way, We still have some questions which need to your help.
 1) What is the process that NOX want to build its controlled OpenFlow
 switches topology? NOX will send an event to notify all controlled OpenFlow
 switches, then all OpenFlow switches will send LLDP out from their owned
 ports to all connected switches?

 Right.  Nox sends out LLDP packets from every switch port and then listens
 for incoming LLDP packets on neighbor switches to determine the topology.

This means that the LLDP packets are sent out from NOX? When LLDP packets
arrived on every switches which connect to NOX, every switch will redirect
LLDP packets to its connected switches?


  2) The discoveried topology will be stored on NOX?

 Correct.

  3) Support we have a network topology, which showed below, these OpenFlow
 switches are all controlled by one NOX. What do the NOX write into the
 flowtables of these OpenFlow switches when user ping host2 from host1?

 host1 -- ofsw1 ---  ofsw2
   |  |
   |  |
ofsw3 ---  ofsw4  --  host2


 Nox doesn't support topologies with loops (though there are a number of
 spanning tree implementations which have been ported to it) so this would
 not work.  However, if there wasn't a loop, then nox would set up flows for
 the ARP and ICMP packets in both directions.

 We assume to remove the link between ofsw1 and ofsw2 in the above topology
(no loop topology). NOX knows that ofsw1 connect to ofsw3, ofsw3 connect to
ofsw4 by LLDP packets? If it is correct, will NOX write ofsw3's information
into ofsw1, such as which port of ofsw1 connects to ofsw3 port? There will
have the similar information on ofsw3 and ofsw4?

Bests,

JW

 .martin


 We really appreciate to all the help you gave us.
 Best,

 JW

 On Fri, Mar 26, 2010 at 5:55 AM, Martin Casado cas...@nicira.commailto:
 cas...@nicira.com wrote:

Hi JW,

Nox was not built to support coordination between two instances.
 Why don't control both switches from the same Nox process?

.martin

Dear all,

We just join the world of OpenFlow and NOX lately. Everything
for us is new and also doesn't know how to start. Currently,
we have built the enviroment which contains 1 NOX (nox1), 1
OpenFlow switch with NetFPGA (ofsw1), and 2 hosts which
connect to ofsw1. After installing, we got some quesions about
it. Could someone could help us?

(current)
nox1 -- ofsw1
 |--- host1
 |--- host2

(suppose)
nox1 -- ofsw1 - ofsw2 -- nox2
 |--- host1
 |--- host2

1. Suppose we add 1 OpenFlow switch (ofsw2) and 1 NOX (nox2),
let this ofsw2 connects to nox2 and sw1. The LLDP will let
nox1 discover ofsw1, how let nox1 also discovery ofsw2?
2. Does nox1 could discover nox2?
3. The packages between ofsw1 and ofsw2 are using OpenFlow
protocol? And how about nox1 and nox2?

Thanks
Bests,

JW

  

___
nox-dev mailing list
nox-dev@noxrepo.org mailto: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] The conversation between two NOXs

2010-03-26 Thread Jen-Wei Hu
Thanks for your quick and nice reply!

JW

On Fri, Mar 26, 2010 at 2:26 PM, Martin Casado cas...@nicira.com wrote:

 Inline:




 On Fri, Mar 26, 2010 at 9:56 AM, Martin Casado cas...@nicira.commailto:
 cas...@nicira.com wrote:

Inline:


Dear martin,

Thanks for your reply. We just think when the network
environment contains more than 2 NOXs, what is the behavior
between them? So, NOX do not do the load balance currently?

Correct, Nox does not support multiple instances working together.
 For that, you will have to extend Nox.

 If we want to modify, which source code is the good starting point?


 Oh boy, that depends entirely on what you want to do.  To begin with, I
 would suggest building a simple client/server component using twisted in
 python in order to exchange state between controllers.




By the way, We still have some questions which need to your help.
1) What is the process that NOX want to build its controlled
OpenFlow switches topology? NOX will send an event to notify
all controlled OpenFlow switches, then all OpenFlow switches
will send LLDP out from their owned ports to all connected
switches?

Right.  Nox sends out LLDP packets from every switch port and then
listens for incoming LLDP packets on neighbor switches to
determine the topology.

 This means that the LLDP packets are sent out from NOX? When LLDP packets
 arrived on every switches which connect to NOX, every switch will redirect
 LLDP packets to its connected switches?


 Yes, Nox sends LLDP packets out of every port on every switch.



2) The discoveried topology will be stored on NOX?

Correct.

3) Support we have a network topology, which showed below,
these OpenFlow switches are all controlled by one NOX. What do
the NOX write into the flowtables of these OpenFlow switches
when user ping host2 from host1?

host1 -- ofsw1 ---  ofsw2
  |  |
  |  |
   ofsw3 ---  ofsw4  --  host2


Nox doesn't support topologies with loops (though there are a
number of spanning tree implementations which have been ported to
it) so this would not work.  However, if there wasn't a loop, then
nox would set up flows for the ARP and ICMP packets in both
directions.

 We assume to remove the link between ofsw1 and ofsw2 in the above topology
 (no loop topology). NOX knows that ofsw1 connect to ofsw3, ofsw3 connect to
 ofsw4 by LLDP packets? If it is correct, will NOX write ofsw3's information
 into ofsw1, such as which port of ofsw1 connects to ofsw3 port? There will
 have the similar information on ofsw3 and ofsw4?

 This depends on what applications are running.  If you are running routing
 then yes, Nox discovers the topology via LLDP packets and stores the
 information in the topology component.  So Nox knows, internally, that ofsw1
 is connect to ofsw3, ofsw3 is connect to ofsw1 and ofsw4, and ofsw4 is
 connected to ofsw3 and ofsw2.

 .m


 Bests,

 JW

.martin


We really appreciate to all the help you gave us.
Best,

JW

On Fri, Mar 26, 2010 at 5:55 AM, Martin Casado
cas...@nicira.com mailto:cas...@nicira.com
mailto:cas...@nicira.com mailto:cas...@nicira.com wrote:

   Hi JW,

   Nox was not built to support coordination between two
instances.
Why don't control both switches from the same Nox process?

   .martin

   Dear all,

   We just join the world of OpenFlow and NOX lately.
Everything
   for us is new and also doesn't know how to start.
Currently,
   we have built the enviroment which contains 1 NOX (nox1), 1
   OpenFlow switch with NetFPGA (ofsw1), and 2 hosts which
   connect to ofsw1. After installing, we got some
quesions about
   it. Could someone could help us?

   (current)
   nox1 -- ofsw1
|--- host1
|--- host2

   (suppose)
   nox1 -- ofsw1 - ofsw2 -- nox2
|--- host1
|--- host2

   1. Suppose we add 1 OpenFlow switch (ofsw2) and 1 NOX
(nox2),
   let this ofsw2 connects to nox2 and sw1. The LLDP will let
   nox1 discover ofsw1, how let nox1 also discovery ofsw2?
   2. Does nox1 could discover nox2?
   3. The packages between ofsw1 and ofsw2 are using OpenFlow
   protocol? And how about nox1 and nox2?

   Thanks
   Bests,

   JW

  

   ___
   

Re: [nox-dev] The conversation between two NOXs

2010-03-25 Thread Jen-Wei Hu
Dear martin,

Thanks for your reply. We just think when the network environment contains
more than 2 NOXs, what is the behavior between them? So, NOX do not do the
load balance currently?

By the way, We still have some questions which need to your help.
1) What is the process that NOX want to build its controlled OpenFlow
switches topology? NOX will send an event to notify all controlled OpenFlow
switches, then all OpenFlow switches will send LLDP out from their owned
ports to all connected switches?
2) The discoveried topology will be stored on NOX?
3) Support we have a network topology, which showed below, these OpenFlow
switches are all controlled by one NOX. What do the NOX write into the
flowtables of these OpenFlow switches when user ping host2 from host1?

host1 -- ofsw1 ---  ofsw2
   |  |
   |  |
ofsw3 ---  ofsw4  --  host2

We really appreciate to all the help you gave us.
Best,

JW

On Fri, Mar 26, 2010 at 5:55 AM, Martin Casado cas...@nicira.com wrote:

 Hi JW,

 Nox was not built to support coordination between two instances.  Why don't
 control both switches from the same Nox process?

 .martin

  Dear all,

 We just join the world of OpenFlow and NOX lately. Everything for us is
 new and also doesn't know how to start. Currently, we have built the
 enviroment which contains 1 NOX (nox1), 1 OpenFlow switch with NetFPGA
 (ofsw1), and 2 hosts which connect to ofsw1. After installing, we got some
 quesions about it. Could someone could help us?

 (current)
 nox1 -- ofsw1
  |--- host1
  |--- host2

 (suppose)
 nox1 -- ofsw1 - ofsw2 -- nox2
  |--- host1
  |--- host2

 1. Suppose we add 1 OpenFlow switch (ofsw2) and 1 NOX (nox2), let this
 ofsw2 connects to nox2 and sw1. The LLDP will let nox1 discover ofsw1, how
 let nox1 also discovery ofsw2?
 2. Does nox1 could discover nox2?
 3. The packages between ofsw1 and ofsw2 are using OpenFlow protocol? And
 how about nox1 and nox2?

 Thanks
 Bests,

 JW
 

 ___
 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