Re: [nox-dev] Basic Network Monitor : LAVI and ENVI

2012-03-07 Thread kk yap
Hi

You probably missed this...  In the link you attached
(http://www.openflow.org/wk/index.php/LAVI)...

The latest version of LAVI uses a JSON backend, which has to be
translated to work with the binary-formatted ENVI using a translator
provided.

Regards
KK

On 7 March 2012 03:47, Hyogi Jung hgj...@mmlab.snu.ac.kr wrote:
 Hi all

 I am a master student in South Korea.
 I want to visualize an OpenFlow network with information provided by the
 Nox-based lavi backend.

 I use below nox git and envi source.

 nox : git clone git://noxrepo.org/nox
 envi : git clone git://github.com/dound/envi.git

 Nox is started by this command.
 ./nox_core -i ptcp:6633 jsonmessenger=tcpport=11222,sslport=0 lavi_switches
 lavi_swlinks switch
 (link : http://www.openflow.org/wk/index.php/LAVI:Miscellaneous)

 And run ant in the envi gui directory, then ant run.
 (link : http://www.openflow.org/wp/gui/)

 Envi's input that ask the IP or hostname of the backend is 127.0.0.1:11222.
 Because Nox run TCP server on port 11222.

 But nox has a problem like this.

 json syntax error at:
 json syntax error at:
 json syntax error at:
 json syntax error at:

 In mailing-list
 (http://noxrepo.org/pipermail/nox-dev/2011-September/008033.html)

 KK's reply

 LAVI in the zaku branch uses a new JSON format and a different port.
 nox-gui.py in the destiny branch is another example.  More is
 said here: http://www.openflow.org/wk/index.php/LAVI;

 So, I use nox-console.py example.

 python nox-console.py -v -p 11222 -n 127.0.0.1 getlinks
 python nox-console.py -v -p 11222 -n 127.0.0.1 getnodes

 Above command work well.

 How can I solve the nox  problem related envi monitoring tool? Could you
 help me?

 Thank you.

 Regards
 Hyogi











 ___
 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] Receiving JSON messages

2012-01-29 Thread kk yap
Hi,

Reading the documentation might help.
http://noxrepo.org/~yapkke/doc/classvigil_1_1jsonmessenger.html#_details

Try have a type field.

Regards
KK

On 29 January 2012 07:34, Giorgio Mazza giorgio.mazza...@gmail.com wrote:
 A little update and a further question :)

 With destiny's messenger my component works, even adding jsonmessenger as a
 dependency. Also Jsonmsg_events are raised and handled without errors by my
 callback and I solved the dummy timer problem with the client disconnection.

 Now, I have a strange behaviour with my callback that seems to handle only
 messages that have the default syntax described in jsonmessenger.hh ( just
 above the definition of the jsonmessenger class).
 If I send a 'connect' or a 'disconnect' message it is handled by my
 callback, while, if I send a different message (that's what I want to do),
 jsonmessenger posts a JSONMsg_event, that it is simply ignored by my
 callback.

 That 's a snippet of my install function:

 from nox.coreapps.messenger.pyjsonmsgevent import JSONMsg_event
 JSONMsg_event.register_event_converter(self.ctxt)
 self.register_handler(JSONMsg_event.static_get_name(),
 self.json_message_callback)


 That's my (temporary) callback:

 def json_message_callback(self, e):
         import json
         global cache_server_table
         message = json.loads(e.jsonstring)
         cache_server_table.update(message)
         print message
         print cache_server_table
         e.reply(json.dumps({MSG:Welcome! I am the Controller}))
         if cache_server_table.has_key(MSG):
             print cache_server_table[MSG]
             if cache_server_table[MSG] == Connection setup:
                 cache_server_MAC = cache_server_table[MAC]
                 print cache_server_MAC
         return CONTINUE


 And that's what I get as output:

 00046|nox|INFO:nox bootstrap complete
 00047|messenger_core|DBG:Starting connection with idleInterval 0
 00048|jsonmessenger|DBG:JSON message of length 18 (connect)
 00049|jsonmessenger|DBG:JSON message of length 18
 00050|jsonmessenger|DBG:JSON: {type:connect}
 {u'type': u'connect'}
 --- the two print instruction
 {u'type': u'connect'}
 --- in the callback
 00051|messenger_core|DBG:Sent string of length 39 socket 0x8e536c0
 00052|messenger_core|DBG:TCP socket connection accepted
 00053|messenger_core|DBG:Copy 74 bytes to message
 00054|messenger_core|DBG:Received packet of length 74
 00055|jsonmessenger|DBG:JSON message of length 74
 00056|jsonmessenger|DBG:Message posted as JSONMsg_event
 - after that I would expect the
 output of my callback (the two print instruction)
 00057|jsonmessenger|DBG:JSON:
 {MAC:08:00:27:cc:77:1c,IP:10.0.10.2,MSG:Connection setup}
 00058|messenger_core|DBG:Copy 22 bytes to message
 00059|messenger_core|DBG:Received packet of length 22
 00060|jsonmessenger|DBG:JSON message of length 22
 00061|jsonmessenger|DBG:Message posted as JSONMsg_event

 00062|jsonmessenger|DBG:JSON: {type:disconnect}
 00063|jsonmessenger|DBG:Clear connection state for 0x8e536c0
 {u'type': u'disconnect'}
 {u'type': u'disconnect'}


 So, the question is: Why my callback does not handle events posted by
 jsonmessenger? How can I fix that? Is there any particular syntax I have to
 follow so that it is a json-related error?

 Thanks in advance.

 Regards,
 Giorgio



 On 27/01/2012 16:42, kk yap wrote:

 Hi Giorgio,

 Your client is disconnecting before the reply is sent.  If you look at
 nox-console.py, it should be a good example to follow.

 Regards
 KK

 On 27 January 2012 05:12, Kyriakos Zarifis kyr.zari...@gmail.com wrote:

 A JSONMsg_event is just another NOX event and us such it will either passed
 on to all components down the event handler chain or stopped by one of them.
 Your handler needs to return a valid NOX event disposition (
 http://noxrepo.org/noxwiki/index.php/Disposition  )
 So in your case you just need to add a return STOP and the error will
 disappear.


 As for the other comment, I'm not sure how messenger_core cleans the
 connections state/closes socket. It might very well be a timing issue, maybe
 the connection state hasn't been cleaned when the event is processed. I
 don't know if the log messages represent the reality 100%. In any case the
 last message is either never really sent or it's sent to the void. Either
 way I'd just ignore it, I doubt it will affect anything


 On Fri, Jan 27, 2012 at 3:02 AM, Giorgio Mazza giorgio.mazza...@gmail.com
 wrote:

 I tried this way:  I replaced zaku's default messenger folder with
 destiny's messenger one (nox/src/nox/coreapps/messenger), that I had
 previously downloaded and installed.
 Then I recompiled zaku and the import error disappeared, so that when I
 run
 ./nox_core -v -i ptcp:6633 jsonmessenger=tcpport=3334 my_component
 I do not get errors anymore and components are installed successfully.
 However, when I try to send a json message from my

Re: [nox-dev] Receiving JSON messages

2012-01-27 Thread kk yap
Hi Giorgio,

Your client is disconnecting before the reply is sent.  If you look at
nox-console.py, it should be a good example to follow.

Regards
KK

On 27 January 2012 05:12, Kyriakos Zarifis kyr.zari...@gmail.com wrote:
 A JSONMsg_event is just another NOX event and us such it will either passed
 on to all components down the event handler chain or stopped by one of them.
 Your handler needs to return a valid NOX event disposition (
 http://noxrepo.org/noxwiki/index.php/Disposition  )
 So in your case you just need to add a return STOP and the error will
 disappear.


 As for the other comment, I'm not sure how messenger_core cleans the
 connections state/closes socket. It might very well be a timing issue, maybe
 the connection state hasn't been cleaned when the event is processed. I
 don't know if the log messages represent the reality 100%. In any case the
 last message is either never really sent or it's sent to the void. Either
 way I'd just ignore it, I doubt it will affect anything


 On Fri, Jan 27, 2012 at 3:02 AM, Giorgio Mazza giorgio.mazza...@gmail.com
 wrote:

 I tried this way:  I replaced zaku's default messenger folder with
 destiny's messenger one (nox/src/nox/coreapps/messenger), that I had
 previously downloaded and installed.
 Then I recompiled zaku and the import error disappeared, so that when I
 run
 ./nox_core -v -i ptcp:6633 jsonmessenger=tcpport=3334 my_component
 I do not get errors anymore and components are installed successfully.
 However, when I try to send a json message from my external application I
 get a strange behaviour. I don't understand very well what is happening and
 why I get this error, so I do not know if it is my fault in doing something
 or if I need to hack something because the simple replacement of messenger
 folder is not enough.

 My callback is fairly simple for the moment and the only thing it does is
 to store the value of the received json message and to answer with a Hello
 world message, like that:
     def json_message_callback(self, e):
         import json
         global cache_server_table    #the global dict where I
 want to store received json information
         cache_server_table = json.loads(e.jsonstring)
         print cache_server_table

         e.reply(json.dumps({msg:Hello world}))


 This is my simple external application:

 import json
 import socket

 HOST = '10.0.10.1'
 PORT = 3334
 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
 s.connect((HOST, PORT))
 print Connected to server:  + str(s.getpeername())
 message={msg:CS-setup,mac:x,ip:10.0.10.2}
 json_message=json.dumps(message)
 s.send(json_message)
 print Sent JSON message
 data = s.recv(1024)
 print 'Received', repr(data)


 And this is what I get in the controller prompt, after executing the above
 code:

 00045|openflow|DBG:Passive tcp interface bound to port 6633
 00046|nox|INFO:nox bootstrap complete
 00047|messenger_core|DBG:Starting connection with idleInterval 0
 00048|jsonmessenger|DBG:JSON message of length 18 (connect)
 00049|jsonmessenger|DBG:JSON message of length 18
 00050|jsonmessenger|DBG:JSON: {type:connect}
 {u'type': u'connect'}
 00051|messenger_core|DBG:Sent string of length 22 socket 0x8b9ff48
 00052|pyrt|ERR:Python handler returned invalid Disposition.
                          No idea
 00053|messenger_core|DBG:TCP socket connection accepted
 00054|messenger_core|DBG:Copy 54 bytes to message
 00055|messenger_core|DBG:Received packet of length 54
 00056|jsonmessenger|DBG:JSON message of length 54
 00057|jsonmessenger|DBG:Message posted as JSONMsg_event
 00058|jsonmessenger|DBG:JSON:
 {mac:x,msg:CS-setup,ip:10.0.10.2}
 00059|jsonmessenger|DBG:JSON message of length 21 (disconnect)
 00060|jsonmessenger|DBG:JSON message of length 21
 00061|messenger_core|DBG:socket closed
 00062|jsonmessenger|DBG:JSON: {type:disconnect}
 00063|jsonmessenger|DBG:Clear connection state for 0x8b9ff48
 {u'type': u'disconnect'}
 00064|messenger_core|DBG:Sent string of length 22 socket
 0x8b9ff48   -- It seems that my
 callback tries to answer when the socket is already closed. Why?
 00065|pyrt|ERR:Python handler returned invalid Disposition.


 Any idea or suggestion will be appreciated.

 Regards,
 Giorgio



 On 26/01/2012 23:39, Kyriakos Zarifis wrote:

 That's the reason; the jsonmsg_event isn't exposed in python on zaku.
 I'd really encourage you to try to migrate to destiny. Not only because
 this will work, but more importantly because destiny is a far more developed
 branch by now, with many fixes and added features.

 If you really don't want to switch to destiny, maybe you could just grab
 jsonmsg_event.i from destiny and stick it in your zaku tree. (I can't
 remember if this is going to just work or you'll need to hack something, but
 give it a try and see what breaks?)

 On Thu, Jan 26, 2012 at 1:37 PM, Giorgio Mazza
 giorgio.mazza...@gmail.com wrote:

 Yes, I'm using 

Re: [nox-dev] A couple of questions about simplerouting.

2011-10-23 Thread kk yap
Hi,

I am confused.   I am guessing you have the packet-in?  Are the flow-mod
looking okay?

More question inline.

2011/10/23 Min-Hyup KANG kang-min-h...@hanmail.net

   Hi,

 Sorry, I will not try to mail you in private mail.

 check connectivity is ping test between end hosts.

Thanks.  That clarifies things.



  so, While I run pyswitch, Flowtable is made successfully,

 CLI# flowtable
 Flow table show
 port L3src L3dst L4src L4dst Out_P packets
 6 192.168.1.2 192.168.1.1 0 0 8 3
 8 192.168.1.1 192.168.1.2 8 0 6 3
 6 0.0.0.0 0.0.0.0 0 0 8 1
 CLI#


 As you know, Simplerouting install shortest path to switch.


Yes I do realized that.


 00090|simplerouting|DBG:Sending packet of port0004:vlan:pcp:0
 mac00:0f:b0:6f:ea:e2-00:0f:b0:72:1b:e3 proto0806 ip192.168.1.2-192.168.1.1
 port0-0 via control

 But, Flowtable is NOT made normally.

What does this mean?



  CLI# flowtable

 Flow table show
 ERROR: Status nil, operation did not complete.
 Error string given: transact ERROR: Could not connect to server; op: GET.
 uri: /cs/1.0/flowtable id 16
 Error handing command flowtable. No flow table entries returned
 CLI#

Seems switch specific to me here.



  I don't know exactly wheather it is problem of switch or NOX.

 Mr.Dan said That seems like a NOX question.

Can you give us the tcpdump of the control traffic? This is a moot argument
until you can be sure what transpired.

Regards
KK



 I doubt that limitation of Pronto 3290 can't make flowtable.

 Any suggestion ?



 - 원본 메일 -

 *보낸사람*: kk yap yap...@stanford.edu
 *받는사람* : Min-Hyup KANG kang-min-h...@hanmail.net
 *참조* : Murphy McCauley jam...@nau.edu, nox-dev nox-dev@noxrepo.org
 *날짜*: 2011년 10월 23일 일요일, 23시 49분 02초 +0900
 *제목*: Re: A couple of questions about simplerouting.

 Hi Min-Hyun,

 cc-ing the mailing list again.

 First, try not to email us in private email unless it is truly appropriate.
  I tend to ignore these emails.

 Long story short, I do not understand what is check connectivity.  You
 have to describe your problem more.  And I suspect you need to do a little
 more debugging to know what is wrong, before we can help you.

 Regards
 KK


 2011/10/23 Min-Hyup KANG 
 kang-min-h...@hanmail.nethttp://hanmail/mail/MailComposeFrame.daum?TO=kang-min-h...@hanmail.net
 

   Hi,


 I am currently facing simplerouting problem..

 Let me arrange precise my situation.

 I don't know exactly wheather it is problem of switch or NOX(zaku)

 When I run ./nox_core -i ptcp:6633 pyswitch, I can check connectivity
 between end hosts,

 But, When I run ./nox_coire -i ptcp:6633 simplerouting, I CAN NOT check
 connectivity between end hosts.

 Pronto 3290 switch has some limitations.(
 http://www.openflowhub.org/display/Indigo/Indigo+2011.10.03+Release+Notes
 )
 Is it Fatal limitation ?

 Any tips would help me.

 Many thanks.


 Below is limitation of pronto 3290 switch.
 Counters are byte or packet, not both

 For flows, only packet counters or byte counters are supported, not both
 simultaneously. In the configuration of this release, only packet counters
 are supported. Applies to all platforms.
 Actions sequencing is not supported.

 For example, the action list with 4 actions: (1) set VID to X, (2) output
 to port A, (3) set VID to Y, (4) output to port B has the intention of
 sending the packet out on different ports with different VLANs. This is not
 supported. However, sending to multiple ports by specifying each port in a
 different output action is supported. Applies to all platforms.
  Not all OpenFlow actions are supported.

 The following are not currently supported on any Indigo platform:


 OFPAT_SET_NW_SRC (Set L3 IP source address)
 OFPAT_SET_NW_DST (Set L3 IP destination address)
 OFPAT_SET_TP_SRC (Set L4 source port)
 OFPAT_SET_TP_DST (Set L4 destination port)

 The following are only supported on the Pronto 3290 and the Triumph 2
 reference:


 OFPAT_SET_DL_SRC (Set L2 MAC source address)
 OFPAT_SET_DL_DST (Set L2 MAC destination address)

 OFPAT_STRIP_VLAN (Strip VLAN tag) is supported (but with only limited
 validation) on the 3290 and 3240 platforms. On other platforms, the function
 can be implemented by setting to the system's untagged VLAN (untested).
  Cannot multicast and wildcard source port.

 Actions with a wildcard source port may not specify flood nor multicast
 (multiple output ports) with the expectation of source port blocking.






 Best Regards,
 Min-Hyup KANG

 http://hanmail/mail/MailComposeFrame.daum?TO=kang-min-h...@hanmail.net








 Best Regards,
 Min-Hyup KANG

 kang-min-h...@hanmail.net

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


Re: [nox-dev] Accessing TCP sequence numbers on packet-in-events

2011-10-12 Thread kk yap
Hi Andrea,

My suggestion would be for you to overload the Flow struct with your
own.  In that new struct, you can override how pull_tcp works and have
an additional field that stores the seq number.

Try not to muck with the main distribution, though it is the
convenient thing to do (at least in the short term).  You will find
that you will diverge from the main distribution and need to fix bugs
on your own later.

Regards
KK

On 12 October 2011 02:51, andrea simeoni andreasimeon...@gmail.com wrote:
 Hi KK,

 I think it is exactly want I need to solve my problem. Now the question is:
 I need to call the static pull_tcp(..) function defined in flow.cc. Well how
 do I include that file? Maybe it's a stupid question, but I'm not so used to
 C++.

 Thank you in advance

 2011/10/11 kk yap yap...@stanford.edu

 Hi Andrea,

 In flow.cc, the flow struct is defined and that is used to parse the
 packet-in content.  You can get the seq number for tcp_header which is
 described in packets.h.  It should not be hard to parse this, since
 the packet is parsed for the various headers already.

 Regards
 KK

 On 11 October 2011 12:07, andrea simeoni andreasimeon...@gmail.com
 wrote:
  Hi Murphy,
 
  thank you for answering. I' ve already checked in /inet++, and I found
  the
  tcp.hh file.
  At first hand it seems being not useful for my task. Or maybe it is, by
  I
  don't know how to make it useful :)
  I'm right? The file is only few lines of code, so if you have
  suggestions it
  would not take too much time.
 
  Thank you very much
 
 
  2011/10/11 Murphy McCauley jam...@nau.edu
 
  It's not quite as developed as the Python packet library, but take a
  look
  in include/netinet++.
 
  -- Murphy
 
   Hi guys,
  
   I'm writing a C++ component that needs to access the TCP sequence
   number
   of a packet upon packet-in-event notification.
   Is there an high level function that simplifies such task? Or I have
   to
   take an offset after calling the get_buffer() function from the
   event?
  
   Thank you.
   --
   Andrea Simeoni
   ___
   nox-dev mailing list
   nox-dev@noxrepo.org
   http://noxrepo.org/mailman/listinfo/nox-dev
 
 
 
 
  --
  Andrea Simeoni
 
  ___
  nox-dev mailing list
  nox-dev@noxrepo.org
  http://noxrepo.org/mailman/listinfo/nox-dev
 
 



 --
 Andrea Simeoni

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


Re: [nox-dev] Accessing TCP sequence numbers on packet-in-events

2011-10-11 Thread kk yap
Hi Andrea,

In flow.cc, the flow struct is defined and that is used to parse the
packet-in content.  You can get the seq number for tcp_header which is
described in packets.h.  It should not be hard to parse this, since
the packet is parsed for the various headers already.

Regards
KK

On 11 October 2011 12:07, andrea simeoni andreasimeon...@gmail.com wrote:
 Hi Murphy,

 thank you for answering. I' ve already checked in /inet++, and I found the
 tcp.hh file.
 At first hand it seems being not useful for my task. Or maybe it is, by I
 don't know how to make it useful :)
 I'm right? The file is only few lines of code, so if you have suggestions it
 would not take too much time.

 Thank you very much


 2011/10/11 Murphy McCauley jam...@nau.edu

 It's not quite as developed as the Python packet library, but take a look
 in include/netinet++.

 -- Murphy

  Hi guys,
 
  I'm writing a C++ component that needs to access the TCP sequence number
  of a packet upon packet-in-event notification.
  Is there an high level function that simplifies such task? Or I have to
  take an offset after calling the get_buffer() function from the event?
 
  Thank you.
  --
  Andrea Simeoni
  ___
  nox-dev mailing list
  nox-dev@noxrepo.org
  http://noxrepo.org/mailman/listinfo/nox-dev




 --
 Andrea Simeoni

 ___
 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] A question about network.graph.hh

2011-10-06 Thread kk yap
Hi,

Murphy and Andrea are right.  The structure is designed to store a
tree, thanks to my need for a multicast tree in OpenFlow.  So, it is
the output and reference to the next switch and the corresponding
input port at the next switch.

Regards
KK

On 6 October 2011 07:42, andrea simeoni andreasimeon...@gmail.com wrote:
 Hi Murphy,

 I think it should be the outport to the next hop too. I run some code that
 prints the value stored in such variable for each hop on a route, and I get
 always a 0 value; that maybe means that the variable is never initialized.
 Maybe it is a bug? I don't know

 2011/10/6 Murphy McCauley jam...@nau.edu

 .. do you mean uint16_t?

 KK is the one to ask, but I believe this is the port number -- I believe
 the pair is:
 (port-number, next-hop-out-that-port)

 -- Murphy

 On Oct 6, 2011, at 5:28 AM, andrea simeoni wrote:

  Hi guys,
 
  I'm using the hop struct defined in the file network-graph.hh.  I
  was able to navigate the structure, and I've well understood its recursive
  nature.
  But I have a question: for what stands the uint64_t field in the
   std::liststd::pairuint16_t, hop*  next_hops ?
 
  Thank you
 
  --
  Andrea Simeoni
  ___
  nox-dev mailing list
  nox-dev@noxrepo.org
  http://noxrepo.org/mailman/listinfo/nox-dev




 --
 Andrea Simeoni

 ___
 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] Getting dl_src, nw_src

2011-09-23 Thread kk yap
Hi,

nw_src and nw_dst are 32-bit unsigned integers , i.e., binary values of the
IP address.  This is how ofp_match is defined in OpenFlow.  It might help to
read the spec for the exact definition.

Regards
KK

2011/9/23 Min-Hyup KANG kang-min-h...@hanmail.net

   Hi All,


 I would like to get dl_src, nw_src in void
 lavi_hostflow::send_flow_list(const Flow flow, etc)


 So, I am printing some Flow values.


 For example, I used print function to get dl_src, nw_src.


 void lavi_hostflow::send_flow_list(const Flow flow,

  const network::route rte,

  const Msg_stream stream,

  bool add)

   {

 ...

 ...

 std::coutnw_src : flow.nw_srcstd::endl;

 std::coutnw_dst : flow.nw_dststd::endl;

 std::coutdl_src : flow.dl_srcstd::endl;

 std::coutdl_dst : flow.dl_dststd::endl;

   }


 and Below is outcome.

 As you can see, dl_src looks good, but nw_src isn't IP address..

 To get IP src,dst Address, What should I do ?


 ./nox_core

 .

 .
 nw_src : 16885952
 nw_dst : 33663168
 dl_src : 00:0f:b0:72:1b:e3
 dl_dst : 00:0f:b0:6f:ea:e2
 .
 .






















 Best Regards,
 Min-Hyup KANG

 kang-min-h...@hanmail.net
 ___
 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] NOX routing question

2011-09-20 Thread kk yap
Hi David,

AFAIK the information on the mailing list has been fairly consistent.
The answers then to differ depending on what you mean by a basic
router.  So your confusion is understandable.

If you want to route between two points in the network, i.e.,
inserting all the flow rules on the affected switches at one go, then
NOX does okay as long as there is no loop.  The problem with loops is
not with routing but a broadcast storm will result due to the way
broadcast packets are handled.

If your basic router need to bridge subnets, then you are asking for a
lot more.  One important item is of course responding to ARPs
appropriately.  All of which are not implemented in the default
distribution to the best of my knowledge.

Hope this information is clear.

Regards
KK

On 19 September 2011 23:38, danderson415 danderson...@gmail.com wrote:
 Hi Kok-Kiong,
 I hope this email is not too abrupt for you. I planed to send the question
 to nox-dev@ email list. Before my subscription is approved, I would like to
 ask you as you are an expert in this area.
 Basically I want to make OVS a basic router. Is routing component in NOX
 distribution good enough? After search in the Internet, I get two
 conflicting information: someone said routing is working as long as there is
 no loop; someone said routing is not working because there is no ARP support
 in OVS. Which one is right? What is the easiest way to get a functional OVS
 based router so two hosts in different subnets can ping each other?
 Thanks a lot!
 Best,
 David
___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


Re: [nox-dev] NOX routing question

2011-09-20 Thread kk yap
Hi David,

I have not thought through the entire solution space, but you would
need to handle the Ethernet addresses too?  I suspect you can achieve
the solution by changing only the controller.  The solution would be
cool.  Hope to see someone put something out.  Even a rough solution
would be cool.

Regards
KK

On 20 September 2011 13:49, danderson415 danderson...@gmail.com wrote:
 I see. So if I set up ARP entries statically using arp command, the ping
 should work, right?
 Thanks for your prompt reply.
 David
 On Tue, Sep 20, 2011 at 4:30 AM, kk yap yap...@stanford.edu wrote:

 Hi David,

 AFAIK the information on the mailing list has been fairly consistent.
 The answers then to differ depending on what you mean by a basic
 router.  So your confusion is understandable.

 If you want to route between two points in the network, i.e.,
 inserting all the flow rules on the affected switches at one go, then
 NOX does okay as long as there is no loop.  The problem with loops is
 not with routing but a broadcast storm will result due to the way
 broadcast packets are handled.

 If your basic router need to bridge subnets, then you are asking for a
 lot more.  One important item is of course responding to ARPs
 appropriately.  All of which are not implemented in the default
 distribution to the best of my knowledge.

 Hope this information is clear.

 Regards
 KK

 On 19 September 2011 23:38, danderson415 danderson...@gmail.com wrote:
  Hi Kok-Kiong,
  I hope this email is not too abrupt for you. I planed to send the
  question
  to nox-dev@ email list. Before my subscription is approved, I would like
  to
  ask you as you are an expert in this area.
  Basically I want to make OVS a basic router. Is routing component in NOX
  distribution good enough? After search in the Internet, I get two
  conflicting information: someone said routing is working as long as
  there is
  no loop; someone said routing is not working because there is no ARP
  support
  in OVS. Which one is right? What is the easiest way to get a functional
  OVS
  based router so two hosts in different subnets can ping each other?
  Thanks a lot!
  Best,
  David


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


Re: [nox-dev] Running Lavi

2011-09-20 Thread kk yap
Seems like an invalid JSON string is being returned.  See what you get
when you print sock.recv(4096).

Regards
KK

On 20 September 2011 21:13, Aaron Rosen aro...@clemson.edu wrote:
 Thanks kk,
 Quick question, I'm getting the following error with getlinks any idea?
  getnodes works fine though.
 arosen@laptop ~/devel/nox/src/scripts $ python nox-console.py  -n awesome -p
 11222  getlinks
 Traceback (most recent call last):
   File nox-console.py, line 104, in module
     print simplejson.dumps(simplejson.loads(sock.recv(4096)), indent=4)
   File /usr/lib64/python2.7/site-packages/simplejson/__init__.py, line
 385, in loads
     return _default_decoder.decode(s)
   File /usr/lib64/python2.7/site-packages/simplejson/decoder.py, line 402,
 in decode
     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
   File /usr/lib64/python2.7/site-packages/simplejson/decoder.py, line 418,
 in raw_decode
     obj, end = self.scan_once(s, idx)
 ValueError: end is out of bounds



 On Wed, Sep 21, 2011 at 12:00 AM, kk yap yap...@stanford.edu wrote:

 Hi Aaron,

 LAVI in the zaku branch uses a new JSON format and a different port.
 nox-gui.py in the destiny branch is another example.  More is said
 here:

 http://www.openflow.org/wk/index.php/LAVI

 Regards
 KK

 On 20 September 2011 15:09, Aaron Rosen aro...@clemson.edu wrote:
  Hello,
  I was thinking about writing a front end that could integrate with Lavi
  (the
  way envi does). Right now I'm just playing around with them. Anyone know
  how
  to run lavi and connect envi? I tired doing ./nox_core -i ptcp:6633 lavi
  but envi keeps telling me that it cannot connect.
  If i do ./nox_core  -i ptcp:6633  jsonmessenger=tcpport=2503 lavi
  I get a json syntax error from nox.
  Thanks,
  Aaron
 
  --
  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
 
 



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


Re: [nox-dev] Get a new Datapath ID?

2011-09-12 Thread kk yap
Hi Shrutarshi,

I am not sure why you would need to get the IP address on the switch
so as to write a NAT application.  The IP address assigned to the
switch/NAT box can be logical (i.e., the controller knows about it and
not the switch).  The rewriting of the IP addresses, transport ports,
etc. are be done by the flow rules anyway.

PS If your NAT box is getting its IP address via DHCP, then let me
know because you can cheat a little to get the address in the
controller.

Hope this helps.

Regards
KK

On 8 September 2011 07:37, Shrutarshi Basu ba...@cs.cornell.edu wrote:



 On Thu, Sep 8, 2011 at 10:31 AM, Nicholas Bastin nbas...@stanford.edu
 wrote:

 On Thu, Sep 8, 2011 at 09:56, Aaron Rosen aro...@clemson.edu wrote:

 I'm not sure how you would go about obtaining the switches ip though
 nox. Though it think it should be possible to get when the switches
 join. Any reason you would need to do that?


 I'm trying to write a network translation application where a switch acts as
 a NAT box. Looking through core.py I can see that the datapath_join handler
 is called with an attrs dictionary (which I assume contains switch
 information) but the code comments don't say what the contents of attrs are.

 The dp_desc of the switch *may* contain the IP address (no guarantees in
 the spec).

 Is there some reliable way to get the IP of the switch? Even if it has to be
 a separate query?
 Thanks,
 Basu


 --
 --
 Shrutarshi Basu
 Basus.me
 The ByteBaker -- because Computer Science is not about computers

 ___
 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] How to send request and fetch reply

2011-08-10 Thread kk yap
Hi Ali,

You can take a look at the datapathmem component.  I suspect that does
most of what you want.

Regards
KK

On 10 August 2011 02:10, ali ahmad aliahmad...@hotmail.com wrote:

 Can u please tell me how to do coding for this because i am new to this .If
 not possible that than please do give me the links of any tutorials of
 coding in this domain.
 Regards,
 Ali Ahmad
 From: yap...@stanford.edu
 Date: Tue, 9 Aug 2011 09:45:44 -0700
 Subject: Re: [nox-dev] How to send request and fetch reply
 To: aliahmad...@hotmail.com
 CC: nox-dev@noxrepo.org

 Just listening for datapath_join_event. NOX send
 OFPT_FEATURES_REQUEST when a switch connects and the
 OFPT_FEATURES_REPLY is contained in the datapath_join_event.

 Regards
 KK

 On 9 August 2011 09:38, ali ahmad aliahmad...@hotmail.com wrote:
  Hy!
     I want to know, what's the procedure to send a request to controller
  like OFPT_FEATURES_REQUEST  and how to receive the  OFPT_FEATURES_REPLY
  message.
  In short what i have to code for the controller to do all this.
  ___
  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] How to send request and fetch reply

2011-08-09 Thread kk yap
Just listening for datapath_join_event.  NOX send
OFPT_FEATURES_REQUEST when a switch connects and the
OFPT_FEATURES_REPLY is contained in the datapath_join_event.

Regards
KK

On 9 August 2011 09:38, ali ahmad aliahmad...@hotmail.com wrote:
 Hy!
    I want to know, what's the procedure to send a request to controller
 like OFPT_FEATURES_REQUEST  and how to receive the  OFPT_FEATURES_REPLY
 message.
 In short what i have to code for the controller to do all this.
 ___
 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] Change the destination of packets

2011-07-24 Thread kk yap
I mean a tcpdump of the control traffic.  Not datapath.  :)

On 24 July 2011 10:04, Ricardo Bennesby ricardo.benne...@gmail.com wrote:
 Hi. The tcpdump .pcap file the print of a dump-flows command are attached.
 The dump-flows, tcp-dump and wireshark shows the same result: I first ping
 from 192.168.47.1 (h1- n2) to 10.0.0.2 (h2-n1) and take mac address, port
 and IP of h2. Then, when I ping from 192.168.47.1 to 192.168.47.2 (h2-n2) I
 want the packets be forwarded to 10.0.0.2.
 As the files shows, the packets are forwarded to MAC address desired, but it
 continues looking for the original IP, it means that it is not modified in
 the flow_mod.
 I tried in several way, fixing the original IP in the match field and
 setting an action to change the destination IP, but it didn't work. It con
 continues generating ARP request for 192.168.47.2.
                     ofp_action_nw_addr *nwaction = (ofp_action_nw_addr
 *)malloc(sizeof(ofp_action_nw_addr));
                     nwaction-type = htons(OFPAT_SET_NW_DST);
                     nwaction-len = htons(sizeof(ofp_action_nw_addr));
                     nwaction-nw_addr = inet_addr(10.0.0.2);
 In past discussions in the list, was said that openflow does routing in
 Layer 2. Is this a cause of destination IP does not change? Or am I missing
 something?
 Thank you very much for help.
 Best Regards.

 2011/7/21 kk yap yap...@stanford.edu

 A tcpdump of the control traffic will be useful and easier.

 Regards
 KK

 On 21 July 2011 16:04, Ricardo Bennesby ricardo.benne...@gmail.com
 wrote:
  Hi KK. I tested as you suggested.
  ofm-match.nw_dst = htons(36677824); // I tested also ofm-match.nw_dst
  =
  flow.nw_dst;
  and in the action I did:
  nwaction-nw_addr = htons(new_ip);
  But it continue trying to send to IP 192.168.47.2...
  The Wireshark continues showing these:
  Ethernet II, Src: 5a:8c:01:8b:e0:fb (5a:8c:01:8b:e0:fb), Dst:
  62:4c:de:97:90:e4 (62:4c:de:97:90:e4)
  Internet Protocol, Src: 192.168.47.1 (192.168.47.1), Dst: 192.168.47.2
  (192.168.47.2)
 
  The MAC adress is of host with IP 10.0.0.2. So the dataframes arrive in
  this
  host. But the destination IP continues without midifications.
  Any suggestion?
  Thank you very much.
  Best Regards.
  2011/7/21 kk yap yap...@stanford.edu
 
  Hi Ricardo,
 
  Try matching on the old IP, then rewrite to the new IP.
 
  Regards
  KK
 
  On 20 July 2011 14:50, Ricardo Bennesby ricardo.benne...@gmail.com
  wrote:
   Hi all. I would like to forward packets from one host to another.
   I have the following topology:
      c0              c0
       |                 |
      s3- s3
     /    \            /   \
    h1  h2        h1   h2
   Each host can ping each other. The two networks are connected by
   their
   switches (s3).
   In net1 h1 and h2 have IP 10.0.0.1 and 10.0.0.2.
   In net2 h1 and h2 have IP 192.168.47.1 and 192.168.47.2
   I want that everytime I ping from some host in 192.168.47.2 the
   packets
   be
   forward to 10.0.0.2.
   I am using the switch.cc component and making some modifications on
   it.
   I set some actions to achieve this, using flow_mod and changing the
   out_port, destination mac_address and destination IP.
   Using wireshark, listening to the port where h2 (10.0.0.2) is, I saw
   that it
   got an ARP request from h1. So, looks like the packets arrive in the
   correct
   ethernet address, but it continue asking for 192.168.47.2. The
   destination
   IP was not modified. The code follows:
       if (flow.nw_dst == 36677824){//if destination ip=192.168.47.2
                  uint8_t no_of_actions_len = 56;
                  uint8_t action_length =
   no_of_actions_len/(sizeof(struct
   ofp_action_header));
                  unsigned char *action_type = (unsigned
   char*)malloc(action_length*sizeof(struct ofp_action_header));
               ofp_flow_mod* ofm;
                      size_t size = sizeof *ofm +
   7*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-match.wildcards = htonl(0);
                      ofm-match.wildcards = htonl(120 | 11);
                      ofm-match.in_port = htons(flow.in_port);
                      ofm-match.dl_vlan = flow.dl_vlan;
                      ofm-match.dl_vlan_pcp = flow.dl_vlan_pcp;
                      memcpy(ofm-match.dl_src, flow.dl_src.octet,
   sizeof
   ofm-match.dl_src);
                      memcpy(ofm-match.dl_dst, new_mac.octet, sizeof
   ofm-match.dl_dst);
                      ofm-match.dl_type = flow.dl_type;
                      ofm-match.nw_src = flow.nw_src;
                      ofm-match.nw_dst = new_ip;
                      ofm-match.tp_src = flow.tp_src;
                      ofm-match.tp_dst

Re: [nox-dev] handle_flow_route Event

2011-07-21 Thread kk yap
Is there a question in this email?

KK

2011/7/21 Min-Hyup KANG kang-min-h...@hanmail.net

   Thank you for your response.


 1.  You need to include the header file for the definition of the event,
 then create the event, populate it and post it.

 -Basically, there is part of flow_route_event in lavi_hostflow.cc. so I
 don't have to include the header file, right ?

 .

 register_handlerFlow_route_event

   (boost::bind(lavi_hostflow::handle_flow_route, this, _1));

   Disposition lavi_hostflow::handle_flow_route(const Event e)

 .


 2, One of the lavi component (though I forgot which one) will listen for
 that event and send a message to ENVI.  

 - lavi_hostflow inherit lavi_flows, so lavi_hostflow has JSONmsg_event
 handler.

 I think JSONmsg_event handler seems to check type, command, node_type.

 if command is request,  send_list-send_flow_list(reply add)

 if subscribe , interested.push_back

 if unsubscribe, interested.erase,

 so, I don't know flow_route_event is run at some point,

 

  register_handlerJSONMsg_event

  (boost::bind(lavi_flows::handle_req, this, _1));


   Disposition lavi_flows::handle_req(const Event e)

   {

 const JSONMsg_event jme = assert_castconst JSONMsg_event(e)

 


 Thanks,


 - 원본 메일 -

 *보낸사람*: kk yap yap...@stanford.edu
 *받는사람* : Min-Hyup KANG kang-min-h...@hanmail.net
 *참조* : NOX-dev nox-dev@noxrepo.org
 *날짜*: 2011년 7월 22일 금요일, 01시 59분 28초 +0900
 *제목*: Re: [nox-dev] handle_flow_route Event

 Hi,

 This is a standard procedure in NOX.  You need to include the header file
 for the definition of the event, then create the event, populate it and post
 it.  One of the lavi component (though I forgot which one) will listen for
 that event and send a message to ENVI.  Look at lavi_hosts (I think) for an
 example.

 Regards
 KK

 PS Sorry, I did not find time to look up the code before replying.

 2011/7/18 Min-Hyup KANG 
 kang-min-h...@hanmail.nethttp://hanmail/mail/MailComposeFrame.daum?TO=kang-min-h...@hanmail.net
 

   Hi All,


 I am currently trying to understand relation between LAVI and ENVI.


 especially, I am looking at part of lavi_flow and lavi_hostflow to add and
 delete on ENVI.


 To handle event such as add and delete flows on ENVI,


  I think I should generate Handle_flow_route event in
 netapps/lavi/lavi_hostflow.cc.


 so, how can I generate handle_flow_route event ? or where does it operate
 the event ?





 Best Regards,
 Min-Hyup KANG

 http://hanmail/mail/MailComposeFrame.daum?TO=kang-min-h...@hanmail.net
 ___
 nox-dev mailing list
 nox-dev@noxrepo.orghttp://hanmail/mail/MailComposeFrame.daum?TO=nox-dev@noxrepo.org
 http://noxrepo.org/mailman/listinfo/nox-dev








 Best Regards,
 Min-Hyup KANG

 kang-min-h...@hanmail.net

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


Re: [nox-dev] handle_flow_route Event

2011-07-21 Thread kk yap
Sorry, I continue to be lost.

if you want to send flows to ENVI, look at lavi_hostflow.cc line 34 to 60
for an example.  Basically, a list of flow is created and the send_flow_list
function is called.

Regards
KK

2011/7/21 Min-Hyup KANG kang-min-h...@hanmail.net

   Yes, sorry for not clearness.


 2, One of the lavi component (though I forgot which one) will listen for
 that event and send a message to ENVI.  

 

 

 so, I don't know flow_route_event is run at some point in lavi_hostflow.cc

 can you give me some tips ?


 thanks,


 - 원본 메일 -

 *보낸사람*: kk yap yap...@stanford.edu
 *받는사람* : Min-Hyup KANG kang-min-h...@hanmail.net
 *참조* : NOX-dev nox-dev@noxrepo.org
 *날짜*: 2011년 7월 22일 금요일, 09시 36분 46초 +0900, and which one of the lavi com

 *제목*: Re: [nox-dev] handle_flow_route Event
 Is there a question in this email?

 KK

 2011/7/21 Min-Hyup KANG 
 kang-min-h...@hanmail.nethttp://hanmail/mail/MailComposeFrame.daum?TO=kang-min-h...@hanmail.net
 

   Thank you for your response.


 1.  You need to include the header file for the definition of the event,
 then create the event, populate it and post it.

 -Basically, there is part of flow_route_event in lavi_hostflow.cc. so I
 don't have to include the header file, right ?

 .

 register_handlerFlow_route_event

   (boost::bind(lavi_hostflow::handle_flow_route, this, _1));

   Disposition lavi_hostflow::handle_flow_route(const Event e)

 .


 2, One of the lavi component (though I forgot which one) will listen for
 that event and send a message to ENVI.  

 - lavi_hostflow inherit lavi_flows, so lavi_hostflow has JSONmsg_event
 handler.

 I think JSONmsg_event handler seems to check type, command, node_type.

 if command is request,  send_list-send_flow_list(reply add)

 if subscribe , interested.push_back

 if unsubscribe, interested.erase,

 so, I don't know flow_route_event is run at some point,

 

  register_handlerJSONMsg_event

  (boost::bind(lavi_flows::handle_req, this, _1));


   Disposition lavi_flows::handle_req(const Event e)

   {

 const JSONMsg_event jme = assert_castconst JSONMsg_event(e)

 


 Thanks,


 - 원본 메일 -

 *보낸사람*: kk yap 
 yap...@stanford.eduhttp://hanmail/mail/MailComposeFrame.daum?TO=yap...@stanford.edu
 
 *받는사람* : Min-Hyup KANG 
 kang-min-h...@hanmail.nethttp://hanmail/mail/MailComposeFrame.daum?TO=kang-min-h...@hanmail.net
 
 *참조* : NOX-dev 
 nox-dev@noxrepo.orghttp://hanmail/mail/MailComposeFrame.daum?TO=nox-dev@noxrepo.org
 
 *날짜*: 2011년 7월 22일 금요일, 01시 59분 28초 +0900
 *제목*: Re: [nox-dev] handle_flow_route Event

 Hi,

 This is a standard procedure in NOX.  You need to include the header file
 for the definition of the event, then create the event, populate it and post
 it.  One of the lavi component (though I forgot which one) will listen for
 that event and send a message to ENVI.  Look at lavi_hosts (I think) for an
 example.

 Regards
 KK

 PS Sorry, I did not find time to look up the code before replying.

 2011/7/18 Min-Hyup KANG 
 kang-min-h...@hanmail.nethttp://hanmail/mail/MailComposeFrame.daum?TO=kang-min-h...@hanmail.net
 

   Hi All,


 I am currently trying to understand relation between LAVI and ENVI.


 especially, I am looking at part of lavi_flow and lavi_hostflow to add
 and delete on ENVI.


 To handle event such as add and delete flows on ENVI,


  I think I should generate Handle_flow_route event in
 netapps/lavi/lavi_hostflow.cc.


 so, how can I generate handle_flow_route event ? or where does it operate
 the event ?





 Best Regards,
 Min-Hyup KANG

 http://hanmail/mail/MailComposeFrame.daum?TO=kang-min-h...@hanmail.net
 ___
 nox-dev mailing list
 nox-dev@noxrepo.orghttp://hanmail/mail/MailComposeFrame.daum?TO=nox-dev@noxrepo.org
 http://noxrepo.org/mailman/listinfo/nox-dev








 Best Regards,
 Min-Hyup KANG

 http://hanmail/mail/MailComposeFrame.daum?TO=kang-min-h...@hanmail.net








 Best Regards,
 Min-Hyup KANG

 kang-min-h...@hanmail.net

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


Re: [nox-dev] handle_flow_route Event

2011-07-21 Thread kk yap
2011/7/21 Min-Hyup KANG kang-min-h...@hanmail.net

   Thank you for your great response.

 Yes,

 handle_flow_route is existing in lavi_hostflow.cc line 34~60.

 and handle_flow_route event call send_flow_list_function.


 My main question is when does handle_flow_route event occur? 


I guess the answer is when there is a flow mod to the host.  You can verify
by doing a grep to see which component post the event.

Hope this is useful.

Regards
KK


 for example handle_req handling JSON event occur, when lavi receive json
 message from envi.



 - 원본 메일 -

 *보낸사람*: kk yap yap...@stanford.edu
 *받는사람* : Min-Hyup KANG kang-min-h...@hanmail.net
 *참조* : NOX-dev nox-dev@noxrepo.org
 *날짜*: 2011년 7월 22일 금요일, 10시 25분 34초 +0900

 *제목*: Re: [nox-dev] handle_flow_route Event
  Sorry, I continue to be lost.

 if you want to send flows to ENVI, look at lavi_hostflow.cc line 34 to 60
 for an example.  Basically, a list of flow is created and the send_flow_list
 function is called.

 Regards
 KK

 2011/7/21 Min-Hyup KANG 
 kang-min-h...@hanmail.nethttp://hanmail/mail/MailComposeFrame.daum?TO=kang-min-h...@hanmail.net
 

   Yes, sorry for not clearness.


 2, One of the lavi component (though I forgot which one) will listen for
 that event and send a message to ENVI.  

 

 

 so, I don't know flow_route_event is run at some point in lavi_hostflow.cc

 can you give me some tips ?


 thanks,


 - 원본 메일 -

 *보낸사람*: kk yap 
 yap...@stanford.eduhttp://hanmail/mail/MailComposeFrame.daum?TO=yap...@stanford.edu
 
 *받는사람* : Min-Hyup KANG 
 kang-min-h...@hanmail.nethttp://hanmail/mail/MailComposeFrame.daum?TO=kang-min-h...@hanmail.net
 
 *참조* : NOX-dev 
 nox-dev@noxrepo.orghttp://hanmail/mail/MailComposeFrame.daum?TO=nox-dev@noxrepo.org
 
 *날짜*: 2011년 7월 22일 금요일, 09시 36분 46초 +0900, and which one of the lavi com

 *제목*: Re: [nox-dev] handle_flow_route Event
 Is there a question in this email?

 KK

 2011/7/21 Min-Hyup KANG 
 kang-min-h...@hanmail.nethttp://hanmail/mail/MailComposeFrame.daum?TO=kang-min-h...@hanmail.net
 

   Thank you for your response.


 1.  You need to include the header file for the definition of the
 event, then create the event, populate it and post it.

 -Basically, there is part of flow_route_event in lavi_hostflow.cc. so I
 don't have to include the header file, right ?

 .

 register_handlerFlow_route_event

   (boost::bind(lavi_hostflow::handle_flow_route, this, _1));

   Disposition lavi_hostflow::handle_flow_route(const Event e)

 .


 2, One of the lavi component (though I forgot which one) will listen
 for that event and send a message to ENVI.  

 - lavi_hostflow inherit lavi_flows, so lavi_hostflow has JSONmsg_event
 handler.

 I think JSONmsg_event handler seems to check type, command, node_type.

 if command is request,  send_list-send_flow_list(reply add)

 if subscribe , interested.push_back

 if unsubscribe, interested.erase,

 so, I don't know flow_route_event is run at some point,

 

  register_handlerJSONMsg_event

  (boost::bind(lavi_flows::handle_req, this, _1));


   Disposition lavi_flows::handle_req(const Event e)

   {

 const JSONMsg_event jme = assert_castconst JSONMsg_event(e)

 


 Thanks,


 - 원본 메일 -

 *보낸사람*: kk yap 
 yap...@stanford.eduhttp://hanmail/mail/MailComposeFrame.daum?TO=yap...@stanford.edu
 
 *받는사람* : Min-Hyup KANG 
 kang-min-h...@hanmail.nethttp://hanmail/mail/MailComposeFrame.daum?TO=kang-min-h...@hanmail.net
 
 *참조* : NOX-dev 
 nox-dev@noxrepo.orghttp://hanmail/mail/MailComposeFrame.daum?TO=nox-dev@noxrepo.org
 
 *날짜*: 2011년 7월 22일 금요일, 01시 59분 28초 +0900
 *제목*: Re: [nox-dev] handle_flow_route Event

 Hi,

 This is a standard procedure in NOX.  You need to include the header file
 for the definition of the event, then create the event, populate it and post
 it.  One of the lavi component (though I forgot which one) will listen for
 that event and send a message to ENVI.  Look at lavi_hosts (I think) for an
 example.

 Regards
 KK

 PS Sorry, I did not find time to look up the code before replying.

 2011/7/18 Min-Hyup KANG 
 kang-min-h...@hanmail.nethttp://hanmail/mail/MailComposeFrame.daum?TO=kang-min-h...@hanmail.net
 

   Hi All,


 I am currently trying to understand relation between LAVI and ENVI.


 especially, I am looking at part of lavi_flow and lavi_hostflow to add
 and delete on ENVI.


 To handle event such as add and delete flows on ENVI,


  I think I should generate Handle_flow_route event in
 netapps/lavi/lavi_hostflow.cc.


 so, how can I generate handle_flow_route event ? or where does it
 operate the event ?





 Best Regards,
 Min-Hyup KANG

 http://hanmail/mail/MailComposeFrame.daum?TO=kang-min-h...@hanmail.net
 ___
 nox-dev mailing list
 nox-dev@noxrepo.orghttp://hanmail/mail/MailComposeFrame.daum?TO=nox-dev@noxrepo.org
 http://noxrepo.org/mailman/listinfo/nox-dev








 Best Regards,
 Min-Hyup KANG

 http

Re: [nox-dev] A discovery question

2011-07-14 Thread kk yap
I believe OFDP uses LLDP as Kyriakos mentioned.  So, there is no real
difference here.

As for the question of discovering a link between two OpenFlow
switches connected by a non-OpenFlow switch, the link will be
discovered if the switch does not process LLDP and thus pass it on.
Else, the intermediate switch will consume the LLDP packet.

For discovery of only OpenFlow switches, it might be best to use a
packet with multicast address (and possibly ethertype) that is
different from LLDP (i.e., 802.11ab).  The change is not hard but note
the consequences.

Just my two cents worth.

Regards
KK

2011/7/14 Murphy McCauley jam...@nau.edu:
 Right.  Someone correct me if I am wrong here, but really the only
 difference between OFDP and normal LLDP is that OFDP uses a normal multicast
 address so that it can see connectivity across non-OpenFlow switches.
 The purpose being... if you have two OpenFlow switches connected via an
 intermediate non-OpenFlow switch, using normal LLDP, you couldn't tell that
 the two OpenFlow switches were connected because the intermediate switch
 would not forward the LLDP packet.  OFDP style LLDP *does* get forwarded
 by the intermediate, so you *can* tell that the two OpenFlow switches are
 connected.
 -- Murphy
 On Jul 14, 2011, at 1:45 AM, Kyriakos Zarifis wrote:

 OFDP is a made-up term used to describe how OF uses LLDP packets to perform
 discovery. There is no such thing as an OFDP packet. The packets used for
 discovery are LLDP packets.
 On Thu, Jul 14, 2011 at 4:32 AM, wunyuan wuny...@nchc.narl.org.tw wrote:

 Hi,

 Thanks for your answer.

 We observe the information from this URL
 (http://groups.geni.net/geni/wiki/OpenFlowDiscoveryProtocol)

 this information is that OFDP advertisements are sent to a normal
 multicast MAC (01:23:00:00:00:01), and we find our openflow switch send the
 lldps to this mac.

 We guess the discovery is the OFDP first.

 We think our guess may be wrong after we see the discovery.py code.

 Therefore, we are not sure that the discovery is the LLDP or the OFDP now.

 Bests,

 Wun-Yuan



 於 2011/7/14 下午 04:03, Kyriakos Zarifis 提到:

 Hi,
 I'm not sure if I understand the question, but Discovery uses LLDP
 packets.
 Short description here:
 http://noxrepo.org/noxwiki/index.php/Discovery

 On Thu, Jul 14, 2011 at 3:43 AM, wunyuan wuny...@nchc.narl.org.tw wrote:

 Hi,

 We have a question about the nox discovery.

 Our NOX version is NOX 0.9.0(zaku) in our openflow enviroment.

 We monitor a port of a openflow by wireshark, and we observe that the
 lldp packets are sent to a  multicast MAC (01:23:00:00:00:01).

 However we see the discovery.py code and find that  it isn't like the
 OFDP.

 We also monitor the ports of the other OF switch not directly-connected
 above openflow switches, but we only see the lldp packets sent by itself and
 the lldp packets receviced from neighbor.

 The discovery seem the LLDP.

 Which one is the discovery, the LLDP or OFDP?

 Thanks.

 Wun-Yuan
 ___
 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] A discovery question

2011-07-14 Thread kk yap
Oops.. I read the GENI document again, and Murphy is right in that the
multicast address is different here.  My apologies.

This address will be forwarded by mac bridges though.  Won't this be
risking a broadcast storm?  Am I missing something again?

Regards
KK


On 14 July 2011 13:23, kk yap yap...@stanford.edu wrote:
 I believe OFDP uses LLDP as Kyriakos mentioned.  So, there is no real
 difference here.

 As for the question of discovering a link between two OpenFlow
 switches connected by a non-OpenFlow switch, the link will be
 discovered if the switch does not process LLDP and thus pass it on.
 Else, the intermediate switch will consume the LLDP packet.

 For discovery of only OpenFlow switches, it might be best to use a
 packet with multicast address (and possibly ethertype) that is
 different from LLDP (i.e., 802.11ab).  The change is not hard but note
 the consequences.

 Just my two cents worth.

 Regards
 KK

 2011/7/14 Murphy McCauley jam...@nau.edu:
 Right.  Someone correct me if I am wrong here, but really the only
 difference between OFDP and normal LLDP is that OFDP uses a normal multicast
 address so that it can see connectivity across non-OpenFlow switches.
 The purpose being... if you have two OpenFlow switches connected via an
 intermediate non-OpenFlow switch, using normal LLDP, you couldn't tell that
 the two OpenFlow switches were connected because the intermediate switch
 would not forward the LLDP packet.  OFDP style LLDP *does* get forwarded
 by the intermediate, so you *can* tell that the two OpenFlow switches are
 connected.
 -- Murphy
 On Jul 14, 2011, at 1:45 AM, Kyriakos Zarifis wrote:

 OFDP is a made-up term used to describe how OF uses LLDP packets to perform
 discovery. There is no such thing as an OFDP packet. The packets used for
 discovery are LLDP packets.
 On Thu, Jul 14, 2011 at 4:32 AM, wunyuan wuny...@nchc.narl.org.tw wrote:

 Hi,

 Thanks for your answer.

 We observe the information from this URL
 (http://groups.geni.net/geni/wiki/OpenFlowDiscoveryProtocol)

 this information is that OFDP advertisements are sent to a normal
 multicast MAC (01:23:00:00:00:01), and we find our openflow switch send the
 lldps to this mac.

 We guess the discovery is the OFDP first.

 We think our guess may be wrong after we see the discovery.py code.

 Therefore, we are not sure that the discovery is the LLDP or the OFDP now.

 Bests,

 Wun-Yuan



 於 2011/7/14 下午 04:03, Kyriakos Zarifis 提到:

 Hi,
 I'm not sure if I understand the question, but Discovery uses LLDP
 packets.
 Short description here:
 http://noxrepo.org/noxwiki/index.php/Discovery

 On Thu, Jul 14, 2011 at 3:43 AM, wunyuan wuny...@nchc.narl.org.tw wrote:

 Hi,

 We have a question about the nox discovery.

 Our NOX version is NOX 0.9.0(zaku) in our openflow enviroment.

 We monitor a port of a openflow by wireshark, and we observe that the
 lldp packets are sent to a  multicast MAC (01:23:00:00:00:01).

 However we see the discovery.py code and find that  it isn't like the
 OFDP.

 We also monitor the ports of the other OF switch not directly-connected
 above openflow switches, but we only see the lldp packets sent by itself 
 and
 the lldp packets receviced from neighbor.

 The discovery seem the LLDP.

 Which one is the discovery, the LLDP or OFDP?

 Thanks.

 Wun-Yuan
 ___
 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] Error in send a string using messenger component

2011-06-25 Thread kk yap
Hi Ricardo,

You might want to take a closer look here
http://noxrepo.org/~yapkke/doc/classvigil_1_1messenger.html
http://noxrepo.org/~yapkke/doc/structvigil_1_1messenger__msg.html

The struct messenger_msg is defined in messenger.hh as (and not what
you presented in the email).

  struct messenger_msg
  {
/** Length of message, including this header.
 */
uint16_t length;
/** Type of message, as defined in \ref msg_type.
 */
uint8_t type;
/** Reference to body of message.
 */
uint8_t body[0];
  } __attribute__ ((packed));

Your packet length does seems way off to me at 512.  The packet sent
is not conforming to the expectation.

Hope this helps.

Regards
KK

On 25 June 2011 13:26, Ricardo Bennesby ricardo.benne...@gmail.com wrote:
 Hi. Thanks for reply, KK.

 I am using the struct messenger_msg of messenger component:

   struct messenger_msg
   {
     uint16_t length;
     uint8_t type;
     string body;
   } __attribute__ ((packed));

 So, I declare and set the fields in my component:

  messenger_msg mymsg;
  mymsg.type = 0x0A;
  mymsg.body.append(Test);
  mymsg.length = (sizeof(messenger_msg));

 And the other part of the client (using socket):

   int Mysocket, numbytes;
       char buf[MAXDATASIZE];
       struct hostent *he;
       struct sockaddr_in seu_endereco;

       if ((he=gethostbyname(localhost)) == NULL)   /* send host info */
       {
           herror(gethostbyname);
           exit(1);
       }

       seu_endereco.sin_family = AF_INET;
       seu_endereco.sin_port = htons(PORTA);
       seu_endereco.sin_addr = *((struct in_addr *)he-h_addr);
       bzero((seu_endereco.sin_zero), 8);

       if (send(Mysocket, mymsg, mymsg.length, 0) == -1) {
           perror(send);
           close(Mysocket);
           exit(0);
       }

 Where PORTA==2603;

 But when I run it, the server client (messenger) prints:

 00077|messenger_core|DBG:Copy 8 bytes to message
 00078|messenger|DBG:Check message completeness 512 (expected 512)
 00079|messenger_core|DBG:Received packet of length 512
 00080|messenger|DBG:Message posted as Msg_event
 00081|messenger|DBG:Received packet of length 512
 00082|messenger_core|DBG:Copy 2 bytes to message
 00083|messenger|DBG:Check message completeness 2 (expected 62559)
 00084|messenger_core|DBG:Copy 502 bytes to message
 00085|messenger|DBG:Check message completeness 504 (expected 62559)
 00086|messenger|DBG:me.msg-length: 512 and sizeof(messenger_msg)+1: 9
 00087|messenger|DBG:Received string ��Q�

 The string Test is not printed. It shows ��Q� instead. What am I doing
 wrong? Is it the length of the message that I am setting doing mymsg.length
 = (sizeof(messenger_msg)); ? Or in the way I am using socket send function
 in client (send(Mysocket, mymsg, mymsg.length, 0)) ?

 Thanks for help.

 Best Regards.

 2011/6/18 kk yap yap...@stanford.edu

 Hi Ricardo,

 You might want to add a length and type in front of the string.  :)

 Regards
 KK

 On 18 June 2011 14:46, Ricardo Bennesby ricardo.benne...@gmail.com
 wrote:
  Hi.
 
  I am writing component in C++ that uses messenger component.
 
  I have a client function that send a string to the own component. As
  follows:
 
    void comp::sendMessageOtherAs(){
      ClientSocket theSocket (localhost, 2603 );
      string request;
      request = Test;
      theSocket  request  \n;
      lg.dbg(Echo sent);
    }
 
  The server part is did by messenger component, calling the
  handle_message
  function;
 
  But the result, when the handle_message is invoked is:
 
  00108|messenger_core|DBG:Starting connection with idleInterval 0
  00109|messenger_core|DBG:Received packet of length 0
  00110|messenger|DBG:Message posted as Msg_event
  00111|messenger_core|DBG:TCP socket connection accepted
  00112|messenger_core|DBG:Copy 2 bytes to message
  00113|messenger|DBG:Check message completeness 2 (expected 21349)
  00114|messenger_core|DBG:Copy 31 bytes to message
  00115|messenger|DBG:Check message completeness 33 (expected 21349)
  00116|messenger_core|DBG:Received packet of length 3
  00117|messenger_core|DBG:Received disconnection request
  00118|messenger|DBG:Message posted as Msg_event
  00119|messenger_core|DBG:socket closed
 
  And the handler messenger has the code:
 
  switch (me.msg-type)
      {
      case MSG_DISCONNECT:
    return STOP;
    break;
      case MSG_ECHO:
    VLOG_DBG(lg, Got echo request);
    reply_echo(me);
    return STOP;
    break;
      case MSG_ECHO_RESPONSE:
    VLOG_DBG(lg, Echo reply received);
    return STOP;
    break;
      case MSG_NOX_STR_CMD:
    char mstring[ntohs(me.msg-length)-sizeof(messenger_msg)+1];
    memcpy(mstring, me.msg-body,
  ntohs(me.msg-length)-sizeof(messenger_msg));
    mstring[ntohs(me.msg-length)-sizeof(messenger_msg)] = '\0';
    VLOG_DBG(lg, Received string %s, mstring);
    break;
      }
 
  Shouldn't the message be of MSG_NOX_STR_CMD type and prints

Re: [nox-dev] Error in send a string using messenger component

2011-06-18 Thread kk yap
Hi Ricardo,

You might want to add a length and type in front of the string.  :)

Regards
KK

On 18 June 2011 14:46, Ricardo Bennesby ricardo.benne...@gmail.com wrote:
 Hi.

 I am writing component in C++ that uses messenger component.

 I have a client function that send a string to the own component. As
 follows:

   void comp::sendMessageOtherAs(){
     ClientSocket theSocket (localhost, 2603 );
     string request;
     request = Test;
     theSocket  request  \n;
     lg.dbg(Echo sent);
   }

 The server part is did by messenger component, calling the handle_message
 function;

 But the result, when the handle_message is invoked is:

 00108|messenger_core|DBG:Starting connection with idleInterval 0
 00109|messenger_core|DBG:Received packet of length 0
 00110|messenger|DBG:Message posted as Msg_event
 00111|messenger_core|DBG:TCP socket connection accepted
 00112|messenger_core|DBG:Copy 2 bytes to message
 00113|messenger|DBG:Check message completeness 2 (expected 21349)
 00114|messenger_core|DBG:Copy 31 bytes to message
 00115|messenger|DBG:Check message completeness 33 (expected 21349)
 00116|messenger_core|DBG:Received packet of length 3
 00117|messenger_core|DBG:Received disconnection request
 00118|messenger|DBG:Message posted as Msg_event
 00119|messenger_core|DBG:socket closed

 And the handler messenger has the code:

 switch (me.msg-type)
     {
     case MSG_DISCONNECT:
   return STOP;
   break;
     case MSG_ECHO:
   VLOG_DBG(lg, Got echo request);
   reply_echo(me);
   return STOP;
   break;
     case MSG_ECHO_RESPONSE:
   VLOG_DBG(lg, Echo reply received);
   return STOP;
   break;
     case MSG_NOX_STR_CMD:
   char mstring[ntohs(me.msg-length)-sizeof(messenger_msg)+1];
   memcpy(mstring, me.msg-body,
 ntohs(me.msg-length)-sizeof(messenger_msg));
   mstring[ntohs(me.msg-length)-sizeof(messenger_msg)] = '\0';
   VLOG_DBG(lg, Received string %s, mstring);
   break;
     }

 Shouldn't the message be of MSG_NOX_STR_CMD type and prints the string sent?
 Or the way I am sending the string is wrong?

 Sorry if I did'n made me clear.
 Thanks for help.
 Regards.

 --
 Ricardo Bennesby da Silva
 Ciência da Computação - UFAM
 LabCIA - Laboratório de Computação Inteligente e Autônoma


 ___
 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] NOX architecture schemes

2011-06-16 Thread kk yap
Hi Andrea,

Beyond the component class, there is nothing particular abstract about
the API of NOX IMHO.  You might of course also be interested in the
OpenFlow messaging API.  Is there anything beyond that?  If not, then
the doxygen page of Component is what you are looking for?

Regards
KK

On 16 June 2011 13:36, andrea simeoni andreasimeon...@gmail.com wrote:
 Hi KK,

 Thank you for answering...the architectural design that you suggested me was
 already clear in my mind.
 I think it is useful for understanding how NOX basically works; however an
 high level design of the API
 provided by main components is completely missing.
 Now I'm working to produce such high level scheme, and to develop some
 use-cases diagrams showing the functionality actually provided by NOX
 components.

 If I'll produce something useful I'll be glad to share it.

 Regards



 2011/6/16 kk yap yap...@stanford.edu

 Hi Andrea,
 I am assuming you are trying to get started on NOX with the description?
  I had a short introduction to NOX a while back (which can be outdated),
 since I am fairly out of touch. You can check it out here
 https://docs.google.com/present/view?id=dfsbt2qf_327f9688ngrncl=true..
 Maybe you can provide some suggestions on how to make this clearer for
 others too.  That would be appreciated.
 Regards
 KK

 On 13 June 2011 15:09, andrea simeoni andreasimeon...@gmail.com wrote:

 Hi guys,
 Do you know were I can find an architectural description of NOX? (
 I mean  a paper or some images describing what are the API provided by
 basic components and what are the main events generated by the network and
 by components.
 I've already found the doxygen documentation
 at http://noxrepo.org/noxwiki/ and I'm looking for some more clear schemes.
 Any suggestions?
 Thank you

 --
 Andrea Simeoni

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





 --
 Andrea Simeoni

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


Re: [nox-dev] nox_core command line options

2011-06-02 Thread kk yap
For list of components, you can try this:

http://noxrepo.org/~yapkke/doc/classvigil_1_1container_1_1Component.html

Regards
KK

On 2 June 2011 00:36, Murphy McCauley jam...@nau.edu wrote:
 Probably the best resource is on the wiki: 
 http://noxrepo.org/noxwiki/index.php/Using_NOX

 There is also a little about it in the rst-based manual.  The source for this 
 in the repository (doc/manual/source/using.rst), and there's an old version 
 online at http://noxrepo.org/manual/using.html .  I don't think this tells 
 you much that isn't in nox --help, though.

 Probably the most interesting part of the commandline isn't anything to do 
 with options, though, and has to do with which NOX components you run (e.g., 
 pyswitch, routing, etc.).  The wiki article above and 
 http://noxrepo.org/noxwiki/index.php/NOX_Components talk some about this, but 
 the definitive reference about which components are available is in the 
 meta.json files.

 Hope that helps.

 -- Murphy

 On Jun 1, 2011, at 3:25 AM, xbalaji wrote:

 Is there a man/info page for nox_core which describes various command line
 options available?

 Thanks and Regards,
 Balaji

 ___
 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] nox_core command line options

2011-06-02 Thread kk yap
This?  :)

http://noxrepo.org/~yapkke/doc/classnox_1_1lib_1_1core_1_1Component.html

Regards
KK

On 2 June 2011 00:45, Murphy McCauley jam...@nau.edu wrote:
 Oh, great thought, KK!

 Note, however, that this does not show Python-only components.

 -- Murphy

 On Jun 2, 2011, at 12:41 AM, kk yap wrote:

 For list of components, you can try this:

 http://noxrepo.org/~yapkke/doc/classvigil_1_1container_1_1Component.html

 Regards
 KK

 On 2 June 2011 00:36, Murphy McCauley jam...@nau.edu wrote:
 Probably the best resource is on the wiki: 
 http://noxrepo.org/noxwiki/index.php/Using_NOX

 There is also a little about it in the rst-based manual.  The source for 
 this in the repository (doc/manual/source/using.rst), and there's an old 
 version online at http://noxrepo.org/manual/using.html .  I don't think 
 this tells you much that isn't in nox --help, though.

 Probably the most interesting part of the commandline isn't anything to do 
 with options, though, and has to do with which NOX components you run 
 (e.g., pyswitch, routing, etc.).  The wiki article above and 
 http://noxrepo.org/noxwiki/index.php/NOX_Components talk some about this, 
 but the definitive reference about which components are available is in the 
 meta.json files.

 Hope that helps.

 -- Murphy

 On Jun 1, 2011, at 3:25 AM, xbalaji wrote:

 Is there a man/info page for nox_core which describes various command line
 options available?

 Thanks and Regards,
 Balaji

 ___
 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] [openflow-discuss] LAVI : Installing a sample flow in a open flow switch using NOX

2011-06-02 Thread kk yap
Hi,

Starting with a rant: I believe this is related (or the same) as the
thread on nox-dev
(http://noxrepo.org/pipermail/nox-dev/2011-June/007611.html).  It
might be advisable not to cross-post questions.

To be clear, LAVI is a GUI backend in NOX.  And nox-gui.py and ENVI
are the front end GUI.  The short answer here is no, you cannot
install flow rules using GUI in NOX---as Kyriakos has previously
mentioned in nox-dev.  The GUI shows statistics and the topology of
the network.

Is there any reason why ovs-ofctl does not work for you (e.g., you
don't use ovs)?

Regards
KK

Disclosure I wrote LAVI, so I can be irritating when it comes to
reference to it.  Pardon me here.

On 2 June 2011 11:23, kashyap TA kashyap...@gmail.com wrote:
 Hi,
     I read that LAVI is a GUI for NOX. How do I install this along with nox.
 I am not able to find much installation guide. Can I program flows using
 LAVI into NOX which intunr would intall flows into the openflow switch. I
 need to program a smaple flow where a packet coming from a particular port
 and with a particular mac need to forwarded to a particular port and
 remaining all traffic needs to be flooded in the vlan. Please do let me
 know.


 Thans and Regards
 Kashyap

 ___
 openflow-discuss mailing list
 openflow-disc...@lists.stanford.edu
 https://mailman.stanford.edu/mailman/listinfo/openflow-discuss


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


Re: [nox-dev] Res: Nox Application with dijkastra

2011-05-19 Thread kk yap
Hi,

I am not sure what is meant by OSPF here.  Routing_module uses the
method described in A New Approach to Dynamic All Pairs Shortest
Paths by C. Demetrescu.  A little more description can be found in
the documentation:

http://noxrepo.org/~yapkke/doc/classvigil_1_1applications_1_1Routing__module.html#_details

Regards
KK

On 19 May 2011 07:45, fernando farias fer...@yahoo.com.br wrote:
 Hi Marwen
 There is a project called initially of QuagFlow and now RouteFlow that is
 able to use route protocols (OSPF, BGP, RIP ...) together with NOX.
 http://chesteve.wordpress.com/2010/07/07/quagflow-the-softrouter-reloaded-or-partnering-quagga-with-openflow/
 Thx
 Fernando N. N. Farias

 Electrical Engineer PhD. Student
 Member of the Research Group on Computer Networks and Multimedia
 Communications - GERCOM/UFPA
 Optical Research Team - GERCOM
 Federal University of Pará
 Primeiro eles o ignoram.
 Depois, riem de você.
 Chega um ponto em que lutam contra voce.
 Ate o dia em que você vence. Gandhi

 
 De: Ricardo Bennesby ricardo.benne...@gmail.com
 Para: marwen mechtri mechtri.mar...@gmail.com
 Cc: nox-dev@noxrepo.org
 Enviadas: Quinta-feira, 19 de Maio de 2011 9:57:21
 Assunto: Re: [nox-dev] Nox Application with dijkastra

 Hi Marwen.

 Nox routing implements OSPF protocol and It is based on Dijkstra algorithm
 (also called SPF). In this algorithm, the component knows the data of all
 nodes in the network.

 Hope it helped.

 Best Regards.

 2011/5/19 marwen mechtri mechtri.mar...@gmail.com

 Hi all,

 I'm exploring routing, sample_routing and switch module of Nox but
 when I configure a partial mesh network this modules don't give any result.
 Could you tell me if this modules use dijkstra to calculate Path between
 source and destination. And if not, do you know a module that use dijkstra
 or any kind of method to calculate source to destination Path, could you
 please give me its name.

 Thinks
 Best regards
 Marwen



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




 --
 Ricardo Bennesby da Silva
 Ciência da Computação - UFAM
 LabCIA - Laboratório de Computação Inteligente e Autonoma


 ___
 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] host deathentication

2011-05-06 Thread kk yap
ARP is a great idea.  Someone should give it a try, though I know some
routers sometimes do funny things with ARP for their own devices, but that
would not be too big an issue I guess.

Regards
KK

On 6 May 2011 03:59, Murphy McCauley jam...@nau.edu wrote:

 I don't consider this a big issue, but what about ARPing at it?  I bet even
 machines that are set to not respond to ICMP echo will still usually answer
 an
 ARP.  Moreover, if they respond once, I'd think it's probably safe to
 assume
 they will continue to do so.  So if something never responds to an ARP, it
 could just timeout after five minutes of inactivity like it does now.  If
 it
 responds to an ARP once, we could periodially check that it still does --
 if
 it goes silent, assume it's gone.

 -- Murphy

 On Thursday, May 05, 2011 06:03:24 PM kk yap wrote:
  Yeah, hosttracker simply timeout.  To the best of my knowledge, there is
 no
  good way to ensure the host is there or not if it is completely silent.
  You can try sending an icmp echo request but that is not guaranteed to
  work all the time either.
 
  Regards
  KK
 
  On 5 May 2011 17:40, Murphy McCauley jam...@nau.edu wrote:
   Maybe take a look at hosttracker.  It raises events when a host is
 first
   seen,
   moves, or is lost.  I don't think it actively checks for the host -- I
   think
   it just has like a five minute timer where if it doesn't see any
 packets
   from a
   host, it assumes it is gone.
  
   -- Murphy
  
   On Thursday, May 05, 2011 06:43:00 AM karim torkmen wrote:
Hi,
Is there any component allowing to detect when a host  detaches from
the network (e.g. host failure).
Unfortunately, the authenticator is able just to detect when a new
 host
joins the network.
Thanks a lot,
Karim
___
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] [openflow-discuss] Pyswitch VLAN

2011-04-27 Thread kk yap
Hi Max,

Something like this?

http://noxrepo.org/noxwiki/index.php/Main_Page
http://noxrepo.org/~yapkke/doc/

Regards
KK

On 27 April 2011 00:15, Max Ott max@nicta.com.au wrote:

 On 26/04/2011, at 4:20 PM, kk yap wrote:

 Hi Max,

 Can you elaborate on what you mean by pyswitch being aware or unaware
 of VLAN?  Do you expect the switch to rewrite the VLAN so that hosts
 on different VLAN can ping each other?

 No, I wanted to stay within the same VLAN.

 However, my primary objective is to find out on how one could develop new 
 functionality. So some form of documentation would be wonderful.

 Cheers,
 -max


 Regards
 KK

 On 25 April 2011 22:44, Srini Seetharaman seeth...@stanford.edu wrote:
 Hi Max
 This mail is more appropriate for the nox-dev list that I've copied here.

 I now can ping two machines across a VLAN using NOX and pyswitch. However, 
 the latter does not seem to create a flow for the VLAN pings as each of 
 them shows up at the controller. I assume the pyswitch isn't aware of VLAN.

 Yes, pyswitch and much of the code in NOX does not track VLANs.

 Now having looked at the code, I was wondering where I could find a 
 writeup on how to add my own extensions and documentation on all the 
 relevant API calls and their options.

 If no one wrote to you thus far, I guess there is nothing ready for
 public use. Please mail the nox-dev list if you manage to get this
 resolved and working on your own. Thanks!

 Srini.
 ___
 openflow-discuss mailing list
 openflow-disc...@lists.stanford.edu
 https://mailman.stanford.edu/mailman/listinfo/openflow-discuss



 The information in this e-mail may be confidential and subject to legal 
 professional privilege and/or copyright. National ICT Australia Limited 
 accepts no liability for any damage caused by this email or its attachments.

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


Re: [nox-dev] [openflow-discuss] Pyswitch VLAN

2011-04-26 Thread kk yap
Hi Max,

Can you elaborate on what you mean by pyswitch being aware or unaware
of VLAN?  Do you expect the switch to rewrite the VLAN so that hosts
on different VLAN can ping each other?

Regards
KK

On 25 April 2011 22:44, Srini Seetharaman seeth...@stanford.edu wrote:
 Hi Max
 This mail is more appropriate for the nox-dev list that I've copied here.

 I now can ping two machines across a VLAN using NOX and pyswitch. However, 
 the latter does not seem to create a flow for the VLAN pings as each of them 
 shows up at the controller. I assume the pyswitch isn't aware of VLAN.

 Yes, pyswitch and much of the code in NOX does not track VLANs.

 Now having looked at the code, I was wondering where I could find a writeup 
 on how to add my own extensions and documentation on all the relevant API 
 calls and their options.

 If no one wrote to you thus far, I guess there is nothing ready for
 public use. Please mail the nox-dev list if you manage to get this
 resolved and working on your own. Thanks!

 Srini.
 ___
 openflow-discuss mailing list
 openflow-disc...@lists.stanford.edu
 https://mailman.stanford.edu/mailman/listinfo/openflow-discuss

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


Re: [nox-dev] QoS in OpenFlow/Nox

2011-04-26 Thread kk yap
Hi Nauman (and Yiannis),

I am not up-to-date with NOX.   But I did previously push support for
all OpenFlow v1.0 messages, which includes whatever support OpenFlow
provides to queues.  That would exclude configuration of the queue,
but include how to forward packets into queues.  That support is in
C/C++.

I am not sure about the Python API.  So, maybe someone can update us on it.

Regards
KK

On 26 April 2011 14:45, Yiannis Yiakoumis gyiakou...@gmail.com wrote:
 Hi Nauman,
 Which OpenFlow implementation do you use? The rererence code (1.0) supports
 queue set-up through dpctl commands (out-of-band CLI). Setup takes place as
 a vendor extension which means that they could be integrated to a
 controller.
 I haven't used queues with Nox though. I think somebody was working on an
 extension, but not sure what the status is.
 KK, any insights?

 Thanks,
 Yiannis
 On Wed, Apr 20, 2011 at 9:43 AM, nauman.lagh...@bt.com wrote:

 Hello all,

 I just started looking into OpenFlow and Nox and particularly interested
 in QoS for flows so have a question about the support in nox.

 Does nox support setting up the queues and then mapping a flow to
 particular queue? I was going through
 http://www.openflow.org/wk/index.php/Slicing#Flow-Queue_Mapping_and_Forwarding
 and wondering if nox implements it.

 I'm using the latest stable (HEAD) version of nox.

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



 --
 Yiannis .

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


Re: [nox-dev] 00005|nox|ERR:Application

2011-04-01 Thread kk yap
Try editing configure.ac.in and rerunning ./boot.sh, ../configure and make.

Regards
KK

On 1 April 2011 01:30, Kyriakos Zarifis kyr.zari...@gmail.com wrote:
 Hey,
 you only need to rebuild NOX the first time you introduce a new python
 component (after following the instructions on the wiki), so that the links
 are created to the build/src/ directory. After that, you can simply run NOX
 each time you edit your python component.

 On Thu, Mar 31, 2011 at 11:32 PM, Bill Liao lwlw1...@gmail.com wrote:

 On Fri, Apr 1, 2011 at 5:29 AM, Kyriakos Zarifis kyr.zari...@gmail.com
 wrote:
  Hi Karim,
  did you rerun ../configure and make after you edited configure.ac and
  Makefile.am?
 
  On Thu, Mar 31, 2011 at 7:42 AM, karim torkmen
  karim.torkm...@gmail.com
  wrote:
 
  Hi,
  I developed a component when I try to run it, I get the following error
  message :
 
  
  1|nox|INFO:Starting nox_core (/nox/build/src/.libs/lt-nox_core)
  2|nox|DBG:Application installation report:
  3|nox|DBG:built-in DSO deployer:
     Current state: INSTALLED
     Required state: INSTALLED
     Dependencies:
 
  4|nox|DBG:built-in event dispatcher:
     Current state: INSTALLED
     Required state: INSTALLED
     Dependencies:
 
  5|nox|ERR:Application 'try_topology' description not found.
  ***
  To add my component I tried two methods:
  The first one is through executing the script : nox-new-c-app.py
  The second one is by editing meta.json, configure.ac and Makefile.am.
  Unfortunately, none of them was able to make me run my component.
 
  Thank you for your help.
  Regards,
  Karim
 
 
  ___
  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
 
 

 Hi, Kyriakos
   Sorry to interrupt. But I'm wondering is it necessary to re-make
 after building a new python component.
   As far as I know after reading some source, there is no such
 requirement right?
   The python component is managed by PyRt, just as Dso-deployer. So,
 for c++ component, maybe we should make to produce the *.so dynamic
 library, but what will MAKE produce for new python component?

   Regards
   wliao


 ___
 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-27 Thread kk yap
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] Flow collection- error

2011-03-22 Thread kk yap
I should have mentioned that the OpenFlow pack library in NOX does
this for you, with the correct byte order.  For details, check out:

http://noxrepo.org/~yapkke/doc/classvigil_1_1openflow__pack.html
http://noxrepo.org/~yapkke/doc/openflow-pack-raw_8hh.html

Regards
KK

On 21 March 2011 13:11, Ricardo Bennesby ricardo.benne...@gmail.com wrote:
 Hi Paulo and kk!

 You are right!
 Problem solved.
 Thank you very much for your help.

 Best Regards.

 2011/3/21 Paulo César pcd...@gmail.com

 Hi, Ricardo.
 I solved this problem.
 Try to use ntohll() to uint64 and ntohs() to uint32.
 Best regards.
 2011/3/21 Paulo César pcd...@gmail.com

 Hi,
 I am having the same problem.
 Any help?
 Best regards.


 2011/3/20 Ricardo Bennesby ricardo.benne...@gmail.com

 Sorry, forgot to paste that...
   fsie is from Flow_stats_in event, declared in a
 handle_flow_stats_in method (a handler):

 Disposition newcomp::handle_flow_stats_in(const Event e){
     const Flow_stats_in_event fsie
     = assert_castconst Flow_stats_in_event(e);

 So, fsie.flows has that informations about the flows, that can be used
 to collect statistcs.

 Thanks for help.
 Regards.

 2011/3/20 kk yap yap...@stanford.edu

 Ricardo,

 Can you explain which component is fsie as with
 * fsie.flows.at(i)

 Regards
 KK

 On 20 March 2011 13:11, Ricardo Bennesby ricardo.benne...@gmail.com
 wrote:
  Thanks kk.
 
  I think I did what you suggested:
 
      uint32_t ds; //duration_sec
      uint64_t pc; //packet_count
      uint16_t pri; //priority
      uint64_t bc; //byte_count
      uint16_t len; //legth
      uint8_t tid; //table_id
 
      for(int i=0;ifsie.flows.size();i++){
              lg.dbg(i value: %d,i);
          ds = ntohl(fsie.flows.at(i).duration_sec);
          pc = ntohl(fsie.flows.at(i).packet_count);
          pri = ntohl(fsie.flows.at(i).priority);
          bc = ntohl(fsie.flows.at(i).byte_count);
          len = ntohl(fsie.flows.at(i).length);
          tid = ntohl(fsie.flows.at(i).table_id);
              lg.dbg(duration_sec: %PRIu32,ds);
              lg.dbg(packet_count: %PRIu64,pc);
              lg.dbg(priority: %PRIu16,pri);
              lg.dbg(byte_count: %PRIu64,bc);
              lg.dbg(length: %PRIu16,len);
              lg.dbg(table_id: %PRIu8,tid);
      }
 
  But now only number of flows and duration in seconds are non-zero:
 
  00238|newcomp|DBG:Size of flows: 2
  00239|newcomp|DBG:i value: 0
  00240|newcomp|DBG:duration_sec: 8
  00241|newcomp|DBG:packet_count: 0
  00242|newcomp|DBG:priority: 0
  00243|newcomp|DBG:byte_count: 0
  00244|newcomp|DBG:length: 0
  00245|newcomp|DBG:table_id: 0
  00246|newcomp|DBG:i value: 1
  00247|newcomp|DBG:duration_sec: 7
  00248|newcomp|DBG:packet_count: 0
  00249|newcomp|DBG:priority: 0
  00250|newcomp|DBG:byte_count: 0
  00251|newcomp|DBG:length: 0
  00252|newcomp|DBG:table_id: 0
 
  What am I missing?
 
  Sorry to bother.
 
  Regards.
 
 
  2011/3/20 kk yap yap...@stanford.edu
 
  Hi Ricardo,
 
  I mean the result.  Did you run  ntohx on them.
 
  Regards
  KK
 
  On 20 March 2011 10:50, Ricardo Bennesby
  ricardo.benne...@gmail.com
  wrote:
   Hi kk, thanks for quick reply.
  
   I changed request.match.wildcards = htonl(0x) to:
  
   request.match.wildcards = htons(0x); - but it didn't
   work.
   Nothing
   was printed about the packets
  
   request.match.wildcards = ntohs(0x); - the same that
   happened
   with
   htons
  
   request.match.wildcards = ntohl(0x); - the same result of
   use
   htonl
  
   Sorry kk, but still I missing something?
  
   2011/3/20 kk yap yap...@stanford.edu
  
   Hi Ricardo,
  
   Did you consider network/host byte order?
  
   Regards
   KK
  
   On 20 March 2011 10:01, Ricardo Bennesby
   ricardo.benne...@gmail.com
   wrote:
Hi.
   
I am running a C++ component that prints statistics of flows
collected
in
switches with the flow_stats_in_event.
I am also running the dpctl dump-flows command in mininet to
compare
the
values and they are very different.
   
The request is as follows:
  request.table_id = 0xff;
      request.out_port = OFPP_NONE;
      request.match.wildcards = htonl(0x);
   
Some values printed with dpctl dump-flows are:
  cookie=0, duration_sec=6s, table_id=1, priority=32768,
n_packets=9,
n_bytes=882
And it seems correct.
   
In Flow_stats_in_event handler I wrote:
    if(fsie.flows.size()0){
            lg.dbg(duration_sec:
%PRIu32,fsie.flows.at(0).duration_sec);
            lg.dbg(packet_count:
%PRIu64,fsie.flows.at(0).packet_count);
            lg.dbg(priority:
%PRIu16,fsie.flows.at(0).priority);
            lg.dbg(byte_count:
%PRIu64,fsie.flows.at(0).byte_count);
            lg.dbg(length: %d,fsie.flows.at(0).length

Re: [nox-dev] Flow collection- error

2011-03-21 Thread kk yap
Oops... should have spotted that.  Thanks Paulo, that saved me.

Regards
KK

PS This email comes 20 sec before I decide to spend a few mins on this.  :)

On 21 March 2011 12:24, Paulo César pcd...@gmail.com wrote:
 Hi, Ricardo.
 I solved this problem.
 Try to use ntohll() to uint64 and ntohs() to uint32.
 Best regards.
 2011/3/21 Paulo César pcd...@gmail.com

 Hi,
 I am having the same problem.
 Any help?
 Best regards.


 2011/3/20 Ricardo Bennesby ricardo.benne...@gmail.com

 Sorry, forgot to paste that...
   fsie is from Flow_stats_in event, declared in a
 handle_flow_stats_in method (a handler):

 Disposition newcomp::handle_flow_stats_in(const Event e){
     const Flow_stats_in_event fsie
     = assert_castconst Flow_stats_in_event(e);

 So, fsie.flows has that informations about the flows, that can be used to
 collect statistcs.

 Thanks for help.
 Regards.

 2011/3/20 kk yap yap...@stanford.edu

 Ricardo,

 Can you explain which component is fsie as with
 * fsie.flows.at(i)

 Regards
 KK

 On 20 March 2011 13:11, Ricardo Bennesby ricardo.benne...@gmail.com
 wrote:
  Thanks kk.
 
  I think I did what you suggested:
 
      uint32_t ds; //duration_sec
      uint64_t pc; //packet_count
      uint16_t pri; //priority
      uint64_t bc; //byte_count
      uint16_t len; //legth
      uint8_t tid; //table_id
 
      for(int i=0;ifsie.flows.size();i++){
              lg.dbg(i value: %d,i);
          ds = ntohl(fsie.flows.at(i).duration_sec);
          pc = ntohl(fsie.flows.at(i).packet_count);
          pri = ntohl(fsie.flows.at(i).priority);
          bc = ntohl(fsie.flows.at(i).byte_count);
          len = ntohl(fsie.flows.at(i).length);
          tid = ntohl(fsie.flows.at(i).table_id);
              lg.dbg(duration_sec: %PRIu32,ds);
              lg.dbg(packet_count: %PRIu64,pc);
              lg.dbg(priority: %PRIu16,pri);
              lg.dbg(byte_count: %PRIu64,bc);
              lg.dbg(length: %PRIu16,len);
              lg.dbg(table_id: %PRIu8,tid);
      }
 
  But now only number of flows and duration in seconds are non-zero:
 
  00238|newcomp|DBG:Size of flows: 2
  00239|newcomp|DBG:i value: 0
  00240|newcomp|DBG:duration_sec: 8
  00241|newcomp|DBG:packet_count: 0
  00242|newcomp|DBG:priority: 0
  00243|newcomp|DBG:byte_count: 0
  00244|newcomp|DBG:length: 0
  00245|newcomp|DBG:table_id: 0
  00246|newcomp|DBG:i value: 1
  00247|newcomp|DBG:duration_sec: 7
  00248|newcomp|DBG:packet_count: 0
  00249|newcomp|DBG:priority: 0
  00250|newcomp|DBG:byte_count: 0
  00251|newcomp|DBG:length: 0
  00252|newcomp|DBG:table_id: 0
 
  What am I missing?
 
  Sorry to bother.
 
  Regards.
 
 
  2011/3/20 kk yap yap...@stanford.edu
 
  Hi Ricardo,
 
  I mean the result.  Did you run  ntohx on them.
 
  Regards
  KK
 
  On 20 March 2011 10:50, Ricardo Bennesby ricardo.benne...@gmail.com
  wrote:
   Hi kk, thanks for quick reply.
  
   I changed request.match.wildcards = htonl(0x) to:
  
   request.match.wildcards = htons(0x); - but it didn't work.
   Nothing
   was printed about the packets
  
   request.match.wildcards = ntohs(0x); - the same that
   happened
   with
   htons
  
   request.match.wildcards = ntohl(0x); - the same result of
   use
   htonl
  
   Sorry kk, but still I missing something?
  
   2011/3/20 kk yap yap...@stanford.edu
  
   Hi Ricardo,
  
   Did you consider network/host byte order?
  
   Regards
   KK
  
   On 20 March 2011 10:01, Ricardo Bennesby
   ricardo.benne...@gmail.com
   wrote:
Hi.
   
I am running a C++ component that prints statistics of flows
collected
in
switches with the flow_stats_in_event.
I am also running the dpctl dump-flows command in mininet to
compare
the
values and they are very different.
   
The request is as follows:
  request.table_id = 0xff;
      request.out_port = OFPP_NONE;
      request.match.wildcards = htonl(0x);
   
Some values printed with dpctl dump-flows are:
  cookie=0, duration_sec=6s, table_id=1, priority=32768,
n_packets=9,
n_bytes=882
And it seems correct.
   
In Flow_stats_in_event handler I wrote:
    if(fsie.flows.size()0){
            lg.dbg(duration_sec:
%PRIu32,fsie.flows.at(0).duration_sec);
            lg.dbg(packet_count:
%PRIu64,fsie.flows.at(0).packet_count);
            lg.dbg(priority:
%PRIu16,fsie.flows.at(0).priority);
            lg.dbg(byte_count:
%PRIu64,fsie.flows.at(0).byte_count);
            lg.dbg(length: %d,fsie.flows.at(0).length);
            lg.dbg(table_id:
%d,fsie.flows.at(0).table_id);
   }
   
But the values printed are:
00533|openflow-event|DBG:received stats reply from 0001
00534|newcomp|DBG:Size of flows: 2
00535|newcomp|DBG:duration_sec: 922746880
00536|newcomp

Re: [nox-dev] Flow collection- error

2011-03-20 Thread kk yap
Hi Ricardo,

I mean the result.  Did you run  ntohx on them.

Regards
KK

On 20 March 2011 10:50, Ricardo Bennesby ricardo.benne...@gmail.com wrote:
 Hi kk, thanks for quick reply.

 I changed request.match.wildcards = htonl(0x) to:

 request.match.wildcards = htons(0x); - but it didn't work. Nothing
 was printed about the packets

 request.match.wildcards = ntohs(0x); - the same that happened with
 htons

 request.match.wildcards = ntohl(0x); - the same result of use htonl

 Sorry kk, but still I missing something?

 2011/3/20 kk yap yap...@stanford.edu

 Hi Ricardo,

 Did you consider network/host byte order?

 Regards
 KK

 On 20 March 2011 10:01, Ricardo Bennesby ricardo.benne...@gmail.com
 wrote:
  Hi.
 
  I am running a C++ component that prints statistics of flows collected
  in
  switches with the flow_stats_in_event.
  I am also running the dpctl dump-flows command in mininet to compare the
  values and they are very different.
 
  The request is as follows:
    request.table_id = 0xff;
        request.out_port = OFPP_NONE;
        request.match.wildcards = htonl(0x);
 
  Some values printed with dpctl dump-flows are:
    cookie=0, duration_sec=6s, table_id=1, priority=32768, n_packets=9,
  n_bytes=882
  And it seems correct.
 
  In Flow_stats_in_event handler I wrote:
      if(fsie.flows.size()0){
              lg.dbg(duration_sec:
  %PRIu32,fsie.flows.at(0).duration_sec);
              lg.dbg(packet_count:
  %PRIu64,fsie.flows.at(0).packet_count);
              lg.dbg(priority: %PRIu16,fsie.flows.at(0).priority);
              lg.dbg(byte_count:
  %PRIu64,fsie.flows.at(0).byte_count);
              lg.dbg(length: %d,fsie.flows.at(0).length);
              lg.dbg(table_id: %d,fsie.flows.at(0).table_id);
     }
 
  But the values printed are:
  00533|openflow-event|DBG:received stats reply from 0001
  00534|newcomp|DBG:Size of flows: 2
  00535|newcomp|DBG:duration_sec: 922746880
  00536|newcomp|DBG:packet_count: 7710162562058289152
  00537|newcomp|DBG:priority: 128
  00538|newcomp|DBG:byte_count: 17737427132398698496
  00539|newcomp|DBG:length: 24576
  00540|newcomp|DBG:table_id: 1
 
  What am I missing?
  If I wasn't detailed enough please let me know.
 
  Best Regards.
 
  --
  Ricardo Bennesby da Silva
  Ciência da Computação - UFAM
  LabCIA - Laboratório de Computação Inteligente e Autonômica
 
 
  ___
  nox-dev mailing list
  nox-dev@noxrepo.org
  http://noxrepo.org/mailman/listinfo/nox-dev
 
 



 --
 Ricardo Bennesby da Silva
 Ciência da Computação - UFAM
 LabCIA - Laboratório de Computação Inteligente e Autonômica


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


Re: [nox-dev] Setting Up a Virtual Testing Environment

2011-03-09 Thread kk yap
Hi Ramana,

You can go into the provided hda.dsk and update that (using
vms-qemu-run.py).  The creation of hda.dsk is a little complicated and
platform specific---here being Debian.

Regards
KK

On 9 March 2011 02:49, Ramana Reddy gtvrre...@gmail.com wrote:
 Yaa, I tried and succeeded  with provided hda.dsk and kernel.bin on that
 page with corresponding
 openflow1.0 binary. But I want to create my own and failed to do hda.dsk and
 kernel.bin using the scripts.
 I am using ubuntu 10.10.

 Regards,
 Ramana.


 On Wed, Mar 9, 2011 at 4:08 PM, Kyriakos Zarifis kyr.zari...@gmail.com
 wrote:

 did you try downloading and using the provided hda.dsk and kernel.bin on
 that page, instead of using the scripts to build your own?
 I'd try using these, as well as the provided openflow1.0 binary

 On Wed, Mar 9, 2011 at 2:30 AM, Ramana Reddy gtvrre...@gmail.com wrote:

 Dear Kyriakos Zarifis,
 Thanks for your reply. I tried using the following link
 http://www.openflow.org/wk/index.php/OpenFlowVMS.
 But when created using the scripts
 (vms-create-disk.sh,vms-compile-kernel.sh), I failed to do that.
 What is the system setup is needed to run these scripts. Does Mininet
 supports  wireless stuff?

 Thanks,
 Ramana.


 On Wed, Mar 9, 2011 at 3:41 PM, Kyriakos Zarifis kyr.zari...@gmail.com
 wrote:

 Ramana,
 the instructions on that page are unfortunately pretty old, and the VM
 images provided there will not work with recent versions of NOX. For newer
 instructions please take a look at the wiki:

 http://noxrepo.org/noxwiki/index.php/Using_NOX#Setting_up_a_virtual_NOX.2FOpenflow_network
 The currently preferred method for setting up a virtual tested is
 Mininet.

 On Wed, Mar 9, 2011 at 2:01 AM, Ramana Reddy gtvrre...@gmail.com
 wrote:

 Does any one tried setting up a virtual Testing Environment.
 It is working fine with me with the existing file system and kernel
 binary from the following link:
 http://noxrepo.org/manual/vm_environment.html
 But when I created my own kernel.bin
 (http://noxrepo.org/manual/vm_environment.html) in ubuntu 10.10,
 it is giving kernel panic. Help in this regards is highly appreciated.
 ( I used existing hda.dsk.gz from the above url)


 VFS: Cannot open root device hda1 or unknown-block(0,0)
 Please append a correct root= boot option; here are the available
 partitions:
 Kernel panic - not syncing: VFS: Unable to mount root fs on
 unknown-block(0,0)
 Pid: 1, comm: swapper Tainted: G        W   2.6.38-rc6+ #1
 Call Trace:
 [c120f5bb] ? panic+0x50/0x13f
 [c1342b7b] ? mount_block_root+0x1eb/0x1ff
 [c10a9590] ? sys_mknod+0x13/0x15
 [c1342bdb] ? mount_root+0x4c/0x54
 [c1342cf4] ? prepare_namespace+0x111/0x138
 [c13423d4] ? kernel_init+0x17a/0x189
 [c134225a] ? kernel_init+0x0/0x189
 [c1002c86] ? kernel_thread_helper+0x6/0x10

 Regards,
 Ramana.



 ___
 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] different between ofdatapath and dpctl

2011-03-09 Thread kk yap
Hi,

Comments inline.

Regards
KK

2011/3/9 杨宇 yangyu...@gmail.com:
 hi, all
when I follow the tutorial in the page
 http://www.openflow.org/foswiki/bin/view/OpenFlow/Deployment/HOWTO/LabSetup
 
there is a command line:
   # ./udatapath/ofdatapath --detach punix:/var/run/dp0 -d 004E46324304
 -i eth1,eth2

This runs the OpenFlow switch.

   Is this same with the command line:
   ./dpctl adddp nl:0

This commandline tool ask the switch you just ran to create a datapath.


   what's the difference between this two commands?

   Thans a lot

   Best regards.


 yang
 ___
 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] different between ofdatapath and dpctl

2011-03-09 Thread kk yap
Hi,

This is because you are trying to add a kernel datapath on a userspace
switch.  I do not see this pair of commands being used in the link you
provided 
(http://www.openflow.org/foswiki/bin/view/OpenFlow/Deployment/HOWTO/LabSetup).
 Any reason for doing so?

/var/run/dp0 is the UNIX domain socket to communicate to the switch
with.  You need it when you run ofprotocol.  And the datapath id is
004E46324304.  The userspace switch supports only one datapath from
what I recall.

Regards
KK

PS Please don't drop the mailing list.


On 9 March 2011 06:48, 杨宇 yangyu...@gmail.com wrote:
 hello, kk
  thansk for your reply..


   # ./udatapath/ofdatapath --detach punix:/var/run/dp0 -d 004E46324304
 -i eth1,eth2
 This runs the OpenFlow switch.

 I think the punix:/var/run/dp0  is the created switch.
 and the 004E46324304 is the datapath , is that true ?


 
 发件人: kk yap
 发送时间: 2011-03-09  22:34:50
 收件人: 杨宇
 抄送: nox-dev
 主题: Re: [nox-dev] different between ofdatapath and dpctl
 Hi,
 Comments inline.
 Regards
 KK
 2011/3/9 杨宇 yangyu...@gmail.com:
 hi, all
when I follow the tutorial in the page
 http://www.openflow.org/foswiki/bin/view/OpenFlow/Deployment/HOWTO/LabSetup
 
there is a command line:
   # ./udatapath/ofdatapath --detach punix:/var/run/dp0 -d 004E46324304
 -i eth1,eth2
 This runs the OpenFlow switch.
   Is this same with the command line:
   ./dpctl adddp nl:0
 This commandline tool ask the switch you just ran to create a datapath.

   what's the difference between this two commands?

   Thans a lot

   Best regards.


 yang
 ___
 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] different between ofdatapath and dpctl

2011-03-09 Thread kk yap
Hi,

You have to write your own controller components for this.  From what
I remember, NOX does not ship with standard components that is full
IP routing.  I might be wrong.

Regards
KK

2011/3/9 杨宇 yangyu...@gmail.com:
 Hi kk yap,
   Thanks for your reply.
   These days, I read a lot of tutorial of openflow and nox in the
 website. Maybe I mixed these command line.
   Which I want to do is the followings:

   I want to set up a topology like this:


   controller
 __|__
 | | |
  switch switch switch

  |   |
PC1 PC2

 The  openflow switches should be worked as routers. PC1 and Pc2 are in
 the different subnet.

 What should I configure the switches and controllers that Pc1 can ping
 the PC2.

 I was confused because lots of the experiment are in the mininet and all
 of the hosts(like PC1 and Pc2)are in the same subnet in the Openflow
 tutorial page.

 These tutorial are not suitable to my experiments.



 Thank you again.








 Best regards



 yang
 2011-03-10
 
 发件人: kk yap
 发送时间: 2011-03-09  22:52:16
 收件人: 杨宇
 抄送: nox-dev
 主题: Re: Re: [nox-dev] different between ofdatapath and dpctl
 Hi,
 This is because you are trying to add a kernel datapath on a userspace
 switch.  I do not see this pair of commands being used in the link you
 provided 
 (http://www.openflow.org/foswiki/bin/view/OpenFlow/Deployment/HOWTO/LabSetup).
  Any reason for doing so?
 /var/run/dp0 is the UNIX domain socket to communicate to the switch
 with.  You need it when you run ofprotocol.  And the datapath id is
 004E46324304.  The userspace switch supports only one datapath from
 what I recall.
 Regards
 KK
 PS Please don't drop the mailing list.
 On 9 March 2011 06:48, 杨宇 yangyu...@gmail.com wrote:
 hello, kk
  thansk for your reply..


   # ./udatapath/ofdatapath --detach punix:/var/run/dp0 -d 004E46324304
 -i eth1,eth2
 This runs the OpenFlow switch.

 I think the punix:/var/run/dp0  is the created switch.
 and the 004E46324304 is the datapath , is that true ?


 
 发件人: kk yap
 发送时间: 2011-03-09  22:34:50
 收件人: 杨宇
 抄送: nox-dev
 主题: Re: [nox-dev] different between ofdatapath and dpctl
 Hi,
 Comments inline.
 Regards
 KK
 2011/3/9 杨宇 yangyu...@gmail.com:
 hi, all
when I follow the tutorial in the page
 http://www.openflow.org/foswiki/bin/view/OpenFlow/Deployment/HOWTO/LabSetup
 
there is a command line:
   # ./udatapath/ofdatapath --detach punix:/var/run/dp0 -d 004E46324304
 -i eth1,eth2
 This runs the OpenFlow switch.
   Is this same with the command line:
   ./dpctl adddp nl:0
 This commandline tool ask the switch you just ran to create a datapath.

   what's the difference between this two commands?

   Thans a lot

   Best regards.


 yang
 ___
 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] ARP, MAC Address of switches

2011-03-01 Thread kk yap
Hi Sriram,

The hw_addr is that of the switch ports.  If you look at the
switch_features message, there is an entire array of the ofp_phy_port.
 The datapathmem component (from zaku on) does keep track of this and
handles port_status to update it too.

FYI.

Regards
KK

On 1 March 2011 12:41, Sriram natarajan.sri...@gmail.com wrote:
 I was assuming that the MAC in ofp_phy_port refers to the interface between
 the switch and the controller. Is this right?
 But I am looking to get the hw_addresses for the switch - to - switch
 interfaces.
 Thanks
 Sriram
 On Tue, Mar 1, 2011 at 3:37 PM, Kyriakos Zarifis kyr.zari...@gmail.com
 wrote:

 No, you are right, this is the MAC. I meant that they are not stored
 somewhere on NOX by default, you'd have to collect the MACs programmatically
 with some queries. (But this is indeed easier than sending ARPs)

 On Tue, Mar 1, 2011 at 12:29 PM, Niky Riga nr...@bbn.com wrote:

 Hi,

 In ofp_phy_port data structure, that includes per port info, there is a
 hw_addr field, which I always assumed is the MAC address of the port, is
 this something different?

 --niky

 On 3/1/11 3:17 PM, Kyriakos Zarifis wrote:

 Hi Sriram,

 I don't think there is any mapping to switch port MACs on the controller
 by default. You'd probably have to do something like what you described.

 But why do you need the MAC addresses of the switch ports in order to
 setup flows?

 (Or did I misunderstand you and you referring to the MAC addresses of H1
 and H2?)

 On Tue, Mar 1, 2011 at 11:35 AM, Sriram natarajan.sri...@gmail.com
 mailto:natarajan.sri...@gmail.com wrote:

    Hello All,

    I have the following topology setup
    H1-S1-S2...-Sn-H2 (n varies from 1 to 20 in my testbed).

    I need to pre-install set of flows in each switch (when I receive a
    Datapath Join Event). To achieve this i need to know the MAC address
    of the connected interfaces in the switches.

    I was thinking to send an ARP request from the controller to all
    switches when I receive the datapath_join_event and the switch can
    FLOOD the request to all connected ports. With the ARP reply I can
    determine the MAC addresses.

    However I would like to know if there is a better way to get this
    information (dynamically determine the MAC addresses of all
    connected switch links). Is there an API which gives this
    information already?

    Thanks for your help
    Sriram



    ___
    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



 ___
 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 difference between GUI and ENVI

2011-02-28 Thread kk yap
Hmmm...

I feel obliged to comment briefly here.  LAVI and ENVI grew out of the
need for visualization during =our demonstrations.  The original
version uses a binary protocol that is similar to the OpenFlow
protocol, for ease of hacking.  After some time, LAVI was moved to a
JSON based protocol, and ENVI was not updated.  The new GUI is
compatible with the new LAVI, which ENVI will need translation.

Hope that gives you an idea of how all these software came about.

Regards
KK

On 28 February 2011 12:44, Kyriakos Zarifis kyr.zari...@gmail.com wrote:
 Hi,
 ENVI and the new GUI are completely different frontend applications with
 different functionalities. (The only thing in common is that they both use
 LAVI as a backend)

 On Mon, Feb 28, 2011 at 4:23 AM, 谢峰 xiefen...@gmail.com wrote:

 Hi all,

 Does anybody know the difference between GUI and ENVI, or they are just
 the same application with the same function?
 many thanks!
 regards,

 XieFeng
 ___
 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] Sending arp packets

2011-02-16 Thread kk yap
Hi,

There are many ways to do this and none of this is particularly more
appealing.  If you are using Python, you can try dpkt or scapy.
Handcrafting it is not that bad for ARP either.  If you are using
C/C++, I do not know of nice libraries to use here so anyone who has
any idea can educate me too.

In general, you can craft all sort of packets in NOX and it is not
clear than NOX is responsible for support that.

Regards
KK

On 16 February 2011 13:20, Bob Lantz rla...@cs.stanford.edu wrote:
 Generating ARPs in OpenFlow is a frequently encountered problem (a FEP?)!! 
 And how to do so conveniently and correctly might be something of what I call 
 a FABNAQ - a Frequently Asked But Never (or rarely adequately) Answered 
 Question. (FABNAQs are great because they generate lots of Google results 
 which don't actually answer the question.)

 So, if you have working code to generate correct ARP replies, I think sending 
 it to the list would be helpful for posterity!

 Also, for NOX developers - what is the preferred easy way to generate ARP 
 packets? If it's not simple or convenient, is there a way to make it more so?

 -Bob

 On Feb 16, 2011, at 12:18 PM, Niky Riga wrote:

 Hi Aaron,

 that might not be an issue at all, but I don't see in your code where you 
 set the ethernet headers (basically the src and dst) for the arp reply.

 If you want, I have some code that I wrote a while back to send arp replies, 
 that seemed to work as expected. I can forward it along if this is helpful.

 --niky

 On 2/16/11 2:59 PM, Aaron Rosen wrote:
 Hello,

 I'm trying to send arp replies from my nox controller though for some
 reason my packets don't seem to be getting sent out and I was hoping
 someone could point out where I'm going wrong. This is the code I
 have:

      if packet.type == ethernet.ARP_TYPE:
             arppacket = arp.arp(packet.next.arr, packet.next.prev)
             if arppacket.opcode == arppacket.REQUEST:
                 tmp_dst = arppacket.protodst
                 arppacket.protodst =  arppacket.protosrc
                 arppacket.protosrc =  tmp_dst
                 arppacket.hwdst = arppacket.hwsrc
                 arppacket.hwsrc = mac_to_int('\xd2\x85\xde\x8e\xf6\x13')
                 arppacket.opcode = arppacket.REPLY
                 packet.next = arppacket;
                 self.send_openflow(dpid, None, packet.arr,
 openflow.OFPP_FLOOD, inport);
                 print ARP REPLY SEND!!
                 return CONTINUE

 When I run tcpdump on the node that is sending the requests I does not
 see any of these packets.

 I'm trying to look at my openflow traffic with wireshark but for some
 reason I'm not seeing any. Though at my controller I'm definitely
 getting the packets. (I think this may because I'm using mininet? I've
 tried all the interfaces on my machine in wireshark). Though when I
 try this using the Openflow Tutorial provided VM i'm also not seeing
 any 'of' packets in wireshark there? (Any idea why)?

 Thanks,

 Aaron




 ___
 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] Timestamp update on pyswitch

2011-01-26 Thread kk yap
Hi Niky,

Yes, this is clearer now.  I do think it is better to watch for both
packet_in and flow_removed in this case.  You are looking for hints on
the host binding and both gives you the same information.  The easiest
fix is to just update the timestamp nonetheless.

Regards
KK

On 26 January 2011 15:13, Niky Riga nr...@bbn.com wrote:
 On the pyswitch code there is a function do_l2_learning().

 It's easier if I just paste the code here, hopefully it won't be
 too clattered.

 def do_l2_learning(dpid, inport, packet):
    global inst
    # learn MAC on incoming port
    srcaddr = packet.src.tostring()
    if ord(srcaddr[0])  1:
        return
    if inst.st[dpid].has_key(srcaddr):
        dst = inst.st[dpid][srcaddr]
        if dst[0] != inport:
            log.msg(...)
        else:
            return
    else:
        log.msg(...)

 # learn or update timestamp of entry
    inst.st[dpid][srcaddr] = (inport, time(), packet)

    # Replace any old entry for (switch,mac).
    mac = mac_to_int(packet.src)

 The update of the entries is happening in the end of the fxn,
 but if you look at the third 'if', if the cached port is the same
 as the inport (i.e. the host hasn't moved) the fxn returns without
 updating the timestamp, causing the entry to timeout sooner.

 Also it seems more appropriate that the entry times out after the
 hard time out, since while the flow is installed the controller is
 not expected to see any packets (at least from that flow), while it should
 see a packet after the hard timeout expires. If the hard timeout is set to
 infinite, then this is a potential problem, but in this case
 one can either not timeout the entry (like the switch module) or just
 set a default timeout value.

 Hope this helps,
 Niky

 On 1/26/11 5:56 PM, kk yap wrote:

 Hi,

 I am lost in this conversation.  While I can go and read the code, can
 someone explain this to people on the list?  I can figure out why
 entries will timeout quickly.

 Regards
 KK

 On 26 January 2011 14:49, Niky Riganr...@bbn.com  wrote:

 I am not exactly sure what you mean about L3 flows, I am guessing you
 mean
 that it installs exact matches on all the fields and not just using the
 L2
 fields, which, I am guessing, is done for efficiency reasons.

 I was thinking along the same lines as you, and modifying the controller
 to
 use the hard flow timeout value for the timeout, since the way it's
 implemented now the entry will timeout really soon and thus new flows
 have
 to start with flooding packets.

 Thanks,
 Niky

 On 1/26/11 1:40 PM, Murphy McCauley wrote:

 I think you're right.  This has bothered me (a tiny, tiny bit) for
 years,
 but I never took the time to 100% convince myself that having it update
 the
 timestamp was the right thing to do.  Since pyswitch isn't exactly an L2
 switch -- it installs L3 flows -- I was worried there might be something
 subtle.  At one point I had a version of pyswitch that did update it,
 and
 actually had two timeout numbers -- one was longer and used as the
 timeout
 for the internal map and also as the hard flow timeout, the other
 (shorter)
 one was the idle flow timeout.

 -- Murphy

 On Jan 26, 2011, at 9:56 AM, Niky Riga wrote:

 Hi,

 I was recently going over the code of pyswitch and I noticed that the
 timestamp
 of an entry is not being updated when a packet comes in on the same
 port
 as before
 (if the port is the same the code will return before updating the
 entry).

 I know that this is not terribly important since, unless you have a
 high
 arrival rate of new
 flows the entry will timeout really soon, I was just wondering ...

 Cheers,
 Niky

 ___
 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] pytopology patch

2011-01-20 Thread kk yap
Pushed.

Regards
KK

On 20 January 2011 17:13, Nikhil Handigol nikh...@cs.stanford.edu wrote:
 Hi KK,
 Here's the new patch generated with git-format-patch. Please let me know if
 this works.
 -/\/


 On Fri, Jan 14, 2011 at 10:53 AM, kk yap yap...@stanford.edu wrote:

 Please use git-format-patch.

 Regards
 KK

 On 14 January 2011 10:52, Nikhil Handigol nikh...@cs.stanford.edu wrote:
  I haven't used git-am. What format does it expect the patch to be in?
 
  I usually do the following:
  $ cd nox
  $ patch -p1  path/to/patch/pytopology_destiny.patch
 
  -/\/
 
 
  On Fri, Jan 14, 2011 at 10:39 AM, kk yap yap...@stanford.edu wrote:
 
  Hi Nikhil,
 
  That did not work.
 
  ykk@kk-alien:~$ git am pytopology_destiny.patch
  Patch format detection failed.
 
  Regards
  KK
 
  On 13 January 2011 20:44, Martin Casado cas...@nicira.com wrote:
   Awesome, thanks Nikhil.
  
   Hi,
   I have added 2 new functions to pytopology that makes it more
   useful/usable:
   * get_datapaths() : returns a list of all datapathids in the network
   * get_neighbors(dpid) : returns a list of neighbors of a given
   datapathid.
   I've attached a patch for the destiny branch (commit
   no. 5917f412d6d2a23ce5373ec499872cb8b40833e8).
   Thanks,
   Nikhil
  
   ___
   nox-dev mailing list
   nox-dev@noxrepo.org
   http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
  
  
   --
   ~~~
   Martin Casado
   Nicira Networks, Inc.
   www.nicira.com | www.openvswitch.org
   cell: 650-776-1457
   ~~~
  
   ___
   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] [POSSIBLE VIRUS:###] Re: Using flow fetcher

2011-01-18 Thread kk yap
Hi Paulo,

It would help that flow_fetcher_app is actually defined like the rest
of the components in NOX---with prototype in header file.  Anyway, the
details are for you to figure out, since I would also only know if I
try to do the clean up.

Regards
KK

On 18 January 2011 06:32, Paulo César pcd...@gmail.com wrote:
 Hi,
 I came back to this issue today. Please, can you tell me what have to be
 done to clean up flow fetcher?
 Sorry to bother.
 Thanks.

 2011/1/11 Paulo César pcd...@gmail.com

 Thanks.

 2011/1/11 kk yap yap...@stanford.edu

 Hi Paulo,

 I looked at flow_fetcher more carefully and found that
 Flow_fetcher_app is only defined as in flow_fetcher.cc.  In fact, it
 is a class in flow_fetcher.hh and a struct in flow_fetcher.cc.
 Cleaning up flow_fetcher will take more time than I have at hand.  If
 anyone can chip in, please do.

 Regards
 KK

 On 11 January 2011 13:19, Paulo César pcd...@gmail.com wrote:
  Hi, thanks for reply.
 
  I did the modifications that you recommended and follow the steps
  described
  in Developing in NOX tutorial.
  I also looked at other components(i.e. routing.cc, messennger.cc) and
  tried
  to make the communication between components like they do
  (resolve(component) in configure) but the following error is raised in
  compilation:
 
  ../../../../../src/nox/component.hh: In member function ‘void
  vigil::container::Component::resolve(T*) const [with T =
  vigil::applications::Flow_fetcher_app]’:
  ../../../../../src/nox/netapps/newcomp/newcomp.cc:38:   instantiated
  from
  here
  ../../../../../src/nox/component.hh:111: error: incomplete type
  ‘vigil::applications::Flow_fetcher_app’ used in nested name specifier
 
  I am declaring:
 
  Flow_fetcher_app *ffa
 
  Is that correct?
 
  Thanks.
 
  Best regards.
 
 
 
  2011/1/7 kk yap yap...@stanford.edu
 
  Hi Paulo,
 
  You need using namespace vigil::applications, which Flow_fetcher is
  in.
  Also fix the problem I previously mentioned, i.e., resolve(ff) and not
  resolve(Flow_fetcher)
  You also have a stray line boost::shared_ptrFlow_fetcher in
  newcomp.cc.
 
  Finally Flow_fetcher is *not* a NOX component, so you cannot resolve
  it this way.  You should look at Flow_fetcher_app instead.
 
  Regards
  KK
 
  On 7 January 2011 14:00, Paulo César pcd...@gmail.com wrote:
   Thanks.
  
   2011/1/7 kk yap yap...@stanford.edu
  
   Hi Paulo,
  
   Can I have your Makefile.am too?
  
   Regards
   KK
  
   On 7 January 2011 13:46, Paulo César pcd...@gmail.com wrote:
Hi,
I have already tested it but the error persists.
The error is accused on the header newcomp.hh :
../../../../../src/nox/netapps/newcomp/newcomp.hh:98: error: ISO
C++
forbids
declaration of ‘Flow_fetcher’ with no type
Sorry to bother, thanks for help.
Best regards.
   
2011/1/7 kk yap yap...@stanford.edu
   
Hi Paulo,
   
cc-ing back the list for archival.
   
It should be resolve(ff) and not resolve (Flow_fetcher).  That
should
resolve it.
   
Regards
KK
   
On 7 January 2011 10:38, Paulo César pcd...@gmail.com wrote:
 Thanks for the help.

 2011/1/7 kk yap yap...@stanford.edu

 Hi Paulo,

 Can you send me a tarball of the component?  There is
 insufficient
 information here us to comment.

 Regards
 KK

 On 7 January 2011 09:57, Paulo César pcd...@gmail.com
 wrote:
  Yes, I already have included the flow fetcher's header. I
  am
  declaring
  the
  flow fetcher in the header of my component this way:
    private:
    Flow_fetcher *ff;
  I did this based on how routing.cc utilizes the Topology
  class
  and
  in
  the
  tutorial available
  in http://noxrepo.org/noxwiki/index.php/Developing_in_NOX.
  Any suggestions?
  Thansk for the reply.
 
  2011/1/7 kk yap yap...@stanford.edu
 
  Hi Paulo,
 
  You have not include the flow fetcher's header?  Sorry for
  the
  wild
  guess, but from what you provided this seems like
  something
  about
  header inclusion.
 
  Regards
  KK
 
  On 7 January 2011 06:36, Paulo César pcd...@gmail.com
  wrote:
   Hi,
   I was trying to use the method fetch() from
   flow_fetcher.cc.
   I included the header flow_fetcher.hh in my component
   and
   added
   flow
   fetcher
   as a dependency in the meta.json file,
   but an error occurs on compilation:
   ../../../../../src/nox/netapps/newcomp/newcomp.hh:98:
   error:
   ISO
   C++
   forbids
   declaration of ‘Flow_fetcher’ with no type
   Any suggestions to solve this? Am I missing something?
   Best regards.
   --
   Life is not fair; get used to it.
   Bill Gates
  
  
   ___
   nox-dev mailing list
   nox-dev@noxrepo.org
   http://noxrepo.org

Re: [nox-dev] Problem about the action_list on the 1st packet

2011-01-18 Thread kk yap
Hi Kyle,

It might help to explain it seemed to be not work.  Did NOX segfault
as a result?  Was the a OpenFlow flow_mod sent?  Was an error
received?  What switch are you using?  These would be useful
information.

Regards
KK

On 18 January 2011 04:15, Kyle Wang ese.kylew...@gmail.com wrote:
 Hi,
 how can I use function send_openflow_packet(const datapathid datapath_id,
 uint32_t buffer_id, const ofp_action_header actions[], uint16_t
 actions_len, uint16_t in_port, bool block) to change the destination MAC
 address of the 1st packet of some flow, and then send this modified packet
 to the desired out_port ?
 I had tried using action_list to do this, but it seemed to be not work. The
 following is partial code.
         ofp_action_list ofpall;
         ofp_action *ofp1 = new ofp_action();
         ofp1-action_raw.reset(new uint8_t[sizeof(ofp_action_dl_addr)]);
         of_action_dl_addr oada;
         oada.type = OFPAT_SET_DL_DST;
         oada.len = sizeof(ofp_action_dl_addr);
         memcpy(oada.dl_addr, fns_server_attr.dl_src, ethernetaddr::LEN);
         oada.pack((ofp_action_dl_addr*)
 openflow_pack::get_header(ofp1-action_raw));
         ofpall.action_list.push_back(*ofp1);
         ofp_action *ofp2 = new ofp_action();
         ofp2-action_raw.reset(new uint8_t[sizeof(ofp_action_output)]);
         of_action_output oao;
         oao.type = OFPAT_OUTPUT;
         oao.len = sizeof(ofp_action_output);
         oao.port = fns_server_attr.in_port;
         oao.max_len = 0;
         oao.pack((ofp_action_output*)
 openflow_pack::get_header(ofp2-action_raw));
         ofpall.action_list.push_back(*ofp2);
         size_t size = sizeof(ofp_flow_mod) + ofpall.mem_size();
         boost::shared_arrayuint8_t of_raw(new uint8_t[size]);
         of_raw.reset(new uint8_t[size]);
         of_flow_mod ofm;
         ofm.header = openflow_pack::header(OFPT_FLOW_MOD, size);
         ofm.match = flow.get_exact_match();
         ofm.match.wildcards = htonl(0);
         ofm.match.in_port = flow.in_port;
         ofm.command = OFPFC_ADD;
         ofm.buffer_id = htonl(-1);
         ofm.idle_timeout = htons(5);
         ofm.hard_timeout = htons(OFP_FLOW_PERMANENT);
         ofm.priority = htons(OFP_DEFAULT_PRIORITY);
         ofm.flags = htons(ofd_flow_mod_flags());
         ofm.pack((ofp_flow_mod*) openflow_pack::get_pointer(of_raw));
         ofpall.pack(openflow_pack::get_pointer(of_raw,
 sizeof(ofp_flow_mod)));
         send_openflow_command(pi.datapath_id, of_raw, true);
         if (buffer_id == UINT32_MAX) {
             send_openflow_packet(pi.datapath_id, *pi.get_buffer(),
                                  ofm.actions, ofpall.mem_size(),
                                  pi.in_port, true);
         } else {
             send_openflow_packet(pi.datapath_id, buffer_id,
                                  ofm.actions, ofpall.mem_size(),
                                  pi.in_port, true);
         }


 ___
 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] Handling corrupted TCP header

2011-01-14 Thread kk yap
Okay, I think the high level point is we should expose malformed
packets and let others decide how to handle it.  Can someone review
this patch before I push?

Regards
KK

On 14 January 2011 01:25, Rob Sherwood rob.sherw...@stanford.edu wrote:
 Fwiw, I agree with what both Masa and KK.

 Masa's point: OFPP_TABLE shouldn't be a special case: i.e., it should
 be able to generate packet_in's on the second pss

 KK's point: this should be more explicitly called out in the spec.

 I think if you were to suggest a specific wording in the next week,
 this could still make it into the 1.1 spec.

 - Rob
 .



 On Thu, Jan 13, 2011 at 7:06 PM, Masayoshi Kobayashi
 mkoba...@stanford.edu wrote:
 KK,

 I think the implementer will read the spec the other way around.
 Spec requires nothing special about OFPP_TABLE action (it does not say
 don't generate pkt_in, if there is no match). So the switch
 just follows the default behavior, i.e., pkt_in will be generated.

 I would expect the reference design also does the same.

  Masa

 On 01/13/2011 06:38 PM, kk yap wrote:

 Because the action of pkt_out is OFPP_TABLE.
 (the packet in pkt_out does not match to the entry that is installed by
 flow_mod, since the matching entry says nw_proto=0).

 Is there anything in the spec that says that the switch should send
 another packet-in if there is no matching entry for a OFPP_TABLE?  I
 am failing to find that.  Can someone point to why this behavior is
 specified by the spec?

 Regards
 KK

 On 13 January 2011 18:28, Masayoshi Kobayashimkoba...@stanford.edu
  wrote:

 KK,

 I thought about it a little.  Why is the switch doing step 7?

 Because the action of pkt_out is OFPP_TABLE.
 (the packet in pkt_out does not match to the entry that is installed by
 flow_mod, since the matching entry says nw_proto=0).

  Masa

 On 01/13/2011 06:06 PM, kk yap wrote:

 Hi Srini,

 I thought about it a little.  Why is the switch doing step 7?

 Anyway, I do agree that NOX is not handling malformed packets right.
 I have included an invalid field in the struct flow, and created a
 component that ignore invalid packets.  If anyone will double-check
 and test the patches attached, I will push it.

 Regards
 KK

 On 13 January 2011 16:13, Srini Seetharamanseeth...@stanford.edu
  wrote:

 I explained this to KK in person. For others, here is the sequence of
 events:

 1. Packet arrives with (nw_proto=6, tp_src=0, tp_dst=0). Store in bufid
 'X'
 2. flow.cc identifies that the arrived TCP packet is corrupted, and
 generates
    pkt_in event with flow structure having (nw_proto=0, tp_src=0,
 tp_dst=0)
 3. Authenticator generates a flow_in with flow_in.flow being same as
 above
 3. routing.cc generates a flow_mod for the flow_in with the match
 pattern
    defined using the fields of the flow_in.flow
 4. Switch inserts a flow table entry for matching (nw_proto=0,
 tp_src=0, tp_dst=0)
 5. routing.cc generates a pkt_out for the bufid 'X' with action =
 OFPP_TABLE
 6. Switch notices that the packet in bufid 'X' has no matching flow
 table
 entry,
    because there is a mismatch on the nw_proto field
 7. Switch generates a new pkt_in event
 8. Go to step (2)

 This is the infinite loop.

 Srini.

 On Thu, Jan 13, 2011 at 1:08 PM, kk yapyap...@stanford.edu    wrote:

 Hi Srini,

 I think you are fixing this in the wrong place.  Putting nw_proto=0
 does not cause an infinite loop.  Where is the loop happening?  Can
 you provide more detailed NOX output so that we can even start looking
 at this.

 Regards
 KK

 On 13 January 2011 11:02, Srini Seetharamanseeth...@stanford.edu
  wrote:

 We don't know who sent it, but it came from outside our network. If
 it
 is easy to take down a network by just sending 1 invalid packet, I'd
 be worried!

 On Thu, Jan 13, 2011 at 10:59 AM, kk yapyap...@stanford.edu
  wrote:

 Hi Srini,

 What is this packet?  The length of TCP is zero?!?!  I wish to
 understand the circumstance for which we are getting the packet
 before
 commenting on the right way to handle this.

 Regards
 KK


 On 13 January 2011 10:38, Srini Seetharamanseeth...@stanford.edu
  wrote:

 When someone sends the attached packet to a switch, it generates an
 infinite loop of packet_ins in our production network. This is
 because
 this incoming tcp packet has nw_proto=6 and tcp port numbers of
 0,
 but outgoing flow_mod has nw_proto of 0 and tcp port numbers of
 0.
 So, the packet_out generates a new packet_in and this loop
 continues
 forever.

 I see the following code in src/lib/flow.cc (both in NOX-Zaku and
 SNAC). I believe this is what is causing the nw_proto to be 0 in
 the
 flow_mod. I'm not sure who wrote that piece of  code. This is not
 handling corrupted packets well and rejecting this packet as a
 invalid
 TCP packet. Does anyone see problems with removing the else
 clause?

    if (nw_proto == ip_::proto::TCP) {
        const tcp_header *tcp = pull_tcp(b);
        if (tcp) {
            tp_src = tcp-tcp_src;
            tp_dst = tcp-tcp_dst

Re: [nox-dev] pytopology patch

2011-01-14 Thread kk yap
Please use git-format-patch.

Regards
KK

On 14 January 2011 10:52, Nikhil Handigol nikh...@cs.stanford.edu wrote:
 I haven't used git-am. What format does it expect the patch to be in?

 I usually do the following:
 $ cd nox
 $ patch -p1  path/to/patch/pytopology_destiny.patch

 -/\/


 On Fri, Jan 14, 2011 at 10:39 AM, kk yap yap...@stanford.edu wrote:

 Hi Nikhil,

 That did not work.

 ykk@kk-alien:~$ git am pytopology_destiny.patch
 Patch format detection failed.

 Regards
 KK

 On 13 January 2011 20:44, Martin Casado cas...@nicira.com wrote:
  Awesome, thanks Nikhil.
 
  Hi,
  I have added 2 new functions to pytopology that makes it more
  useful/usable:
  * get_datapaths() : returns a list of all datapathids in the network
  * get_neighbors(dpid) : returns a list of neighbors of a given
  datapathid.
  I've attached a patch for the destiny branch (commit
  no. 5917f412d6d2a23ce5373ec499872cb8b40833e8).
  Thanks,
  Nikhil
 
  ___
  nox-dev mailing list
  nox-dev@noxrepo.org
  http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
 
 
  --
  ~~~
  Martin Casado
  Nicira Networks, Inc.
  www.nicira.com | www.openvswitch.org
  cell: 650-776-1457
  ~~~
 
  ___
  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] Handling corrupted TCP header

2011-01-13 Thread kk yap
Hi Srini,

What is this packet?  The length of TCP is zero?!?!  I wish to
understand the circumstance for which we are getting the packet before
commenting on the right way to handle this.

Regards
KK


On 13 January 2011 10:38, Srini Seetharaman seeth...@stanford.edu wrote:
 When someone sends the attached packet to a switch, it generates an
 infinite loop of packet_ins in our production network. This is because
 this incoming tcp packet has nw_proto=6 and tcp port numbers of 0,
 but outgoing flow_mod has nw_proto of 0 and tcp port numbers of 0.
 So, the packet_out generates a new packet_in and this loop continues
 forever.

 I see the following code in src/lib/flow.cc (both in NOX-Zaku and
 SNAC). I believe this is what is causing the nw_proto to be 0 in the
 flow_mod. I'm not sure who wrote that piece of  code. This is not
 handling corrupted packets well and rejecting this packet as a invalid
 TCP packet. Does anyone see problems with removing the else clause?

    if (nw_proto == ip_::proto::TCP) {
        const tcp_header *tcp = pull_tcp(b);
        if (tcp) {
            tp_src = tcp-tcp_src;
            tp_dst = tcp-tcp_dst;
        } else {
            /* Avoid tricking other code into thinking that
             * this packet has an L4 header. */
            nw_proto = 0;
        }
    }

 FYI, pull_tcp is defined as below:
    static const tcp_header * pull_tcp(Buffer b)
    {
        if (const tcp_header *tcp = b.try_attcp_header(0)) {
            int tcp_len = TCP_OFFSET(tcp-tcp_ctl) * 4;
            if (tcp_len = sizeof *tcp) {
                return reinterpret_castconst 
 tcp_header*(b.try_pull(tcp_len));
            }
        }
        return 0;
    }

 ___
 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] Handling corrupted TCP header

2011-01-13 Thread kk yap
Hi Srini,

I think you are fixing this in the wrong place.  Putting nw_proto=0
does not cause an infinite loop.  Where is the loop happening?  Can
you provide more detailed NOX output so that we can even start looking
at this.

Regards
KK

On 13 January 2011 11:02, Srini Seetharaman seeth...@stanford.edu wrote:
 We don't know who sent it, but it came from outside our network. If it
 is easy to take down a network by just sending 1 invalid packet, I'd
 be worried!

 On Thu, Jan 13, 2011 at 10:59 AM, kk yap yap...@stanford.edu wrote:
 Hi Srini,

 What is this packet?  The length of TCP is zero?!?!  I wish to
 understand the circumstance for which we are getting the packet before
 commenting on the right way to handle this.

 Regards
 KK


 On 13 January 2011 10:38, Srini Seetharaman seeth...@stanford.edu wrote:
 When someone sends the attached packet to a switch, it generates an
 infinite loop of packet_ins in our production network. This is because
 this incoming tcp packet has nw_proto=6 and tcp port numbers of 0,
 but outgoing flow_mod has nw_proto of 0 and tcp port numbers of 0.
 So, the packet_out generates a new packet_in and this loop continues
 forever.

 I see the following code in src/lib/flow.cc (both in NOX-Zaku and
 SNAC). I believe this is what is causing the nw_proto to be 0 in the
 flow_mod. I'm not sure who wrote that piece of  code. This is not
 handling corrupted packets well and rejecting this packet as a invalid
 TCP packet. Does anyone see problems with removing the else clause?

    if (nw_proto == ip_::proto::TCP) {
        const tcp_header *tcp = pull_tcp(b);
        if (tcp) {
            tp_src = tcp-tcp_src;
            tp_dst = tcp-tcp_dst;
        } else {
            /* Avoid tricking other code into thinking that
             * this packet has an L4 header. */
            nw_proto = 0;
        }
    }

 FYI, pull_tcp is defined as below:
    static const tcp_header * pull_tcp(Buffer b)
    {
        if (const tcp_header *tcp = b.try_attcp_header(0)) {
            int tcp_len = TCP_OFFSET(tcp-tcp_ctl) * 4;
            if (tcp_len = sizeof *tcp) {
                return reinterpret_castconst 
 tcp_header*(b.try_pull(tcp_len));
            }
        }
        return 0;
    }

 ___
 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] Contributing to Nox

2011-01-12 Thread kk yap
Thanks.  I pushed this.

Regards
KK

On 12 January 2011 21:40, Derek Cormier derek.corm...@lab.ntt.co.jp wrote:
 Thanks! I'm glad my patches are decent.

 I've attached another one for destiny:

 In a Flow_removed_event, the fields are taken from an ofp_flow_removed
 message,
 but a couple of fields were missing (reason and priority). I added these to
 the event
 struct and changed python's flow removed callback generator to give these
 new parameters.

 -Derek

 On 01/12/2011 04:43 AM, kk yap wrote:

 Hi Derek,

 Thanks.  Great patches as usual.  I have pushed them to the destiny
 branch.

 Martin and Murphy, I believe I have pushed most (if not all) of
 Derek's patches at this moment.  If anything else is missing, let me
 know.

 Thanks.

 Regards
 KK

 On 11 January 2011 07:23, Martin Casadocas...@nicira.com  wrote:

 Derek,

 Thanks for the patches, these are very helpful.  One of us will take a
 look
 shortly.

 .martin

 Hello,
 Here are two patches for destiny for the Python API.

 patch 1:
  - in pyrt.cc, add datapath id to the dictionaries created by
 Flow_removed_event and Error_event

 patch2:
 - add lots of doxygen doc strings to core.api
 - add callback generators for flow mod and flow removed events
 - change the names of callback generators to make them more readable
 - add more constants for dictionary keys

 -Derek

 On 01/04/2011 10:27 AM, kk yap wrote:

 Hi Derek,

 Thanks.  Doxygen comments are presented in the code.  E.g.,

 /** \brief Event
   * Some event
   *
   * @author ykk
   * @date Jan 2011
   */
 struct x_event
 {
    ...
 }

 They are more in-depth example in the components.

 Regards
 KK

 On 3 January 2011 17:19, Derek Cormierderek.corm...@lab.ntt.co.jp
 wrote:

 Sure thing. Where do the doxygen comments go? I've never used doxygen
 before, I'm assuming they go above the struct definition but I don't see
 any
 such comments in the files I edited. Is there another file?

 Thanks,
 -Derek

 On 01/04/2011 06:20 AM, kk yap wrote:

 Hi Derek,

 Sorry it took me a while to get to this.  Can you put in doxygen
 comments for these patches?  The patches includes new structs and so
 on from what I can see.  Else, I can do it.  But I doubt I can get to
 it fast enough.  Thanks.

 Regards
 KK

 On 27 December 2010 23:23, Derek Cormierderek.corm...@lab.ntt.co.jp
   wrote:

 Here's a couple more patches for destiny.

 'barrier-reply.tar.gz'  -  make barrier reply events available to the
 Python
 API.
 'flow-stats-in.tar.gz'  -  add a convenience method in component to
 register
 for flow stats in events.

 -Derek

 On 12/28/2010 01:30 AM, Martin Casado wrote:

 Thanks KK.  I pushed a few edits as well.

 Hi,

 I have done that for destiny and pushed the file.  Martin, you should
 probably check the list again.  If I have missed you out (since I only
 exploited git log), do let me know.

 Regards
 KK

 ___
 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


 --
 ~~~
 Martin Casado
 Nicira Networks, Inc.
 www.nicira.com | www.openvswitch.org
 cell: 650-776-1457
 ~~~




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


Re: [nox-dev] Contributing to Nox

2011-01-11 Thread kk yap
Hi Derek,

Thanks.  Great patches as usual.  I have pushed them to the destiny branch.

Martin and Murphy, I believe I have pushed most (if not all) of
Derek's patches at this moment.  If anything else is missing, let me
know.

Thanks.

Regards
KK

On 11 January 2011 07:23, Martin Casado cas...@nicira.com wrote:
 Derek,

 Thanks for the patches, these are very helpful.  One of us will take a look
 shortly.

 .martin

 Hello,
 Here are two patches for destiny for the Python API.

 patch 1:
  - in pyrt.cc, add datapath id to the dictionaries created by
 Flow_removed_event and Error_event

 patch2:
 - add lots of doxygen doc strings to core.api
 - add callback generators for flow mod and flow removed events
 - change the names of callback generators to make them more readable
 - add more constants for dictionary keys

 -Derek

 On 01/04/2011 10:27 AM, kk yap wrote:

 Hi Derek,

 Thanks.  Doxygen comments are presented in the code.  E.g.,

 /** \brief Event
   * Some event
   *
   * @author ykk
   * @date Jan 2011
   */
 struct x_event
 {
    ...
 }

 They are more in-depth example in the components.

 Regards
 KK

 On 3 January 2011 17:19, Derek Cormierderek.corm...@lab.ntt.co.jp  wrote:

 Sure thing. Where do the doxygen comments go? I've never used doxygen
 before, I'm assuming they go above the struct definition but I don't see any
 such comments in the files I edited. Is there another file?

 Thanks,
 -Derek

 On 01/04/2011 06:20 AM, kk yap wrote:

 Hi Derek,

 Sorry it took me a while to get to this.  Can you put in doxygen
 comments for these patches?  The patches includes new structs and so
 on from what I can see.  Else, I can do it.  But I doubt I can get to
 it fast enough.  Thanks.

 Regards
 KK

 On 27 December 2010 23:23, Derek Cormierderek.corm...@lab.ntt.co.jp
   wrote:

 Here's a couple more patches for destiny.

 'barrier-reply.tar.gz'  -  make barrier reply events available to the
 Python
 API.
 'flow-stats-in.tar.gz'  -  add a convenience method in component to
 register
 for flow stats in events.

 -Derek

 On 12/28/2010 01:30 AM, Martin Casado wrote:

 Thanks KK.  I pushed a few edits as well.

 Hi,

 I have done that for destiny and pushed the file.  Martin, you should
 probably check the list again.  If I have missed you out (since I only
 exploited git log), do let me know.

 Regards
 KK

 ___
 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


 --
 ~~~
 Martin Casado
 Nicira Networks, Inc.
 www.nicira.com | www.openvswitch.org
 cell: 650-776-1457
 ~~~

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


Re: [nox-dev] Contributing to Nox

2011-01-11 Thread kk yap
Hi All,

With Derek's patch, the documentation for destiny branch is more
useful for those using Python.  Consequently, I have pushed the
doxygen documentation for destiny (which include Derek's patch) to
replace the one previously generated from zaku.  FYI.

Regards
KK

On 11 January 2011 11:43, kk yap yap...@stanford.edu wrote:
 Hi Derek,

 Thanks.  Great patches as usual.  I have pushed them to the destiny branch.

 Martin and Murphy, I believe I have pushed most (if not all) of
 Derek's patches at this moment.  If anything else is missing, let me
 know.

 Thanks.

 Regards
 KK

 On 11 January 2011 07:23, Martin Casado cas...@nicira.com wrote:
 Derek,

 Thanks for the patches, these are very helpful.  One of us will take a look
 shortly.

 .martin

 Hello,
 Here are two patches for destiny for the Python API.

 patch 1:
  - in pyrt.cc, add datapath id to the dictionaries created by
 Flow_removed_event and Error_event

 patch2:
 - add lots of doxygen doc strings to core.api
 - add callback generators for flow mod and flow removed events
 - change the names of callback generators to make them more readable
 - add more constants for dictionary keys

 -Derek

 On 01/04/2011 10:27 AM, kk yap wrote:

 Hi Derek,

 Thanks.  Doxygen comments are presented in the code.  E.g.,

 /** \brief Event
   * Some event
   *
   * @author ykk
   * @date Jan 2011
   */
 struct x_event
 {
    ...
 }

 They are more in-depth example in the components.

 Regards
 KK

 On 3 January 2011 17:19, Derek Cormierderek.corm...@lab.ntt.co.jp  wrote:

 Sure thing. Where do the doxygen comments go? I've never used doxygen
 before, I'm assuming they go above the struct definition but I don't see any
 such comments in the files I edited. Is there another file?

 Thanks,
 -Derek

 On 01/04/2011 06:20 AM, kk yap wrote:

 Hi Derek,

 Sorry it took me a while to get to this.  Can you put in doxygen
 comments for these patches?  The patches includes new structs and so
 on from what I can see.  Else, I can do it.  But I doubt I can get to
 it fast enough.  Thanks.

 Regards
 KK

 On 27 December 2010 23:23, Derek Cormierderek.corm...@lab.ntt.co.jp
   wrote:

 Here's a couple more patches for destiny.

 'barrier-reply.tar.gz'  -  make barrier reply events available to the
 Python
 API.
 'flow-stats-in.tar.gz'  -  add a convenience method in component to
 register
 for flow stats in events.

 -Derek

 On 12/28/2010 01:30 AM, Martin Casado wrote:

 Thanks KK.  I pushed a few edits as well.

 Hi,

 I have done that for destiny and pushed the file.  Martin, you should
 probably check the list again.  If I have missed you out (since I only
 exploited git log), do let me know.

 Regards
 KK

 ___
 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


 --
 ~~~
 Martin Casado
 Nicira Networks, Inc.
 www.nicira.com | www.openvswitch.org
 cell: 650-776-1457
 ~~~


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


Re: [nox-dev] Using flow fetcher

2011-01-07 Thread kk yap
Hi Paulo,

You have not include the flow fetcher's header?  Sorry for the wild
guess, but from what you provided this seems like something about
header inclusion.

Regards
KK

On 7 January 2011 06:36, Paulo César pcd...@gmail.com wrote:
 Hi,
 I was trying to use the method fetch() from flow_fetcher.cc.
 I included the header flow_fetcher.hh in my component and added flow fetcher
 as a dependency in the meta.json file,
 but an error occurs on compilation:
 ../../../../../src/nox/netapps/newcomp/newcomp.hh:98: error: ISO C++ forbids
 declaration of ‘Flow_fetcher’ with no type
 Any suggestions to solve this? Am I missing something?
 Best regards.
 --
 Life is not fair; get used to it.
 Bill Gates


 ___
 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] [POSSIBLE VIRUS:###] Re: Using flow fetcher

2011-01-07 Thread kk yap
Hi Paulo,

cc-ing back the list for archival.

It should be resolve(ff) and not resolve (Flow_fetcher).  That should
resolve it.

Regards
KK

On 7 January 2011 10:38, Paulo César pcd...@gmail.com wrote:
 Thanks for the help.

 2011/1/7 kk yap yap...@stanford.edu

 Hi Paulo,

 Can you send me a tarball of the component?  There is insufficient
 information here us to comment.

 Regards
 KK

 On 7 January 2011 09:57, Paulo César pcd...@gmail.com wrote:
  Yes, I already have included the flow fetcher's header. I am declaring
  the
  flow fetcher in the header of my component this way:
    private:
    Flow_fetcher *ff;
  I did this based on how routing.cc utilizes the Topology class and in
  the
  tutorial available
  in http://noxrepo.org/noxwiki/index.php/Developing_in_NOX.
  Any suggestions?
  Thansk for the reply.
 
  2011/1/7 kk yap yap...@stanford.edu
 
  Hi Paulo,
 
  You have not include the flow fetcher's header?  Sorry for the wild
  guess, but from what you provided this seems like something about
  header inclusion.
 
  Regards
  KK
 
  On 7 January 2011 06:36, Paulo César pcd...@gmail.com wrote:
   Hi,
   I was trying to use the method fetch() from flow_fetcher.cc.
   I included the header flow_fetcher.hh in my component and added flow
   fetcher
   as a dependency in the meta.json file,
   but an error occurs on compilation:
   ../../../../../src/nox/netapps/newcomp/newcomp.hh:98: error: ISO C++
   forbids
   declaration of ‘Flow_fetcher’ with no type
   Any suggestions to solve this? Am I missing something?
   Best regards.
   --
   Life is not fair; get used to it.
   Bill Gates
  
  
   ___
   nox-dev mailing list
   nox-dev@noxrepo.org
   http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
  
  
 
 
 
  --
  Life is not fair; get used to it.
  Bill Gates
 
 



 --
 Life is not fair; get used to it.
 Bill Gates



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


Re: [nox-dev] Quick Bugfix for pyglue.

2011-01-06 Thread kk yap
Hi Derek,

Yes, we use doxypy for Python comments.  I pushed a simple_py_app
today, with example of how the documentation works.

Regards
KK

On 6 January 2011 18:44, Derek Cormier derek.corm...@lab.ntt.co.jp wrote:
 Hi KK,

 No problem. I'm working on some more changes to further expose python, and I
 noticed that core.py has both method header comments and doc strings. If I
 clean up the comments, which should I use? And, do you also format python
 comments for doxygen?

 Thanks,
 -Derek

 On 01/06/2011 05:03 AM, kk yap wrote:

 Hi Derek,

 I pushed all the patches.  I did not realize you are just exposing
 things to Python and not declaring new structs.  Sorry.  A quick
 glimpse has failed me.

 Regards
 KK

 On 3 January 2011 21:07, Derek Cormierderek.corm...@lab.ntt.co.jp
  wrote:

 Here is a patch for destiny to fix a bug where pyglue.cc was using ntohl
 on
 ofp_flow_stat's cookie field instead of ntohll, which is required for
 64-bit
 values.

 -Derek

 ___
 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] Quick Bugfix for pyglue.

2011-01-05 Thread kk yap
Hi Derek,

I pushed all the patches.  I did not realize you are just exposing
things to Python and not declaring new structs.  Sorry.  A quick
glimpse has failed me.

Regards
KK

On 3 January 2011 21:07, Derek Cormier derek.corm...@lab.ntt.co.jp wrote:
 Here is a patch for destiny to fix a bug where pyglue.cc was using ntohl on
 ofp_flow_stat's cookie field instead of ntohll, which is required for 64-bit
 values.

 -Derek

 ___
 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] dl_vlan not correct?

2011-01-05 Thread kk yap
Hi Aaron,

Can you tell us if there is any difference in the tcpdump from the HP
and Indigo?

I skimmed through the NOX code and it seems to parse VLAN.  So, there
is something amiss here.

Regards
KK

On 5 January 2011 14:50, Srini Seetharaman seeth...@stanford.edu wrote:
 I'm a bit confused by what you see with Indigo. Here's what I said:
 - HP switch: Packet_ins seen at the controller will not have the VLAN
 tag, but outgoing packets in the dataplane will have the appropriate
 tag.
 - Indigo switch: Packet_ins seen at the controller will have the VLAN
 tag if tagged packets are sent to it. For outgoing packets to have the
 tag, the controller has to add the tag (as an additional action).

 On Wed, Jan 5, 2011 at 2:37 PM, Aaron Rosen aro...@clemson.edu wrote:
 Hi Srini,

 In my topology I have an HP switch which I have configured a port to tag
 several vlans. If I plug my laptop into this port I'm able to see the
 correct vlan values. Now If I plug a switch into this port that is running
 the indigo firmware when the controller gets the packets I'm seeing 0x
 as the value instead of the correct value I see with my laptop using
 wireshark.

 (According to your response this should be fine? )

 Aaron

 On Wed, Jan 5, 2011 at 5:31 PM, Srini Seetharaman seeth...@stanford.edu
 wrote:

 Hi Aaron
 Only pure-OF switches (like Pronto switch with Indigo firmware) will
 send the VLAN tag to the controller. With others, the tag is usually
 added / stripped by the VLAN configs on the switch. So, you'll not get
 to see them.

 Srini.

 On Wed, Jan 5, 2011 at 2:23 PM, Aaron Rosen aro...@clemson.edu wrote:
  Hello,
 
  I'm trying to extract the dl_vlan value from packets on a trunk port.
  When I
  plug my computer into the trunk port and run tcpdump I see the correct
  802.1Q values. Though when I attach this port to my openflow switch
  (running
  the pronto firmware) I can't get the correct values at my controller.
 
  In my controller I'm running these few lines of code to print out what's
  in
  the packet.
 
  test = extract_flow(packet)
  print test.keys()
  print test.values()
 
  From this: I'm getting the following output
 
  ['dl_type', 'nw_dst', 'dl_vlan_pcp', 'dl_src', 'nw_proto', 'nw_tos',
  'tp_dst', 'tp_src', 'dl_dst', 'dl_vlan', 'nw_src']
  [2048, 4294967295, 0, array('B', [0, 27, 177, 2, 100, 167]), 17, 0, 698,
  698, array('B', [255, 255, 255, 255, 255, 255]), 65535, 2189371010]
 
  I'm getting 65535 for every packet and that is not correct from what I'm
  seeing with tcpdump and not what I'm expecting.
 
  Can someone point out where I'm going wrong.
 
  Thanks,
 
  Aaron
 
  --
  Aaron O. Rosen
  Masters Student - Network Communication
  306B Fluor Daniel
  843.425.9777
 
 
  ___
  nox-dev mailing list
  nox-dev@noxrepo.org
  http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
 
 



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



 ___
 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] dl_vlan not correct?

2011-01-05 Thread kk yap
Hi Aaron,

Let me get this right.  You see the 802.1Q tag for a switch and not
another.  What does this has to do with NOX?  NOX will simply parse
the packet it receives.  Should this email to be openflow-discuss
instead?  Correct me if I am misinterpreting.

Regards
KK

On 5 January 2011 15:11, Aaron Rosen aro...@clemson.edu wrote:
 Gah wrong permissions on file here we go..

 Sorry,

 Aaron

 On Wed, Jan 5, 2011 at 6:08 PM, Aaron Rosen aro...@clemson.edu wrote:

 Opps,  sorry for got to attach the laptop dump file.

 Aaron

 On Wed, Jan 5, 2011 at 6:08 PM, Aaron Rosen aro...@clemson.edu wrote:

 Hi KK,

 Attached are two wireshark dump files. One is a dump from my laptop
 plugged into the trunk port (on the hp switch). If you look at it in
 wireshark all of these packets have a 802.1Q virtual LAN frame with an ID of
 either 845, 846, or 847.

 The other dump file 'dump_at_controller', is a wireshark capture at the
 controller where an switch running indigo is pointing. If you look at all of
 these packet_in events I don't see any of these 802.1Q frames.

 Thanks,

 Aaron



 On Wed, Jan 5, 2011 at 5:58 PM, kk yap yap...@stanford.edu wrote:

 Hi Aaron,

 Can you tell us if there is any difference in the tcpdump from the HP
 and Indigo?

 I skimmed through the NOX code and it seems to parse VLAN.  So, there
 is something amiss here.

 Regards
 KK

 On 5 January 2011 14:50, Srini Seetharaman seeth...@stanford.edu
 wrote:
  I'm a bit confused by what you see with Indigo. Here's what I said:
  - HP switch: Packet_ins seen at the controller will not have the VLAN
  tag, but outgoing packets in the dataplane will have the appropriate
  tag.
  - Indigo switch: Packet_ins seen at the controller will have the VLAN
  tag if tagged packets are sent to it. For outgoing packets to have the
  tag, the controller has to add the tag (as an additional action).
 
  On Wed, Jan 5, 2011 at 2:37 PM, Aaron Rosen aro...@clemson.edu
  wrote:
  Hi Srini,
 
  In my topology I have an HP switch which I have configured a port to
  tag
  several vlans. If I plug my laptop into this port I'm able to see the
  correct vlan values. Now If I plug a switch into this port that is
  running
  the indigo firmware when the controller gets the packets I'm seeing
  0x
  as the value instead of the correct value I see with my laptop using
  wireshark.
 
  (According to your response this should be fine? )
 
  Aaron
 
  On Wed, Jan 5, 2011 at 5:31 PM, Srini Seetharaman
  seeth...@stanford.edu
  wrote:
 
  Hi Aaron
  Only pure-OF switches (like Pronto switch with Indigo firmware) will
  send the VLAN tag to the controller. With others, the tag is usually
  added / stripped by the VLAN configs on the switch. So, you'll not
  get
  to see them.
 
  Srini.
 
  On Wed, Jan 5, 2011 at 2:23 PM, Aaron Rosen aro...@clemson.edu
  wrote:
   Hello,
  
   I'm trying to extract the dl_vlan value from packets on a trunk
   port.
   When I
   plug my computer into the trunk port and run tcpdump I see the
   correct
   802.1Q values. Though when I attach this port to my openflow
   switch
   (running
   the pronto firmware) I can't get the correct values at my
   controller.
  
   In my controller I'm running these few lines of code to print out
   what's
   in
   the packet.
  
   test = extract_flow(packet)
   print test.keys()
   print test.values()
  
   From this: I'm getting the following output
  
   ['dl_type', 'nw_dst', 'dl_vlan_pcp', 'dl_src', 'nw_proto',
   'nw_tos',
   'tp_dst', 'tp_src', 'dl_dst', 'dl_vlan', 'nw_src']
   [2048, 4294967295, 0, array('B', [0, 27, 177, 2, 100, 167]), 17,
   0, 698,
   698, array('B', [255, 255, 255, 255, 255, 255]), 65535,
   2189371010]
  
   I'm getting 65535 for every packet and that is not correct from
   what I'm
   seeing with tcpdump and not what I'm expecting.
  
   Can someone point out where I'm going wrong.
  
   Thanks,
  
   Aaron
  
   --
   Aaron O. Rosen
   Masters Student - Network Communication
   306B Fluor Daniel
   843.425.9777
  
  
   ___
   nox-dev mailing list
   nox-dev@noxrepo.org
   http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
  
  
 
 
 
  --
  Aaron O. Rosen
  Masters Student - Network Communication
  306B Fluor Daniel
  843.425.9777
 
 
 
  ___
  nox-dev mailing list
  nox-dev@noxrepo.org
  http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
 



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




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




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



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


Re: [nox-dev] [mininet-dev] Mininet/Nox randomMacs error

2011-01-05 Thread kk yap
The Python parsing logic in zaku has a few corner cases that it does
not handle.  I would suggest trying the destiny version of this
function.

def convert_to_eaddr(val):
if isinstance(val, ethernetaddr):
return val
if isinstance(val, array.array):
val = val.tostring()
if isinstance(val, str) and len(val) == ethernetaddr.LEN:
return create_bin_eaddr(val)
elif isinstance(val, str) or isinstance(val, int) or
isinstance(val, long):
return create_eaddr(val)
return None

Regards
KK


On 5 January 2011 15:51, Yiannis Yiakoumis yiann...@stanford.edu wrote:
 In the pcap files there are some unexpected packet-ins :

 - Multicast Listener Report Message v2
 - Neighbour Solicitation.

 These are IPv6 packets, with src :: and dest ff02::16.

 1. Why my switch receives these packets. Should I disable IPv6 or any daemon
 at mininet hosts?
 2. Could Nox be meshed-up while trying to decode these?

 Y.


 On Wed, Jan 5, 2011 at 3:37 PM, Bob Lantz rla...@cs.stanford.edu wrote:

 As I recall the problem had to do with certain Nox routines trying to be
 smart and accept either a binary MAC ('\1\2\3\4\5\6') or one in ASCII
 ('01:02:03:04:05:06'). If it has ASCII 58, ':', it assumes that it's an
 ASCII MAC and various errors occur. I thought the problem was fixed
 however...
 -Bob
 On Jan 5, 2011, at 2:51 PM, Yiannis Yiakoumis wrote:

 it might be cause I remember another address that started with 58 as well.
 What's this bug? I am using zaku..

 Y.

 On Wed, Jan 5, 2011 at 2:40 PM, Bob Lantz rla...@cs.stanford.edu wrote:

 Is this because we're using an older version of NOX that still has the
 colon (i.e. chr(58)) bug?

 On Jan 5, 2011, at 2:06 PM, Yiannis Yiakoumis wrote:

  Hi,
 
  I am writing a simple script using Mininet and Nox. When I don't set
  the setAutoMacs=True in Mininet, randomly selected MACs seem to cause
  problems to Nox. Nox just shows an invalid ethernet addr message and 
  skips
  the packet. It comes from nox/lib/util.py, lines 278-285. Here is an 
  output
  :
 
  array('B', [2, 129, 31, 58, 172, 59])
  invalid ethernet addr
  array('B', [2, 129, 31, 58, 172, 59])
  invalid ethernet addr
  array('B', [2, 129, 31, 58, 172, 59])
  invalid ethernet addr
  array('B', [2, 129, 31, 58, 172, 59])
  invalid ethernet addr
  array('B', [2, 129, 31, 58, 172, 59])
  invalid ethernet addr
  array('B', [2, 129, 31, 58, 172, 59])
  invalid ethernet addr
 
  Setting setAutoMacs=True seems to solve the problem...
 
  Thanks,
  Y.
  ___
  mininet-dev mailing list
  mininet-...@lists.stanford.edu
  https://mailman.stanford.edu/mailman/listinfo/mininet-dev






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


Re: [nox-dev] What's meaning of lines in NOX log?

2010-12-30 Thread kk yap
Hi Anh Nugyen,

I believe this is the size of the OpenFlow message which is carried in a TCP
stream, so you should be able to find it in wireshark (though the size will
be much larger).  Wonder if that is what you are looking for.

Regards
KK

PS Mailing list gives you an benefit of getting replies from more people.
 Do make use of it.


On 29 December 2010 19:27, Anh Nguyen nna4...@gmail.com wrote:

 Hi kk,

 I have a confusion with some lines in NOX log, example when I start NOX and
 control OFswitch behave as a switch:  ./nox_core -v -i  ptcp: switch
 spanning_tree
 then I ping 2 host in mininet, something like that is showed in NOX log:

 00078|openflow-event|DBG:
 received packet-in event from 0001 (len:98)

 And I confuse about len:98, it is exact length of  what ? I capture packets
 with Wireshark but nothing has that length (98).
 Can you give me some suggestion about meaning of lines in NOX log?

 Thank you so much.

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


[nox-dev] NOX's API Documentation online

2010-12-26 Thread kk yap
Hi All,

The last release of NOX (zaku) has come with doxygen-generated
documentation, which can be a rich source of information for those trying to
figure out what individual components do (e.g., routing).  Judging from
recent questions on the list (and to make my friends' TA job easier), I have
decided put up the documentation online @ http://noxrepo.org/~yapkke/doc.

Hope this will come in useful.

Merry Christmas and Happy New Year.
KK

PS
This online version has Graphviz generated diagrams and extracts all
functions.  To generate this, I run
   make EXTRACT_ALL=YES HAVE_DOT=YES html
in nox/doc/doxygen for the curious.
___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


Re: [nox-dev] Contributing to Nox

2010-12-22 Thread kk yap
Hi Derek,

Many thanks for the patch.  Do you mind sending me the patch zipped or
tarballed?  Sorry Gmail reformats things a little, so the
git-format-patch output is distorted.

Regards
KK

On 21 December 2010 23:38, Derek Cormier derek.corm...@lab.ntt.co.jp wrote:
 Hello,

 I would like to start contributing to the Nox code. This is my first time
 contributing to open source software, and I'm still new to git, so I don't
 know the exact process. I've seen some people post patch files, so I'll
 include a small change I made here.

 Recently the Error_event was made available in the python API, but core.py
 didn't have an easier member function to register errors (had to register
 using the Error_event.get_static_name() etc..). This isn't incredibly
 useful, but I just wanted to try contributing for the first time. Please let
 me know if I didn't do this right.

 Thanks!
 Derek


 From ea590df29ae342bb9029b90829fa1ddf3ff36d10 Mon Sep 17 00:00:00 2001
 From: Derek Cormier cormier.de...@gmail.com
 Date: Wed, 22 Dec 2010 16:18:33 +0900
 Subject: [PATCH] Allow python components to register for error events
 through a class method.

 ---
  src/nox/lib/core.py |   10 ++
  src/nox/lib/util.py |    9 +
  2 files changed, 19 insertions(+), 0 deletions(-)

 diff --git a/src/nox/lib/core.py b/src/nox/lib/core.py
 index 3b994c6..70cdb48 100644
 --- a/src/nox/lib/core.py
 +++ b/src/nox/lib/core.py
 @@ -678,6 +678,16 @@ class Component:
         self.register_handler(Switch_mgr_leave_event.static_get_name(),
                               gen_switch_mgr_leave_cb(handler))

 +    def register_for_error(self, handler):
 +        
 +        register a handler to be called on every error
 +        event handler will be called with the following args:
 +
 +        handler(type, code, data, xid)
 +        
 +        self.register_handler(Error_event.static_get_name(),
 +                              gen_error_cb(handler))
 +
     def unregister_handler(self, rule_id):
         
         Unregister a handler for match.
 diff --git a/src/nox/lib/util.py b/src/nox/lib/util.py
 index a192826..aa4b807 100644
 --- a/src/nox/lib/util.py
 +++ b/src/nox/lib/util.py
 @@ -239,6 +239,15 @@ def gen_switch_mgr_leave_cb(handler):
     f.cb = handler
     return f

 +def gen_error_cb(handler):
 +    def f(event):
 +        ret = f.cb(event.type, event.code, event.data, event.xid)
 +        if ret == None:
 +            return CONTINUE
 +        return ret
 +    f.cb = handler
 +    return f
 +
  def set_match(attrs):
     m = openflow.ofp_match()
     wildcards = 0
 --
 1.7.0.4



 ___
 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] Contributing to Nox

2010-12-22 Thread kk yap
Thanks Alec.  That's a useful feature I did not know about.
Appreciate the advice.

Hi Derek,

Is this patch against destiny?  We tend to patch the unstable branch
(destiny), so if I can have a patch against destiny, that would be
best.

Also, have you seen Murphy's patch in the destiny branch?

Regards
KK


commit a2efd049da9f0d0d8dc4e56dc1aaa64930c1d257
Author: Murphy McCauley murphy.mccau...@gmail.com
Date:   Tue Dec 14 11:49:18 2010 -0800

Pythonize OpenFlow error messages

OpenFlow error messages (ofp_error_msg / OFPT_ERROR_MSG) were previously
only available in C++.  They're now available in Python as well.



On 22 December 2010 10:09, Alec Story av...@cornell.edu wrote:
 If you click the little down arrow on the top right, and select Show
 original you get the non-formatted version of the message and should be
 able to get the patch out of there.

 On Wed, Dec 22, 2010 at 6:29 AM, kk yap yap...@stanford.edu wrote:

 Hi Derek,

 Many thanks for the patch.  Do you mind sending me the patch zipped or
 tarballed?  Sorry Gmail reformats things a little, so the
 git-format-patch output is distorted.

 Regards
 KK

 On 21 December 2010 23:38, Derek Cormier derek.corm...@lab.ntt.co.jp
 wrote:
  Hello,
 
  I would like to start contributing to the Nox code. This is my first
  time
  contributing to open source software, and I'm still new to git, so I
  don't
  know the exact process. I've seen some people post patch files, so I'll
  include a small change I made here.
 
  Recently the Error_event was made available in the python API, but
  core.py
  didn't have an easier member function to register errors (had to
  register
  using the Error_event.get_static_name() etc..). This isn't incredibly
  useful, but I just wanted to try contributing for the first time. Please
  let
  me know if I didn't do this right.
 
  Thanks!
  Derek
 
 
  From ea590df29ae342bb9029b90829fa1ddf3ff36d10 Mon Sep 17 00:00:00 2001
  From: Derek Cormier cormier.de...@gmail.com
  Date: Wed, 22 Dec 2010 16:18:33 +0900
  Subject: [PATCH] Allow python components to register for error events
  through a class method.
 
  ---
   src/nox/lib/core.py |   10 ++
   src/nox/lib/util.py |    9 +
   2 files changed, 19 insertions(+), 0 deletions(-)
 
  diff --git a/src/nox/lib/core.py b/src/nox/lib/core.py
  index 3b994c6..70cdb48 100644
  --- a/src/nox/lib/core.py
  +++ b/src/nox/lib/core.py
  @@ -678,6 +678,16 @@ class Component:
          self.register_handler(Switch_mgr_leave_event.static_get_name(),
                                gen_switch_mgr_leave_cb(handler))
 
  +    def register_for_error(self, handler):
  +        
  +        register a handler to be called on every error
  +        event handler will be called with the following args:
  +
  +        handler(type, code, data, xid)
  +        
  +        self.register_handler(Error_event.static_get_name(),
  +                              gen_error_cb(handler))
  +
      def unregister_handler(self, rule_id):
          
          Unregister a handler for match.
  diff --git a/src/nox/lib/util.py b/src/nox/lib/util.py
  index a192826..aa4b807 100644
  --- a/src/nox/lib/util.py
  +++ b/src/nox/lib/util.py
  @@ -239,6 +239,15 @@ def gen_switch_mgr_leave_cb(handler):
      f.cb = handler
      return f
 
  +def gen_error_cb(handler):
  +    def f(event):
  +        ret = f.cb(event.type, event.code, event.data, event.xid)
  +        if ret == None:
  +            return CONTINUE
  +        return ret
  +    f.cb = handler
  +    return f
  +
   def set_match(attrs):
      m = openflow.ofp_match()
      wildcards = 0
  --
  1.7.0.4
 
 
 
  ___
  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



 --
 Alec Story
 Cornell University
 Biological Sciences, Computer Science 2012


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


Re: [nox-dev] Is flow mod event misleading?

2010-12-19 Thread kk yap
Hi Derek,

Some comments inline.  Hope they help.

Regards
KK

On 19 December 2010 21:10, Derek Cormier derek.corm...@lab.ntt.co.jp wrote:
 I noticed that the flow mod event fires in response to a successful NOX API
 call for adding a flow. It gives the impression that it was successfully
 added to the switch, but, this is not always the case. For example, if I
 send two identical ofp_flow_mod requests with the OFPFF_CHECK_OVERLAP flag
 set, then I will still get a flow mod, even though one triggers an error and
 is not added to the switch's table.

A flow mod event is triggered whenever a flow_mod is sent by a
component.  As you have noticed, multiple comments can be sending flow
mods and this is a way for a component to see all the flow mods sent.
That's all.  It does not imply NOX has sent the message, and even less
if the switch has received it or processed it.


 I'm guessing the reason for this is speed. Since OpenFlow switches do not
 reply to flow mod requests, there are a couple ways I can think of to
 confirm if a flow was added:

 1. Send a barrier message after each add flow message. If a reply is
 received and no error message was received, then it was added.

Most of the time, you are right.  While OpenFlow messages are carried
over TCP and SSL connections, there is no guarantee that a switch will
honor all the messages.  Meaning, it is perfectly okay for a switch to
send a reply to the barrier and ignore the flow mod before that.  This
is really because a switch can be overwhelmed by control messages and
at some point it might discard messages.  Your flow mod might just be
the unlucky message dropped.

 2. Store an internal copy of the flow table in the NOX component and check
 for potential errors before adding.

Yes.  This is prudent but unfortunately tedious.  This allows assume
you emulate the entire switch functionality in the controller.  By the
way, you still will not have any guarantees about the switch inserting
the flow mod, as I have explained above.

 Both of these solutions have problems if other components are also adding
 flows. Does anyone have any other ideas?

In my mind, the obvious way to do this is hard and evil.  You have to
send the flow mods, cache it in the controller and periodically dump
the flow table to check that it is there.  This can be done in
conjunction with other operations like stat gathering, but the
operation can be very stressful to a switch.

 It would be nice if the OpenFlow protocol had responses to flow mod requests
 that could be optionally turned on/off for speed.

We have been through this discussion a few times in OpenFlow.  And
current result is that we still don't have it in the spec, even for
the upcoming OpenFlow v1.1.

 -Derek

 ___
 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] Is flow mod event misleading?

2010-12-19 Thread kk yap
Hi Derek,

This question is better asked on openflow-spec or openflow-discuss.  :)

Regards
KK

On 19 December 2010 22:11, Derek Cormier derek.corm...@lab.ntt.co.jp wrote:
 Thanks KK, that clears everything up. May I ask, what is the main reason for
 not including a flow mod reply in the OpenFlow protocol? Is it speed? Isn't
 OpenFlow fast enough?

 -Derek

 On 12/20/2010 02:38 PM, kk yap wrote:

 Hi Derek,

 Some comments inline.  Hope they help.

 Regards
 KK

 On 19 December 2010 21:10, Derek Cormierderek.corm...@lab.ntt.co.jp
  wrote:

 I noticed that the flow mod event fires in response to a successful NOX
 API
 call for adding a flow. It gives the impression that it was successfully
 added to the switch, but, this is not always the case. For example, if I
 send two identical ofp_flow_mod requests with the OFPFF_CHECK_OVERLAP
 flag
 set, then I will still get a flow mod, even though one triggers an error
 and
 is not added to the switch's table.

 A flow mod event is triggered whenever a flow_mod is sent by a
 component.  As you have noticed, multiple comments can be sending flow
 mods and this is a way for a component to see all the flow mods sent.
 That's all.  It does not imply NOX has sent the message, and even less
 if the switch has received it or processed it.

 I'm guessing the reason for this is speed. Since OpenFlow switches do not
 reply to flow mod requests, there are a couple ways I can think of to
 confirm if a flow was added:

 1. Send a barrier message after each add flow message. If a reply is
 received and no error message was received, then it was added.

 Most of the time, you are right.  While OpenFlow messages are carried
 over TCP and SSL connections, there is no guarantee that a switch will
 honor all the messages.  Meaning, it is perfectly okay for a switch to
 send a reply to the barrier and ignore the flow mod before that.  This
 is really because a switch can be overwhelmed by control messages and
 at some point it might discard messages.  Your flow mod might just be
 the unlucky message dropped.

 2. Store an internal copy of the flow table in the NOX component and
 check
 for potential errors before adding.

 Yes.  This is prudent but unfortunately tedious.  This allows assume
 you emulate the entire switch functionality in the controller.  By the
 way, you still will not have any guarantees about the switch inserting
 the flow mod, as I have explained above.

 Both of these solutions have problems if other components are also adding
 flows. Does anyone have any other ideas?

 In my mind, the obvious way to do this is hard and evil.  You have to
 send the flow mods, cache it in the controller and periodically dump
 the flow table to check that it is there.  This can be done in
 conjunction with other operations like stat gathering, but the
 operation can be very stressful to a switch.

 It would be nice if the OpenFlow protocol had responses to flow mod
 requests
 that could be optionally turned on/off for speed.

 We have been through this discussion a few times in OpenFlow.  And
 current result is that we still don't have it in the spec, even for
 the upcoming OpenFlow v1.1.

 -Derek

 ___
 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] Is flow mod event misleading?

2010-12-19 Thread kk yap
Hi Syed,

The barrier function is only there to tell you that a preceding
message is processed (i.e., the command is carried out, dropped or
error code is returned).  So, you can imagine if you want to check the
flow mod is inserted or not, you can do the following:
1) send flow mod
2) send barrier request
3) send flow stat after receiving barrier reply
This ensures that the flow mod is processed by the switch already.
Switch can choose to process messages out of order of what is
received, except for the barrier message.

Hope this is clearer.

Regards
KK

On 19 December 2010 22:53, Syed Akbar Mehdi
akbar.me...@seecs.nust.edu.pk wrote:
 Hi KK,

 You say that:

 Meaning, it is perfectly okay for a switch to
 send a reply to the barrier and ignore the flow mod before that.

 How is the barrier reply useful then, if it does not guarantee this?

 --
 Regards,
 Syed Akbar Mehdi,
 School of EECS (SEECS),
 National University of Sciences and Technology (NUST),
 Pakistan.

 On Mon, Dec 20, 2010 at 10:38 AM, kk yap yap...@stanford.edu wrote:

 Hi Derek,

 Some comments inline.  Hope they help.

 Regards
 KK

 On 19 December 2010 21:10, Derek Cormier derek.corm...@lab.ntt.co.jp
 wrote:
  I noticed that the flow mod event fires in response to a successful NOX
  API
  call for adding a flow. It gives the impression that it was successfully
  added to the switch, but, this is not always the case. For example, if I
  send two identical ofp_flow_mod requests with the OFPFF_CHECK_OVERLAP
  flag
  set, then I will still get a flow mod, even though one triggers an error
  and
  is not added to the switch's table.

 A flow mod event is triggered whenever a flow_mod is sent by a
 component.  As you have noticed, multiple comments can be sending flow
 mods and this is a way for a component to see all the flow mods sent.
 That's all.  It does not imply NOX has sent the message, and even less
 if the switch has received it or processed it.

 
  I'm guessing the reason for this is speed. Since OpenFlow switches do
  not
  reply to flow mod requests, there are a couple ways I can think of to
  confirm if a flow was added:
 
  1. Send a barrier message after each add flow message. If a reply is
  received and no error message was received, then it was added.

 Most of the time, you are right.  While OpenFlow messages are carried
 over TCP and SSL connections, there is no guarantee that a switch will
 honor all the messages.  Meaning, it is perfectly okay for a switch to
 send a reply to the barrier and ignore the flow mod before that.  This
 is really because a switch can be overwhelmed by control messages and
 at some point it might discard messages.  Your flow mod might just be
 the unlucky message dropped.

  2. Store an internal copy of the flow table in the NOX component and
  check
  for potential errors before adding.

 Yes.  This is prudent but unfortunately tedious.  This allows assume
 you emulate the entire switch functionality in the controller.  By the
 way, you still will not have any guarantees about the switch inserting
 the flow mod, as I have explained above.

  Both of these solutions have problems if other components are also
  adding
  flows. Does anyone have any other ideas?

 In my mind, the obvious way to do this is hard and evil.  You have to
 send the flow mods, cache it in the controller and periodically dump
 the flow table to check that it is there.  This can be done in
 conjunction with other operations like stat gathering, but the
 operation can be very stressful to a switch.

  It would be nice if the OpenFlow protocol had responses to flow mod
  requests
  that could be optionally turned on/off for speed.

 We have been through this discussion a few times in OpenFlow.  And
 current result is that we still don't have it in the spec, even for
 the upcoming OpenFlow v1.1.

  -Derek
 
  ___
  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] Is flow mod event misleading?

2010-12-19 Thread kk yap
Hi Syed,

One can interpret finish processing as having dropped.  I am
suggesting we do, but this is apparently not a impossibility.  It is a
rare event nonetheless.

Regards
KK

On 19 December 2010 23:37, Syed Akbar Mehdi
akbar.me...@seecs.nust.edu.pk wrote:
 Hi KK,

 Thanks for detailed explanation. However this conflicts somewhat with the
 OpenFlow Spec v1.0. In section 5.3.7 (page 36) of the OpenFlow1.0 spec it is
 written that:

 Upon receipt, the switch must finish processing all previously received
 messages before executing any messages beyond the Barrier Request.

 --
 Regards,
 Syed Akbar Mehdi,
 School of EECS (SEECS),
 National University of Sciences and Technology (NUST),
 Pakistan.

 On Mon, Dec 20, 2010 at 12:18 PM, kk yap yap...@stanford.edu wrote:

 Hi Syed,

 The barrier function is only there to tell you that a preceding
 message is processed (i.e., the command is carried out, dropped or
 error code is returned).  So, you can imagine if you want to check the
 flow mod is inserted or not, you can do the following:
 1) send flow mod
 2) send barrier request
 3) send flow stat after receiving barrier reply
 This ensures that the flow mod is processed by the switch already.
 Switch can choose to process messages out of order of what is
 received, except for the barrier message.

 Hope this is clearer.

 Regards
 KK

 On 19 December 2010 22:53, Syed Akbar Mehdi
 akbar.me...@seecs.nust.edu.pk wrote:
  Hi KK,
 
  You say that:
 
  Meaning, it is perfectly okay for a switch to
  send a reply to the barrier and ignore the flow mod before that.
 
  How is the barrier reply useful then, if it does not guarantee this?
 
  --
  Regards,
  Syed Akbar Mehdi,
  School of EECS (SEECS),
  National University of Sciences and Technology (NUST),
  Pakistan.
 
  On Mon, Dec 20, 2010 at 10:38 AM, kk yap yap...@stanford.edu wrote:
 
  Hi Derek,
 
  Some comments inline.  Hope they help.
 
  Regards
  KK
 
  On 19 December 2010 21:10, Derek Cormier derek.corm...@lab.ntt.co.jp
  wrote:
   I noticed that the flow mod event fires in response to a successful
   NOX
   API
   call for adding a flow. It gives the impression that it was
   successfully
   added to the switch, but, this is not always the case. For example,
   if I
   send two identical ofp_flow_mod requests with the OFPFF_CHECK_OVERLAP
   flag
   set, then I will still get a flow mod, even though one triggers an
   error
   and
   is not added to the switch's table.
 
  A flow mod event is triggered whenever a flow_mod is sent by a
  component.  As you have noticed, multiple comments can be sending flow
  mods and this is a way for a component to see all the flow mods sent.
  That's all.  It does not imply NOX has sent the message, and even less
  if the switch has received it or processed it.
 
  
   I'm guessing the reason for this is speed. Since OpenFlow switches do
   not
   reply to flow mod requests, there are a couple ways I can think of to
   confirm if a flow was added:
  
   1. Send a barrier message after each add flow message. If a reply is
   received and no error message was received, then it was added.
 
  Most of the time, you are right.  While OpenFlow messages are carried
  over TCP and SSL connections, there is no guarantee that a switch will
  honor all the messages.  Meaning, it is perfectly okay for a switch to
  send a reply to the barrier and ignore the flow mod before that.  This
  is really because a switch can be overwhelmed by control messages and
  at some point it might discard messages.  Your flow mod might just be
  the unlucky message dropped.
 
   2. Store an internal copy of the flow table in the NOX component and
   check
   for potential errors before adding.
 
  Yes.  This is prudent but unfortunately tedious.  This allows assume
  you emulate the entire switch functionality in the controller.  By the
  way, you still will not have any guarantees about the switch inserting
  the flow mod, as I have explained above.
 
   Both of these solutions have problems if other components are also
   adding
   flows. Does anyone have any other ideas?
 
  In my mind, the obvious way to do this is hard and evil.  You have to
  send the flow mods, cache it in the controller and periodically dump
  the flow table to check that it is there.  This can be done in
  conjunction with other operations like stat gathering, but the
  operation can be very stressful to a switch.
 
   It would be nice if the OpenFlow protocol had responses to flow mod
   requests
   that could be optionally turned on/off for speed.
 
  We have been through this discussion a few times in OpenFlow.  And
  current result is that we still don't have it in the spec, even for
  the upcoming OpenFlow v1.1.
 
   -Derek
  
   ___
   nox-dev mailing list
   nox-dev@noxrepo.org
   http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
  
  
 
  ___
  nox-dev mailing list
  nox

Re: [nox-dev] Is flow mod event misleading?

2010-12-19 Thread kk yap
Oops.. typos.

 One can interpret finish processing as having dropped.  I am *not*
 suggesting we do, but this is apparently not an impossibility.  It is a
 rare event nonetheless.

On 19 December 2010 23:41, kk yap yap...@stanford.edu wrote:
 Hi Syed,

 One can interpret finish processing as having dropped.  I am
 suggesting we do, but this is apparently not a impossibility.  It is a
 rare event nonetheless.

 Regards
 KK

 On 19 December 2010 23:37, Syed Akbar Mehdi
 akbar.me...@seecs.nust.edu.pk wrote:
 Hi KK,

 Thanks for detailed explanation. However this conflicts somewhat with the
 OpenFlow Spec v1.0. In section 5.3.7 (page 36) of the OpenFlow1.0 spec it is
 written that:

 Upon receipt, the switch must finish processing all previously received
 messages before executing any messages beyond the Barrier Request.

 --
 Regards,
 Syed Akbar Mehdi,
 School of EECS (SEECS),
 National University of Sciences and Technology (NUST),
 Pakistan.

 On Mon, Dec 20, 2010 at 12:18 PM, kk yap yap...@stanford.edu wrote:

 Hi Syed,

 The barrier function is only there to tell you that a preceding
 message is processed (i.e., the command is carried out, dropped or
 error code is returned).  So, you can imagine if you want to check the
 flow mod is inserted or not, you can do the following:
 1) send flow mod
 2) send barrier request
 3) send flow stat after receiving barrier reply
 This ensures that the flow mod is processed by the switch already.
 Switch can choose to process messages out of order of what is
 received, except for the barrier message.

 Hope this is clearer.

 Regards
 KK

 On 19 December 2010 22:53, Syed Akbar Mehdi
 akbar.me...@seecs.nust.edu.pk wrote:
  Hi KK,
 
  You say that:
 
  Meaning, it is perfectly okay for a switch to
  send a reply to the barrier and ignore the flow mod before that.
 
  How is the barrier reply useful then, if it does not guarantee this?
 
  --
  Regards,
  Syed Akbar Mehdi,
  School of EECS (SEECS),
  National University of Sciences and Technology (NUST),
  Pakistan.
 
  On Mon, Dec 20, 2010 at 10:38 AM, kk yap yap...@stanford.edu wrote:
 
  Hi Derek,
 
  Some comments inline.  Hope they help.
 
  Regards
  KK
 
  On 19 December 2010 21:10, Derek Cormier derek.corm...@lab.ntt.co.jp
  wrote:
   I noticed that the flow mod event fires in response to a successful
   NOX
   API
   call for adding a flow. It gives the impression that it was
   successfully
   added to the switch, but, this is not always the case. For example,
   if I
   send two identical ofp_flow_mod requests with the OFPFF_CHECK_OVERLAP
   flag
   set, then I will still get a flow mod, even though one triggers an
   error
   and
   is not added to the switch's table.
 
  A flow mod event is triggered whenever a flow_mod is sent by a
  component.  As you have noticed, multiple comments can be sending flow
  mods and this is a way for a component to see all the flow mods sent.
  That's all.  It does not imply NOX has sent the message, and even less
  if the switch has received it or processed it.
 
  
   I'm guessing the reason for this is speed. Since OpenFlow switches do
   not
   reply to flow mod requests, there are a couple ways I can think of to
   confirm if a flow was added:
  
   1. Send a barrier message after each add flow message. If a reply is
   received and no error message was received, then it was added.
 
  Most of the time, you are right.  While OpenFlow messages are carried
  over TCP and SSL connections, there is no guarantee that a switch will
  honor all the messages.  Meaning, it is perfectly okay for a switch to
  send a reply to the barrier and ignore the flow mod before that.  This
  is really because a switch can be overwhelmed by control messages and
  at some point it might discard messages.  Your flow mod might just be
  the unlucky message dropped.
 
   2. Store an internal copy of the flow table in the NOX component and
   check
   for potential errors before adding.
 
  Yes.  This is prudent but unfortunately tedious.  This allows assume
  you emulate the entire switch functionality in the controller.  By the
  way, you still will not have any guarantees about the switch inserting
  the flow mod, as I have explained above.
 
   Both of these solutions have problems if other components are also
   adding
   flows. Does anyone have any other ideas?
 
  In my mind, the obvious way to do this is hard and evil.  You have to
  send the flow mods, cache it in the controller and periodically dump
  the flow table to check that it is there.  This can be done in
  conjunction with other operations like stat gathering, but the
  operation can be very stressful to a switch.
 
   It would be nice if the OpenFlow protocol had responses to flow mod
   requests
   that could be optionally turned on/off for speed.
 
  We have been through this discussion a few times in OpenFlow.  And
  current result is that we still don't have it in the spec, even for
  the upcoming OpenFlow v1.1

Re: [nox-dev] Associate xid with a flow mod event

2010-12-16 Thread kk yap
On 15 December 2010 23:48, Derek Cormier derek.corm...@lab.ntt.co.jp wrote:
 @KK
 It turns out I made a wrong assumption. I thought that when an ofp_flow_mod
 (OFPFC_ADD) message was sent, it returns a reply with the same xid. After
 looking at the OF protocol, it looks like a message is only sent back if an
 error occurred.

Yup, there is no ack.  You can send a follow-up message to
double-check but that is a real pain.

Regards
KK


 @Rob
 The cookie isn't quite what I'm looking for, I'm not sure what it might be
 used for in the future...

 Basically, I'm looking for a way to validate that adding a flow worked.
 Consider the following cenario:

 There are two components: A  B

 1. A sends a request to add a flow.
 2. B sends a request to add the exact same flow.
 3. B's gets added first and is successful.
 4. A received a flow mod event and thinks its flow was added.
 5. A's flow gets added. It conflicts with B's flow and generates an error.
 6. A sees an error for his exact flow and doesn't know if it's flow was
 added or another component's.

 -Derek

 ___
 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] Forwarding to controller ... datapath crashes

2010-12-16 Thread kk yap
Hi,

This is a bug in the reference implementation of OpenFlow.  Please
raise this in openflow-discuss, preferably filing it as a bug in Trac
(though it might already be there).

Regards
KK

On 16 December 2010 04:26, Syed Akbar Mehdi
akbar.me...@seecs.nust.edu.pk wrote:
 Hi,

 I having problems with setting a flow with action to forward packets to the
 controller, while running a virtual network using NOX(0.9.0 Zaku) and
 OpenFlowVMS (v1.0).

 I ran a simple test using the hub component in NOX. I changed the value of
 action.port on line 90 of hub.cc to OFPP_CONTROLLER instead of OFPP_FLOOD. I
 then used this updated hub in a simple virtual network created using
 OpenFlowVMS, consisting of two hosts connected to a single datapath. When I
 try to ping one host from the other, the controller gets the packet and
 tries to install a flow on the datapath with the OFPP_CONTROLLER port in
 the action.port field. At this time the datapath crashes. Here is the output
 I get in the virtual machine:

 qemu:~# ofdatapath: lib/ofpbuf.c:168: ofpbuf_prealloc_headroom: Assertion
 `size = ofpbuf_headroom(b)' failed.
 Dec 16 12:06:31|2|fault|EMER|Caught signal 6.
   0x0805793f
   0xe400 (__kernel_sigreturn+0x0)
   0xb7e8fd88 (abort+0x188)
   0xb7e87590 (__assert_fail+0xf0)
   0x0805a789
   0x0805a7ae (ofpbuf_push_uninit+0x1e)
   0x08051223 (dp_output_control+0x53)
   0x08052191
   0x0805331c (dp_run+0x3bc)
   0x080545b5 (main+0x545)
   0xb7e7a455 (__libc_start_main+0xe5)
 modprobe: FATAL: Could not load /lib/modules/2.6.27-rc1/modules.dep: No such
 file or directory

 Dec 16 12:06:31|00014|netdev|ERR|ioctl(SIOCGIFFLAGS) on tap0 device failed:
 No such device
 Dec 16 12:06:31|00015|port_watcher|WARN|could not get flags for tap0
 Dec 16 12:06:31|00016|rconn|INFO|unix:/tmp/ofsw: connection closed by peer
 Dec 16 12:06:32|00017|rconn|INFO|unix:/tmp/ofsw: connecting...
 Dec 16 12:06:32|00018|vconn_unix|ERR|/tmp/vconn-unix.1030.2: connection to
 /tmp/ofsw failed: Connection refused
 Dec 16 12:06:32|00019|rconn|WARN|unix:/tmp/ofsw: connection failed
 (Connection refused)
 Dec 16 12:06:32|00020|rconn|INFO|unix:/tmp/ofsw: waiting 2 seconds before
 reconnect
 Dec 16 12:06:34|00021|rconn|INFO|unix:/tmp/ofsw: connecting...


 Regards,
 Akbar

 ___
 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] Setting up flows at startup

2010-12-16 Thread kk yap
Hi Fengxie,

In Zaku, LAVI already dump list of datapath to the console.  Look at
lavi_switches.  You can use nox-console with it and it should just
work.

Regards
KK

On 16 December 2010 06:20, Srini Seetharaman seeth...@stanford.edu wrote:
 Hi Fengxie
 Please look in src/nox/netapps/discovery/discovery.py for the phrase
 link detected. That discovery module keeps track of the topology by
 sending our LLDPs.

 Srini.

 On Thu, Dec 16, 2010 at 3:58 AM, 谢峰 xiefen...@gmail.com wrote:
 Hello, Akbar, Murphy

 I want to dump the topology so that I can see the topology in the console.
 how should I do? Can I add some code into the routing.cc file, but I don't
 know exactly what the detailed nodes information stored in. Can you help me.

 thanks.

 regards

 fengxie

 2010/12/16 Syed Akbar Mehdi akbar.me...@seecs.nust.edu.pk

 Thanks Murphy. This makes more sense, since datapaths may connect and
 leave at various times.

 On Thu, Dec 16, 2010 at 4:38 PM, Murphy McCauley jam...@nau.edu wrote:

 Welcome to nox-dev, Akbar.

 You should actually do this when the switches connect (in response to the
 datapath join event) rather than at NOX/component startup, as the switches
 won't have connected at that point.

 -- Murphy

 On Dec 16, 2010, at 3:19 AM, Syed Akbar Mehdi wrote:

  Hi,
 
  I am writing Nox components using C++. I want to install some 'default'
  flows at startup (e.g. if I want to say that all ARP packets should be 
  sent
  to the controller). I understand that I should probably put the relevant
  code in either configure() or install() (which one should it be?). How 
  do I
  get the IDs of all datapaths that are connected to the controller when
  initialize() or configure() is called for a component?
 
  Regards,
  Akbar
  ___
  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




 --
 Feng Xie
 Ph.D. Candidate
 Network Security Lab, Research Institute of Information Technology
 Tsinghua National Laboratory for Information Science and Technology
 Dept. of Automation, Tsinghua Univ., Beijing, China, 100084.
 Tel.: +86-010-6277-2656
 Email: xiefen...@gmail.com


 ___
 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] dump the topology in the console

2010-12-16 Thread kk yap
Double post?  Anyway, you have both the GUI and console version at
your disposal.  Let us know if it works out.

Regards
KK

On 16 December 2010 06:22, Kyriakos Zarifis kyr.zari...@gmail.com wrote:
 Hi,
 the topology component holds some structures that describe the topology. I
 guess a way to dump a description of the topology would be to get a hangle
 to that component (from any component, presumably your own) and read and
 print out the information you're interested.
 If there is no specific reason why you want the topology dumped on the
 console as text, you could use NOX's GUI [1], found on the destiny branch
 [2], to get a visualization of the topology.
 [1] http://noxrepo.org/noxwiki/index.php/NOX_GUI
 [2] http://noxrepo.org/noxwiki/index.php/NOX_Installation#Installation
 On Thu, Dec 16, 2010 at 3:02 PM, 谢峰 xiefen...@gmail.com wrote:

 Hello, all,

 I want to dump the topology so that I can see the topology in the console.
 how should I do? Should I add some codes into the routing.cc or nox_main.cc
 file, but I don't know exactly what the detailed nodes information stored
 in. Can anybody help me.

 thanks.

 regards

 fengxie

 --
 Feng Xie
 Ph.D. Candidate
 Network Security Lab, Research Institute of Information Technology
 Tsinghua National Laboratory for Information Science and Technology
 Dept. of Automation, Tsinghua Univ., Beijing, China, 100084.
 Tel.: +86-010-6277-2656
 Email: xiefen...@gmail.com


 ___
 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] Multi-threaded handlers

2010-12-16 Thread kk yap
Hi Akbar,

NOX (Zaku) is not multi-threaded, though that might change soon.
However, I am not sure if what you are looking for will be there.

Regards
KK

On 16 December 2010 07:41, Syed Akbar Mehdi
akbar.me...@seecs.nust.edu.pk wrote:
 Hi,

 Does the current NOX (Zaku) release have any support for calling event
 handlers within the same component object in a multi-threaded way? e.g. if I
 have a handler for a packet_in_event and another for a flow_expired event
 within the same component and they both access a shared data structure, do I
 protect it from concurrent access using synchronization? Or are the handlers
 called in a sequential way? Are there any plans to add something like this
 in future releases?

 Regards,
 Akbar

 ___
 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] [openflow-discuss] NOX performance improvement by a factor 10

2010-12-15 Thread kk yap
Random curiosity: Why would jumbo frames increases replies per sec?

Regards
KK

On 15 December 2010 11:45, Amin Tootoonchian a...@cs.toronto.edu wrote:
 I missed that. The single core throughput is ~250k replies/sec, two
 cores ~450k replies/sec, three cores ~650k replies/sec, four cores
 ~800 replies/sec. These numbers are higher than what I reported in my
 previous post. That is most probably because, right now, I am testing
 with MTU 9000 (jumbo frames) and with more user-space threads.

 Cheers,
 Amin

 On Wed, Dec 15, 2010 at 12:36 AM, Martin Casado cas...@nicira.com wrote:
 Also, do you mind posting the single core throughput?

 [cross-posting to nox-dev, openflow-discuss, ovs-discuss]

 I have prepared a patch based on NOX Zaku that improves its
 performance by a factor of10. This implies that a single controller
 instance can run a large network with near a million flow initiations
 per second. I am writing to open up a discussion and get feedback from
 the community.

 Here are some preliminary results:

 - Benchmark configuration:
   * Benchmark: Throughput test of cbench (controller benchmarker) with
 64 switches. Cbench is a part of the OFlops package
 (http://www.openflowswitch.org/wk/index.php/Oflops). Under throughput
 mode, cbench sends a batch of ofp_packet_in messages to the controller
 and counts the number of replies it gets back.
   * Benchmarker machine: HP ProLiant DL320 equipped with a 2.13GHz
 quad-core Intel Xeon processor (X3210), and 4GB RAM
   * Controller machine: Dell PowerEdge 1950 equipped with two 2.00GHz
 quad-core Intel Xeon processor (E5405), and 4GB RAM
   * Connectivity: 1Gbps

 - Benchmark results:
   * NOX Zaku: ~60k replies/sec (NOX Zaku only utilizes a single core).
   * Patched NOX: ~650k replies/sec (utilizing only 4 cores out of 8
 available cores). The sustained controller-benchmarker throughput is
 ~400Mbps.

 The patch updates the asynchronous harness of NOX to a standard
 library (boost asynchronous I/O library) which simplifies the code
 base. It fixes the code in several areas, including but not limited
 to:

 - Multi-threading: The patch enables having any number of worker
 threads running on multiple cores.

 - Batching: Serving requests individually and sending replies one by
 one is quite inefficient. The patch tries to batch requests together
 were possible, as well replies (which reduces the number of system
 calls significantly).

 - Memory allocation: The standard C++ memory allocator is not robust
 in multi-threaded environments. Google's Thread-Caching Malloc
 (TCMalloc) or Hoard memory allocator perform much better for NOX.

 - Fully asynchronous operation: The patched version avoids wasting CPU
 cycles polling sockets, or event/timer dispatchers when not necessary.

 I would like to add that the patched version should perform much
 better than what I reported above (the number reported is with a run
 on 4 CPU cores). I guess a single NOX instance running on a machine
 with 8 CPU cores should handle well above 1 million flow initiation
 requests per second. Also having a more capable machine should help to
 serve more requests! The code will be made available soon and I will
 post updates as well.


 Cheers,
 Amin
 ___
 openflow-discuss mailing list
 openflow-disc...@lists.stanford.edu
 https://mailman.stanford.edu/mailman/listinfo/openflow-discuss



 ___
 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] [openflow-discuss] NOX performance improvement by a factor 10

2010-12-15 Thread kk yap
Hi Amin,

Just to clarify, does your jumbo frames refer to the OpenFlow messages
or the frames in the datapath?   By OpenFlow messages, I am assuming
you use a TCP connection between NOX and the switches, and you are
batching the messages into jumbo frames of 9000 bytes before sending
them out.  By frames in the datapath, I mean jumbo Ethernet frames are
being sent in the datapath.  The latter does not make any sense to me,
because OpenFlow should send 128 bytes to the controller by default.

Thanks.

Regards
KK

On 15 December 2010 12:36, Amin Tootoonchian a...@cs.toronto.edu wrote:
 I double checked. It does slightly improve the performance (in the
 order of a few thousand replies/sec). Larger MTUs decrease the CPU
 workload (by decreasing the number of transfers across the bus) and
 this means that more CPU cycles are available to the controller to
 process requests. However, I am not suggesting that people should use
 jumbo frames. Apparently running with more user-space threads does the
 trick here. Anyway, I should trust a profiler rather than guessing, so
 I will get back with a definite answer once I have done a more
 thorough evaluation.

 Cheers,
 Amin

 On Wed, Dec 15, 2010 at 2:51 PM, kk yap yap...@stanford.edu wrote:
 Random curiosity: Why would jumbo frames increases replies per sec?

 Regards
 KK

 On 15 December 2010 11:45, Amin Tootoonchian a...@cs.toronto.edu wrote:
 I missed that. The single core throughput is ~250k replies/sec, two
 cores ~450k replies/sec, three cores ~650k replies/sec, four cores
 ~800 replies/sec. These numbers are higher than what I reported in my
 previous post. That is most probably because, right now, I am testing
 with MTU 9000 (jumbo frames) and with more user-space threads.

 Cheers,
 Amin

 On Wed, Dec 15, 2010 at 12:36 AM, Martin Casado cas...@nicira.com wrote:
 Also, do you mind posting the single core throughput?

 [cross-posting to nox-dev, openflow-discuss, ovs-discuss]

 I have prepared a patch based on NOX Zaku that improves its
 performance by a factor of10. This implies that a single controller
 instance can run a large network with near a million flow initiations
 per second. I am writing to open up a discussion and get feedback from
 the community.

 Here are some preliminary results:

 - Benchmark configuration:
   * Benchmark: Throughput test of cbench (controller benchmarker) with
 64 switches. Cbench is a part of the OFlops package
 (http://www.openflowswitch.org/wk/index.php/Oflops). Under throughput
 mode, cbench sends a batch of ofp_packet_in messages to the controller
 and counts the number of replies it gets back.
   * Benchmarker machine: HP ProLiant DL320 equipped with a 2.13GHz
 quad-core Intel Xeon processor (X3210), and 4GB RAM
   * Controller machine: Dell PowerEdge 1950 equipped with two 2.00GHz
 quad-core Intel Xeon processor (E5405), and 4GB RAM
   * Connectivity: 1Gbps

 - Benchmark results:
   * NOX Zaku: ~60k replies/sec (NOX Zaku only utilizes a single core).
   * Patched NOX: ~650k replies/sec (utilizing only 4 cores out of 8
 available cores). The sustained controller-benchmarker throughput is
 ~400Mbps.

 The patch updates the asynchronous harness of NOX to a standard
 library (boost asynchronous I/O library) which simplifies the code
 base. It fixes the code in several areas, including but not limited
 to:

 - Multi-threading: The patch enables having any number of worker
 threads running on multiple cores.

 - Batching: Serving requests individually and sending replies one by
 one is quite inefficient. The patch tries to batch requests together
 were possible, as well replies (which reduces the number of system
 calls significantly).

 - Memory allocation: The standard C++ memory allocator is not robust
 in multi-threaded environments. Google's Thread-Caching Malloc
 (TCMalloc) or Hoard memory allocator perform much better for NOX.

 - Fully asynchronous operation: The patched version avoids wasting CPU
 cycles polling sockets, or event/timer dispatchers when not necessary.

 I would like to add that the patched version should perform much
 better than what I reported above (the number reported is with a run
 on 4 CPU cores). I guess a single NOX instance running on a machine
 with 8 CPU cores should handle well above 1 million flow initiation
 requests per second. Also having a more capable machine should help to
 serve more requests! The code will be made available soon and I will
 post updates as well.


 Cheers,
 Amin
 ___
 openflow-discuss mailing list
 openflow-disc...@lists.stanford.edu
 https://mailman.stanford.edu/mailman/listinfo/openflow-discuss



 ___
 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] [openflow-discuss] NOX performance improvement by a factor 10

2010-12-15 Thread kk yap
Oh.. another point, if you are batching the frames, then what about
delay?  There seems to be a trade-off between delay and throughput,
and we have went for the former by disabling Nagle's algorithm.

Regards
KK

On 15 December 2010 12:46, kk yap yap...@stanford.edu wrote:
 Hi Amin,

 Just to clarify, does your jumbo frames refer to the OpenFlow messages
 or the frames in the datapath?   By OpenFlow messages, I am assuming
 you use a TCP connection between NOX and the switches, and you are
 batching the messages into jumbo frames of 9000 bytes before sending
 them out.  By frames in the datapath, I mean jumbo Ethernet frames are
 being sent in the datapath.  The latter does not make any sense to me,
 because OpenFlow should send 128 bytes to the controller by default.

 Thanks.

 Regards
 KK

 On 15 December 2010 12:36, Amin Tootoonchian a...@cs.toronto.edu wrote:
 I double checked. It does slightly improve the performance (in the
 order of a few thousand replies/sec). Larger MTUs decrease the CPU
 workload (by decreasing the number of transfers across the bus) and
 this means that more CPU cycles are available to the controller to
 process requests. However, I am not suggesting that people should use
 jumbo frames. Apparently running with more user-space threads does the
 trick here. Anyway, I should trust a profiler rather than guessing, so
 I will get back with a definite answer once I have done a more
 thorough evaluation.

 Cheers,
 Amin

 On Wed, Dec 15, 2010 at 2:51 PM, kk yap yap...@stanford.edu wrote:
 Random curiosity: Why would jumbo frames increases replies per sec?

 Regards
 KK

 On 15 December 2010 11:45, Amin Tootoonchian a...@cs.toronto.edu wrote:
 I missed that. The single core throughput is ~250k replies/sec, two
 cores ~450k replies/sec, three cores ~650k replies/sec, four cores
 ~800 replies/sec. These numbers are higher than what I reported in my
 previous post. That is most probably because, right now, I am testing
 with MTU 9000 (jumbo frames) and with more user-space threads.

 Cheers,
 Amin

 On Wed, Dec 15, 2010 at 12:36 AM, Martin Casado cas...@nicira.com wrote:
 Also, do you mind posting the single core throughput?

 [cross-posting to nox-dev, openflow-discuss, ovs-discuss]

 I have prepared a patch based on NOX Zaku that improves its
 performance by a factor of10. This implies that a single controller
 instance can run a large network with near a million flow initiations
 per second. I am writing to open up a discussion and get feedback from
 the community.

 Here are some preliminary results:

 - Benchmark configuration:
   * Benchmark: Throughput test of cbench (controller benchmarker) with
 64 switches. Cbench is a part of the OFlops package
 (http://www.openflowswitch.org/wk/index.php/Oflops). Under throughput
 mode, cbench sends a batch of ofp_packet_in messages to the controller
 and counts the number of replies it gets back.
   * Benchmarker machine: HP ProLiant DL320 equipped with a 2.13GHz
 quad-core Intel Xeon processor (X3210), and 4GB RAM
   * Controller machine: Dell PowerEdge 1950 equipped with two 2.00GHz
 quad-core Intel Xeon processor (E5405), and 4GB RAM
   * Connectivity: 1Gbps

 - Benchmark results:
   * NOX Zaku: ~60k replies/sec (NOX Zaku only utilizes a single core).
   * Patched NOX: ~650k replies/sec (utilizing only 4 cores out of 8
 available cores). The sustained controller-benchmarker throughput is
 ~400Mbps.

 The patch updates the asynchronous harness of NOX to a standard
 library (boost asynchronous I/O library) which simplifies the code
 base. It fixes the code in several areas, including but not limited
 to:

 - Multi-threading: The patch enables having any number of worker
 threads running on multiple cores.

 - Batching: Serving requests individually and sending replies one by
 one is quite inefficient. The patch tries to batch requests together
 were possible, as well replies (which reduces the number of system
 calls significantly).

 - Memory allocation: The standard C++ memory allocator is not robust
 in multi-threaded environments. Google's Thread-Caching Malloc
 (TCMalloc) or Hoard memory allocator perform much better for NOX.

 - Fully asynchronous operation: The patched version avoids wasting CPU
 cycles polling sockets, or event/timer dispatchers when not necessary.

 I would like to add that the patched version should perform much
 better than what I reported above (the number reported is with a run
 on 4 CPU cores). I guess a single NOX instance running on a machine
 with 8 CPU cores should handle well above 1 million flow initiation
 requests per second. Also having a more capable machine should help to
 serve more requests! The code will be made available soon and I will
 post updates as well.


 Cheers,
 Amin
 ___
 openflow-discuss mailing list
 openflow-disc...@lists.stanford.edu
 https://mailman.stanford.edu/mailman/listinfo/openflow-discuss

Re: [nox-dev] Associate xid with a flow mod event

2010-12-15 Thread kk yap
Hi Derek,

Are you assuming the components will tag the flow_mod with the same
xid as the packet_in?  I think this is not true for verbatim NOX,
though I am not sure.  Either way, what is important is that you can
make changes to make that true.  So, you can definitely do this.

Regards
KK

On 15 December 2010 22:04, Derek Cormier derek.corm...@lab.ntt.co.jp wrote:
 Hello,

 When you receive a flow mod event, is there any way to associate it with the
 xid of the original request that caused it? I'm looking for a way to confirm
 that a specific request generated a specific response. For example, if
 multiple components are running and they both send a packet to add the same
 flow (with the no overlapping flows flag on), then one will get an error and
 the other will not. I suppose you could check the xid of the errors to
 determine who's was successful, but that seems a bit hackish.

 Thanks!
 Derek

 ___
 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] Using pytopology

2010-12-14 Thread kk yap
Hi,

You can try the doxygen, but it will not be that complete.  If
topology the component people are looking at?  I can go ahead and add
documentation if there is only a few components.

Regards
KK

On 14 December 2010 10:40, Soundararajan Ramaswamy
soundararaja...@huawei.com wrote:
 KK,
 On the same note, is there a common documentation for using the
 topology(usage and/or implementation)? Appreciate your help.


 Thanks
 Soundar

 -Original Message-
 From: nox-dev-boun...@noxrepo.org [mailto:nox-dev-boun...@noxrepo.org] On
 Behalf Of kk yap
 Sent: Tuesday, December 14, 2010 7:48 AM
 To: Nikhil Handigol
 Cc: nox-dev
 Subject: Re: [nox-dev] Using pytopology

 Hi Nikhil,

 I see your point.  Topology does seem to provide a little more than
 pytopology though.  Also, datapathmem should give you the list of
 datapaths to complete the picture.  The functionality does appear
 scattered, but they are all there.

 Regards
 KK

 On 14 December 2010 02:50, Nikhil Handigol nikh...@cs.stanford.edu wrote:
 I want to write a nox python module that uses pytopology for topology
 discovery. I believe pytopology.i is the file I need to be looking at to
 understand the interface provided by pytopology? And pytopology_test.py is
 a
 sample app that uses pytopology?
 It seems pytopology provides me with just 2 functions:
 1) get_outlinks(dpsrc, dpdst)
 2) is_internal(dp, port)

 It is not clear to me how exactly I can use these two to get complete
 topology information. I'd expect the following information from a topology
 module:
 1) list of all dps in the topology
 2) list of all links from a dp (probably in the form of a list of
 (srcport,
 dstdp, dstport))
 3) link between 2 dps (provided by get_outlinks)
 4) is_internal()
 Is there a python module that provides all this information?
 Thanks,
 Nikhil

 ___
 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] [PATCH] support passing the 64-bit cookie in send_flow_command from Python code

2010-12-12 Thread kk yap
Hi Romain,

Thanks for all the patches.  I really appreciate these.  Personally, I
tend to work purely in C/C++ in NOX (though I do use Python
elsewhere).  So, I have not really followed up with exposing
functionalities to the Python side of NOX.  Definitely appreciate all
these efforts.

A probably unimportant suggestion is to send these patches with
git-format-patches, so that you are properly credited in the git log.
Might help those using gmail that you zip them up too.  This is
probably applicable to those who send patches too.

THANKS!

Regards
KK

On 12 December 2010 21:45, Romain Lenglet romain.leng...@berabera.info wrote:
 Hi,
 This is an updated and tested version of this patch for the zaku branch.
 Do you see any problem with this patch?
 BR,
 --
 Romain Lenglet

 On 12/13/10 14:42, romain.leng...@berabera.info wrote:

 From: Romain Lengletromain.leng...@berabera.info

 The C++ implementation allowed passing the 64-bit opaque cookie with
 every flow command, but not the Python wrapper.
 ---
  src/nox/coreapps/pyrt/context.i |    3 ++-
  src/nox/lib/core.py             |   26 ++
  2 files changed, 20 insertions(+), 9 deletions(-)

 diff --git a/src/nox/coreapps/pyrt/context.i
 b/src/nox/coreapps/pyrt/context.i
 index 803513d..6172a75 100644
 --- a/src/nox/coreapps/pyrt/context.i
 +++ b/src/nox/coreapps/pyrt/context.i
 @@ -96,7 +96,8 @@ public:
      void send_flow_command(uint64_t datapath_id, ofp_flow_mod_command,
                             const ofp_match, uint16_t idle_timeout,
                             uint16_t hard_timeout, const Nonowning_buffer
  actions,
 -                           uint32_t buffer_id, uint16_t priority);
 +                           uint32_t buffer_id, uint16_t priority,
 +                           uint64_t cookie);

      int close_openflow_connection(uint64_t datapathid);

 diff --git a/src/nox/lib/core.py b/src/nox/lib/core.py
 index 37bae36..910e5c7 100644
 --- a/src/nox/lib/core.py
 +++ b/src/nox/lib/core.py
 @@ -249,7 +249,8 @@ class Component:
      def send_flow_command(self, dp_id, command, attrs,
                            priority=openflow.OFP_DEFAULT_PRIORITY,
                            add_args=None,
 -                          hard_timeout=openflow.OFP_FLOW_PERMANENT):
 +                          hard_timeout=openflow.OFP_FLOW_PERMANENT,
 +                          cookie=0):
          m = set_match(attrs)
          if m == None:
              return False
 @@ -265,7 +266,8 @@ class Component:
              buffer_id = UINT32_MAX

          self.ctxt.send_flow_command(dp_id, command, m, idle_timeout,
 -                                    hard_timeout, oactions, buffer_id,
 priority)
 +                                    hard_timeout, oactions, buffer_id,
 priority,
 +                                    cookie)

          return True

 @@ -294,7 +296,7 @@ class Component:
          else:
              self.send_openflow_packet(dp_id, packet, actions, inport)

 -    def delete_datapath_flow(self, dp_id, attrs):
 +    def delete_datapath_flow(self, dp_id, attrs, cookie=0):
          
          Delete all flow entries matching the passed in (potentially
          wildcarded) flow
 @@ -302,10 +304,12 @@ class Component:
          dp_id - datapath to delete the entries from
          attrs - the flow as a dictionary (described above)
          
 -        return self.send_flow_command(dp_id, openflow.OFPFC_DELETE,
 attrs)
 +        return self.send_flow_command(dp_id, openflow.OFPFC_DELETE,
 attrs,
 +                                      cookie=cookie)

      def delete_strict_datapath_flow(self, dp_id, attrs,
 -                        priority=openflow.OFP_DEFAULT_PRIORITY):
 +
  priority=openflow.OFP_DEFAULT_PRIORITY,
 +                                    cookie=0):
          
          Strictly delete the flow entry matching the passed in
 (potentially
          wildcarded) flow.  i.e. matched flow have exactly the same
 @@ -315,9 +319,11 @@ class Component:
          attrs - the flow as a dictionary (described above)
          priority - the priority of the entry to be deleted (only
 meaningful
                     for entries with wildcards)
 +        cookie - the opaque controller-issued identifier associated with
 the
 +                 flow
          
          return self.send_flow_command(dp_id,
 openflow.OFPFC_DELETE_STRICT,
 -                                      attrs, priority)
 +                                      attrs, priority, cookie=cookie)


  ###
      # The following methods manipulate a flow entry in a datapath.
 @@ -342,7 +348,7 @@ class Component:
      def install_datapath_flow(self, dp_id, attrs, idle_timeout,
 hard_timeout,
                                actions, buffer_id=None,
                                priority=openflow.OFP_DEFAULT_PRIORITY,
 -                              inport=None, packet=None):
 +                     

Re: [nox-dev] [PATCH] support passing the 64-bit cookie in send_flow_command from Python code

2010-12-12 Thread kk yap
Hi Romain,

It is not your fault, but Gmail's.  Gmail reformats things a little
and it does not always work as a result.  Sigh...

Regards
KK

On 12 December 2010 22:07, Romain Lenglet romain.leng...@berabera.info wrote:
 Hi KK,
 I format my patches with git-format-patches, and send them using git
 send-email. Is there any issues with the formatting?
 Regards,
 --
 Romain Lenglet

 On 12/13/10 14:57, kk yap wrote:

 Hi Romain,

 Thanks for all the patches.  I really appreciate these.  Personally, I
 tend to work purely in C/C++ in NOX (though I do use Python
 elsewhere).  So, I have not really followed up with exposing
 functionalities to the Python side of NOX.  Definitely appreciate all
 these efforts.

 A probably unimportant suggestion is to send these patches with
 git-format-patches, so that you are properly credited in the git log.
 Might help those using gmail that you zip them up too.  This is
 probably applicable to those who send patches too.

 THANKS!

 Regards
 KK

 On 12 December 2010 21:45, Romain Lengletromain.leng...@berabera.info
  wrote:

 Hi,
 This is an updated and tested version of this patch for the zaku branch.
 Do you see any problem with this patch?
 BR,
 --
 Romain Lenglet

 On 12/13/10 14:42, romain.leng...@berabera.info wrote:

 From: Romain Lengletromain.leng...@berabera.info

 The C++ implementation allowed passing the 64-bit opaque cookie with
 every flow command, but not the Python wrapper.
 ---
  src/nox/coreapps/pyrt/context.i |    3 ++-
  src/nox/lib/core.py             |   26 ++
  2 files changed, 20 insertions(+), 9 deletions(-)

 diff --git a/src/nox/coreapps/pyrt/context.i
 b/src/nox/coreapps/pyrt/context.i
 index 803513d..6172a75 100644
 --- a/src/nox/coreapps/pyrt/context.i
 +++ b/src/nox/coreapps/pyrt/context.i
 @@ -96,7 +96,8 @@ public:
      void send_flow_command(uint64_t datapath_id, ofp_flow_mod_command,
                             const ofp_match, uint16_t idle_timeout,
                             uint16_t hard_timeout, const
 Nonowning_buffer
  actions,
 -                           uint32_t buffer_id, uint16_t priority);
 +                           uint32_t buffer_id, uint16_t priority,
 +                           uint64_t cookie);

      int close_openflow_connection(uint64_t datapathid);

 diff --git a/src/nox/lib/core.py b/src/nox/lib/core.py
 index 37bae36..910e5c7 100644
 --- a/src/nox/lib/core.py
 +++ b/src/nox/lib/core.py
 @@ -249,7 +249,8 @@ class Component:
      def send_flow_command(self, dp_id, command, attrs,
                            priority=openflow.OFP_DEFAULT_PRIORITY,
                            add_args=None,
 -                          hard_timeout=openflow.OFP_FLOW_PERMANENT):
 +                          hard_timeout=openflow.OFP_FLOW_PERMANENT,
 +                          cookie=0):
          m = set_match(attrs)
          if m == None:
              return False
 @@ -265,7 +266,8 @@ class Component:
              buffer_id = UINT32_MAX

          self.ctxt.send_flow_command(dp_id, command, m, idle_timeout,
 -                                    hard_timeout, oactions, buffer_id,
 priority)
 +                                    hard_timeout, oactions, buffer_id,
 priority,
 +                                    cookie)

          return True

 @@ -294,7 +296,7 @@ class Component:
          else:
              self.send_openflow_packet(dp_id, packet, actions, inport)

 -    def delete_datapath_flow(self, dp_id, attrs):
 +    def delete_datapath_flow(self, dp_id, attrs, cookie=0):
          
          Delete all flow entries matching the passed in (potentially
          wildcarded) flow
 @@ -302,10 +304,12 @@ class Component:
          dp_id - datapath to delete the entries from
          attrs - the flow as a dictionary (described above)
          
 -        return self.send_flow_command(dp_id, openflow.OFPFC_DELETE,
 attrs)
 +        return self.send_flow_command(dp_id, openflow.OFPFC_DELETE,
 attrs,
 +                                      cookie=cookie)

      def delete_strict_datapath_flow(self, dp_id, attrs,
 -                        priority=openflow.OFP_DEFAULT_PRIORITY):
 +
  priority=openflow.OFP_DEFAULT_PRIORITY,
 +                                    cookie=0):
          
          Strictly delete the flow entry matching the passed in
 (potentially
          wildcarded) flow.  i.e. matched flow have exactly the same
 @@ -315,9 +319,11 @@ class Component:
          attrs - the flow as a dictionary (described above)
          priority - the priority of the entry to be deleted (only
 meaningful
                     for entries with wildcards)
 +        cookie - the opaque controller-issued identifier associated
 with
 the
 +                 flow
          
          return self.send_flow_command(dp_id,
 openflow.OFPFC_DELETE_STRICT,
 -                                      attrs, priority)
 +                                      attrs, priority, cookie=cookie

Re: [nox-dev] 6633 routing error

2010-12-09 Thread kk yap
Try deleting the vde directory.  They should be temp files.

Regards
KK

On 8 December 2010 23:38, Abhishek Majumdar majum...@cse.unl.edu wrote:
 I don't have the prob with vde_switch anymore. I installed vde2. Now I have
 a different problem. When i execute

 vms-start.pymy-network-name  it gives me

 vde_switch: Could not bind to socket
 '/home/abhishek/opticsproj/vde/ctlof1host1/ctl': Address already in use
 vde_switch: Cleanup not removing files
 vde_switch: Could not bind to socket
 '/home/abhishek/opticsproj/vde/ctlof1of2/ctl': Address already in use
 vde_switch: Cleanup not removing files
 vde_switch: Could not bind to socket
 '/home/abhishek/opticsproj/vde/ctlof2host2/ctl': Address already in use
 vde_switch: Cleanup not removing files
 vde_switch: Could not bind to socket
 '/home/abhishek/opticsproj/vde/ctlofsw/ctl': Address already in use
 vde_switch: Cleanup not removing files
 

 Thanks
 Abhishek Majumdar


 On 12/09/2010 01:36 AM, kk yap wrote:

 Hi,

 I assume you have vde2 installed?  What is the output of `which
 vde_switch`?

 Regards
 KK

 On 8 December 2010 23:21, Abhishek Majumdarmajum...@cse.unl.edu  wrote:


 when i executed vms-start.pymy-network-name  it gave me error:
 vde_switch: command not found. How do I fix this.
 Also while running NOX, how do i connect/start the switches?

 Thanks
 Abhishek Majumdar

 On 12/08/2010 11:55 PM, Murphy McCauley wrote:

 (CCing the list again)
 I don't know much about OpenFlowVMS, so I can't help you too much with
 that.
  But... there seems to be a typo
 on
 http://www.openflowswitch.org/foswiki/bin/view/OpenFlow/Deployment/HOWTO/LabSetup#4_Controller_Setup
 Try grepping for port 6633 instead or 6663.  Also, when you have NOX
 running, try just connecting to port 6633 (using telnet or netcat or
 something) and see if it connects.
 -- Murphy
 On Dec 8, 2010, at 9:36 PM, Hasnat Ahmed wrote:

 hmmm right.
 when i run this command vms-start.py 2hosts-2ofsw.vms.xml refering to
 step 6
 of openflow switch in single pc tutorial (for running switches) executed
 successfully i think because no error is displayed.

 and when i run the commands of basic testing (Step 7 of

 http://openflowswitch.org/foswiki/bin/view/OpenFlow/Deployment/HOWTO/Virtual
 )


 netstat -n | grep 6663                      it did not show any out put
 so i
 think controller listener port is not in listening mode.

 screen -r host1      it shows an error that host1 is not found



 scree -r of1             it shows an error that of1 is not found

 regards

 Hasnat




 On Thu, Dec 9, 2010 at 10:11 AM, Murphy McCauleyjam...@nau.edu  wrote:


 (I've copied the list; it seems to have been dropped accidentally)
 It's normal behavior for NOX to start up and wait silently for switches
 to
 connect to it.  Are you running any switches?
 -- Murphy
 On Dec 8, 2010, at 9:06 PM, Hasnat Ahmed wrote:

 Hi all,

 i am also facing this issue.

 Regards,

 Hasnat

 On Thu, Dec 9, 2010 at 8:46 AM, Murphy McCauleyjam...@nau.edu  wrote:


 Were you running any switches that were attempting to connect to it?
 -- Murphy
 On Dec 8, 2010, at 7:39 PM, Abhishek Majumdar wrote:

 Ok. But it was doing that for a long time. more than 30 mins.??

 Thanks
 Abhishek Majumdar

 On 12/8/2010 9:00 PM, Kyriakos Zarifis wrote:

 Hi Abhishek,
 nothing is necessarily wrong in what you're describing. NOX seems to
 have
 started and is waiting for switches to connect.
 Running nox_core with the -v flag will give you more information
 about
 what's happening.
 Zaku is fine. It's the current HEAD (master branch, and stable version)
 On Wed, Dec 8, 2010 at 6:51 PM,majum...@cse.unl.edu  wrote:


 After installing everything properly, when i tried the following
 $./nox_core -i ptcp:6633 routing
 it got stuck in an infinite loop. it gave
 NOX0.8.0`full`beta (nox_core), compiled Dec 8 2010 19:22:19
 Compiled with OpenFlow 0x01 and the prompt got stuck.

 I'm using a Ubuntu10Vm, OpenFlow v1.0. Also while installing NOX
 compatible with OpenFlow v1.0 when I did git branch -a, I got * zaku
 instead of a * master. I don't whether this is an issue or not, but
 still this was something different from what is mentioned in the page
 and
 so I wanted to let you know.

 Please reply ASAP.

 Thanks
 Abhishek




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

Re: [nox-dev] Nox make Error - Help needed

2010-12-08 Thread kk yap
Let's try gitweb.

http://noxrepo.org/cgi-bin/gitweb.cgi?p=nox;a=summary

I believe you can get a snapshot tarball if you click on tree, then snapshot.

Regards
KK

On 8 December 2010 11:17, Soundararajan Ramaswamy
soundararaja...@huawei.com wrote:
 KK,
 Where can I find Nox 0.9? I can only see Nox 0.5 in the Noxrepo download
 page. I am behind a firewall and I couldn’t get the git repository. So I was
 using the tarball.

 Thanks
 Soundar

 -Original Message-
 From: yap...@gmail.com [mailto:yap...@gmail.com] On Behalf Of kk yap
 Sent: Wednesday, December 08, 2010 11:05 AM
 To: Soundararajan Ramaswamy
 Cc: nox-dev@noxrepo.org
 Subject: Re: [nox-dev] Nox make Error - Help needed

 Hi Soundararajan,

 Are you using gcc 4.4?  A google search for error ‘EOF’ was not
 declared in this scope suggests that you might need to include

 {{{
 #include cstdio
 }}}

 at the top of the file.  Let us know if it works.  If possible, we
 would prefer to move on to NOX 0.9, rather than to work with NOX 0.5.

 Regards
 KK

 On 8 December 2010 10:52, Soundararajan Ramaswamy
 soundararaja...@huawei.com wrote:
 Hello All,

 I took the  nox-0.5.0~full~beta tar ball from the Nox site. I could do the
 “configure” but I am getting error when I do the “make”. Can you folks
 please throw some light on these errors?



 cona...@conalab186:~/nox/nox/build$ make

 make  all-recursive

 make[1]: Entering directory `/home/conalab/nox/nox/build'

 Making all in src

 make[2]: Entering directory `/home/conalab/nox/nox/build/src'

 make  all-recursive

 make[3]: Entering directory `/home/conalab/nox/nox/build/src'

 Making all in include

 make[4]: Entering directory `/home/conalab/nox/nox/build/src/include'

 make[4]: Nothing to be done for `all'.

 make[4]: Leaving directory `/home/conalab/nox/nox/build/src/include'

 Making all in lib

 make[4]: Entering directory `/home/conalab/nox/nox/build/src/lib'

 make  all-am

 make[5]: Entering directory `/home/conalab/nox/nox/build/src/lib'

 /bin/bash ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.
 -I../../../src/lib -I../..  -DPKGDATADIR=\/usr/local/share/nox\
 -DPKGLIBDIR=\/usr/local/bin/lib\
 -DPKGLOCALSTATEDIR=\/usr/local/var/nox\
 -DPKGSYSCONFDIR=\/usr/local/etc/nox\ -include ../../config.h -I
 ../../../src/include -I../../../src/include/openflow -I/usr/include
 -D_GNU_SOURCE=1   -D_REENTRANT -D__STDC_LIMIT_MACROS=1
 -D__STDC_FORMAT_MACROS=1 -D__STDC_CONSTANT_MACROS=1
 -D_GLIBCXX_CONCEPT_CHECKS=1 -D_GLIBCXX_DEBUG=1 -D_GLIBCXX_DEBUG_PEDANTIC=1
 -I/usr/include/python2.6 -I../../../src/include/openflow
 -I../../../src/nox
 -fno-omit-frame-pointer -Wall -Wno-sign-compare -Winit-self
 -Wformat-nonliteral -Wformat-security -g -O2 -MT async_file.lo -MD -MP -MF
 .deps/async_file.Tpo -c -o async_file.lo ../../../src/lib/async_file.cc

 mkdir .libs

  g++ -DHAVE_CONFIG_H -I. -I../../../src/lib -I../..
 -DPKGDATADIR=\/usr/local/share/nox\ -DPKGLIBDIR=\/usr/local/bin/lib\
 -DPKGLOCALSTATEDIR=\/usr/local/var/nox\
 -DPKGSYSCONFDIR=\/usr/local/etc/nox\ -include ../../config.h -I
 ../../../src/include -I../../../src/include/openflow -I/usr/include
 -D_GNU_SOURCE=1 -D_REENTRANT -D__STDC_LIMIT_MACROS=1
 -D__STDC_FORMAT_MACROS=1 -D__STDC_CONSTANT_MACROS=1
 -D_GLIBCXX_CONCEPT_CHECKS=1 -D_GLIBCXX_DEBUG=1 -D_GLIBCXX_DEBUG_PEDANTIC=1
 -I/usr/include/python2.6 -I../../../src/include/openflow
 -I../../../src/nox
 -fno-omit-frame-pointer -Wall -Wno-sign-compare -Winit-self
 -Wformat-nonliteral -Wformat-security -g -O2 -MT async_file.lo -MD -MP -MF
 .deps/async_file.Tpo -c ../../../src/lib/async_file.cc  -fPIC -DPIC -o
 .libs/async_file.o

 mv -f .deps/async_file.Tpo .deps/async_file.Plo

 /bin/bash ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.
 -I../../../src/lib -I../..  -DPKGDATADIR=\/usr/local/share/nox\
 -DPKGLIBDIR=\/usr/local/bin/lib\
 -DPKGLOCALSTATEDIR=\/usr/local/var/nox\
 -DPKGSYSCONFDIR=\/usr/local/etc/nox\ -include ../../config.h -I
 ../../../src/include -I../../../src/include/openflow -I/usr/include
 -D_GNU_SOURCE=1   -D_REENTRANT -D__STDC_LIMIT_MACROS=1
 -D__STDC_FORMAT_MACROS=1 -D__STDC_CONSTANT_MACROS=1
 -D_GLIBCXX_CONCEPT_CHECKS=1 -D_GLIBCXX_DEBUG=1 -D_GLIBCXX_DEBUG_PEDANTIC=1
 -I/usr/include/python2.6 -I../../../src/include/openflow
 -I../../../src/nox
 -fno-omit-frame-pointer -Wall -Wno-sign-compare -Winit-self
 -Wformat-nonliteral -Wformat-security -g -O2 -MT async_io.lo -MD -MP -MF
 .deps/async_io.Tpo -c -o async_io.lo ../../../src/lib/async_io.cc

  g++ -DHAVE_CONFIG_H -I. -I../../../src/lib -I../..
 -DPKGDATADIR=\/usr/local/share/nox\ -DPKGLIBDIR=\/usr/local/bin/lib\
 -DPKGLOCALSTATEDIR=\/usr/local/var/nox\
 -DPKGSYSCONFDIR=\/usr/local/etc/nox\ -include ../../config.h -I
 ../../../src/include -I../../../src/include/openflow -I/usr/include
 -D_GNU_SOURCE=1 -D_REENTRANT -D__STDC_LIMIT_MACROS=1
 -D__STDC_FORMAT_MACROS=1 -D__STDC_CONSTANT_MACROS=1
 -D_GLIBCXX_CONCEPT_CHECKS=1 -D_GLIBCXX_DEBUG=1 -D_GLIBCXX_DEBUG_PEDANTIC=1
 -I/usr/include/python2.6 -I

Re: [nox-dev] Nox make Error - Help needed

2010-12-08 Thread kk yap
Very cool.  Thanks for letting us know.

Regards
KK

On 8 December 2010 12:30, Soundararajan Ramaswamy
soundararaja...@huawei.com wrote:
 KK,
 Thanks for the info. Could able to install nox 0.9. Thanks a lot.

 Thanks
 Soundar

 -Original Message-
 From: yap...@gmail.com [mailto:yap...@gmail.com] On Behalf Of kk yap
 Sent: Wednesday, December 08, 2010 11:34 AM
 To: Soundararajan Ramaswamy
 Cc: nox-dev@noxrepo.org
 Subject: Re: [nox-dev] Nox make Error - Help needed

 Let's try gitweb.

 http://noxrepo.org/cgi-bin/gitweb.cgi?p=nox;a=summary

 I believe you can get a snapshot tarball if you click on tree, then
 snapshot.

 Regards
 KK

 On 8 December 2010 11:17, Soundararajan Ramaswamy
 soundararaja...@huawei.com wrote:
 KK,
 Where can I find Nox 0.9? I can only see Nox 0.5 in the Noxrepo download
 page. I am behind a firewall and I couldn’t get the git repository. So I
 was
 using the tarball.

 Thanks
 Soundar

 -Original Message-
 From: yap...@gmail.com [mailto:yap...@gmail.com] On Behalf Of kk yap
 Sent: Wednesday, December 08, 2010 11:05 AM
 To: Soundararajan Ramaswamy
 Cc: nox-dev@noxrepo.org
 Subject: Re: [nox-dev] Nox make Error - Help needed

 Hi Soundararajan,

 Are you using gcc 4.4?  A google search for error ‘EOF’ was not
 declared in this scope suggests that you might need to include

 {{{
 #include cstdio
 }}}

 at the top of the file.  Let us know if it works.  If possible, we
 would prefer to move on to NOX 0.9, rather than to work with NOX 0.5.

 Regards
 KK

 On 8 December 2010 10:52, Soundararajan Ramaswamy
 soundararaja...@huawei.com wrote:
 Hello All,

 I took the  nox-0.5.0~full~beta tar ball from the Nox site. I could do
 the
 “configure” but I am getting error when I do the “make”. Can you folks
 please throw some light on these errors?



 cona...@conalab186:~/nox/nox/build$ make

 make  all-recursive

 make[1]: Entering directory `/home/conalab/nox/nox/build'

 Making all in src

 make[2]: Entering directory `/home/conalab/nox/nox/build/src'

 make  all-recursive

 make[3]: Entering directory `/home/conalab/nox/nox/build/src'

 Making all in include

 make[4]: Entering directory `/home/conalab/nox/nox/build/src/include'

 make[4]: Nothing to be done for `all'.

 make[4]: Leaving directory `/home/conalab/nox/nox/build/src/include'

 Making all in lib

 make[4]: Entering directory `/home/conalab/nox/nox/build/src/lib'

 make  all-am

 make[5]: Entering directory `/home/conalab/nox/nox/build/src/lib'

 /bin/bash ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H
 -I.
 -I../../../src/lib -I../..  -DPKGDATADIR=\/usr/local/share/nox\
 -DPKGLIBDIR=\/usr/local/bin/lib\
 -DPKGLOCALSTATEDIR=\/usr/local/var/nox\
 -DPKGSYSCONFDIR=\/usr/local/etc/nox\ -include ../../config.h -I
 ../../../src/include -I../../../src/include/openflow -I/usr/include
 -D_GNU_SOURCE=1   -D_REENTRANT -D__STDC_LIMIT_MACROS=1
 -D__STDC_FORMAT_MACROS=1 -D__STDC_CONSTANT_MACROS=1
 -D_GLIBCXX_CONCEPT_CHECKS=1 -D_GLIBCXX_DEBUG=1
 -D_GLIBCXX_DEBUG_PEDANTIC=1
 -I/usr/include/python2.6 -I../../../src/include/openflow
 -I../../../src/nox
 -fno-omit-frame-pointer -Wall -Wno-sign-compare -Winit-self
 -Wformat-nonliteral -Wformat-security -g -O2 -MT async_file.lo -MD -MP
 -MF
 .deps/async_file.Tpo -c -o async_file.lo ../../../src/lib/async_file.cc

 mkdir .libs

  g++ -DHAVE_CONFIG_H -I. -I../../../src/lib -I../..
 -DPKGDATADIR=\/usr/local/share/nox\ -DPKGLIBDIR=\/usr/local/bin/lib\
 -DPKGLOCALSTATEDIR=\/usr/local/var/nox\
 -DPKGSYSCONFDIR=\/usr/local/etc/nox\ -include ../../config.h -I
 ../../../src/include -I../../../src/include/openflow -I/usr/include
 -D_GNU_SOURCE=1 -D_REENTRANT -D__STDC_LIMIT_MACROS=1
 -D__STDC_FORMAT_MACROS=1 -D__STDC_CONSTANT_MACROS=1
 -D_GLIBCXX_CONCEPT_CHECKS=1 -D_GLIBCXX_DEBUG=1
 -D_GLIBCXX_DEBUG_PEDANTIC=1
 -I/usr/include/python2.6 -I../../../src/include/openflow
 -I../../../src/nox
 -fno-omit-frame-pointer -Wall -Wno-sign-compare -Winit-self
 -Wformat-nonliteral -Wformat-security -g -O2 -MT async_file.lo -MD -MP
 -MF
 .deps/async_file.Tpo -c ../../../src/lib/async_file.cc  -fPIC -DPIC -o
 .libs/async_file.o

 mv -f .deps/async_file.Tpo .deps/async_file.Plo

 /bin/bash ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H
 -I.
 -I../../../src/lib -I../..  -DPKGDATADIR=\/usr/local/share/nox\
 -DPKGLIBDIR=\/usr/local/bin/lib\
 -DPKGLOCALSTATEDIR=\/usr/local/var/nox\
 -DPKGSYSCONFDIR=\/usr/local/etc/nox\ -include ../../config.h -I
 ../../../src/include -I../../../src/include/openflow -I/usr/include
 -D_GNU_SOURCE=1   -D_REENTRANT -D__STDC_LIMIT_MACROS=1
 -D__STDC_FORMAT_MACROS=1 -D__STDC_CONSTANT_MACROS=1
 -D_GLIBCXX_CONCEPT_CHECKS=1 -D_GLIBCXX_DEBUG=1
 -D_GLIBCXX_DEBUG_PEDANTIC=1
 -I/usr/include/python2.6 -I../../../src/include/openflow
 -I../../../src/nox
 -fno-omit-frame-pointer -Wall -Wno-sign-compare -Winit-self
 -Wformat-nonliteral -Wformat-security -g -O2 -MT async_io.lo -MD -MP -MF
 .deps/async_io.Tpo -c -o async_io.lo ../../../src/lib/async_io.cc

  g

Re: [nox-dev] New component usinf configure.ac.in

2010-12-08 Thread kk yap
Hi Alexandre,

Did you include the directory of your component in configure.ac.in?
It is not clear in your email that you did.  This page might also
provide some clue.

http://noxrepo.org/noxwiki/index.php/Developing_in_NOX#Compiling_your_new_component

Regards
KK

On 8 December 2010 12:59, Alexandre Passito pass...@dcc.ufam.edu.br wrote:
 Hi All,



 I’m  trying to compile a new component as a  netapp. I included the
 component .cc, component.hh and meta.json in a new directory in netapps.



 I ran ./boot.sh and ./configure.



 ./configure creates all makefiles but my new component.



 Looking at ./configure it does create $ac_config_files and $ac_config_target
 for all nox components, but for my component it does not create them.



 Any ideia?

 ___
 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] 6633 routing error

2010-12-08 Thread kk yap
Hi Abhishek,

 NOX0.8.0`full`beta (nox_core), compiled Dec 8 2010 19:22:19

This looks suspicious, the current HEAD is zaku as Kyriakos mention.
TThe current NOX head is 0.9.0 (zaku), and you should see this which
you are not.  It might not be critical for you though.  FYI.

Regards
KK

On 8 December 2010 18:51,  majum...@cse.unl.edu wrote:
 After installing everything properly, when i tried the following
 $./nox_core -i ptcp:6633 routing
 it got stuck in an infinite loop. it gave
 NOX0.8.0`full`beta (nox_core), compiled Dec 8 2010 19:22:19
 Compiled with OpenFlow 0x01 and the prompt got stuck.

 I'm using a Ubuntu10Vm, OpenFlow v1.0. Also while installing NOX
 compatible with OpenFlow v1.0 when I did git branch -a, I got * zaku
 instead of a * master. I don't whether this is an issue or not, but
 still this was something different from what is mentioned in the page and
 so I wanted to let you know.

 Please reply ASAP.

 Thanks
 Abhishek




 ___
 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] RES: New component using configure.ac.in

2010-12-08 Thread kk yap
Hi Alexandre,

You added the component name or directory name.  The latter is the
right thing to do.  Try to be a little more descriptive on what you do
and we can try to figure out what is wrong.  If it is a C component,
try the nox-new-c-app.py script in src/utilities.

Regards
KK

On 8 December 2010 18:16, Alexandre Passito pass...@dcc.ufam.edu.br wrote:
 Hi All,



 Yes. I included my component name in configure.ac.in but after running
 ./boot and ../configure it does not create the makefile into my component’s
 directory. Did I miss something?



 Regards,



 Alex



 De: Kyriakos Zarifis [mailto:kyr.zari...@gmail.com]
 Enviada em: quarta-feira, 8 de dezembro de 2010 19:07
 Para: Alexandre Passito
 Cc: nox-dev@noxrepo.org
 Assunto: Re: [nox-dev] New component usinf configure.ac.in



 Hi Alexandre,



 in the file configure.ac.in, you'll need to define your component as part of
 the netapps package



 On Wed, Dec 8, 2010 at 12:59 PM, Alexandre Passito pass...@dcc.ufam.edu.br
 wrote:

 Hi All,



 I’m  trying to compile a new component as a  netapp. I included the
 component .cc, component.hh and meta.json in a new directory in netapps.



 I ran ./boot.sh and ./configure.



 ./configure creates all makefiles but my new component.



 Looking at ./configure it does create $ac_config_files and $ac_config_target
 for all nox components, but for my component it does not create them.



 Any ideia?

 ___
 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] [openflow-discuss] openflow virtual switch

2010-12-08 Thread kk yap
Hi Hasnat,

XSD is a style definition for the XML file.  You are interested in
getting IP on the hosts and switches right?  That means defining that
in the XML file.  I can give you an example tomorrow if that helps.

Regards
KK

On 8 December 2010 23:03, Hasnat Ahmed 10msithah...@seecs.edu.pk wrote:


 On Thu, Dec 9, 2010 at 11:55 AM, Hasnat Ahmed 10msithah...@seecs.edu.pk
 wrote:

 yeah i looked at the vms.xsd file and found that entry

 xs:complexType name=ipType
         xs:choice
             xs:element name=static type=ipAddress /
             xs:element name=dynamic type=NULL /
         /xs:choice
       /xs:complexType


 kindly tell me what will i write in type of dynamic ??





 On Thu, Dec 9, 2010 at 10:38 AM, kk yap yap...@stanford.edu wrote:

 Hi Hasnat,

 OpenFlowVMS provides a XML option to assign IP automatically or
 statically.  If you would look at the xsd file, it should tell you the
 exact one.  If you have problems with the XSD file included, let me
 know.  I will spell this out more clearly.

 Regards
 KK

 On 8 December 2010 20:54, Hasnat Ahmed 10msithah...@seecs.edu.pk wrote:
 
 
 
  Hi,
 
  while completing the openflowvms with in a single pc (Tutorial). my
  switch
  side is working fine independently and nox controller also working fine
  independently. but can you please tell me how to assign IP's to
  interfaces
  of open flow switches and hosts.
 
  because when i run this command netstat -a | grep 6663 its executed
  successfully but does not show any output.
 
 
  how to configure this port in listening mode
 
  and last what will be the output of the above mentioned tutorial
 
 
  Regards,
 
  Hasnat
 
 
  ___
  openflow-discuss mailing list
  openflow-disc...@lists.stanford.edu
  https://mailman.stanford.edu/mailman/listinfo/openflow-discuss
 
 




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


Re: [nox-dev] NoX routing does not work

2010-12-07 Thread kk yap
Seems like the authenticator is dying here.  It seems to be locked in
a loop for your requesting host 10.10.11.34.  I could not replicate
the error on my side.  Srini, can you?

I am using the latest zaku.  Jean, could you update to that?  I did a
git pull --rebase this morning.

Regards
KK

On 6 December 2010 18:41, kk yap yap...@stanford.edu wrote:
 Thanks Jean.  I will stare on it when I get to a wireshark capable
 terminal tomorrow.

 Regards
 KK

 On 6 December 2010 18:31, Jean Tourrilhes j...@hpl.hp.com wrote:
 On Mon, Dec 06, 2010 at 05:47:46PM -0800, kk yap wrote:
 Hi Jean,

 I am confused you seem to be giving us partial logs

        Hi,

        Attached you will find a complete log and a complete PCAP
 output, as complete as I could make, and they correspond to the same
 run on the switch without the LAG.

        I would like first to know what happenind to packet 135 and
 why the controller did not forward it. Same for packet 151, 165...
        Then, I would like to know why the controller sent packet 133
 which is clearly a NoX error.

        Have fun...

        Jean



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


Re: [nox-dev] Mininet BGP

2010-12-07 Thread kk yap
Hi Uday,

That sounds like a question for mininet-discuss, rather than nox-dev.

Regards
KK

On 7 December 2010 22:28, Uday Kiran Medisetty udaykira...@gmail.com wrote:
 Hi,
 I am running mininet on a VM and I am implementing a router on one of the
 switches in the topology. Is it possible to send packets from a switch in
 mininet to an interface on the VM? I have a peering session to a BGP server
 on a tun interface on the VM. I want to route packets from switch in mininet
 to global internet via this interface. Could you please let me know if there
 is a way to achieve this in mininet.
 Regards,
 Uday
 ___
 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] working of switch api on link failure

2010-12-06 Thread kk yap
Hi,

Pardon my laziness in not reading the patches.  I am confused here.  Two points:
1) Switch does not depend on topology or discovery, so how do you get
link failure?

2) There is no spanning tree implementation in NOX (distributed by
default), i.e., you cannot have a redundant network with NOX.  So, how
can you possibly hope to find the host on a different route when a
link failure occurs?  On that note, why does handling link failure
even matters?

Regards
KK

On 6 December 2010 12:14, Srini Seetharaman seeth...@stanford.edu wrote:
 Hi Sachin
 You raise a good point. There is no code that performs the needed
 cleanup on link failure. I've attached two patch files that shud work
 for the switch module and the routing module. This will clear the flow
 rules on the switch for that out_port that went down, and also clear
 any learned MAC address (in case of the switch module).

 The code is not necessarily optimized. But, it has been tested to work
 fine with HP switches in a small lab setup. Please let us know whether
 this solves your problem.

 NOX-Admins - Please accept this patch if you find it worthwhile.

 Thanks
 Srini.

 On Fri, Nov 26, 2010 at 7:09 AM, sachin sharma
 sharon_sac...@yahoo.co.in wrote:
 Hi,
 I have gone through the switch api of code at nox
 (/home/user/newnox/src/nox/coreapps/switch/switch.cc)  but i do not find any
 action of switch on link failure.

  when i run nox with this switch api then flow entries are getting added in
 openvswitch. But when I make one of outgoing link down. then after some
 time, older flow entry gets vanishes and new flow entry is getting added in
 my flow table with available port. But new entry addition time is greater
 than flow expired time ( in my case it is 50 seconds).

 But I am not able to find the code in nox which does this action on link
 failure.  Can anyone explain me that which part of code at nox is called
 when nox detects link failure on any datapath port.

 Thank You!
 Sachin Sharma




 ___
 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] working of switch api on link failure

2010-12-06 Thread kk yap
Hi Srini,

1) The archived port would be the same port?

2) My point precisely.  So, what does clearing the flow entries achieve here?

I contend that custom controllers might want to implement this
flushing on their own.  The patch is probably most useful as a
component that other controllers can load on demand.  Patching this on
switch and routing would add to clutter with little utility in my
opinion.

Regards
KK

PS I am happy to push this functionality as a component.

On 6 December 2010 12:43, Srini Seetharaman seeth...@stanford.edu wrote:
 Pardon my laziness in not reading the patches.  I am confused here.  Two 
 points:
 1) Switch does not depend on topology or discovery, so how do you get
 link failure?

 Oh, with switch, I use the port_status_change event and clear flow
 rules (and the archived Mac_source for the port).

 2) There is no spanning tree implementation in NOX (distributed by
 default), i.e., you cannot have a redundant network with NOX.  So, how
 can you possibly hope to find the host on a different route when a
 link failure occurs?  On that note, why does handling link failure
 even matters?

 If a silent host (connected to port X) had moved to port Y, then your
 table will still think the host is located on port X. Even if there
 existed a chance of reaching host thro' port Y, the controller won't
 really try that.


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


Re: [nox-dev] working of switch api on link failure

2010-12-06 Thread kk yap
Hi Sachin,

Thanks for all the heads-up.

For aging, I am a little wary about the consequence of implementing
aging.  Wireless clients (esp. phones with WiFi) tends to be fairly
silent these days.  I don't have numbers for that, but it might be
good to have some value to play with before pushing such a patch.  I
will see how I can get some of these numbers.

Thanks.

Regards
KK

On 6 December 2010 13:09, sachin sharma sharon_sac...@yahoo.co.in wrote:
 Hi Srini,

 Thank you very much for the patch.

 Switch.cc implements  L2  learning. But  in this patch, action are taken on
 link failure. This does not match with MAC learning.

 The code of switch.cc works fine. But only the issue is that it does not
 implement aging timer.

 Aging timer is explained below:

 http://noxrepo.org/pipermail/nox-dev_noxrepo.org/2010-December/001845.html

 I think if we implement this then MAC learning code would work well for
 protection scenarios as well.

 So from my point of view,  we should not take the action on link status
 change.

 The patch would work fine. But this could be a enhancement over MAC
 learning.

 Best Regards,
 Sachin Sharma

 
 From: Srini Seetharaman seeth...@stanford.edu
 To: kk yap yap...@stanford.edu
 Cc: sachin sharma sharon_sac...@yahoo.co.in; nox-dev@noxrepo.org
 Sent: Mon, 6 December, 2010 9:43:43 PM
 Subject: Re: [nox-dev] working of switch api on link failure

 Pardon my laziness in not reading the patches.  I am confused here.  Two
 points:
 1) Switch does not depend on topology or discovery, so how do you get
 link failure?

 Oh, with switch, I use the port_status_change event and clear flow
 rules (and the archived Mac_source for the port).

 2) There is no spanning tree implementation in NOX (distributed by
 default), i.e., you cannot have a redundant network with NOX.  So, how
 can you possibly hope to find the host on a different route when a
 link failure occurs?  On that note, why does handling link failure
 even matters?

 If a silent host (connected to port X) had moved to port Y, then your
 table will still think the host is located on port X. Even if there
 existed a chance of reaching host thro' port Y, the controller won't
 really try that.



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


Re: [nox-dev] NoX routing does not work

2010-12-06 Thread kk yap
Hi Jean,

I am confused you seem to be giving us partial logs and also your NOX
seems to be slow.  Are you running in a VM?  Anyway, I cannot figure
out what the problem is from all these.  I understand you have flow
setup in one way and not the other.

Can you furnish more information and probably the full NOX output and
pcap exchange of OpenFlow messages? Knowing the line number to focus
on in those logs will help too.  I understand you are a savvy user of
OpenFlow but it is hard to debug from email description, esp. when I
am not clear which is from LAG or non-LAG switch.

Thanks.

Regards
KK

On 6 December 2010 17:06, Jean Tourrilhes j...@hpl.hp.com wrote:
 On Mon, Dec 06, 2010 at 03:06:34PM -0800, Srini Seetharaman wrote:
 Hi Jean
 What is the topology you're using? Do you have a loop?

        Can you look at the attached pcap files ? It's quite clear
 that the second packet is never forwarded or flooded in any way.
        Looking at the trace, it would be nice if NoX would show
 OpenFlow protocol errors in the debug output.
        Regards,

        Jean


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


Re: [nox-dev] problem with swig

2010-12-06 Thread kk yap
Murphy,

The list I use for the package is

Depends: doxygen, doxypy, build-essential, python-dev, autoconf,
automake, make, g++, libtool, python-twisted, python-dev, swig,
libssl-dev, libboost-dev (= 1.34.1), libboost-test-dev,
libboost-filesystem-dev

Suggests: git-core, libsqilte3-dev, python-simplejson

libboost-all-dev is quite a bit to download for me.

Regards
KK


On 6 December 2010 17:45, Murphy McCauley jam...@nau.edu wrote:
 Glad to hear it!
 Did you try it with just libboost-dev, or did you use libboost-all-dev?  If
 it's the former, I'd like to update the wiki (if it's the latter, I'll have
 to look into it more). :)
 -- Murphy
 On Dec 6, 2010, at 3:28 PM, Abhishek Majumdar wrote:

 It works now. Thanks a lot.

 Abhishek Majumdar

 On 12/6/2010 2:13 PM, Murphy McCauley wrote:

 Yeah, I think this will probably work.
 apt-get install libboost-dev
 might also do the trick (and not be overkill).
 -- Murphy
 On Dec 6, 2010, at 12:07 PM, Syed Akbar Mehdi wrote:

 I encountered the same configure: error: Could not link against !. Try
 installing the libboost-all-dev as well as boost-build packages. Maybe
 this is overkill but, in my case it made this error go away.

 sudo aptitude install boost-build libboost-all-dev

 --Akbar

 On Mon, Dec 6, 2010 at 9:06 PM, majum...@cse.unl.edu wrote:

 Output of uname -a:
 Linux Ubuntu10VM 2.6.32-26-generic #48-Ubuntu SMP Wed Nov 24 09:00:03 UTC
 2010 i686 GNU/Linux
 Output of cat /etc/issue:
 Ubuntu 10.04.1 LTS \n \l



  Can you send the config.log file from your build directory, as well as
  the
  output from uname -a and cat /etc/issue ?
 
  -- Murphy
 
  On Dec 6, 2010, at 6:51 AM, Abhishek Majumdar wrote:
 
  I still got that configure : error: could not link against !
 
  Thanks
  Abhishek Majumdar
 
 
  On 12/6/2010 8:43 AM, Murphy McCauley wrote:
  The information on that page is long out of date.  The noxrepo wiki
  (http://noxrepo.org/noxwiki) is much more in line with reality.  The
  packages listed on that page are for Debian, and the NOX it has you
  fetch is no longer 0.6.0.
 
  Please try the following (copy/pasted from the noxrepo wiki), and then
  re-run ../configure:
 
  sudo apt-get install autoconf automake g++ libtool swig make git-core
  libboost-test-dev libboost-filesystem-dev libssl-dev libpcap-dev
  python-twisted python-simplejson python-dev
 
 
  -- Murphy
 
  On Dec 6, 2010, at 6:36 AM, majum...@cse.unl.edu wrote:
 
  BTW I'm using the tutorial given at
 
  http://www.openflowswitch.org/foswiki/bin/view/OpenFlow/Deployment/HOWTO/LabSetup#4_Controller_Setup
 
  So I'm using NOX 0.6
 
  Thanks
  Abhishek
 
  Can you please post the results of running apt-get install swig
  and
  also
  the results of running ../configure ?
 
  Also, which version of NOX are you using?
 
  -- Murphy
 
  On Dec 5, 2010, at 11:44 PM, Abhishek Majumdar wrote:
 
  Its Linux Ubuntu10Vm 2.6.32-25-generic. I separately installed
  everything and in /nox/build when i do ../configure it recognizes
  and
  then gives configure: error: Could not link against !
 
  Thanks
  Abhishek Majumdar
 
 
  On 12/5/2010 10:35 PM, kk yap wrote:
  Hi Abhishek,
 
  Let's see... Try make install and ldconfig?
 
  Jokes aside, please let us know your OS, distro, etc. for anyone
  to
  give advice.  It works perfectly on Ubuntu (Lucid Lynx) for me.
   In
  fact, we have a pseudo-package that installs the requisites using
  apt-get.
 
  Regards
  KK
 
  On 5 December 2010 20:24, Abhishek Majumdarmajum...@cse.unl.edu
  wrote:
  When I try to install the pre-requisites, it says swig package
  cannot
  be
  found. I separately installed libboost, it can now detect, but
  cannot
  link i
  guess. please help ASAP.
 
  --
  Thanks
  Abhishek Majumdar
 
 
  ___
  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 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] problem with swig

2010-12-05 Thread kk yap
Hi Abhishek,

Let's see... Try make install and ldconfig?

Jokes aside, please let us know your OS, distro, etc. for anyone to
give advice.  It works perfectly on Ubuntu (Lucid Lynx) for me.  In
fact, we have a pseudo-package that installs the requisites using
apt-get.

Regards
KK

On 5 December 2010 20:24, Abhishek Majumdar majum...@cse.unl.edu wrote:
 When I try to install the pre-requisites, it says swig package cannot be
 found. I separately installed libboost, it can now detect, but cannot link i
 guess. please help ASAP.

 --
 Thanks
 Abhishek Majumdar


 ___
 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] Issue regarding setting up Controller (Virtual Testing Environment)

2010-12-04 Thread kk yap
Hi Hasnat,

You are not telling me much other than you have some errors going on.
It would definitely help if you can tell me what the errors are.  Then
maybe I can see if I can advise on how to get rid of them.  So, can I
have the logs?  Thanks.

Regards
KK

PS Unless this is meant to be a private email, please don't drop the
mailing list.  Thanks.

On 4 December 2010 06:39, Hasnat Ahmed 10msithah...@seecs.edu.pk wrote:
 now i have redone all the steps mentioned in CREATE AN OPENFLOW NETWORK
 WITHIN A SINGLE PC my switch portion is verified successfully and drawing
 command is also working fine but this time at controller(NOX) portion when i
 run the ./nox_core -i ptcp:6633 routing command
 it is displaying me that line openflow compiled and cursor stays blink
 like its in blocking stage etc i dont know

 than when i run a command vms-start.py 2hosts-2ofsw.vms.xml
 its shows me error hda.disk  file is missing. but i have placed this file
 and its present.

 On Wed, Dec 1, 2010 at 6:18 PM, kk yap yap...@stanford.edu wrote:

 I see the errors on the switch side, but what about the NOX side?
 What is the controller saying about the switch?  Is the switch
 disconnecting or is the controller disconnecting the switch?  That's
 critical for understanding what is happening.

 Regards
 KK

 On 1 December 2010 03:22, Hasnat Ahmed 10msithah...@seecs.edu.pk wrote:
  sorry yapkke , i did not get ur point.
 
  On Wed, Dec 1, 2010 at 11:57 AM, kk yap yap...@stanford.edu wrote:
 
  What about the log from the NOX side of things?
 
  Regards
  KK
 
  On 30 November 2010 22:49, Hasnat Ahmed 10msithah...@seecs.edu.pk
  wrote:
   Hi , while creating a openflow network within a single pc I have
   verified
   successfully switch set up part but when tried to setup the
   controller
   portion. we are examing a issue. controller port (6663) is in
   listening
   mode
   (fine)but when we start the controller it will 1st show its status
   connected
   and then lose the connection and cannot reestablish the connection.
   so
   without holding the conntroller connectivity the simulation cant run.
  
   kindly see the attached pic.
  
   we are not getting out that why controller loses its connectivity.
  
  
  
  
  
  
   ___
   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] Aging Timer of MAC learning at NOX

2010-12-04 Thread kk yap
Hmm... I think you are right.  Ideally you might want to flood the
packet if you have not heard from the host for a while.  That
implementation does seem to imply the host is not silent which can be
untrue.

While that aging logic might be a RFC standard, I doubt NOX claims
compliance to any RFC.  I am happy to push any patch to add that, but
must say that this works for most situation we have now.

Either way, thanks for bringing this up!  Appreciate you shared your
analysis of the code.

Regards
KK

On 4 December 2010 10:49, sachin sharma sharon_sac...@yahoo.co.in wrote:
 Hi KK,

 Please correct me if I am wrong.

 The field you are talking about is idle_timeout.  MAC logic implemented at
 switch.cc adds idle_timeout for each flow which is to be added through
 packet_out message sent to openflow switch.

 idle_timeout for a flow entry means that if openflow switch does not hear
 from that source about that flow before idle_timeout expires, openflow
 switch would  remove the entry from the table.

 But I am talking about entries deletion from the Source_Table (sources) used
 by class Switch.cc. Entries from this datastructure never gets deleted.
 Entries are just modified if it receives the packet  from different port.
 MAC Table in switch.cc is maintained by this (Source_Table).


 Thanks  Regards,
 Sachin Sharma

 
 From: kk yap yap...@stanford.edu
 To: sachin sharma sharon_sac...@yahoo.co.in
 Cc: nox-dev@noxrepo.org
 Sent: Sat, 4 December, 2010 7:25:04 PM
 Subject: Re: [nox-dev] Aging Timer of MAC learning at NOX

 Hi Sachin,

 Each flow in the OpenFlow table has an idle expiration time.  So, the
 controller is exploiting that to implement the aging logic.

 Regards
 KK

 On 4 December 2010 07:21, sachin sharma sharon_sac...@yahoo.co.in wrote:

 Hi All,

 Aging timer Explanation:
 When a bridge learns a source address, it time stamps the entry. Every
 time
 the bridge sees a frame from that source, the bridge updates the
 timestamp.
 If the bridge does not hear from that source before an aging time expires,
 the bridge removes the entry from the table.

 I have gone through the MAC learning code of NOX at file
 nox/build/src/nox/coreapps/switch/switch.cc.  But coding of above
 explanation is missing.  Is there any other MAC learning api present at
 nox
 which includes the aging timer expiration coding?

 Thanks  Regards,
 Sachin Sharma


 ___
 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] openflowswtich site opening issue

2010-12-03 Thread kk yap
Hi Hasnat,

The machine is facing some problem.  Sorry.  Do try again later.

Regards
KK

On 3 December 2010 04:04, Hasnat Ahmed 10msithah...@seecs.edu.pk wrote:

 While trying to retrieve the URL: http://www.openflowswitch.org/

 *The following error was encountered: *

- *Read Error *

 *The system returned: *

 *(104) Connection reset by peer*

 *An error condition occurred while reading data from the network. Please
 retry your request. *


 since morning i am facing this issue.



 On Fri, Dec 3, 2010 at 5:02 PM, Hasnat Ahmed 10msithah...@seecs.edu.pkwrote:

 Hi


 www.openflowswitch.org is not opening. kindly any one send me these files
 for openflow virtual testing on a single machine.

File Name
  Description
  For OpenFlow v0.8.9
  For OpenFlow v1.0
  hda.dsk
  disk image used for the
   File Name
  Description
  For OpenFlow v0.8.9
  For OpenFlow v1.0
  hda.dsk
  disk image used for the hosts running on qemu
  Download 
 Linkhttp://openflowswitch.org/downloads/diskimages/openflowvms-image.tgz
  kernel.bin
  kernel image used for the hosts running on qemu
  Download Linkhttp://openflowswitch.org/downloads/diskimages/kernel.bin
  ofdatapath.ko
  openflow switch (kernel module); not supported from v1.0 and later
  Download 
 Linkhttp://openflowswitch.org/downloads/diskimages/openflow.8.9-bin.tgz
  Download 
 Linkhttp://openflowswitch.org/downloads/diskimages/openflow1.0-bin.tgz
  ofdatapath
  openflow switch (userspace)
  ofprotocol
  openflow protocol module (used to communicate to the controller)
  dpctl
  openflow datapath control command
 hosts running on qemu
  Download 
 Linkhttp://openflowswitch.org/downloads/diskimages/openflowvms-image.tgz
  kernel.bin
  kernel image used for the hosts running on qemu
  Download Linkhttp://openflowswitch.org/downloads/diskimages/kernel.bin
  ofdatapath.ko
  openflow switch (kernel module); not supported from v1.0 and later
  Download 
 Linkhttp://openflowswitch.org/downloads/diskimages/openflow.8.9-bin.tgz
  Download 
 Linkhttp://openflowswitch.org/downloads/diskimages/openflow1.0-bin.tgz
  ofdatapath
  openflow switch (userspace)
  ofprotocol
  openflow protocol module (used to communicate to the controller)
  dpctl
  openflow datapath control command



 thanks.



 ___
 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


  1   2   3   >