Re: [nox-dev] For help
I'm not clear on what you want to do… What do you mean by the local machine? The controller? Where do you want to output them? Out of an ethernet adapter? -- Murphy On Mar 1, 2012, at 2:43 AM, bbs wrote: Hi, I want to let the packets send to the local machine, how could I write the command, and what is the output port? actions = [[openflow.OFPAT_OUTPUT, [0, ?]]] Thank you very much! John ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] For help
Yeah, I think that looks right. -- Murphy On Mar 1, 2012, at 7:26 AM, bbs wrote: Hi, I am writing a component for the nox controller, which can guid the openflow-switch to decide which port to send the packets. But, when I want the packet to be sent to the local port in the openflow-switch, I didn't know how to write the actions list( using python), Is the following right? actions = [[openflow.OFPAT_OUTPUT, [0, OFPP_LOCAL]]] Thank you for your replay! John 在 2012-03-01 21:54:23,Murphy McCauley jam...@nau.edu 写道: I'm not clear on what you want to do… What do you mean by the local machine? The controller? Where do you want to output them? Out of an ethernet adapter? -- Murphy On Mar 1, 2012, at 2:43 AM, bbs wrote: Hi, I want to let the packets send to the local machine, how could I write the command, and what is the output port? actions = [[openflow.OFPAT_OUTPUT, [0, ?]]] Thank you very much! John ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
[nox-dev] IMPORTANT: noxrepo.org service outage is forthcoming
Sometime in the next few days, you may have trouble connecting to noxrepo.org and there may be problems with the mailing list and git repositories. Hopefully this will be quite short-lived, but I wanted to give a heads up that this is liable to occur. If you have problems, you might want to try finding help on the freenode IRC network in our new home: #noxrepo. For a web-based IRC client, check out http://webchat.freenode.net/ . Sorry for any inconvenience this may cause; we hope to have it sorted out soon. -- Murphy ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Help with NOX to OpenFlow messages
OpenFlow version 2.02 doesn't mean anything to me. What kind of switches are you using? What IP address are you using with dpctl? The switch? In general, switches make active connections (they initiate a connection to the controller/NOX), so it's not listening on port 6633. Sometimes switches can also be configured to listen too, but it depends on the switch and on the configuration. More to the point, you say that you're trying to get NOX to send messages to the switch, but dpctl doesn't have anything to do with that. Have you configured the switches to connect to the IP that you're running NOX on? If you run NOX and set it to listen for connections, do the switches connect? What commandline are you running NOX with? -- Murphy On Feb 28, 2012, at 3:11 PM, Elias Marti Paz-Rudolph wrote: Hello, I am in the beginning stages of implementing an OpenFlow network. I believe i have configured my switch correctly. I am trying to get NOX to send messages to the switch. When i send dpctl dump-tables tcp:xxx.xx.xx.xxx:6633 i get a connection refused message back. I am using NOX version 0.9.0 and OpenFlow version 2.02 Can you help me this is? Thanks Elias Elias Paz CompE Undergraduate member of HESO Hispanic Engineering and Science Organization(SHPE/MAES) nmeli...@unm.edu (505) 550-9554 ___ 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] Help with NOX to OpenFlow messages
This sounds like a switch configuration issue; you might try whatever support channels HP provides. Is NOX configured to listen for connections on whatever port you set the switches to connect to? -- Murphy On Feb 28, 2012, at 3:36 PM, Elias Marti Paz-Rudolph wrote: I am using HP ProCurve 3500 yl switches. i have configured the switch to listen on port 6633. I am using ipv4 addresses. I also configured the switch to point to my nox controller. I was using dpctl to see if the switches connect and they dont. I am using Ubuntu to run NOX --Elias On Feb 28, 2012, at 4:25 PM, Murphy McCauley jam...@nau.edu wrote: OpenFlow version 2.02 doesn't mean anything to me. What kind of switches are you using? What IP address are you using with dpctl? The switch? In general, switches make active connections (they initiate a connection to the controller/NOX), so it's not listening on port 6633. Sometimes switches can also be configured to listen too, but it depends on the switch and on the configuration. More to the point, you say that you're trying to get NOX to send messages to the switch, but dpctl doesn't have anything to do with that. Have you configured the switches to connect to the IP that you're running NOX on? If you run NOX and set it to listen for connections, do the switches connect? What commandline are you running NOX with? -- Murphy On Feb 28, 2012, at 3:11 PM, Elias Marti Paz-Rudolph wrote: Hello, I am in the beginning stages of implementing an OpenFlow network. I believe i have configured my switch correctly. I am trying to get NOX to send messages to the switch. When i send dpctl dump-tables tcp:xxx.xx.xx.xxx:6633 i get a connection refused message back. I am using NOX version 0.9.0 and OpenFlow version 2.02 Can you help me this is? Thanks Elias Elias Paz CompE Undergraduate member of HESO Hispanic Engineering and Science Organization(SHPE/MAES) nmeli...@unm.edu (505) 550-9554 ___ 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 configure an OpenFlow network in in-band mode?
There are multiple ways that you can set up in-band control, and I believe support varies depending on the specific type of switch you're using, so you will probably get a better response by asking the specific switch vendor. (By the way, your message was posted to the list like five or six times. I am guessing this is because you kept getting strange responses because you not only sent to nox-dev, but to nox-dev-request. Please send messages to the list only to nox-dev.) -- Murphy On Feb 28, 2012, at 5:55 PM, chenyangseamoon wrote: Hi, I'd like to configure an OpenFlow network in in-band mode. Which document should I refre to? And if the OpenFlow network is configured in this mode how can each OFSwitch connect to the nox controller and how does NOX controller communicate to each OFSwitch?Is there any mechanism that allows OFSwitch to discover its neighbor OFSwitch? My OpenFlow network topology looks like this. Only OFSwitch1 connects to NOX controller .NOX Controller... clietnt1---OFSwtich2OFSwitch1---OFSwitch3---client2 client1 IP:192.168.1.1 client2 IP:192.168.1.2 NOX controller IP:192.168.1.10 The NIC of OFSwich1 connects to NOX controller IP:192.168.1.3 Other OFSwitches' NIC has no IP Address 2012-02-29 chenyangseamoon ___ 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] ports statistics questions
Ah, I begin to see the problem here. :) The ports that the port stats are referring to are *switch ports*. Like the ethernet and wifi interfaces. Not TCP/UDP ports. If you want to gather statistics on TCP/UDP ports, you do that by installing flows that match on those TCP/UDP ports and then monitoring the flow stats. -- Murphy On Feb 18, 2012, at 1:53 AM, Diana Marosin wrote: Hello, I use a Linksys wrt54gl, v1.1. With Wireshark I can identify ports 46245 for ACK controller - switch and 22 for the SSH PC - switch, in nox the output is totally different. In nox, if I use the monitoring.py I receive empty stats and ports 1 and 65534, but if I use the packet_in_callback I can extract the port from the packet (here the 22 for the ssh) Maybe I misunderstood what those stats should show, but please point me in the right direction. My output is in this form : Aggregate stats in from datapath 58:6d:87:62:f8:b1 {'packet_count': 0L, 'byte_count': 0L, 'flow_count': 0L} packet_in_callback: 58:6d:87:62:f8:b1 ssh packet received on port 22 Table stats in from datapath 58:6d:87:62:f8:b1 hash2 : 0 linear : 0 Port stats in from datapath 58:6d:87:62:f8:b1 1 : 4162 65534 : 0 My code is bellow: def aggregate_timer(self, dpid): flow = ofp_match() flow.wildcards = 0x self.ctxt.send_aggregate_stats_request(dpid, flow, 0xff) self.post_callback(MONITOR_TABLE_PERIOD, lambda : self.aggregate_timer(dpid)) def table_timer(self, dpid): self.ctxt.send_table_stats_request(dpid) self.post_callback(MONITOR_TABLE_PERIOD, lambda : self.table_timer(dpid)) def port_timer(self, dpid): self.ctxt.send_port_stats_request(dpid, OFPP_NONE) self.post_callback(MONITOR_PORT_PERIOD, lambda : self.port_timer(dpid)) # For each new datapath that joins, create a timer loop that monitors # the statistics for that switch def datapath_join_callback(self, dpid, stats): print datapath_join_callback: , longlong_to_octstr(dpid)[6:] self.post_callback(MONITOR_TABLE_PERIOD, lambda : self.table_timer(dpid)) self.post_callback(MONITOR_PORT_PERIOD + 1, lambda : self.port_timer(dpid)) self.post_callback(MONITOR_AGGREGATE_PERIOD + 2, lambda : self.aggregate_timer(dpid)) def aggregate_stats_in_handler(self, dpid, stats): print Aggregate stats in from datapath, longlong_to_octstr(dpid)[6:] print '\t',stats def table_stats_in_handler(self, dpid, tables): print Table stats in from datapath, longlong_to_octstr(dpid)[6:] for item in tables: print '\t',item['name'],':',item['active_count'] def port_stats_in_handler(self, dpid, ports): print Port stats in from datapath, longlong_to_octstr(dpid)[6:] for item in ports: print '\t',item['port_no'],':',item['rx_packets'] def packet_in_callback(self, dpid, inport, reason, len, bufid, packet): flow=extract_flow(packet) if flow['tp_dst'] == 22: print packet_in_callback: , longlong_to_octstr(dpid)[6:] print ssh packet received on port 22 def install(self): self.register_for_packet_in(self.packet_in_callback) self.register_for_datapath_join(lambda dpid, stats : self.datapath_join_callback(dpid,stats)) self.register_for_table_stats_in(self.table_stats_in_handler) self.register_for_port_stats_in(self.port_stats_in_handler) self.register_for_aggregate_stats_in(self.aggregate_stats_in_handler) Thank you! Diana On Fri, Feb 17, 2012 at 2:14 PM, Murphy McCauley jam...@nau.edu wrote: What type of switch are you using, and are you sure that it's reporting the ports correctly? I assume your ssh traffic should be going through multiple ports... The first thing I'd suggest is that you check the control traffic with Wireshark and the OpenFlow dissector to see if what's coming across the wire is consistent with what you see in NOX. -- Murphy On Feb 17, 2012, at 5:02 AM, Diana Marosin wrote: Hello, I am trying to retrieve the ports statistics from an openflow switch using nox. I tried to use the coreapp/ examples /monitoring.py script, but no matter what I do (for example a ssh) I retrive only ports 1 (rx_packets values are always increasing) and 65534 (rx_packets = 0). If I use the packet_in_callback then from the packet I can extract the port number, but the parameter inport is 1 (not as I would expect). Any idea on what is happening and why the stats don't work? I mention I use NOX 0.9.1-full-beta compiled with OpenFlow 0x01. Thank you, Diana ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] NOX requires OpenSSL
Do you have the openssl-devel package installed? -- Murphy On Feb 9, 2012, at 1:51 AM, Prashanth Prahalad wrote: Hi Folks, I'm seeing this error when running ../configure on Centos. I did see some other threads with similar issues here (http://noxrepo.org/pipermail/nox-dev/2011-October/008152.html). Openssl is installed and available. I'm already using destiny branch. Here's the ../configure output : checking for openssl/md5.h... no configure: error: openssl/md5.h not found. NOX requires OpenSSL Any ideas ? Thanks ! Prashanth ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] FW: Nox question
So the parameters for the packet_in callback are: dpid, inport, reason, len, bufid, packet The last one is an ethernet object from src/nox/lib/packet/ethernet.py. For IP packets, this ethernet object will then reference an ipv4 object which then might reference a tcp object. So for example, you might write something like: def packet_in_callback (dpid, inport, reason, len, bufid, packet): ip = packet.find(ipv4) if ip is not None: tcp = ip.find(tcp) if tcp is not None: print %s:%i - %s:%i % (ip.srcip, tcp.srcport, ip.dstip, tcp.dstport) (Apologies if that doesn't just work; I didn't try it and my NOX is getting a little rusty.) Hopefully that'll get you started. -- Murphy On Feb 4, 2012, at 6:58 AM, Gabe Bassett wrote: Please see the question below. If you can point me in the right direction, I’d appreciate it! Gabe From: Gabe Bassett Sent: Friday, February 03, 2012 5:55 PM To: 'yap...@stanford.edu' Subject: Nox question Hi, I’m trying to learn openflow by building on the nox switch tutorial (as well as learning python in the process). Could you help me with a quick question? What is the best way to access the Source and Destination IP addresses and Ports? Is there any way to reference it with just the information passed to the register_for_packet_in() event handler that gets passed through packet_in_callback to learn_and_forward? Thanks for the help. Gabe ___ 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 use own controller in custom topology
This seems to be much more of a mininet question than a NOX question, and you should probably be asking about it somewhere else. For example, there is a mininet mailing list at: https://mailman.stanford.edu/mailman/listinfo/mininet-discuss That said, the problem here is that the value you pass in as controller in the Mininet constructor is later used by addController() to actually construct the controller object. In your case, your lambda function only takes one parameter -- the name. Thus, the port parameter is meaningless. You could fix up the function you pass into the Mininet constructor (to take keyword arguments and pass them along to the NOX constructor), but I don't think it's really necessary. I think you can just do: net = Mininet() c1 = net.addController(c1, NOX, noxArgs=myswitch, port=6633) noxArgs just gets spliced into the commandline for NOX. You should be able to create multiple controllers this way, but as far as I know, for this to be useful, you'll also need to subclass a switch class (e.g., OVSKernelSwitch) or pass in a factory to the Mininet constructor which actually assigns different switches to different controllers. I believe as it is, switches are always just given to the first controller (if anyone knows me to be wrong on that, I'd be interested in knowing). As for why pinging doesn't work -- your controller is broken or you don't have the proper links in place. If you start with mininet's emptynet.py example, switch it to use the controller-adding code given above, but specify the normal pyswitch component -- you should find that pinging works. -- Murphy On Jan 31, 2012, at 6:45 AM, Baraki Halefom wrote: Dear all, I have built a simple custom topology network in mininet. and want to use a my own controller in the topology. as follows; net = Mininet(controller= lambda name: NOX(name ,'myswitch')) # where 'myswitch' is a learning switch component also to add multiple controllers to the topology I did the following additions c1 = net.addController('c1', port = 6633) c2 = net.addController('c2', port = 6634) when I run the topology I got the following error controller_new = controller(name,**kwargs) TypeError:lambda() got an unexpected key word argument 'port' in addition pinging between hosts attached to different switches is not working. How can I resolve this? Sincerely, -- Baraki H. Abay Department of Math and Computer science North Carolina Central University Durham, 27707 NC ___ 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
I believe it defaults to port 2703. You should be able to set the port number by specifying it on the commandline... ./nox_core -i ptcp: jsonmessenger=tcpport=4096 your_app_here It listens on all IP addresses; there is currently no way to specify just one. -- Murphy On Jan 25, 2012, at 1:11 PM, Giorgio Mazza wrote: A question about the socket opened when invoking jsonmessenger. What are the IP address, the tcp port and the interface that this socket refers to? Is there any way to set them? I undersotood the mechanism, but I don't know where to send my messages from the external application. Thank you. Regards, Giorgio On 24/01/2012 13:49, Murphy McCauley wrote: The minimum to get up and going should be something like this: 1) In your component's install function: from nox.coreapps.messenger.pymsgevent import JSONMsg_event JSONMsg_event.register_event_converter(self.ctxt) self.register_handler(JSONMsg_event.static_get_name(), myHandler) 2) Implement a handler: def myHandler (e): import json print json.loads(e.jsonstring) e.reply(json.dumps({msg:Hello world})) 3) Include jsonmessenger on the commandline or as a dependency That may not be exactly correct -- it's adapted from a quick writeup I did in December about using the new Python support for the regular messenger (as opposed to the JSON messenger), which has not yet been pushed to the repository. For reference, that post was: http://noxrepo.org/pipermail/nox-dev/2011-December/008382.html (If using the new version of messenger that I linked to in that post, you remove the register_event_converter() call from step 1 and include pyjsonmessenger instead of jsonmessenger in step 3.) Invoking the jsonmessenger component (on the commandline or by including it as a dependency in your app's meta.json) will create the server socket for you. You absolutely do not have to use the messenger.py class. I'm removing it from that directory, because all it ever does is confuse people -- it really doesn't belong there. messenger.py is a library for writing JSON messenger *clients* (external programs) in Python. That may be useful to you, but you don't need it for the NOX side of things. Hope that helps. -- Murphy On Jan 24, 2012, at 4:12 AM, Giorgio Mazza wrote: Thank you. I try to sum up the operations I need to perform, to see if I understood correctly. Basically in my external application I have to set up a socket that sends json messages and this would be quite simple. In my nox component, instead, I have to import the JSONMsg_event and, within the install() instruction, to handle it with my specific method, that, in my case, would only save these json messages into a dictionary, for using them later, according to some conditions. Is that correct? A couple of things that I didn't understand: - I assume I also have to set up a server socket in my nox component, in order to receive json messages and handle JSONMsg_events. So, I think this socket has to be already up and running when I handle the event. So, when do I have to create it and how? Do I have to use messenger.py channel class? - Second question, probably related to the first. I think to be pretty confused about jsonmessenger: what are the jsonmessenger files I could look into in order to understand fields and methods that I would need to use? Are the jsonmessenger.cc and jsonmessenger.hh in nox/src/nox/coreapps/messenger? And, if it is the case, how can I integrate them into a python component? Thanks again, Giorgio On 24/01/2012 12:28, Kyriakos Zarifis wrote: Hi Giorgio, yes, I think using jsonmessenger would be the best approach for this. you need to implement a send/receive interface on the external application and in your nox component. For the external application, it's pretty straightforward - Connect to the jsonmessenger socket and send json strings. In your nox application you need to register for JSON messages, and handle them appropriately. The wiki explains the communication in a few steps (specifically for the GUI-NOX, but it will be similar and simpler for any external app) here: If you want to see a full example, the GUI and the monitoring component in destiny could be a place to look. I'm afraid it's much more complex than what you need, but the bits you need are in there if you dig in the code a bit. On Tue, Jan 24, 2012 at 2:16 AM, Giorgio Mazza giorgio.mazza...@gmail.com wrote: Hi all! I have written a simple component in python that works fine. Now I would to improve it, making it to install flow entries depending on parameters received from an external application. In particular I want to pass those parameters via json messages to my component, which, in my thougths, has to open a permanent socket listening for them, save those parameters in a dictionary and, as a consequence, decide the desired
Re: [nox-dev] Error while running nox_core
That fix is actually buggy. :) A better one is in the destiny branch, which is very, very close to being the stable branch. -- Murphy On Jan 21, 2012, at 11:44 AM, Maciej Gałkiewicz wrote: Have anyone implemented a fix for http://noxrepo.org/pipermail/nox-dev/2010-November/006685.html? I am still experiencing the issue. Murphy's fix works fine for me but I would like to have it fixed in stable branch. Murphy fix: I think the fix is to change line 133 in pyoxidereactor.py to: signal.signal(signal.SIGCHLD, lambda : self.callLater(0, reapAllProcesses)) regards M. Galkiewicz ___ 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] ERR:application 'pyswitch' descritpion not found
I imagine this means you're not running destiny, which you may want to consider unless you have a specific reason to use the zaku branch. This almost certainly means that Python is disabled in your build. The most common reasons for this are that you didn't have Twisted or SWIG installed. Please try installing all the packages that the wiki recommends and rebuilding starting with configure. If that doesn't work, examine the output of configure or its log to see why Python is being disabled. Hope that helps. -- Murphy On Jan 20, 2012, at 10:44 AM, Francesco Pocci wrote: Hi, i've tried to run this command #./nox_core -v -i ptcp:6633 pyswitch and i have this error #5|nox|ERR:Application 'pyswitch' descritpion not found. the installation is successful whitout any error. If i run this command #./nox_core -v -i ptcp:6633 the controller starts fine, listening on the right port, but practically does nothing, only creates secure channel and does echo/reply messages with openflow switch. It's seems like if all the python applications don't work (router, switch, ecc). Each command ends with giving the same error. what can i do? Regards, F.P. ___ 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 api development
So my first thought is to wonder what happens if you try with wildcards = 0x... -- Murphy On Jan 18, 2012, at 11:19 PM, edward wilson wrote: hi, Currently im using NOX 0.9.0(zaku)~full~beta (nox_core), compiled Jan 3 2012 15:21:13 Compiled with OpenFlow 0x01 Now i have developed this api for getting aggregrate table stats 1. def aggregate_timer(self, dp): flow = ofp_match() flow.dl_type=ethernet.ethernet.IP_TYPE flow.nw_proto=ipv4.ipv4.ICMP_PROTOCOL self.ctxt.send_aggregate_stats_request(dp, flow, 0xff) self.post_callback(MONITOR_TABLE_PERIOD, lambda : self.aggregate_timer(dp)) Now when i connect nox controller to switch and display the aggregrate statistics i get Aggregate stats in from datapath 2c:27:d7:1d:08:7d packet_count-- 0 flow_count-- 0 byte_count-- 0 however i have a rule with nw_proto=icmp and dl_type=ip, and packets do match this rule but still statistics are displayed as zero. 2. Even if i use following definition def aggregate_timer(self, dp): flow = ofp_match() flow.wildcards=0x self.ctxt.send_aggregate_stats_request(dp, flow, 0xff) self.post_callback(MONITOR_TABLE_PERIOD, lambda : self.aggregate_timer(dp) now in this case statistics should be displayed for all rules but again the aggregrate statistics displayed are zero. Aggregate stats in from datapath 2c:27:d7:1d:08:7d packet_count-- 0 flow_count-- 0 byte_count-- 0 Please let me know if am missing something. regards ___ 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] Python API buffer_id None problems
Can you please show us the code you are using to call send_openflow()? -- Murphy On Jan 17, 2012, at 1:40 AM, Peter Peresini wrote: Hi developers. It seems that there is an inconsistency in python API (destiny branch) for using buffer_id. Namely, send_openflow documentation states that buffer_id -1 should be used to indicate no buffer but in the fact it tests for None. But apart from that, if you supply None to this function the call will fail with the following error: (openflow typemap) py argument to Buffer must be of type str, instead received nox.lib.packet.ethernet.ethernet instance at 0x7fbe65001b90 as far as I can tell, the problem occurs inside the call self.ctxt.send_openflow_packet_acts(dp_id, packet, oactions, inport) in the send_openflow_packet() function. Any idea what might be the problem? I can debug it even more if you tell me where to find the implementation of context. Kind regards Peter Peresini ___ 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] Python API buffer_id None problems
You're right about the documentation and the implementation being mismatched. The implementation is correct, the documentation is outdated. The error you see when you pass None as the buffer ID is almost certainly in your code and not in NOX. The error message is not that clear, but it's telling you that the packet argument must be a str, and you are passing an ethernet object from the packet library. You need to either convert this to a string (packet.tostring()), or try to use the original buffer (packet.arr or packet.arr.tostring(); I can't remember). Hope that helps. -- Murphy On Jan 17, 2012, at 5:31 AM, Peter Peresini wrote: I can reproduce it with following simple command, packet is the packet received in packet_in_callback, actions is a combination of setting ToS and forwarding to a single port. self.send_openflow(datapath_id, None, packet, actions, inport=inport) Kind regards Peter On Tue, Jan 17, 2012 at 11:42 AM, Murphy McCauley jam...@nau.edu wrote: Can you please show us the code you are using to call send_openflow()? -- Murphy On Jan 17, 2012, at 1:40 AM, Peter Peresini wrote: Hi developers. It seems that there is an inconsistency in python API (destiny branch) for using buffer_id. Namely, send_openflow documentation states that buffer_id -1 should be used to indicate no buffer but in the fact it tests for None. But apart from that, if you supply None to this function the call will fail with the following error: (openflow typemap) py argument to Buffer must be of type str, instead received nox.lib.packet.ethernet.ethernet instance at 0x7fbe65001b90 as far as I can tell, the problem occurs inside the call self.ctxt.send_openflow_packet_acts(dp_id, packet, oactions, inport) in the send_openflow_packet() function. Any idea what might be the problem? I can debug it even more if you tell me where to find the implementation of context. Kind regards Peter Peresini ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] need support for these features in NOX
The enqueue action is supported in destiny. Flow stats are possible (there has been some recent discussion about it on the list, I believe). I'm not sure what you mean by queue statistics. Matches support wildcards to the extent offered by OpenFlow 1.0. I'm actually not sure about fragments. If I recall correctly, this is more a function of the switch rather than the controller. I'm not sure what you mean by supporting those errors. The controller receives error the messages, so... yes? You also haven't mentioned whether you're interested in the Python or the C++ API, and support differs somewhat across languages. -- Murphy On Jan 15, 2012, at 7:55 PM, Sheili Mittal wrote: Hi Murphy, Thanks for this quick response, I needed that data urgently. Can you please confirm are the below mentioned features supported in destiny branch? I saw destiny branch is unstable on NOX site so I used 0.9 zaku. Thanks Regards, Sheili Mittal From: Murphy McCauley [mailto:jam...@nau.edu] Sent: 16 January 2012 09:22 To: Sheili Mittal Cc: nox-dev@noxrepo.org Subject: Re: [nox-dev] need support for these features in NOX The most recent branch is destiny. -- Murphy On Jan 15, 2012, at 7:49 PM, Sheili Mittal wrote: Hi, I am using NOX 0.9 zaku, following is not supporting in this, Can anyone please confirm in which branch of NOX all the following supported:- 1) Action Enqueue 2) Flow statistics 3) Queue statistics 4) Wilcard ( ANY and other wildcard of openflow 1.0) 5) L3 matching on IP fragment 6) Error message – OFPET_FLOW_MOD_FAILED OFPET_PORT_MOD_FAILED OFPET_QUEUE_OP_FAILED Regards, Sheili DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NECHCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NECHCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . --- ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NECHCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NECHCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . --- ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] NOX for 64 bit
destiny is routinely run on both 32 and 64 bit systems. -- Murphy On Jan 16, 2012, at 12:52 AM, Sheili Mittal wrote: Hi, Can you please confirm are the branch available on git (0.9 zaku) and destiny supported for 64 bit machine also? Are the version we downloading from git is for 32bit and 64 bit both? Thanks Regards, Sheili Mittal DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NECHCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NECHCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . --- ___ 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 for 64 bit
Probably no major problems, but there might be minor ones. I honestly don't remember; I have not run zaku in quite some time. Unless you're already running it, there are only a few good reasons to run zaku now. -- Murphy On Jan 16, 2012, at 1:01 AM, Sheili Mittal wrote: Thanks Murphy Please confirm for NOX 0.9 zaku as well? Regards, Sheili From: Murphy McCauley [mailto:jam...@nau.edu] Sent: 16 January 2012 14:29 To: Sheili Mittal Cc: nox-dev@noxrepo.org Subject: Re: [nox-dev] NOX for 64 bit destiny is routinely run on both 32 and 64 bit systems. -- Murphy On Jan 16, 2012, at 12:52 AM, Sheili Mittal wrote: Hi, Can you please confirm are the branch available on git (0.9 zaku) and destiny supported for 64 bit machine also? Are the version we downloading from git is for 32bit and 64 bit both? Thanks Regards, Sheili Mittal DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NECHCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NECHCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . --- ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NECHCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NECHCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . --- ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] questions regarding OFPAT_STRIP_VLAN
Do you mean support creating flows using the OFPAT_STRIP_VLAN, OFPAT_SET_NW_SRC, OFPAT_SET_NW_DST, and OFPAT_SET_NW_TOS action types? If so, all of these should be available if you are using the destiny branch. -- Murphy On Jan 16, 2012, at 8:15 AM, Alexander Cheskis wrote: Dear All, We're working on test suite, which should implement all OF 1.0 features. If somebody add OFPAT_STRIP_VLAN, modify IP and TOS fileds to nox sources? Thanks Alexander ___ 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] attribute '_handleSigchld'
I believe you can safely just remove the offending line from pyoxidereactor (the signal.signal(signal.SIGCHLD, self._handleSigchld) one). If not, the current version of pyoxidereactor (from the destiny branch) should fix this in a way which doesn't require you to modify your system's Twisted installation. -- Murphy On Jan 16, 2012, at 1:38 PM, Nikhil Handigol wrote: Hi Vjeko, I'm facing a similar issue. I recently upgraded twisted to 11.0 and found that an older (customized) version of nox crashes with the same error. Can you tell me to which class in '/usr/lib/python2.6/dist-packages/twisted/internet/base.py' should I add the _handleSigchld function? Thanks, -- Nikhil On Fri, Aug 6, 2010 at 1:58 PM, Vjekoslav Brajkovic bal...@cs.washington.edu wrote: Hi Tim! You are correct. After adding the following function definition to '/usr/lib/python2.6/dist-packages/twisted/internet/base.py', the problem seems to be gone. def _handleSigchld(self, signum, frame, _threadSupport=platform.supportsThreads()): from twisted.internet.process import reapAllProcesses if _threadSupport: self.callFromThread(reapAllProcesses) else: self.callLater(0, reapAllProcesses) Thanks a bunch! Vjeko On Fri, Aug 06, 2010 at 04:30:28PM -0400, tim.upthegr...@gatech.edu wrote: Hi Vjekoslav, I had this issue before after doing a fresh install on a Debian sid machine using the openflow-1.0 branch. What I found is, the function _handleSigchld has been moved-around/removed from more recent versions of TwistedPython. The fix I found was to go grab Twisted 8.0 and install it. I haven't tested the controller in a production setup yet, but the source compiles and I can run a simple switch without getting any error messages. Give that a shot and see if it works. Best of luck, Tim Upthegrove Georgia Institute of Technology College of Computing (406)-437-1493 - Vjekoslav Brajkovic bal...@cs.washington.edu wrote: Hello. After I upgraded my system, I've been having trouble starting NOX. This is the error message: 2|nox|ERR:Cannot change the state of 'python' to INSTALLED: 'python' ran into an error: Unable to construct a Python component: Traceback (most recent call last): File ./nox/coreapps/pyrt/pyoxidereactor.py, line 364, in instance return pyoxidereactor(ctxt) File ./nox/coreapps/pyrt/pyoxidereactor.py, line 133, in __init__ signal.signal(signal.SIGCHLD, self._handleSigchld) AttributeError: 'pyoxidereactor' object has no attribute '_handleSigchld' Any clues to why this might be happening? Thanks! Vjeko ___ 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 ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Error while installing NOX on Fedora release 14
First, can you please switch to the destiny branch (git checkout -b destiny origin/destiny) and try again? If that doesn't work, can you please post your config.log and the full output of configure? -- Murphy On Jan 14, 2012, at 5:23 PM, Dushyant Arora wrote: Hello Murphy, John, I tried both the solutions and I still get the same error when I run configure. I tried running: ../configure --with-boost-filesystem=boost_filesystem --with-boost-unit-test-framework=mt LDFLAGS='-L/usr/include/openssl -lssl -lcrypto' but it doesn't help. I have installed all the packages that you mentioned in your mails. I already had boost-devel and boost-system. What should I do now? Thanks, Dushyant - Original Message - From: John Meylor mey...@incntre.iu.edu To: Dushyant Arora dushy...@cs.princeton.edu Cc: nox-dev@noxrepo.org, Murphy McCauley jam...@nau.edu Sent: Saturday, January 14, 2012 11:34:59 AM Subject: Re: [nox-dev] Error while installing NOX on Fedora release 14 On RHEL6/RHEL5, we use the following; Fedora 14 should be similar. sudo yum install gcc-c++ boost-devel openssl-devel automake autoconf swig git libtool libtool-dev python-devel python-twisted python-simplejson git clone git://noxrepo.org/nox ./boot.sh mkdir build cd build ../configure --with-boost-filesystem=boost_filesystem --with-boost-unit-test-framework=mt LDFLAGS='-L/usr/include/openssl -lssl -lcrypto' make cd src make check --John On Jan 14, 2012, at 4:19 AM, Murphy McCauley wrote: I'm not a Fedora user, but try installing boost-system and boost-devel. -- Murphy On Jan 14, 2012, at 1:11 AM, Dushyant Arora wrote: Hello, I am trying to install NOX by following the instructions on NOX Wiki. I get an error while running ~/nox/configure checking for boostlib = 1.34.1... yes checking whether the Boost::System library is available... yes configure: error: Could not find a version of the library! Is there some dependency that I might be missing? Thanks, Dushyant ___ 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] need support for these features in NOX
The most recent branch is destiny. -- Murphy On Jan 15, 2012, at 7:49 PM, Sheili Mittal wrote: Hi, I am using NOX 0.9 zaku, following is not supporting in this, Can anyone please confirm in which branch of NOX all the following supported:- 1) Action Enqueue 2) Flow statistics 3) Queue statistics 4) Wilcard ( ANY and other wildcard of openflow 1.0) 5) L3 matching on IP fragment 6) Error message – OFPET_FLOW_MOD_FAILED OFPET_PORT_MOD_FAILED OFPET_QUEUE_OP_FAILED Regards, Sheili DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NECHCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NECHCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . --- ___ 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] Recieved LLDP packet from unconnected switch
I'd suggest that you don't skip to zaku but skip to destiny instead. If you still have this problem in destiny, can you please tell us about your setup? Like switch types (ProCurve?), whether you are using FlowVisor, etc.? -- Murphy On Jan 14, 2012, at 7:31 AM, Theophlius Benson wrote: I'm making the switch from NOX 0.8.0~full~beta (nox_core) to NOX 0.9.0(zaku)~full~beta I go zaku from git and have made no modifications. I'm testing out the routing module and noticed that the discovery module is print out some weird errors and it is unable to discover any links . Note, when I do switch to the old version .. these links are discovered and routing module works appropriately. The errors are below. Did the format of the dpid change between versions? In the past version the switches had this DPID 002347cc4400 but now they have 06d6002347cc4400 00623|openflow-event|DBG:received packet-in event from 06d6002347cc4400 (len:128) 00624|discovery|DBG:Recieved LLDP packet from unconnected switch 00625|openflow-event|DBG:received packet-in event from 06d6002347cc4400 (len:34) 00626|discovery|DBG:Recieved LLDP packet from unconnected switch 00627|openflow-event|DBG:received packet-in event from 06d6002347cc4400 (len:34) 00628|discovery|DBG:Recieved LLDP packet from unconnected switch ___ 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] Topology component and FlowVisor.
There have been some changes to logging. Use -v -v. -- Murphy On Jan 12, 2012, at 10:10 AM, Sergio Jiménez Feijóo wrote: Hi Aaron, I have moved to the destiny branch and compiled everything again. The topology component seems to work fine (I can see new link detected messages in the log) but now I can't see the log messages of my application (VLOG_DBG function) despite I'm running NOX with the -v flag. My application isn't working properly yet but until I can see those log messages I won't be able to find the cause of the new problem. In response to Ali: I Have tested my application in another testbed without flowvisor but I can't run it in this testbed without flowvisor. I can't disable FlowVisor because I'm using the OFELIA project infraestructure (I share the devices with other experimenters): http://www.fp7-ofelia.eu/ofelia-facility-and-islands/equipment/ Thank you. El 12/01/2012 18:08, Aaron Rosen escribió: If you do a packet dump at the flowvisor do you see vlan tags on these LLDP packets returned to you? I'm guessing the LLDP packets that are returned to you from the switch (Via PACKET_IN) ) do not have VLAN tags correct? (The switch takes them off since this switch isn't acting as a pure of switch. Only this one vlan is being openflow controlled. ) This is the same reason why your controller does not need to know which vlan tag you are using on the switch. When the controller sends a LLDP packet to the switch the switch will output that packet on the correct port and automatically add the tag for you. You said this was working with out flowvisor right? If you run git branch from the nox directory what does it say? Aaron 2012/1/12 Sergio Jiménez Feijóo jjji...@gmail.com Hi Aaron, My application that runs on NOX examines the packets and forwards them keeping the same VLAN ID tag. But how does the topology module tell the switches that they must send the LLDPs with a certain VLAN ID tag? The topology module is independent from my application and I can't controle it. If the topology module sends the LLDPs packets without the proper VLAN tag they won't be forwarded to my controller (because they won't belong to my FlowVisor flowspace). This is just a supposition but I think this may be the cause of the problem. Thank you for your help. El 12/01/2012 16:25, Aaron Rosen escribió: Did you do git checkout -b destiny When the controller sends the LLDP packet it won't have a vlan tag. Once it leaves the switch, the switch will add your tag for you. I don't think that's the problem. Aaron 2012/1/12 Sergio Jiménez Feijóo jjji...@gmail.com Hi Aaron, I'm using the latest version (I think). I downloaded it from the git repository by the command git clone git://noxrepo.org/nox a few days ago. My flowspace consists on tagging all my trafic with a certain VLAN ID (VLAN 13). All the traffic tagged with that VLAN ID belongs to my flowspace. Is it possible that the topology component isn't sending the LLDP frames tagged with the proper VLAN ID? How can I force the topology component to send the LLDP frames tagged with a certain VLAN ID? Thank you. El 12/01/2012 15:33, Aaron Rosen escribió: P.S: Which version of nox are you running? I believe this works fine in destiny. Aaron 2012/1/12 Aaron Rosen aro...@clemson.edu Hi, I've encountered an issue like this before with flowvisor and the discovery module. The easiest thing to do is to change the lldp value in ./src/nox/lib/packet/ethernet.py #LLDP_TYPE = 0x88cc LLDP_TYPE = new_value then add this new_value, ether_type to your slice. Hopefully that will do the trick. Aaron 2012/1/12 Sergio Jiménez Feijóo jjji...@gmail.com Hi guys, I've developed a NOX aplication which needs to use the topology component to discover the network topology. I've tested my application in a testbed of 6 Linksys WRT54GL running the OpenWRT Pantou firmware (without flowvisor) and it worked like a charm. Now I'm testing my aplication in a testbed of 5 NEC IP8800/S3640-24T2XW (with flowvisor) and the topology detection isn't working at all (the data struct is empty). Since OpenFlow allows an application to run in different devices I've discarded the fact of using new switches as the cause of the error. Therefore I think flowvisor is causing the topology component not to run properly. Is this possible? Have you experienced any problems with flowvisor and NOX? Thank you. http://homestore.cisco.eu/store/ciscoeu/en_IE/pd/productID.241269400 http://www.openflow.org/wk/index.php/Pantou_:_OpenFlow_1.0_for_OpenWRT http://yuba.stanford.edu/foswiki/bin/view/OpenFlow/Deployment/Vendor/NEC ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev -- Aaron O. Rosen Masters Student - Network Communication
Re: [nox-dev] features-reply without features-request
I can't speak as to the particulars of the reference switch (you might try one of the OpenFlow mailing lists). However, the spec does state that part of the handshake sequence is that the controller sends a features request when a connection is established. I don't see this in your sequences of messages below. NOX should do this. Are you using NOX? If so, is it possible you missed this message (remember that multiple OpenFlow messages can be in the same packet, so it is possible it's in packet #4 along with the HELLO or something -- you'll have to look at the detail view of the packet, not just the summary line)? If the message really isn't there, I suppose it's possible that ofprotocol does this proactively, but in this case I believe your controller is out of spec. -- Murphy On Jan 11, 2012, at 6:00 AM, Cayle Spandon wrote: Are OpenFlow controllers expected to process unsolicited feature-reply messages? I am running the following setup: controller - ofprotocol - ofdatapath Using wireshark I see the following sequence of messages: #1 ofprotocol - ofdatapath : hello #2 ofprotocol - controller : hello #3 ofdatapath - ofprotocol : hello #4 controller - ofprotocol : hello #5 ofprotocol - ofdatapath : features-request #6 ofdatapath - ofprotocol : features-reply #7 ofprotocol - controller : features-reply This means that the controller gets a features-reply even though it never sent a features-request. It appears that ofprotocol originates the features-request to the switch (which is somewhat surprising because I thought it was supposed to be a dumb pass-through) and the forwards the features-reply to the controller. ___ 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 messenger example for external c++ and nox python
Actually, no. The version I posted has Python support for the plain messenger too, not just the JSON messenger. But it sounds like you're satisfied with using the JSON messenger. See the channel.receive() method in nox/coreapps/messenger/messenger.py. But really this is just simple socket IO. Hope that helps. -- Murphy On Jan 9, 2012, at 11:00 PM, Harshil Anil Kumar Shah wrote: Hi Murphy, Thanks for the reply. I am using the Zaku beta version. I guess it is the same library that you sent. But one question I have is, I got some working example of send() function from nox-send-cmd.py but for recv() function, I can’t find example. How can I use recv() functionof messenger.py?? Thanks, Harshil From: Murphy McCauley [mailto:jam...@nau.edu] Sent: Wednesday, December 21, 2011 4:47 PM To: Harshil Anil Kumar Shah Cc: Kyriakos Zarifis; nox-dev@noxrepo.org Subject: Re: [nox-dev] Nox messenger example for external c++ and nox python No, the plain messenger is not exposed to Python. Kyriakos and I did enough of the JSON messenger to get monitoring working, but never did the normal messenger. The messenger.py should really be named messenger_client.py, and maybe shouldn't even be in that directory -- it's a library for writing messenger clients, and not a NOX component. I've taken a quick stab at exposing the plain messenger to Python. You can grab my current messenger directory from: http://www.noxathome.org/x/Murphy/messenger/messenger.zip Using it is very much like using jsonmessenger (as monitoring does). Something like: 1) In your component's install function: from nox.coreapps.messenger.pymsgevent import Msg_event self.register_handler(Msg_event.static_get_name(), myHandler) 2) Implement a handler: def myHandler (e): print e.type, e.body 3) Include pymessenger on the commandline or as a dependency Messages for messenger are prefixed with a three byte header: 2 Byte Network Order Unsigned Integer: Message length (including header) 1 Byte: Message type (can be anything, but I think 0-9 are reserved -- see messenger.hh) Hope that's useful. -- Murphy On Dec 21, 2011, at 2:46 AM, Harshil Anil Kumar Shah wrote: Thanks Murphy. I guess 2nd option is the better to go with. Can I use boost.python for that? And I guess plain messenger is exposed to python. There are messenger.py and messenger.cpp/hh files corresponding to plain messenger. -Harshil From: Murphy McCauley [mailto:jam...@nau.edu] Sent: Wednesday, December 21, 2011 2:33 PM To: Harshil Anil Kumar Shah Cc: Kyriakos Zarifis; nox-dev@noxrepo.org Subject: Re: [nox-dev] Nox messenger example for external c++ and nox python So NOX's messenger is a fairly generic method for communicating with external applications over a socket. Built on top of this is jsonmessenger which communicates JSON messages over a socket. If you specifically want to use protobufs (and not JSON messages), then you'd want to use the plain messenger. However, the plain messenger is not exposed to Python -- only jsonmessenger is. So I think your options are: 1) Use JSON messages instead of protobufs, and just use jsonmessenger 2) Expose messenger to Python, and then use this to send/receive protobufs 3) Use protobufs and roll your own method for communicating with your external application (probably using Twisted) -- Murphy On Dec 20, 2011, at 11:02 PM, Harshil Anil Kumar Shah wrote: Hi Murphy. Yes, I have external C++ module which I want to communicate with Nox python module using protobuf. I am using libjson library at C++ module. -Harshil. From: Murphy McCauley [mailto:jam...@nau.edu] Sent: Wednesday, December 21, 2011 1:38 AM To: Harshil Anil Kumar Shah Cc: Kyriakos Zarifis; nox-dev@noxrepo.org Subject: Re: [nox-dev] Nox messenger example for external c++ and nox python Do you mean that you have some external program (written in C++) that you want to communicate with a NOX component (written in Python)? jsonmessenger works by sending and receiving JSON (http://json.org) messages. So on the NOX side, you use jsonmessenger. In the external program, you can use any of several libraries for doing JSON encoding/decoding. -- Murphy On Dec 20, 2011, at 1:09 AM, Harshil Anil Kumar Shah wrote: Hi, In my case where external module is C++ then can I use “pyobject” to interact with python module? From: Harshil Anil Kumar Shah Sent: Monday, December 19, 2011 3:32 PM To: 'Kyriakos Zarifis' Cc: nox-dev@noxrepo.org Subject: RE: [nox-dev] Nox messenger example for external c++ and nox python Thanks Zarifis… I looked at GUI example. It seems very useful. But in my case, client is external C++ module. So in that case do I have to use use messenger.cpp?? -Harshil. From: nox-dev-boun...@noxrepo.org [mailto:nox-dev-boun...@noxrepo.org] On Behalf Of Kyriakos
Re: [nox-dev] nox-gui flowtracer problem
Right; I was unclear earlier. This bug should only appear on 32 bit Pythons. On Pythons with 64 bit integers, these are not long integers and have no L suffix. This is basically a bad behavior for the hex() function, and I believe this was *intended* to be fixed in Python 2.x, but was accidentally missed and now is only fixed in Python 3. The solution for us is to use 0x%x % (n,)) or hex(n).rstrip(L) or something instead of the plain hex(n). We'll push a fix for this at some point. Thanks again for pointing out the problem. -- Murphy On Jan 8, 2012, at 11:04 PM, wunyuan wrote: Dear Murphy, My NOX controller is 32 bit and two clients are 32 bit. When the two clients ping each other, this problem still occur. Wun-Yuan 於 2012/1/6 上午 09:39, wunyuan 提到: Dear Murphy, I forgot that our client are 64 bit version.Thanks for your reminding me. 於 2012/1/5 下午 06:11, Murphy McCauley 提到: Ah, of course, you must be running a 32 bit version. We should fix this (maybe by replacing hex(n) with 0x%x % (n,)). Thanks for humoring me. -- Murphy On Jan 5, 2012, at 2:03 AM, wunyuan wrote: Hi, The answers are as follows: 於 2012/1/5 下午 05:46, Murphy McCauley 提到: I'm a bit surprised. Can you try /usr/bin/python -V? Yes nchc@NCHC:/usr/bin$ ./python -V Python 2.7.1+ What OS / distro are you using? nchc@NCHC:/usr/bin$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:Ubuntu 11.04 Release:11.04 Codename: natty -- Murphy On Jan 5, 2012, at 1:35 AM, wunyuan wrote: Hi, My python version is 2.7.1+. $~/wunyuan/oringinal_nox/destiny/nox/src$ python -V Python 2.7.1+ Thanks! 於 2012/1/5 下午 05:26, Murphy McCauley 提到: Are you using Python 2.5? I am guessing this bug doesn't exist with Python 2.6+... -- Murphy On Jan 4, 2012, at 11:52 PM, wunyuan wrote: Hi, The 0xe4115b1251b4L string is our client internet iterface mac. Our client are HP DL380 G7. Our Openflow are installed in Desktop PC with NetFPGA card. Thanks. 於 2012/1/5 下午 03:33, Kyriakos Zarifis 提到: This seems to be a bug where the component was expecting a hex string, but the L in the end of the long int messes things. Thanks for reporting. What kind of switch are you using? For a temporary fix in your case, try replacing line 95 with: value = int(value[:-1],16) On Wed, Jan 4, 2012 at 11:07 PM, wunyuan wuny...@nchc.narl.org.tw wrote: Dear all, I build a testbed as follows: NOX / \ of1of2 /\ ab Firstly, I set a and b to ping each other. Secondly, I input ./nox_core -v -v -i ptcp:9550 routing lavi monitoring trackhost_pktin to run the NOX. and then start nox-gui. Thirdly, I click FlowTracer botton and then double click of1 node on nox-gui to show its flow entries. Finally, I highlight one entry and click Trace! botton. However,I cannot find any flows on nox-gui and I find one error message. this error message is as follows: File ~/nox/src/gui/views/flowtracer.py, line 95, in trace_flow value = int(value,16) ValueError: invalid literal for int() with base 16: '0xe4115b1251b4L' How could I fix it? -- === 系統與網路技術組-黃文源(Wun- Yuan Huang) 財團法人國家實驗研究院 國家高速網路與計算中心南部事業群 National Center for High-Performance Computing South Region Office 台南縣台南科學園區南科三路28號 No.28, Nan-Ke 3rd. Rd., Science-based Industrial Park, Tainan 744, Taiwan, R.O.C. TEL:06-5050940 ext.751 FAX:06-5050945 E-Mail:wuny...@nchc.narl.org.tw === ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev -- === 系統與網路技術組-黃文源(Wun-Yuan Huang) 財團法人國家實驗研究院 國家高速網路與計算中心南部事業群 National Center for High-Performance Computing South Region Office 台南縣台南科學園區南科三路28號 No.28, Nan-Ke 3rd. Rd., Science-based Industrial Park, Tainan 744, Taiwan, R.O.C. TEL:06-5050940 ext.751 FAX:06-5050945 E-Mail:wuny...@nchc.narl.org.tw === ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev -- === 系統與網路技術組-黃文源(Wun-Yuan Huang) 財團法人國家實驗研究院 國家高速網路與計算中心南部事業群 National Center for High-Performance Computing South Region Office 台南縣台南科學園區南科三路28號 No.28, Nan-Ke 3rd. Rd., Science-based Industrial Park, Tainan 744, Taiwan, R.O.C. TEL:06-5050940 ext.751 FAX:06-5050945 E-Mail:wuny...@nchc.narl.org.tw
Re: [nox-dev] extract_flow not consistent with install_datapath_flow?
Thanks for the report. Since matching on IP addresses in ARPs is an optional switch feature, I don't think it's 100% clear what the function should do, but I don't object to the idea that it should probably just extract the addresses. I'll add it to my queue. -- Murphy On Jan 9, 2012, at 6:28 AM, Peter Peresini wrote: Hi, it seems that util.py extract_flow in destiny branch is not consistent with install_datapath_flow. I tried to install a flow extracted from a packet and the resulting match failed to capture the same packet stream. More precisely, if a packet is an ARP packet, extract_flow returns following attributes: {'dl_type': 2054, 'nw_dst': 0, 'dl_vlan_pcp': 0, 'dl_src': array('B', [0, 0, 0, 0, 0, 11]), 'nw_proto': 1, 'nw_tos': 0, 'tp_dst': 0, 'tp_src': 0, 'dl_dst': array('B', [255, 255, 255, 255, 255, 255]), 'dl_vlan': 65535, 'nw_src': 0} Now If I install the flow using these attributes, the switch still forwards the packets to the controller. I experimentally found that del match[core.NW_DST] del match[core.NW_SRC] solves the problem. According to the http://www.openflow.org/wk/index.php/OpenFlow_1.0_release_notes#Match_on_IP_fields_in_ARP_packets it seems that nw_src and nw_dst should contain actual IPs from ARP and not zeroes. Kind regards Peter Peresini ___ 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 api support for openflow 1.0 spec operation
Item #1: flowtracer and monitoring both do per flow statistics. You might want to examine how they do it (they use pylibopenflow to craft an OpenFlow message). Item #2: As I mentioned in response to your previous message, you must be using the destiny branch of NOX (not zaku) to use OFPAT_ENQUEUE. Please upgrade. -- Murphy On Jan 9, 2012, at 9:45 PM, Amit Tewari wrote: Hi, I am currently using NOX 0.9.0(zaku)~full~beta contrlooer for my openvswitch 1.2.2 on openflow 1.0 I have developed certain api’s using /lib/core.py file . I am able to get table statictics and port statistics of switch on nox. ISSUE: I want to extract per flow statistics , queue statistics on nox . but I am unable to find api’s and handlers for it. I want to support ENQUEUE action also, but when I use send_flow_command api it returns error. Self.ctxt.send_flow_command with action argument as OFPAT_ENQUEUE then make_actions_array routine returns error “action not supported” In make_actions_array routine only testing is for OFPAT_OUTPUT action type. Although lib/openflow.py contains all flags and operations as per openflow 1.0 spec. Please let me know how I can meet support these features using nox, or I need to use different nox version ? Regards Amit Tewari NHST DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NECHCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NECHCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . --- ___ 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-gui flowtracer problem
I'm a bit surprised. Can you try /usr/bin/python -V? What OS / distro are you using? -- Murphy On Jan 5, 2012, at 1:35 AM, wunyuan wrote: Hi, My python version is 2.7.1+. $~/wunyuan/oringinal_nox/destiny/nox/src$ python -V Python 2.7.1+ Thanks! 於 2012/1/5 下午 05:26, Murphy McCauley 提到: Are you using Python 2.5? I am guessing this bug doesn't exist with Python 2.6+... -- Murphy On Jan 4, 2012, at 11:52 PM, wunyuan wrote: Hi, The 0xe4115b1251b4L string is our client internet iterface mac. Our client are HP DL380 G7. Our Openflow are installed in Desktop PC with NetFPGA card. Thanks. 於 2012/1/5 下午 03:33, Kyriakos Zarifis 提到: This seems to be a bug where the component was expecting a hex string, but the L in the end of the long int messes things. Thanks for reporting. What kind of switch are you using? For a temporary fix in your case, try replacing line 95 with: value = int(value[:-1],16) On Wed, Jan 4, 2012 at 11:07 PM, wunyuan wuny...@nchc.narl.org.tw wrote: Dear all, I build a testbed as follows: NOX / \ of1of2 /\ ab Firstly, I set a and b to ping each other. Secondly, I input ./nox_core -v -v -i ptcp:9550 routing lavi monitoring trackhost_pktin to run the NOX. and then start nox-gui. Thirdly, I click FlowTracer botton and then double click of1 node on nox-gui to show its flow entries. Finally, I highlight one entry and click Trace! botton. However,I cannot find any flows on nox-gui and I find one error message. this error message is as follows: File ~/nox/src/gui/views/flowtracer.py, line 95, in trace_flow value = int(value,16) ValueError: invalid literal for int() with base 16: '0xe4115b1251b4L' How could I fix it? -- === 系統與網路技術組-黃文源(Wun-Yuan Huang) 財團法人國家實驗研究院 國家高速網路與計算中心南部事業群 National Center for High-Performance Computing South Region Office 台南縣台南科學園區南科三路28號 No.28, Nan-Ke 3rd. Rd., Science-based Industrial Park, Tainan 744, Taiwan, R.O.C. TEL:06-5050940 ext.751 FAX:06-5050945 E-Mail:wuny...@nchc.narl.org.tw === ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev -- === 系統與網路技術組-黃文源(Wun-Yuan Huang) 財團法人國家實驗研究院 國家高速網路與計算中心南部事業群 National Center for High-Performance Computing South Region Office 台南縣台南科學園區南科三路28號 No.28, Nan-Ke 3rd. Rd., Science-based Industrial Park, Tainan 744, Taiwan, R.O.C. TEL:06-5050940 ext.751 FAX:06-5050945 E-Mail:wuny...@nchc.narl.org.tw === ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev -- === 系統與網路技術組-黃文源(Wun-Yuan Huang) 財團法人國家實驗研究院 國家高速網路與計算中心南部事業群 National Center for High-Performance Computing South Region Office 台南縣台南科學園區南科三路28號 No.28, Nan-Ke 3rd. Rd., Science-based Industrial Park, Tainan 744, Taiwan, R.O.C. TEL:06-5050940 ext.751 FAX:06-5050945 E-Mail:wuny...@nchc.narl.org.tw === ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] nox-gui flowtracer problem
Ah, of course, you must be running a 32 bit version. We should fix this (maybe by replacing hex(n) with 0x%x % (n,)). Thanks for humoring me. -- Murphy On Jan 5, 2012, at 2:03 AM, wunyuan wrote: Hi, The answers are as follows: 於 2012/1/5 下午 05:46, Murphy McCauley 提到: I'm a bit surprised. Can you try /usr/bin/python -V? Yes nchc@NCHC:/usr/bin$ ./python -V Python 2.7.1+ What OS / distro are you using? nchc@NCHC:/usr/bin$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:Ubuntu 11.04 Release:11.04 Codename: natty -- Murphy On Jan 5, 2012, at 1:35 AM, wunyuan wrote: Hi, My python version is 2.7.1+. $~/wunyuan/oringinal_nox/destiny/nox/src$ python -V Python 2.7.1+ Thanks! 於 2012/1/5 下午 05:26, Murphy McCauley 提到: Are you using Python 2.5? I am guessing this bug doesn't exist with Python 2.6+... -- Murphy On Jan 4, 2012, at 11:52 PM, wunyuan wrote: Hi, The 0xe4115b1251b4L string is our client internet iterface mac. Our client are HP DL380 G7. Our Openflow are installed in Desktop PC with NetFPGA card. Thanks. 於 2012/1/5 下午 03:33, Kyriakos Zarifis 提到: This seems to be a bug where the component was expecting a hex string, but the L in the end of the long int messes things. Thanks for reporting. What kind of switch are you using? For a temporary fix in your case, try replacing line 95 with: value = int(value[:-1],16) On Wed, Jan 4, 2012 at 11:07 PM, wunyuan wuny...@nchc.narl.org.tw wrote: Dear all, I build a testbed as follows: NOX / \ of1of2 /\ ab Firstly, I set a and b to ping each other. Secondly, I input ./nox_core -v -v -i ptcp:9550 routing lavi monitoring trackhost_pktin to run the NOX. and then start nox-gui. Thirdly, I click FlowTracer botton and then double click of1 node on nox-gui to show its flow entries. Finally, I highlight one entry and click Trace! botton. However,I cannot find any flows on nox-gui and I find one error message. this error message is as follows: File ~/nox/src/gui/views/flowtracer.py, line 95, in trace_flow value = int(value,16) ValueError: invalid literal for int() with base 16: '0xe4115b1251b4L' How could I fix it? -- === 系統與網路技術組-黃文源(Wun-Yuan Huang) 財團法人國家實驗研究院 國家高速網路與計算中心南部事業群 National Center for High-Performance Computing South Region Office 台南縣台南科學園區南科三路28號 No.28, Nan-Ke 3rd. Rd., Science-based Industrial Park, Tainan 744, Taiwan, R.O.C. TEL:06-5050940 ext.751 FAX:06-5050945 E-Mail:wuny...@nchc.narl.org.tw === ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev -- === 系統與網路技術組-黃文源(Wun-Yuan Huang) 財團法人國家實驗研究院 國家高速網路與計算中心南部事業群 National Center for High-Performance Computing South Region Office 台南縣台南科學園區南科三路28號 No.28, Nan-Ke 3rd. Rd., Science-based Industrial Park, Tainan 744, Taiwan, R.O.C. TEL:06-5050940 ext.751 FAX:06-5050945 E-Mail:wuny...@nchc.narl.org.tw === ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev -- === 系統與網路技術組-黃文源(Wun-Yuan Huang) 財團法人國家實驗研究院 國家高速網路與計算中心南部事業群 National Center for High-Performance Computing South Region Office 台南縣台南科學園區南科三路28號 No.28, Nan-Ke 3rd. Rd., Science-based Industrial Park, Tainan 744, Taiwan, R.O.C. TEL:06-5050940 ext.751 FAX:06-5050945 E-Mail:wuny...@nchc.narl.org.tw === -- === 系統與網路技術組-黃文源(Wun-Yuan Huang) 財團法人國家實驗研究院 國家高速網路與計算中心南部事業群 National Center for High-Performance Computing South Region Office 台南縣台南科學園區南科三路28號 No.28, Nan-Ke 3rd. Rd., Science-based Industrial Park, Tainan 744, Taiwan, R.O.C. TEL:06-5050940 ext.751 FAX:06-5050945 E-Mail:wuny...@nchc.narl.org.tw === ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] NOX API development
Responses inline. On Jan 5, 2012, at 5:10 AM, Amit Tewari wrote: If I use openflow.OFPFC_MODIFY flag in send_flow_command, it gives me error-“invalid action type” Something like the following should let you modify flows: from util import set_match from nox.coreapps.pyrt.pycomponent import UINT32_MAX self.ctxt.send_flow_command(dpid, openflow.OFPFC_MODIFY, set_match(attrs), idle_timeout, # timeouts only used if flow hard_timeout, # didn't exist self.make_action_array(actions), UINT32_MAX, # No buffer ID priority) attrs and actions are as described in install_datapath_flow()'s documentation. Also if I give flag as OFPAT_ENQUEUE it gives me error. Where are you trying to put that? It belongs in the actions list. Also, it is one of the newer actions and it won't be available on older versions of NOX. Are you using the destiny branch? I wanted to know Are there any other library files in nox whose functions I can use for developing my api or nox dosent support it ? send_openflow_command() pretty much sends a raw buffer to a datapath, so you can craft pretty much any OpenFlow command you want (often using pyopenflow.py), and send it. The monitoring component uses this technique, so you can look at it as an example. Among other things, it uses it to get flow stats. Hope that helps. Murphy___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Must each switch connect to nox controller?
The machine running NOX does not need to be *directly* connected to the switches; it just needs to be able to reach them. So you could build a separate control network out of standard L2 switches or routers or whatever which allows all OpenFlow switches to be accessed from a single port. Alternately, you can do what you suggest where NOX directly connects to one or more OpenFlow switches and then communicates with other OpenFlow switches through those (in-band control). As for how many switches NOX can support... I don't think there's an easy answer here. I think this will vary hugely depending on exactly what your control program and network are doing. -- Murphy On Jan 4, 2012, at 4:41 AM, 陈阳 wrote: Hi, I have read some papers about OpenFlow and NOX like 'NOX:Towards an Operationg System for Networks'. As the papers presented that each switch is connected to NOX.I wonder what if NOX only has a few network interface but there are many OpenFlow switches? How can it connect to all the switches?Or that the controller like NOX only connects to a few switches directly and the other swiches are connected to them? And I also want to know how many switched that NOX can support? Chenyang ___ 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] something about the working mechanism of NOX
#1: When a switch gets a packet that doesn't correspond to an entry in the flow tables, it will generally buffer it and associate this buffer with an opaque buffer identifier. It will then send a packet_in message to the controller that includes the buffer ID and *part* of the packet data itself (usually not all of it). However, if the switch runs out of buffer space, it is supposed to send a buffer ID of all-bits-on (UNIT32_MAX) along with *all* of the packet data. The code you posted checks to see which of these cases is being handled. If buffer_id == UINT32_MAX, then the controller didn't buffer the packet. So it should have sent the entire payload. The second if statement checks to make sure this is actually the case. If you remove this code, it will continue to operate the same unless the switch decides not to buffer packets (because it ran out of buffers or for some other reason). #2: send_openflow_command() sends any OpenFlow command (anything that starts with an OpenFlow header). send_openflow_packet(), on the other hand, is a shortcut specifically for sending ofp_packet_out messages. #3: You are mistaken about OFPT_PACKET_OUT -- it does not modify the flow table. OFPT_FLOW_MOD does. OFPT_PACKET_OUT is used to immediately send some piece of data (that has either already been buffered in the switch or that the controller provides). Hope that clears things up. -- Murphy On Dec 30, 2011, at 8:10 PM, 王健 wrote: Hi all: I'm a new comer of NOX, and want to know the mechanism of NOX, so i see the codes of hub.cc at the beginning. There are some questions that perplex me for a long time which i list as follows. 1) if (buffer_id == UINT32_MAX) { size_t data_len = pi.get_buffer()-size(); size_t total_len = pi.total_len; if (total_len == data_len) { send_openflow_packe t(pi.datapath_id, *pi.get_buffer(), OFPP_FLOOD, pi.in_port, true); } else { /* Control path didn't buffer the packet and didn't send us * the whole thing--what gives? */ lg.dbg(total_len=%zu data_len=%zu\n, total_len, data_len); }tion There codes are in src/nox/coreapps/hub/hub.cc file. what is the function of them?do they effect the function of hub.cc if remove ? 2) what is the differe nce between int send_openflow_command() and int send_openflow_packet() which defined in src/nox/component.hh. I know both are used for interacting with OF switch. 3)The type of controller/switch message contains OFPT_PACKET_OUT and OFPT_FLOW_MOD. I think both of them are used to add/delete/modify flow table entry in OF switch, am i right? I don't know what is the difference even if refer to openflow-spec-1.0.0 would you like to tell me? Thank you very much, look forward to hear from you~ Best Wishes nbs p; Wang Jian nbsp; Saturday, December 31, 2011 ___ 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 on importing nox/netapps/monitoring.py
Are you also running the monitoring component, either on the commandline before your component or by adding it as a dependency in your component's meta.json? -- Murphy On Dec 29, 2011, at 10:25 PM, Dushyant Arora wrote: Hello, I have created a NOX application NOXSwitch.py which calls send_flow_stats_request() from the module monitoring.py. However I get the following ImportError: 1|nox|INFO:Starting nox_core (/home/openflow/noxcore/build/src/.libs/lt-nox_core) 2|nox|ERR:Cannot change the state of 'NOXSwitch' to INSTALLED: 'NOXSwitch' ran into an error: cannot import a Python module 'nox.coreapps.examples.NOXSwitch': Traceback (most recent call last): File ./nox/coreapps/examples/NOXSwitch.py, line 37, in module from nox.netapps.monitoring.monitoring import Monitoring File ./nox/netapps/monitoring/monitoring.py, line 33, in module from nox.coreapps.messenger.pyjsonmsgevent import JSONMsg_event File ./nox/coreapps/messenger/pyjsonmsgevent.py, line 25, in module _pyjsonmsgevent = swig_import_helper() File ./nox/coreapps/messenger/pyjsonmsgevent.py, line 21, in swig_import_helper _mod = imp.load_module('_pyjsonmsgevent', fp, pathname, description) ImportError: ./nox/coreapps/messenger/_pyjsonmsgevent.so: undefined symbol: vigil::JSONMsg_event::JSONMsg_event(vigil::core_message const*) How do I correct this? I am trying to follow this earlier thread: http://noxrepo.org/pipermail/nox-dev/2011-November/008246.html Thanks, Dushyant ___ 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 messenger example for external c++ and nox python
So NOX's messenger is a fairly generic method for communicating with external applications over a socket. Built on top of this is jsonmessenger which communicates JSON messages over a socket. If you specifically want to use protobufs (and not JSON messages), then you'd want to use the plain messenger. However, the plain messenger is not exposed to Python -- only jsonmessenger is. So I think your options are: 1) Use JSON messages instead of protobufs, and just use jsonmessenger 2) Expose messenger to Python, and then use this to send/receive protobufs 3) Use protobufs and roll your own method for communicating with your external application (probably using Twisted) -- Murphy On Dec 20, 2011, at 11:02 PM, Harshil Anil Kumar Shah wrote: Hi Murphy. Yes, I have external C++ module which I want to communicate with Nox python module using protobuf. I am using libjson library at C++ module. -Harshil. From: Murphy McCauley [mailto:jam...@nau.edu] Sent: Wednesday, December 21, 2011 1:38 AM To: Harshil Anil Kumar Shah Cc: Kyriakos Zarifis; nox-dev@noxrepo.org Subject: Re: [nox-dev] Nox messenger example for external c++ and nox python Do you mean that you have some external program (written in C++) that you want to communicate with a NOX component (written in Python)? jsonmessenger works by sending and receiving JSON (http://json.org) messages. So on the NOX side, you use jsonmessenger. In the external program, you can use any of several libraries for doing JSON encoding/decoding. -- Murphy On Dec 20, 2011, at 1:09 AM, Harshil Anil Kumar Shah wrote: Hi, In my case where external module is C++ then can I use “pyobject” to interact with python module? From: Harshil Anil Kumar Shah Sent: Monday, December 19, 2011 3:32 PM To: 'Kyriakos Zarifis' Cc: nox-dev@noxrepo.org Subject: RE: [nox-dev] Nox messenger example for external c++ and nox python Thanks Zarifis… I looked at GUI example. It seems very useful. But in my case, client is external C++ module. So in that case do I have to use use messenger.cpp?? -Harshil. From: nox-dev-boun...@noxrepo.org [mailto:nox-dev-boun...@noxrepo.org] On Behalf Of Kyriakos Zarifis Sent: Monday, December 19, 2011 1:38 PM To: Harshil Anil Kumar Shah Cc: nox-dev@noxrepo.org Subject: Re: [nox-dev] Nox messenger example for external c++ and nox python Hi Harshil, it might not be the simplest example, but the GUI communicates with NOX using the messenger, so taking a look at that code might be a good starting point. Specifically, the file communication.py is responsible on the GUI side. Similarly on the NOX side, the code that uses the messenger to send messages to the GUI is inside the respective component that talks to the GUI. The component monitoring is one of them. Some of this is documented on the wiki here: http://noxrepo.org/noxwiki/index.php/NOX_GUI#Connecting_a_subview_to_a_NOX_component On Sun, Dec 18, 2011 at 10:41 PM, Harshil Anil Kumar Shah harshil_s...@infosys.com wrote: Hi, I want to exchange messages between external C++ module and python module in Nox using protobuf messages. I browsed through couple of posts, I figured out I can use coreapps/messenger. Can I get some working example how messenger code can be used for message exchange between external c++ and nox python module. Regards, Harshil Shah, Convergence Lab, Infosys Labs Infosys | Bangalore Mob # : +91 97428 87966. CAUTION - Disclaimer * This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system. ***INFOSYS End of Disclaimer INFOSYS*** ___ 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] Running nox with a pcap file as input
If I recall correctly, this is enabled or disabled automatically during configure based on whether the pcap header and/or library can be found. On Ubuntu, you should be good if you have... I think it's libpcap-dev installed. If you don't, please install it and then re-run configure. If you have the appropriate package installed and it still doesn't work, check the output of configure to see if there's anything useful about pcap in there. Hope that helps. -- Murphy On Dec 21, 2011, at 1:18 PM, Bharath Madhusudan wrote: I am just getting started with nox and before I throw real traffic at my setup, I would like to be able to use a pcap file as input. When I try: ./nox_core -i pcap:162.pcap:162.out I get: 1|openflow|ERR:pcap support not built in. Ensure you have pcap installed and rebuild Looking at the nox config files, its non-obvious to me how I would go about doing this Thanks a lot in advance for anything anyone might have to say about this. Regards, Bharath ___ 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 UnicodeDecodeError in nox/coreapps/pyrt/pyoxidereactor.py
It looks like some Python component is trying to log something unprintable. Is your prrt module in Python? Does it do any logging? Is that the full stack trace that you pasted? It'd be nice to see where emit() was being called from. If you just want a quick fix, you could try just commenting out lines 337-339 in pyrt. But if this is happening because of something in monitoring or spanning_tree, I'd like to understand the problem better so that we could fix it. -- Murphy On Dec 20, 2011, at 4:50 AM, Bernd Wittefeld wrote: Hi, I have another problem with my NOX installation. When I start it using ./nox_core -i ptcp:6633 spanning_tree switch prrt monitoring it worked flawlessly all the time with the standard openflow switch from openflow.org in my old environment. Now I have moved to a new environment using an exact copy of the previous setup only with vmware installations, I have the following problem appearing in the NOX logs: Traceback (most recent call last): File ./nox/coreapps/pyrt/pyoxidereactor.py, line 339, in emit msg = unicode(msg, 'utf-8') UnicodeDecodeError: 'utf8' codec can't decode bytes in position 127-129: invalid data prrt is a module that I am currently working on. It does nothing with pyrt and stuff. Currently only gathering information from discovery and filling some datastructures. Does anyone know where this can come from? Do I miss some dependencies upon installation? It seems like NOX cannot understand the data it gets from a switch?! I have checked the configure scripts for dependencies and searched the web but could not find anything useful on this. Thanks in advance! Bernd ___ 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] meta.json syntax and importing files in Python
Some of this is at least lightly documented on the wiki: http://noxrepo.org/noxwiki/index.php/Developing_in_NOX (Please feel free to extend it!) There's a bit more info about the meta files in the FAQ: http://noxrepo.org/noxwiki/index.php/FAQ#Where_can_I_see_and_edit_the_code_that_corresponds_to_different_NOX_components.3F Really quickly and informally, the meta files (formerly meta.xml, now meta.json) are what really specify a NOX component. Specifically, they: 1. Define a component name (name key). These are the names that, for example, can be specified on the nox_core commandline. 2. Specify which code corresponds to a component (library and python keys). A component may be a shared library or a Python module or both. NOX will load the specified library/module, and execute a factory in order to get an actual component instance (the mechanism for this is somewhat different in Python and in C++). You only need to specify the library/module where this factory comes from. 3. Specify dependencies (dependencies key). This is a list of other components which this component relies on. NOX will attempt to load these automatically. Hope that helps. -- Murphy On Dec 16, 2011, at 7:40 AM, Bernd Wittefeld wrote: Hi, it's me again :) I was able to import my python files. They needed to be added to the NOX_RUNTIMEFILES and EXTRA_DIST in my Makefile.am, so that the links from the build directory were established. So that problem is solved, but I would love to have some docs about those meta.json files. Greetings Bernd On 16.12.2011 16:03, Bernd Wittefeld wrote: Hi, I'm am wondering about the syntax and sematic of the meta.json files. I cannot find anything about it in the wiki and the mailinglists. The problem is a fairly easy one: I have written a python component and splitted it up in several files, but I cannot import those files. I tried various permutations of the import statement and nothing worked. Can you give me a hint where I can find valuable information about the NOX build system? Do I have to add my *.py files (which I only want to use in my component) to Makefile.am and meta.json? Thanks in advance Bernd ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] what is the difference between pyswitch and routing module?
No. The situation is as I described -- the routing module is really more like a network-wide L2 switch than anything else. It's possible to implement some L3 routing functionality in NOX as Srini mentions in the referenced email. However, there's at least one thing that IP routers do which can't be done reasonably within the OpenFlow 1.0 specification -- decrement the TTL. -- Murphy On Dec 12, 2011, at 11:59 PM, linbo wrote: Hi,Murphy! I remember there was an earlier thread: http://noxrepo.org/pipermail/nox-dev/2011-April/007494.html It said that nox couldn't support conventional IP routing before,so does the routing module making nox as a IP router now? Thank you! linbo ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Running Error on nox.json
Hi; maybe you can provide a bit more information. What OS/version are you running on? What steps did you use to configure, build, and run NOX? -- Murphy On Dec 15, 2011, at 2:45 PM, Peng Sun wrote: Hi, I encountered an error when running NOX. The error is: ERR: Unable to find a configuration file. Checked the following locations: - /usr/local/etc/nox/nox.json - etc/nox.json The compilation is successful... Does anybody know how to solve the problem? Thanks. Peng ___ 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] Watch inside the IP Option field with Openflow
Well, this depends on what you mean. There is no way in the OpenFlow 1.0 spec to have matches against an IP option. However, if you are installing exact-match flows for TCP or UDP connections and the first packet of the connection will have the option set, then you may be able to do what you want. The first packet of a connection will be sent up to the controller. The controller can then inspect the header to see if your option is set, and can install an exact match flow that modifies the destination address. If *only* the first packets of the connection will have the option set, then you will have to do a little extra work to deal with the case where the flow times out on the switch before the connection is actually dead. (That is, the controller will need to remember the connections it wants rewritten.) Hope that helps. -- Murphy On Dec 2, 2011, at 5:50 AM, Hyogi Jung wrote: Hi all. I am trying to do some experiments with Openflow. And I would like to know if it is possible to watch inside the IP Header Option field? There is ip header length. So I can find that there is header option. But How do I watch inside the IP Header Option? If I read the IP option something like 'x.x.x.x', then I will modify destination's address. Can I do this in nox controller? Thank you! Hope you could help me - 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] how to display network topology timely
The fundamental problem here is that there's no always-applicable way to know when a host leaves. The only mechanism used in NOX now is a timeout. You could adjust this timeout -- the best value for it depends on how talkative your hosts are. You might also extend the host tracker to watch the link state, but that only works in some scenarios. I have also suggested that we track hosts by periodically ARP-pinging them, though I don't think anyone has ever actually implemented this. Hope that helps. -- Murphy On Dec 1, 2011, at 11:29 PM, 王健 wrote: Hi all: I have a question to consult you. The NOX GUI can display a whole network topology when run the command: ./nox_core -v -v -i ptcp:6633 monitoring discovery topology trackhost_pktin. But it cann't update timely when a host leave from network, in other words, the host is still in the network topology which you can see in NOX GUI. I think it may be lack of some component when run the command, am i right? Which one to be used and how to get it? would you like to tell me, thank you very much~ Best Wishes Wang Jian Friday, December 2,2011 At 2011-11-29 03:01:56,Murphy McCauley jam...@nau.edu wrote: I think the attachment is being scrubbed. Maybe you can send an image? Though offhand, I don't know what I can tell you. What do mean by unreachable? Devices connected to the netfpga switch can't ping devices connected to the openwrt switch? What NOX components are you running? -- Murphy On Nov 25, 2011, at 12:09 AM, 王健 wrote: Hi Murphy: Thank you for your last reply , your suggest is right. Recently i built a openflow network,you can see the topology in the attachment. The connection between openflow switch(netfpga) and openwrt(openflow wireless) is unreachable, i mark it in blue. What's wrong with it, would you like to give me some advice for solving this problem,thank you very much! if there is something else you want to know, please tell me. Best Wishes n bsp;Wang Jian Friday, November 25, 2011 topology v1.1.docx ___ 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] Not able to send ARP Reply in C++
First, I'd suggest that you install a flow to send all appropriate ARP messages to the controller. Second, use the packet in event to examine the ARP request. The data that you need is all on the event object (specifically, the buf field of the Ofp_msg_event class contains the raw packet data, which you can parse as an ARP request). Third, build an ARP reply based on the request. Send this data using one of the packet sending functions (e.g., send_openflow_packet()). Have you considered writing this as a Python application first? Hope that helps. -- Murphy On Nov 30, 2011, at 12:15 AM, Kimihiko FUKAMI wrote: Hi,Murphy! Thank you for your reply! I look at arp.hh source code. But, my question is not addressed. I forgot to tell you the code I want to write... The code is NAT program. In the NAT, the condition is that arp reply should be addressed. I examined which api to send arp reply by using of Nox(zaku) in C++, and I get a hint from attached Nox sample code switch.cc. The hint is Packet_in_event... Then I want to tell you how to get packet data from Packet_in_event instance. Please give me a hint! Murphy McCauley jam...@nau.edu wrote: I don't think I've ever used it, but have you taken a look at include/netinet++/arp.hh? -- Murphy On Nov 25, 2011, at 1:54 AM, Kimihiko FUKAMI wrote: Hi, Currently, I can not send an ARP Reply by using of Nox(zaku) in C++ code. # I can write a code to reply ARP in python. So, I want a code sample to send ARP Reply in C++. Please teach me! --- E-mail: fukami.kimih...@lab.ntt.co.jp ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev --- 深見 公彦 (Kimihiko FUKAMI) TEL:0422-59-2475 NTT 情報流通プラットホーム研究所 ネットワークセキュリティプロジェクト E-mail: fukami.kimih...@lab.ntt.co.jp ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Running Error on nox.json
I suspect you're not running nox_core from the src directory (build/src). Try that. You can also run it by specifying a configuration file (src/nox_core -c src/etc/nox.json I think), but you'd also need to specify the directories for components. Hope that helps. -- Murphy On Dec 15, 2011, at 4:39 PM, Peng Sun wrote: Hi Murphy, I followed the steps in NOX wiki. I installed NOX 0.9.0 (zaku) on a VM with Ubuntu 11.04 (Linux 2.6.38). I first installed the dependencies with apt-get, then took the steps: ./boot.sh mkdir build cd build ../configure make -j 5 The compilation finished successfully. But when I launched nox_core, it exits with error: NOX 0.9.0(zaku)~full~beta (nox_core), compiled Dec 16 2011 00:43:32 Compiled with OpenFlow 0x01 ERR: Unable to find a configuration file. Checked the following locations: - /usr/local/etc/nox/nox.json - etc/nox.json Peng On Thu, Dec 15, 2011 at 5:50 PM, Murphy McCauley jam...@nau.edu wrote: Hi; maybe you can provide a bit more information. What OS/version are you running on? What steps did you use to configure, build, and run NOX? -- Murphy On Dec 15, 2011, at 2:45 PM, Peng Sun wrote: Hi, I encountered an error when running NOX. The error is: ERR: Unable to find a configuration file. Checked the following locations: - /usr/local/etc/nox/nox.json - etc/nox.json The compilation is successful... Does anybody know how to solve the problem? Thanks. Peng ___ 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] Not able to send ARP Reply in C++
Glad you got it working; I had missed yeffri's reply. -- Murphy On Dec 15, 2011, at 8:26 PM, Kimihiko FUKAMI wrote: I am sorry for replying this thread late. And I sent a reply only to yeffri. At first, I successed to send an ARP reply in C++. yeffri's code helps me very much! But yeffri's code can send an ARP request, so I wrote the code to send an ARP reply. The code is below. To yeffri and Murphy, thank you very much !! Kimihiko FUKAMI === code 1 === Disposition Switch::handle(const Event e){ const Packet_in_event pi = assert_castconst Packet_in_event(e); uint32_t buffer_id = pi.buffer_id; Flow flow(pi.in_port, *pi.get_buffer()); stringstream out, out2; ipaddr ipsrc(ntohl(flow.nw_src)); ipaddr ipdst(ntohl(flow.nw_dst)); string tp_src; string tp_dst; ipaddr globalgwaddr(LB_IP); ipaddr privategwaddr(GATEWAY_IP); if (flow.dl_type == ethernet::ARP){ Nonowning_buffer b(*pi.get_buffer()); const arp_eth_header* arp = NULL; const eth_header* eth = b.try_pulleth_header(); if (b.size() = ARP_ETH_HEADER_LEN) { arp = reinterpret_castconst arp_eth_header*(b.try_pull(ARP_ETH_HEADER_\ LEN)); }else { return CONTINUE; } if (arp-ar_op == arp::REQUEST){ if (ipdst.string() == GATEWAY_IP){ ethernetaddr senderMAC(arptable[GATEWAY_IP]); ethernetaddr targetMAC(flow.dl_src.string().c_str()); sendARPReply(pi.datapath_id, pi.in_port, senderMAC, privategwaddr.addr\ , targetMAC, ipsrc.addr); } } = sendARPReply function code is below. == void Switch::sendARPReply(datapathid dpid, int port, ethernetaddr senderMAC, u\ int32_t senderIP, ethernetaddr targetMAC, uint32_t targetIP) { ethernet ethPacket; arp arpPacket; ethPacket.daddr = targetMAC; ethPacket.saddr = senderMAC; ethPacket.type = ethernet::ARP; arpPacket.hrd = arp::ETHER; arpPacket.pro = ethernet::IP; arpPacket.hln = ethernet::PAYLOAD_MIN; //6 for ethernet arpPacket.pln = sizeof(targetIP); //4 for IPV4 arpPacket.sha = senderMAC; arpPacket.sip = senderIP; arpPacket.tha = targetMAC; arpPacket.tip = targetIP; arpPacket.op = arp::REPLY; int size = sizeof(ethernet) + sizeof(arp); uint8_t *data = new uint8_t[size]; memcpy(data, ethPacket, sizeof(ethPacket)); memcpy(data + sizeof(ethPacket), arpPacket, sizeof(arpPacket)); Array_buffer buffer(data,size); // data will be deleted automatically send_openflow_packet(dpid, buffer, port, OFPP_LOCAL, true); } } === end === Murphy McCauley jam...@nau.edu wrote: First, I'd suggest that you install a flow to send all appropriate ARP messages to the controller. Second, use the packet in event to examine the ARP request. The data that you need is all on the event object (specifically, the buf field of the Ofp_msg_event class contains the raw packet data, which you can parse as an ARP request). Third, build an ARP reply based on the request. Send this data using one of the packet sending functions (e.g., send_openflow_packet()). Have you considered writing this as a Python application first? Hope that helps. -- Murphy On Nov 30, 2011, at 12:15 AM, Kimihiko FUKAMI wrote: Hi,Murphy! Thank you for your reply! I look at arp.hh source code. But, my question is not addressed. I forgot to tell you the code I want to write... The code is NAT program. In the NAT, the condition is that arp reply should be addressed. I examined which api to send arp reply by using of Nox(zaku) in C++, and I get a hint from attached Nox sample code switch.cc. The hint is Packet_in_event... Then I want to tell you how to get packet data from Packet_in_event instance. Please give me a hint! Murphy McCauley jam...@nau.edu wrote: I don't think I've ever used it, but have you taken a look at include/netinet++/arp.hh? -- Murphy On Nov 25, 2011, at 1:54 AM, Kimihiko FUKAMI wrote: Hi, Currently, I can not send an ARP Reply by using of Nox(zaku) in C++ code. # I can write a code to reply ARP in python. So, I want a code sample to send ARP Reply in C++. Please teach me! --- E-mail: fukami.kimih...@lab.ntt.co.jp ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev --- 深見 公彦 (Kimihiko FUKAMI) TEL:0422-59-2475 NTT 情報流通プラットホーム研究所 ネットワークセキュリティプロジェクト E-mail: fukami.kimih...@lab.ntt.co.jp ___ 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 add flow through NOX
There's no simple manual way to add a flow using NOX -- you must write code in C++ or Python to add flows. However, you could certainly write a NOX component that accepts user input and uses it to add flows. Hope that helps. -- Murphy On Dec 12, 2011, at 10:48 AM, Shan Hu wrote: Hi All, I want to ask if there is a way to manually add flow through NOX controller? For now i only know that i can add flow with command ./ovs-ofctl add-flow ... and apparently it runs on openvswitch and has nothing to do with controller. Regards, Shan ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] error compiling...
What platform are you trying to compile on, and which branch of NOX? Have you tried the destiny branch? -- Murphy On Dec 7, 2011, at 1:39 AM, Prashanth Prahalad wrote: Just getting started with nox controller. During compilation (make -j 5) I'm seeing this error : ../../src/nox_main.cc: In function ‘intunnamed::start_gui()’: ../../src/nox_main.cc:231: warning: deprecated conversion from string constant to ‘char*’ ../../src/nox_main.cc: In function ‘int main(int, char**)’: ../../src/nox_main.cc:532: error: ‘EventDispatcherComponentinstall’ was not declared in this scope ../../src/nox_main.cc:532: error: expected ‘)’ before ‘;’ token ../../src/nox_main.cc:532: error: expected primary-expression before ‘)’ token ../../src/nox_main.cc:532: error: expected ‘;’ before ‘)’ token make[2]: *** [nox_main.o] Error 1 Any ideas what's causing this ? Thanks ! ___ 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] Cannot find packages or modules imported in Graph_Topology.py (NOX destiny)
This file is ancient and I don't think it has ever worked with a public release of NOX. It is probably in there by mistake and we've never noticed. I'd suggest you look at the existing GUI if you want a graph. If you really want to get that thing going... discovery is now nox.netapps.discovery if I recall correctly, and packet is nox.lib.packet. I'm not sure what locator was, but I'd guess it's now part of either authenticator or routing. Hope that helps. -- Murphy On Dec 5, 2011, at 12:02 AM, Patrick Yu ( 游昭霖) wrote: from pyapps import locator from pyapps import discovery from vigil.packet import * cannot find files or directories with names containing pyapps or locator Do the source code of these packages or modules exist? Patrick Yu ___ 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] unable to create new app in nox
I'm not sure if this is a bug or a feature, but if you check try_newapp's meta.json file, you'll see that the actual component name is try newapp (with a space) and not try_newapp (with an underscore). If you try running: ./nox_core -v -l ptcp:789 try newapp .. it should work. It might be a better idea to edit the meta.json so that the component name doesn't contain a space, though. I am not sure if there are parts of NOX which will expect component names to not contain spaces... Hope that helps. -- Murphy On Dec 5, 2011, at 7:00 AM, Beeram, Suresh KumarReddy wrote: Hi All, I am new to NOX source code. Today I tried to create new NOX app “try_newapp” in netapps directory, it compiled successfully but when I start executing nox_core executable “./nox_core –v –I ptcp:789 try_newapp” it throws error “00041|nox|ERR:Application 'try_newapp' description not found.” Steps used to create new app: nox-new-c-app.py try_newapp it created try_newapp dir . root@desktop:~/nox/src/nox/netapps/try_newapp# ls Makefile.am Makefile.in meta.json try_newapp.cc try_newapp.hh Please find the attachment of error log and config log. Correct me if I was wrong in creating new app.. Thanks -B Suresh Reddy config_try_newapp.txterror_log.txt___ 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] help: link_type
I'm not an LAVI expert, but I believe the only types are all, sw2sw and host2sw. -- Murphy On Dec 1, 2011, at 12:48 AM, ztom wrote: Hi~ alls, I need to get all link_types of topo's jsonmsg, but i just find two of them (all sw2sw). Is there some docs about it? I can't get any hint from source code now ... Waiting for your help. --- best regards ___ 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] Why does NOX Destiny version lack of SQLite3 database support??
It was removed several years ago... I think just because nothing in NOX itself was using it. What do you want to use it for? If you just want to use sqlite for your own component to keep data, you can just include it yourself... -- Murphy On Nov 30, 2011, at 6:45 AM, dongxia pan wrote: hi, guys I intend to develop programs based on destiny or latest source codes. Whereas, I find that the version of Destiny lack of SQLite3 database support. Destiny or latest codes only include codes of Dht storage, but Dht storage is too complex for me. Previously, I found that Nox-0.5.0~full~beta version has supported SQLite3. Are there any reasons to remove sqlite3 in the latest codes? Looking forward to your reply. ___ 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] Modify the packet's header in Openflow Switch(Router)
If you want to modify the OpenFlow reference switch, you may have better luck by contacting one of the OpenFlow mailing lists (maybe openflow-discuss ... https://mailman.stanford.edu/mailman/listinfo/openflow-discuss ?). But I'd suggest you consider carefully if there is a way to do what you want within the OpenFlow spec or a common extension. Can you not install a flow that matches the packets you want to modify? Or maybe you can accomplish what you want using multiple tables (though support for this is a bit sketchy... it exists in OpenFlow 1.1 and Open vSwitch though the two differ somewhat)? Good luck! -- Murphy On Nov 29, 2011, at 6:48 AM, Hyogi Jung wrote: Hi Murphy Thank you for reply. I understood your point. The actual work of rewriting the packet header happens on the switch. (I'm sorry, I omit carbon copy.) And I want to modify packet in switch before checking flow table. Is it possible in openflow switch? Original openflow process : Receive packet - Check flow table(Find highest-priority matching flow entry) - Apply instructions(Modify packet etc) I want to do this : Receive packet - Modify packet in each OF switch - Check flow table(Find highest-priority matching flow entry) - Apply instructions(Modify packet etc) So I search receiving callback in OF switch. I think it maybe relate with hw_drv.c (openflow\hw-lib\skeleton\hw_drv.c) ? But I don't know exactly. Could you give some advice or where is the packet receiving callback? Thank you for your favor. Best Regards - Hyogi 2011/11/29 Murphy McCauley jam...@nau.edu This depends on exactly what you mean, though I wonder if you are operating under a misconception. If you use NOX to install a flow with, for example, an OFPAT_SET_DL_DST action to set the ethernet address... the actual work of rewriting the packet header happens on the switch. It's only the instruction to do so that comes from the controller. Hope that helps. -- Murphy On Nov 28, 2011, at 7:12 AM, Hyogi Jung wrote: I want to modify the packet's header in Openflow Switch(Router) not NOX controller. Do you know where event handler is called? I try to search google and mailinglist, but I coundn't search. There is no information. Could you give some advice or reference site? ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev -- Hyogi Jung, MS Student Multimedia Mobile Communications Lab School of Computer Science and Engineering Seoul National University, Korea Tel: +82-2-880-9147 ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Spanning Tree Module
AFAIK, this should work. Have you actually inspected the switches? Are the relevant ports actually getting NOFLOOD set? -- Murphy On Nov 29, 2011, at 7:54 AM, Bernd Wittefeld wrote: Hi, first of all: thanks for your great work and the really good support here. I have a small problem and I hope someone knows what to do :) The situation is the following: I have a network with 6 OpenFlow switches in a mesh here. The software (switches and NOX) is working fine. I use the spanning_tree module in order to prevent loops in the network when flooding ARP-Requests and stuff. I got everything to work fine and even the NOX Gui (I'm on destiny) shows me a correct Spanning-Tree without loops. I have two hosts which are connected to two different switches. If I send an ICMP ping from one host to the other, I get the ARP requests in the Openflow network. They travel along the spanning tree which I checked by using wireshark and tcpdump. The other links don't show ARP requests. Now the problem: The ARP requests are not forwarded out of the OpenFlow network. That means, they reach the switch that is connected to the destination host, but the host does not get the ARP request. How can I solve this? Do I have to manually unset the NOFLOOD switch on that port in my controller or is there any other way, maybe to make the spanning_tree module more intelligent or am I doing something wrong? Thanks in advance Bernd ___ 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] Modify the packet's header in Openflow Switch(Router)
This depends on exactly what you mean, though I wonder if you are operating under a misconception. If you use NOX to install a flow with, for example, an OFPAT_SET_DL_DST action to set the ethernet address... the actual work of rewriting the packet header happens on the switch. It's only the instruction to do so that comes from the controller. Hope that helps. -- Murphy On Nov 28, 2011, at 7:12 AM, Hyogi Jung wrote: I want to modify the packet's header in Openflow Switch(Router) not NOX controller. Do you know where event handler is called? I try to search google and mailinglist, but I coundn't search. There is no information. Could you give some advice or reference site? ___ 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] Not able to send ARP Reply in C++
I don't think I've ever used it, but have you taken a look at include/netinet++/arp.hh? -- Murphy On Nov 25, 2011, at 1:54 AM, Kimihiko FUKAMI wrote: Hi, Currently, I can not send an ARP Reply by using of Nox(zaku) in C++ code. # I can write a code to reply ARP in python. So, I want a code sample to send ARP Reply in C++. Please teach me! --- E-mail: fukami.kimih...@lab.ntt.co.jp ___ 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] Information on Controller Open Flow in general
Maybe some of these resources will be useful? Wiki: http://noxrepo.org/noxwiki/index.php/Main_Page Slightly dated NOX presentation: https://docs.google.com/present/view?id=dfsbt2qf_327f9688ngr Doxygen: http://noxrepo.org/~yapkke/doc/ Hope that helps. -- Murphy On Nov 22, 2011, at 8:43 AM, Francesco Pocci wrote: hello all, I would need some very important information regarding NOx. In practice, I have to retrievesome documents regarding the Open Flow controllers in general to see the differentinterfaces that each controller must have. (NOX is only an implementation of Open FlowController). This information I need to make absolutely a mapping with the interfaces of a protocol in my possession to make a comparison of the features in my Protocol and to implement. I really hope that I explained is that you know well and help me. F.P. ___ 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 hard timeout
Sorry, but it's in seconds. (See ofp_flow_mod in the OpenFlow spec.) -- Murphy On Nov 19, 2011, at 6:30 AM, andrea simeoni wrote: Hi guys, Does the flow hard timeout must be an integer number of seconds? I'm trying to set it to 0.5 ms but i get that it is set to the default value. Thank you. -- 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] import error
I don't really know anything about mobilevms, and I suspect this may be one of the cases where SWIG is misleading about what's going on. But for starters, why don't you try... ./nox_core -v -v -i ptcp:6633 spanning_tree mobilevms -- Murphy On Nov 16, 2011, at 4:37 AM, 王健 wrote: Hello everyone: I am a newcomer of python, and encountered a import error recently. This code is from nox.netapps.spanning_tree import spanning_tree in the mobilevms.py file. when run the command : ./nox_core -v -v -i ptcp:6633 mobilevms the error is:00081|nox|ERR:Cannot change the state of 'mobilevms' to INSTALLED: 'mobilevms' ran into an error: cannot import a Python module 'nox.netapps.mobilevms.mobilevms': Traceback (most recent call last): File ./nox/netapps/mobilevms/mobilevms.py, line 46, in module from nox.netapps.spanning_tree.spanning_tree import* File ./nox/netapps/spanning_tree/spanning_tree.py, line 27, i n module from nox.coreapps.messenger.pyjsonmsgevent import JSONMsg_event File ./nox/coreapps/messenger/pyjsonmsgevent.py, line 25, in module _pyjsonmsgevent = swig_import_helper() File ./nox/coreapps/messenger/pyjsonmsgevent.py, line 21, in swig_import_helper _mod = imp.load_module('_pyjsonmsgevent', fp, pathname, description) ImportError: ./nox/coreapps/messenger/_pyjsonmsgevent.so: undefined symbol: vigil::JSONMsg_event::JSONMsg_event(vigil::core_message const*) I try to use from nox.netapps.spanning_tree.spaning_tree import* instead of the previous code, but also the same error. What's wrong with it, would you like to tell me, thank you very much~ additionally, the component of spanning_tree is normal when run the command: ./nox_core -v -v -i ptcp:6633 spanning_tree and the JSONMsg_event is really in the file of pyjsonmsgevent.py. best wishes ; wang jian Wednesday ,November 16,2011 ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] what is the difference between pyswitch and routing module?
You're using ovs-ofctl to add a flow to a switch. In general, this isn't how NOX is intended to be used. The pyswitch and routing applications in NOX (and this is probably true for pretty much all NOX applications) assume that they are the only things installing flows. If you are manually adding flows externally, there is no telling what the results might be. In your case, I guess it seems to work for pyswitch and not for routing, but the opposite could easily have been true instead. The expected way to do this is to modify the NOX applications so that they install the rules you want (e.g., using enqueue instead of a simple output action) -- NOT to try to override NOX's behavior by manually installing flows. Hope that helps. -- Murphy On Nov 10, 2011, at 5:16 PM, Shan Hu wrote: I has this topology as follows: host2 | [eth2] ovs2 /\ / \ host1--ovs1 ovs3--host3 i set queue tables on ovs2,created two queues,assigned queue0 with rate 400mbps~500mbps,and queue1 with rate 600mbps~700mbps. Then on controller i run command: ./nox_core -ptcp:6633 pyswitch At last on ovs2 i run command: ./ovs-ofctl add flow br0 in_port=1(note:ovs1) ip nw_dst=xx.xx.xx.xx(note:host2 ip) idle_timeout=0 actions=enqueue:4:0(note:to make flows from port1 follow queue0 rule) Then i push data from host1 to host2, the rate is limited to 400mbps~500mbps. However,i do the same as above except that i changed command on controller to: ./nox_core -ptcp:6633 routing, the rate is not limited at all. I thought it might be the routing module problem since the rate is limited with pyswitch. Shan - Original Message - From: Murphy McCauley jam...@nau.edu To: Shan Hu shan...@utdallas.edu Cc: nox-dev nox-dev@noxrepo.org Sent: Thursday, November 10, 2011 3:41:04 PM Subject: Re: [nox-dev] what is the difference between pyswitch and routing module? How did you implement rate limiting with pyswitch, and how are you trying to do it with routing? I'm not sure exactly what you mean about the modules of NOX. They're all in the various coreapps/netapps/webapps directories in the NOX source repository. Not all of them are documented on the wiki (or anywhere, necessarily, except maybe the doxygen). -- Murphy On Nov 10, 2011, at 1:35 PM, Shan Hu wrote: Thank you very much for the explanation, Murphy. Right now,I try to reserve bandwidth and limit rate with the queue table, it works great with pyswitch component,but it doesnt work with routing component.What reason could it be? And another question,where can i find all the modules of NOX?There are not much in the noxwiki.Or, those in noxwiki already include all existing modules? regards, Shan - Original Message - From: Murphy McCauley jam...@nau.edu To: Shan Hu shan...@utdallas.edu Cc: nox-dev nox-dev@noxrepo.org Sent: Thursday, November 3, 2011 11:44:33 AM Subject: Re: [nox-dev] what is the difference between pyswitch and routing module? pyswitch is intended to be a very simple demo and does something along the lines of making each switch in the network a standalone L2 learning switch. Each switch gets no insight about the topology from its neighbors. routing actually uses a global view of the topology, and can just generate optimal paths between any two endpoints. A major result of this is that when running pyswitch, each switch needs to learn which port to use for each destination. Before it learns, each switch will need to flood packets for destinations it doesn't know yet -- a lot of packets will get sent the wrong way. With routing, once ANY switch can determine where a destination is, the entire system knows. Additionally, pyswitch's reliance on flooding is problematic for topologies with loops -- it's easy for packets to unknown destinations to loop indefinitely. Hope that helps clear things up. -- Murphy On Nov 2, 2011, at 11:34 AM, Shan Hu wrote: I'm wondering what's the different between routing module and pyswitch module? I can find from wiki that routing is basically a forwarding module. but what about pyswitch? Because after i connected 3 openvswitchs(like this:host1 -- ovs1 -- ovs2 -- ovs3 --host2),i firstly ran pyswitch module,then host1 can ping host2, however,i tried to run UDP traffic test,and found that the larger bandwidth i use, the more packet loss there are. Then i stopped pyswitch module and ran routing module, then host1 still can ping host2, and the UDP traffic test works well, almost all the packets are transfered from host1 to host2. why this happened? Shan ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org
Re: [nox-dev] what is the difference between pyswitch and routing module?
How did you implement rate limiting with pyswitch, and how are you trying to do it with routing? I'm not sure exactly what you mean about the modules of NOX. They're all in the various coreapps/netapps/webapps directories in the NOX source repository. Not all of them are documented on the wiki (or anywhere, necessarily, except maybe the doxygen). -- Murphy On Nov 10, 2011, at 1:35 PM, Shan Hu wrote: Thank you very much for the explanation, Murphy. Right now,I try to reserve bandwidth and limit rate with the queue table, it works great with pyswitch component,but it doesnt work with routing component.What reason could it be? And another question,where can i find all the modules of NOX?There are not much in the noxwiki.Or, those in noxwiki already include all existing modules? regards, Shan - Original Message - From: Murphy McCauley jam...@nau.edu To: Shan Hu shan...@utdallas.edu Cc: nox-dev nox-dev@noxrepo.org Sent: Thursday, November 3, 2011 11:44:33 AM Subject: Re: [nox-dev] what is the difference between pyswitch and routing module? pyswitch is intended to be a very simple demo and does something along the lines of making each switch in the network a standalone L2 learning switch. Each switch gets no insight about the topology from its neighbors. routing actually uses a global view of the topology, and can just generate optimal paths between any two endpoints. A major result of this is that when running pyswitch, each switch needs to learn which port to use for each destination. Before it learns, each switch will need to flood packets for destinations it doesn't know yet -- a lot of packets will get sent the wrong way. With routing, once ANY switch can determine where a destination is, the entire system knows. Additionally, pyswitch's reliance on flooding is problematic for topologies with loops -- it's easy for packets to unknown destinations to loop indefinitely. Hope that helps clear things up. -- Murphy On Nov 2, 2011, at 11:34 AM, Shan Hu wrote: I'm wondering what's the different between routing module and pyswitch module? I can find from wiki that routing is basically a forwarding module. but what about pyswitch? Because after i connected 3 openvswitchs(like this:host1 -- ovs1 -- ovs2 -- ovs3 --host2),i firstly ran pyswitch module,then host1 can ping host2, however,i tried to run UDP traffic test,and found that the larger bandwidth i use, the more packet loss there are. Then i stopped pyswitch module and ran routing module, then host1 still can ping host2, and the UDP traffic test works well, almost all the packets are transfered from host1 to host2. why this happened? Shan ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Switches crash when inserting OFPP_CONTROLLER actions
How do the switches crash? With an assertion about insufficient buffer headroom or something? Or about a bad buffer ID (are you applying multiple actions?)? Or do they just segfault? Feel free to send along a capture of the OpenFlow traffic between NOX and the switch (along with the NOX and switch logs if possible), and we can take a look. Though I'd be surprised if it was NOX sending something invalid that was causing your problem. If you can develop a very simple application that crashes the switches, that would be valuable, and you might try sending it to one of the OpenFlow mailing lists too. Any which way, the simplest answer is probably to use Open vSwitch instead of the OpenFlow reference implementation. -- Murphy On Nov 8, 2011, at 1:31 AM, andrea simeoni wrote: Hi guys, I'm running a test with 2 hosts, 2 OF switches and 1 controller. The switches and hosts are on 4 different ubuntu virtual machines and the controller is on the host machine. For switches I use the user space OF implementation. I modified the simplerouting code to install a OFPP_CONTROLLER action in both switches when a flow needs to be routed. To install actions I use the simple API provided by routeinstaller. It happens that both switches crash and close connection to controller. I tried the SAME controller on mininet (also with the same network topology) and things seem be working. Any suggestions? -- 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] co-thread starving?
Are you using co_sleep() to do the sleeping? -- Murphy On Nov 4, 2011, at 11:35 PM, danderson415 wrote: Hi, I am wondering how co-threads works. I create a co-thread in my component which just loop 100 times and sleep 100 ms and call co_yield() in the loop. If I run nox with my component, nox can not be connected by bridges until the loop is finished. Are all co-threads scheduled in round-robin or by some priorities? Thanks, David ___ 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 code problem about “util.py”
A function in Python is a first class object. In the code below, f is defined inside of gen_datapath_join_callback, and you get a new f. Since a function is just an object, gen_datapath_join_callback then adds a new property to f -- the cb property. Inside f, this property is accessed. I didn't write this piece of code, but it can actually be done a bit more simply. I would write it like this: def gen_datapath_join_callback(handler): def f(event): attrs = {} attrs[core.N_BUFFERS] = event.n_buffers attrs[core.N_TABLES] = event.n_tables attrs[core.CAPABILITES] = event.capabilities attrs[core.ACTIONS] = event.actions attrs[core.PORTS] = event.ports for i in range(0, len(attrs[core.PORTS])): port = attrs[core.PORTS][i] config = port['config'] state = port['state'] attrs[core.PORTS][i]['link']= (state openflow.OFPPS_LINK_DOWN) == 0 attrs[core.PORTS][i]['enabled'] = (config openflow.OFPPC_PORT_DOWN) == 0 attrs[core.PORTS][i]['flood'] = (config openflow.OFPPC_NO_FLOOD) == 0 ret = handler(event.datapath_id, attrs) if ret == None: return CONTINUE return ret return f I don't know how much that explains. The big point is that a function is an object like any other: it has properties, it can be passed around and returned, and there can be multiple instances of it. As for how f is invoked... register_for_datapath_join() takes a callback function (handler) that is supposed to get called on datapath join. Rather than actually have the given handler be the callback function, gen_datapath_join_callback() is used to generate a wrapper function. The callback that gen_datapath_join_callback() creates (f) does some stuff (e.g., stocking the attrs dictionary), and then calls handler. So the NOX event system calls f (via pyrt's Python_event_manager), and f calls the user-provided handler function. I hope that sheds at least a little light. -- Murphy On Nov 2, 2011, at 7:03 AM, hzy wrote: Hi all: when I look at the code in nox/src/nox/lib/util.py written in python. I was confused about some codes there. Because I am newbie to python. def gen_datapath_join_callback(handler): def f(event): attrs = {} attrs[core.N_BUFFERS] = event.n_buffers attrs[core.N_TABLES] = event.n_tables attrs[core.CAPABILITES] = event.capabilities attrs[core.ACTIONS] = event.actions attrs[core.PORTS] = event.ports for i in range(0, len(attrs[core.PORTS])): port = attrs[core.PORTS][i] config = port['config'] state = port['state'] attrs[core.PORTS][i]['link']= (state openflow.OFPPS_LINK_DOWN) == 0 attrs[core.PORTS][i]['enabled'] = (config openflow.OFPPC_PORT_DOWN) == 0 attrs[core.PORTS][i]['flood'] = (config openflow.OFPPC_NO_FLOOD) == 0 ret = f.cb(event.datapath_id, attrs) if ret == None: return CONTINUE return ret f.cb = handler return f Python can define a function in a function really confused me. I do not know how the function f(event) is invoked. and what the f.cb mean. Any ideas? Thanks forward. hzy ___ 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 code problem about “util.py”
The definition of register_handler is in pycontext.cc in pyrt. It's exposed to Python via SWIG. -- Murphy On Nov 2, 2011, at 10:14 PM, hzy wrote: the code problem I have solved after I looked the python books about function. but, when I look the codes in the core.py. def register_handler(self, event_name, handler): \brief Register an event handler. The handler will be called with: handler(event). 'event' is a dictionary containing data for the specific event. @param event_name name of the event @param handler handler function return self.ctxt.register_handler(event_name, handler) I can't find the ctxt.register_handler function's definition. I want to see how the register_handler works. which file can I find the definition? any ideas? 2011/11/2 hzy yyjianx...@gmail.com The reason why I need to look at the code is that I want to know how does NOX handle the Datapath_join_event. I know the gen_datapath_join_callback was invoked by function register_for_datapath_join in core.py. I am very interested in the architecture of NOX. I am eager to know how the NOX works. Any information will be appreciated. Thanks for advance. hzy 2011/11/2 hzy yyjianx...@gmail.com Hi all: when I look at the code in nox/src/nox/lib/util.py written in python. I was confused about some codes there. Because I am newbie to python. def gen_datapath_join_callback(handler): def f(event): attrs = {} attrs[core.N_BUFFERS] = event.n_buffers attrs[core.N_TABLES] = event.n_tables attrs[core.CAPABILITES] = event.capabilities attrs[core.ACTIONS] = event.actions attrs[core.PORTS] = event.ports for i in range(0, len(attrs[core.PORTS])): port = attrs[core.PORTS][i] config = port['config'] state = port['state'] attrs[core.PORTS][i]['link']= (state openflow.OFPPS_LINK_DOWN) == 0 attrs[core.PORTS][i]['enabled'] = (config openflow.OFPPC_PORT_DOWN) == 0 attrs[core.PORTS][i]['flood'] = (config openflow.OFPPC_NO_FLOOD) == 0 ret = f.cb(event.datapath_id, attrs) if ret == None: return CONTINUE return ret f.cb = handler return f Python can define a function in a function really confused me. I do not know how the function f(event) is invoked. and what the f.cb mean. Any ideas? Thanks forward. hzy ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] what is the difference between pyswitch and routing module?
pyswitch is intended to be a very simple demo and does something along the lines of making each switch in the network a standalone L2 learning switch. Each switch gets no insight about the topology from its neighbors. routing actually uses a global view of the topology, and can just generate optimal paths between any two endpoints. A major result of this is that when running pyswitch, each switch needs to learn which port to use for each destination. Before it learns, each switch will need to flood packets for destinations it doesn't know yet -- a lot of packets will get sent the wrong way. With routing, once ANY switch can determine where a destination is, the entire system knows. Additionally, pyswitch's reliance on flooding is problematic for topologies with loops -- it's easy for packets to unknown destinations to loop indefinitely. Hope that helps clear things up. -- Murphy On Nov 2, 2011, at 11:34 AM, Shan Hu wrote: I'm wondering what's the different between routing module and pyswitch module? I can find from wiki that routing is basically a forwarding module. but what about pyswitch? Because after i connected 3 openvswitchs(like this:host1 -- ovs1 -- ovs2 -- ovs3 --host2),i firstly ran pyswitch module,then host1 can ping host2, however,i tried to run UDP traffic test,and found that the larger bandwidth i use, the more packet loss there are. Then i stopped pyswitch module and ran routing module, then host1 still can ping host2, and the UDP traffic test works well, almost all the packets are transfered from host1 to host2. why this happened? Shan ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Error building dev/destiny-fast branch
This branch is quite a bit behind the actual development. We're preparing to release the updated codebase in the near future. But for one thing, Python doesn't work in it. So you probably need to do --with-python=no when you run configure. Hope that helps. -- Murphy On Oct 25, 2011, at 8:49 PM, Andreas Voellmy wrote: Thanks. I tried editing the conflict marker out in a couple ways that seemed reasonable to me, but I got other compile errors. Does anyone know if there is a known working version of this branch in the repository, and how I can get back to it? Thanks, Andreas 2011/10/25 Zoltán Lajos Kis zoltan.lajos@ericsson.com Seems like someone checked in a conflict marker to that file: http://noxrepo.org/cgi-bin/gitweb.cgi?p=nox;a=blob;f=src/nox/coreapps/pyrt/context.i;h=cb8641d72feb3a1f0543e97830a2addd55d502b9;hb=dev/destiny-fast#l83 Z. From: nox-dev-boun...@noxrepo.org [nox-dev-boun...@noxrepo.org] On Behalf Of Andreas Voellmy [andreas.voel...@gmail.com] Sent: Wednesday, October 26, 2011 4:40 AM To: nox-dev@noxrepo.org Subject: [nox-dev] Error building dev/destiny-fast branch Hi, I'd like to try the destiny-fast branch (I saw it mentioned here: http://www.openflow.org/wk/index.php/Controller_Performance_Comparisons), so I did the following git clone git://noxrepo.org/noxhttp://noxrepo.org/nox cd nox git checkout dev/destiny-fast Is that the right way to get this branch? After that I ran ./boot.sh mkdir build cd build ../configure make and got the following error: Making all in pyrt make[8]: Entering directory `/home/av/Download/nox-destiny/nox/build/src/nox/coreapps/pyrt' /usr/bin/swig -c++ -python -DSWIGWORDSIZE64 -I../../../../../src/include/openflow -I../../../../../src/nox/lib/ -outdir ./. -o oxidereactor_wrap.cc -module oxidereactor ../../../../../src/nox/coreapps/pyrt/oxidereactor.i /usr/bin/swig -c++ -python -DSWIGWORDSIZE64 -outdir ./. -o deferredcallback_wrap.cc -module deferredcallback ../../../../../src/nox/coreapps/pyrt/deferredcallback.i /usr/bin/swig -c++ -python -DSWIGWORDSIZE64 -I../../../../../src/include/openflow -I../../../../../src/nox/lib/ -outdir ./. -o pycomponent_wrap.cc -module pycomponent ../../../../../src/nox/coreapps/pyrt/component.i ../../../../../src/nox/coreapps/pyrt/context.i:79: Error: Syntax error in input(3). make[8]: *** [pycomponent.py] Error 1 Does anyone know what went wrong and how to fix this? Thanks, Andreas ___ 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] meta.xml converts to meta.json
To use it, you just do something like: python nox-convert-meta.py meta.xml meta.json But here's the result: { components: [ { python: nox.netapps.mobilevms.mobilevms, dependencies: [ python, pyrouting, pyauthenticator ], name: mobilevms }, { python: nox.netapps.mobilevms.basicrouting, dependencies: [ pyrouting, authenticator, broadcast_resolve ], name: basicrouting } ] } Just paste that into a meta.json file and hopefully you're good to go. -- Murphy On Oct 25, 2011, at 11:09 PM, 王健 wrote: hello,everyone. I am a new comer of openflow, now i want to use the mobilevms app, but my branch of NOX is destiny, i need to convert the meta.xml to meta.json, because the old version of NOX uses meta.xml to describe the compenents, but the NOX destiny uses meta.json to describe the compenents. i also konw that the nox-convert-meta.py script(in src/scripts) is meant for doing this, but i do not konw how to use it , anyone who can help me,thank you very much. It is better to show the output of the meta.json for mobilevms.The attachment is meta.xml file for mobilevms. Look forward to hear form you~ best wishes nb sp; wang jian on Wednesday , Ocotober 26, 2011 meta.xml___ 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] Sending UDP traffic in openflow network
You'll probably find more help for this on the ovs-discuss mailing list. Good luck! -- Murphy On Oct 26, 2011, at 5:34 PM, Shan Hu wrote: Hi guys, Im trying to test the Qos Rate-Limiting of Kernel vSwitch, i use iperf as my measurement tool. Everything is working fine with TCP part,that is, after i limit rate of one port to, say 50Mbps, the rate is limited to 50Mbps correctly and packets are tranferred 100%. But when i turn to UDP part,i ran into problems.I have to limit bandwidth to at most 4Mbps in order to tranfer 100% packets.And if i use bandwidth more than 4Mbps, the lost packets increase, the worst packet lost percentage is almost 99%. Firstly i thought it is iperf's problem, so i tried to run iperf in normal network,i set bandwidth to 50Mbps, and things work fine. So can anyone give me some ideas where the problem might be? regards, Shan ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] NOX cannot be compiled in Ubuntu 11.10?
So yeah, it doesn't surprise me that make check doesn't work. I don't think I have ever touched the tests, and I think a lot of them have been broken for quite a while now. If people are interested, maybe someone should take up maintaining them. But I personally have no knowledge of anyone ever actually finding them useful. I'm actually inclined to just remove them... I think your Python error was also addressed quite a while ago in destiny. This is going to be a recurring theme -- are you using zaku for any particular reason? -- Murphy On Oct 21, 2011, at 11:19 PM, Heryandi wrote: Thanks again Murphy. After applying 'aee2a3fb696a497a87a30cfc3285d142a464cbc0' and '473be844299ee7b213e9f7dc67ebea212af7d02f' to zaku, I am now able to 'make' successfully, with both boost 1.42 and boost 1.46. However, 'make check' didn't run successfully. The error message is the same for both boost 1.42 and 1.46. Below is the error message: make test-classifier test-coop-preblock-hook test-coop-sema test-coop-signals test-ethernetaddr test-event-dispatcher-blocking test-event-dispatcher-starvation test-poll-loop-removal test-timer-dispatcher-delay test-timer-dispatcher-duplicates test-timer-dispatcher-starvation test-timeval test-type-props make[4]: Entering directory `/home/heryandi/Downloads/nox-patched/build/src/tests' g++ -DHAVE_CONFIG_H -I. -I../../../src/tests -I../.. -DPKGDATADIR=\/usr/local/share/nox\ -DPKGLIBDIR=\/usr/local/bin/tests\ -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 -fno-omit-frame-pointer -fno-strict-aliasing -Wall -Wno-sign-compare -Winit-self -Wformat-nonliteral -Wformat-security -g -O2 -MT test-classifier.o -MD -MP -MF .deps/test-classifier.Tpo -c -o test-classifier.o ../../../src/tests/test-classifier.cc ../../../src/tests/test-classifier.cc: In function ‘void timed_test(Classifier_tvigil::Packet_expr, void*, Rule_list)’: ../../../src/tests/test-classifier.cc:133:38: warning: variable ‘match’ set but not used [-Wunused-but-set-variable] mv -f .deps/test-classifier.Tpo .deps/test-classifier.Po /bin/bash ../../libtool --tag=CXX --mode=link g++ -fno-omit-frame-pointer -fno-strict-aliasing -Wall -Wno-sign-compare -Winit-self -Wformat-nonliteral -Wformat-security -g -O2 -R/usr/local/bin/tests -export-dynamic -o test-classifier test-classifier.o ../lib/libnoxcore.la ../builtin/.libs/libbuiltin.la -L/usr/lib -lboost_unit_test_framework-mt -lboost_filesystem-mt -lssl -lcrypto ../components.xsd.o ../nox.xsd.o libtool: link: g++ -fno-omit-frame-pointer -fno-strict-aliasing -Wall -Wno-sign-compare -Winit-self -Wformat-nonliteral -Wformat-security -g -O2 -o .libs/test-classifier test-classifier.o ../components.xsd.o ../nox.xsd.o -Wl,--export-dynamic ../lib/.libs/libnoxcore.so ../builtin/.libs/libbuiltin.so -L/usr/lib -lboost_unit_test_framework-mt -lboost_filesystem-mt -lssl -lcrypto -Wl,-rpath -Wl,/usr/local/bin/builtin -Wl,-rpath -Wl,/usr/local/bin/tests /usr/bin/ld: ../components.xsd.o: undefined reference to symbol 'boost::system::system_category()' /usr/bin/ld: note: 'boost::system::system_category()' is defined in DSO /usr/lib/libboost_system.so.1.46.1 so try adding it to the linker command line /usr/lib/libboost_system.so.1.46.1: could not read symbols: Invalid operation collect2: ld returned 1 exit status My guess is that the script to run test cases updated with previous changes yet. There is another problem, not with boost. When I run './nox_core', the result is: NOX 0.9.0(zaku)~full~beta (nox_core), compiled Oct 22 2011 11:08:35 Compiled with OpenFlow 0x01 1|nox|ERR:Cannot change the state of 'python' to INSTALLED: 'python' ran into an error: Unable to construct a Python component: Traceback (most recent call last): File ./nox/coreapps/pyrt/pyoxidereactor.py, line 364, in instance return pyoxidereactor(ctxt) File ./nox/coreapps/pyrt/pyoxidereactor.py, line 133, in __init__ signal.signal(signal.SIGCHLD, self._handleSigchld) AttributeError: 'pyoxidereactor' object has no attribute '_handleSigchld' However, after I apply the patch 9b8aeb5c7401c0f6869c0f214566459520151358 from destiny branch to zaku branch, it can be run without error. Although I don't know whether there is a problem underneath because the test cases fail because of the problem with boost. Regards, Heryandi From: Murphy McCauley [jam...@nau.edu] Sent: Friday, October 21, 2011 7:39 PM To: Heryandi Cc: nox-dev@noxrepo.org Subject: Re: [nox-dev] NOX cannot be compiled in Ubuntu 11.10
Re: [nox-dev] NOX cannot be compiled in Ubuntu 11.10?
At this point, destiny is really the branch of choice for new installations, and is more than ripe to become the new stable branch. We'll be becoming more transparent about our (rather loose) policies on this type of thing, but basically part of it for a while now has been that the stable branch runs on OSes/libraries that were current when it was released, while the unstable branch more or less tracks current systems/libraries. -- Murphy On Oct 21, 2011, at 11:49 PM, Heryandi wrote: I see... I will just ignore the test cases then. The python error was already fixed almost one year ago in destiny... Well, there is no other reason for me to use zaku other than because it is the stable branch... Thanks for the help so far, Murphy. Regards, Heryandi From: Murphy McCauley [jam...@nau.edu] Sent: Saturday, October 22, 2011 2:28 PM To: Heryandi Cc: nox-dev@noxrepo.org Subject: Re: [nox-dev] NOX cannot be compiled in Ubuntu 11.10? So yeah, it doesn't surprise me that make check doesn't work. I don't think I have ever touched the tests, and I think a lot of them have been broken for quite a while now. If people are interested, maybe someone should take up maintaining them. But I personally have no knowledge of anyone ever actually finding them useful. I'm actually inclined to just remove them... I think your Python error was also addressed quite a while ago in destiny. This is going to be a recurring theme -- are you using zaku for any particular reason? -- Murphy On Oct 21, 2011, at 11:19 PM, Heryandi wrote: Thanks again Murphy. After applying 'aee2a3fb696a497a87a30cfc3285d142a464cbc0' and '473be844299ee7b213e9f7dc67ebea212af7d02f' to zaku, I am now able to 'make' successfully, with both boost 1.42 and boost 1.46. However, 'make check' didn't run successfully. The error message is the same for both boost 1.42 and 1.46. Below is the error message: make test-classifier test-coop-preblock-hook test-coop-sema test-coop-signals test-ethernetaddr test-event-dispatcher-blocking test-event-dispatcher-starvation test-poll-loop-removal test-timer-dispatcher-delay test-timer-dispatcher-duplicates test-timer-dispatcher-starvation test-timeval test-type-props make[4]: Entering directory `/home/heryandi/Downloads/nox-patched/build/src/tests' g++ -DHAVE_CONFIG_H -I. -I../../../src/tests -I../.. -DPKGDATADIR=\/usr/local/share/nox\ -DPKGLIBDIR=\/usr/local/bin/tests\ -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 -fno-omit-frame-pointer -fno-strict-aliasing -Wall -Wno-sign-compare -Winit-self -Wformat-nonliteral -Wformat-security -g -O2 -MT test-classifier.o -MD -MP -MF .deps/test-classifier.Tpo -c -o test-classifier.o ../../../src/tests/test-classifier.cc ../../../src/tests/test-classifier.cc: In function ‘void timed_test(Classifier_tvigil::Packet_expr, void*, Rule_list)’: ../../../src/tests/test-classifier.cc:133:38: warning: variable ‘match’ set but not used [-Wunused-but-set-variable] mv -f .deps/test-classifier.Tpo .deps/test-classifier.Po /bin/bash ../../libtool --tag=CXX --mode=link g++ -fno-omit-frame-pointer -fno-strict-aliasing -Wall -Wno-sign-compare -Winit-self -Wformat-nonliteral -Wformat-security -g -O2 -R/usr/local/bin/tests -export-dynamic -o test-classifier test-classifier.o ../lib/libnoxcore.la ../builtin/.libs/libbuiltin.la -L/usr/lib -lboost_unit_test_framework-mt -lboost_filesystem-mt -lssl -lcrypto ../components.xsd.o ../nox.xsd.o libtool: link: g++ -fno-omit-frame-pointer -fno-strict-aliasing -Wall -Wno-sign-compare -Winit-self -Wformat-nonliteral -Wformat-security -g -O2 -o .libs/test-classifier test-classifier.o ../components.xsd.o ../nox.xsd.o -Wl,--export-dynamic ../lib/.libs/libnoxcore.so ../builtin/.libs/libbuiltin.so -L/usr/lib -lboost_unit_test_framework-mt -lboost_filesystem-mt -lssl -lcrypto -Wl,-rpath -Wl,/usr/local/bin/builtin -Wl,-rpath -Wl,/usr/local/bin/tests /usr/bin/ld: ../components.xsd.o: undefined reference to symbol 'boost::system::system_category()' /usr/bin/ld: note: 'boost::system::system_category()' is defined in DSO /usr/lib/libboost_system.so.1.46.1 so try adding it to the linker command line /usr/lib/libboost_system.so.1.46.1: could not read symbols: Invalid operation collect2: ld returned 1 exit status My guess is that the script to run test cases updated with previous changes yet. There is another problem, not with boost. When I run './nox_core', the result is: NOX 0.9.0(zaku)~full~beta (nox_core), compiled Oct 22 2011 11:08:35 Compiled with OpenFlow 0x01 1|nox
Re: [nox-dev] NOX cannot be compiled in Ubuntu 11.10?
Patches to fix this link error and to make us compatible with Boost 1.46 have been pushed. -- Murphy On Oct 20, 2011, at 11:17 PM, Heryandi wrote: Thanks Murphy, I tried applying the changes from 73fc9071b9d4f77b8314bf44fe4e5c6bccb480df in destiny branch to the zaku branch and now I can 'configure' successfully. But I am still not able to compile NOX. When I 'make' I got this error message: /bin/bash ../libtool --tag=CXX --mode=link g++ -fno-omit-frame-pointer -fno-strict-aliasing -Wall -Wno-sign-compare -Winit-self -Wformat-nonliteral -Wformat-security -g -O2 -R/usr/local/bin -export-dynamic -L/usr/lib -lboost_unit_test_framework-mt -lboost_filesystem-mt -lssl -lcrypto -Wl,-E -o nox_core components.xsd.o nox.xsd.o nox_main.o ./builtin/.libs/libbuiltin.la ./lib/libnoxcore.la libtool: link: g++ -fno-omit-frame-pointer -fno-strict-aliasing -Wall -Wno-sign-compare -Winit-self -Wformat-nonliteral -Wformat-security -g -O2 -Wl,-E -o .libs/nox_core components.xsd.o nox.xsd.o nox_main.o -Wl,--export-dynamic -L/usr/lib -lboost_unit_test_framework-mt -lboost_filesystem-mt -lssl -lcrypto ./builtin/.libs/libbuiltin.so ./lib/.libs/libnoxcore.so -Wl,-rpath -Wl,/usr/local/bin/builtin -Wl,-rpath -Wl,/usr/local/bin /usr/bin/ld: components.xsd.o: undefined reference to symbol 'boost::system::get_system_category()' /usr/bin/ld: note: 'boost::system::get_system_category()' is defined in DSO /usr/lib/libboost_system.so.1.42.0 so try adding it to the linker command line /usr/lib/libboost_system.so.1.42.0: could not read symbols: Invalid operation collect2: ld returned 1 exit status I am currently using boost 1.42. Previously I used boost 1.46 but there was another error message (which I didn't keep) and I thought the boost used is too new, therefore I changed it to 1.42. I can provide the 'make' log message with boost 1.46 if needed. Regards, Heryandi -Original Message- From: Murphy McCauley [mailto:jam...@nau.edu] Sent: Thursday, October 20, 2011 4:52 PM To: Heryandi Cc: nox-dev@noxrepo.org Subject: Re: [nox-dev] NOX cannot be compiled in Ubuntu 11.10? I believe I fixed this in the destiny branch some time ago. Give that a shot? -- Murphy On Oct 20, 2011, at 1:32 AM, Heryandi wrote: Hi all, I have previously compiled NOX successfully in ubuntu 10.04. Now, I am trying to compile NOX zaku in my ubuntu 11.10 VM, but it doesn't work. All the NOX dependencies have been installed. Here is the end of the configure output: checking pcap.h usability... yes checking pcap.h presence... yes checking for pcap.h... yes checking openssl/md5.h usability... yes checking openssl/md5.h presence... yes checking for openssl/md5.h... yes checking for MD5_Init in -lssl... no configure: error: openssl/md5.h not found. NOX requires OpenSSL The full log and the config.log output are as attached. I have installed openssl and I can find the md5.h inside /usr/include/openssl/md5.h. Regards, Heryandi CONFIDENTIALITY: This email is intended solely for the person(s) named and may be confidential and/or privileged. If you are not the intended recipient, please delete it, notify us and do not copy, use, or disclose its content. Towards A Sustainable Earth: Print Only When Necessary. Thank you. config.logconfigure output.log___ 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] The status of NOX
This is a quick update about the status of NOX. While, over the past few years, NOX has gone from the only controller available to one among many controller options, we want to emphasize that NOX is still here and is being actively maintained and improved. The NOX community is largely centered around the nox-dev mailing list (which is relatively active -- something like 100 posts per month), and consists of a mix of users -- those just playing around with the technology (asking questions), those actively using NOX for research or other projects (reporting bugs), those using NOX for a commercial product, and a handful of developers (who, we hope, are effectively meeting the needs of the previous three groups). There has also been some progress on NOX that hasn't been widely discussed yet. Specifically, there's a new branch which we're pretty excited about. It is the biggest update to NOX we've seen so far, and it responds to requests from the community: in particular, this release involves a streamlining of the codebase and API, along with a sizable performance jump. We are close to making this branch public. We also know that quite a few NOX users appreciate the Python interface. We want to support these users even better. To that end, we've been developing POX -- a new controller framework written in pure Python. We think it's pretty quick and easy to hack on, and it is remarkably easy to deploy. It's still under active initial development, but there are a handful of projects using it now or that are planning to use it soon. We aren't sure exactly when to expect a 1.0 release of POX, but it's coming along. In short: NOX has a thriving community of users, both commercial and academic, and an active set of developers committed to maintaining and improving the codebase, with bugs fixed rapidly and a fairly substantial NOX upgrade on the way. There's even an entirely new Python-only controller in the works to provide an even easier-to-use controller for those who want a Python interface. The comments at ONS about lack of NOX support were ill-informed and may have caused a bit of undue concern, and we hope this note clarifies the situation. We remain interested in your feedback, stand ready to fix any problems you find, and are excited to keep the project moving forward. Murphy McCauley Martin Casado Kyriakos Zarifis Amin Tootoonchian ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] NOX cannot be compiled in Ubuntu 11.10?
I believe I fixed this in the destiny branch some time ago. Give that a shot? -- Murphy On Oct 20, 2011, at 1:32 AM, Heryandi wrote: Hi all, I have previously compiled NOX successfully in ubuntu 10.04. Now, I am trying to compile NOX zaku in my ubuntu 11.10 VM, but it doesn't work. All the NOX dependencies have been installed. Here is the end of the configure output: checking pcap.h usability... yes checking pcap.h presence... yes checking for pcap.h... yes checking openssl/md5.h usability... yes checking openssl/md5.h presence... yes checking for openssl/md5.h... yes checking for MD5_Init in -lssl... no configure: error: openssl/md5.h not found. NOX requires OpenSSL The full log and the config.log output are as attached. I have installed openssl and I can find the md5.h inside /usr/include/openssl/md5.h. Regards, Heryandi CONFIDENTIALITY: This email is intended solely for the person(s) named and may be confidential and/or privileged. If you are not the intended recipient, please delete it, notify us and do not copy, use, or disclose its content. Towards A Sustainable Earth: Print Only When Necessary. Thank you. config.logconfigure output.log___ 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] Sending Entire packet to NOX contoller
The problem is that this isn't true anymore. Since OpenFlow 0.9 or 1.0, you should set it to 0x instead of 0. 0 does exactly what it seems like it should -- send 0 bytes of data. -- Murphy On Oct 17, 2011, at 4:39 AM, ali ahmad wrote: Hi all, I have a query that how we can instruct the switch to send the entire packet rather i found solution to this as in To instruct the switch to send the entire packet to NOX, we have to make some changes to src/lib/openflow.cc. The following statement osc.miss_send_len = htons(OFP_DEFAULT_MISS_SEND_LEN); has to be changed to osc.miss_send_len = htons(0);(1) But when i changed the parameter in the openflow.cc file and recompiled the NOX it has started dropping the packet giving the error packet to short. My question is that by sending entire packet do we mean sending application level data.. Regards, Ali Ahmad ___ 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] Bugs in the send_openflow_command(..) and send_openflow_packet(..)
Assuming you're installing a route along multiple switches, all of them except maybe one should probably have an empty (0x) buffer_id. This doesn't seem like it should be the problem. I can't even hazard a guess without knowing more about the situation. What version of NOX are you running? What kind of switch? What does the NOX log show? Can you provide a capture of the OpenFlow traffic between a switch that sends an error and the controller? -- Murphy On Oct 17, 2011, at 6:33 AM, andrea simeoni wrote: Hi guys, I'm trying to run the simplerouting component, and found that when installing the route it receives Malformed packet error messages back from the switches. The same happens when calling send_openflow_packet(..). If i go in wireshark to analyse the controller-switches openflow packets, I find that the field buffer-id has None value in both cases. Any suggestions? How can I make things working properly? -- 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] How use send_openflow_packet(indpid, pie.buffer_id, const ofp_action_header actions[] ...)
On first glance, yes, that looks correct. Then just cast arrbuff.data() to the appropriate type and pass it as the actions parameter. -- Murphy On Oct 17, 2011, at 5:28 AM, andrea simeoni wrote: Hi guys, I'm trying to instruct a switch to send a buffered packet out of a port. Then I'm trying to use the function send_openflow_packet(indpid, pie.buffer_id, const ofp_action_header actions[] ...). If I start from an ofp_action_list how can I get the correct ofp_action_header []? I tried the following code: ofp_action_list* act_list=new ofp_action_list(); ofp_action* act = new ofp_action(); act-set_action_output(2, 0); // output on port 2 act_list-action_list.push_back(*act); Array_buffer arrbuff(act_list-mem_size()); act_list-pack(arrbuff.data()); It's correct? What is the correct ofp_action_header [] parameter to pass to the function? Thank you -- 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] Bugs in the send_openflow_command(..) and send_openflow_packet(..)
Yes. Use 0x as the second parameter to set_action_output(). -- Murphy On Oct 17, 2011, at 7:14 AM, andrea simeoni wrote: You are right Murphy, in the case of simplerouting, I receive error messages by all switches along the path except for the first (as it is the only having a non empty buffer-id for that packet). I didn't know that those OF errors could be ignored. I solved also the question for the send_openflow_packet() instruction. Since the reason of my packet-in events is explicitely send to controller, then packets are never buffered in switches. However I've a little question more: When I configure the action OFPP_CONTROLLER using ofp_action, is there a way to tell the switch to send the whole packet to the controller, using the ofp_action::set_action_output()? Thank you very much 2011/10/17 Murphy McCauley jam...@nau.edu Assuming you're installing a route along multiple switches, all of them except maybe one should probably have an empty (0x) buffer_id. This doesn't seem like it should be the problem. I can't even hazard a guess without knowing more about the situation. What version of NOX are you running? What kind of switch? What does the NOX log show? Can you provide a capture of the OpenFlow traffic between a switch that sends an error and the controller? -- Murphy On Oct 17, 2011, at 6:33 AM, andrea simeoni wrote: Hi guys, I'm trying to run the simplerouting component, and found that when installing the route it receives Malformed packet error messages back from the switches. The same happens when calling send_openflow_packet(..). If i go in wireshark to analyse the controller-switches openflow packets, I find that the field buffer-id has None value in both cases. Any suggestions? How can I make things working properly? -- 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] using scapy with nox
From the second listing, I think line 7 can be something like: e = Ether(packet.arr.tostring()) (which is much more efficient and straightforward) -- Murphy On Oct 13, 2011, at 3:48 PM, Javier Liendo wrote: hi experts... i know it is of really bad etiquette answering over you own email, but as soon i sent this mail i did the following test which seems to be working...just wanted to share it and see if anybody sees anything wrong with this approach... i defined an hex-string to an hex-binary-blob function inside packet_utils.py (conversion method taken from Brian@stackoverflow) 1 def octstr_to_hexbinary(octstr): 2hexdigits = [int(x,16) for x in octstr] 3blob = ''.join(struct.pack('B',(high4) + low) for high,low in zip(hexdigits[::2], hexdigits[1::2])) 4return blob then on my controller program i did the following 1 from scapy.all import * 2 ... 3 def arping_me(self, dpid, inport, packet, buf, bufid): 4 If arping one of my own IPs respond 5log.debug(+++ inside arping_me) 6print array_to_octstr(packet.arr) 7e=Ether(octstr_to_hexbinary(array_to_octstr(packet.arr))) 8e.show() in (6) i'm printing the hex string representation of the packet... in (7) i'm calling octstr_to_hexbinary to get a binary blob that i could use with scapy... in (8) i get a variable 'e' which can be scapy-manipulated... does this sounds right? regards, javier On Thu, Oct 13, 2011 at 4:40 PM, Javier Liendo jav...@liendo.net wrote: hi experts, a) is there a way to decode/parse a receiving packet inside nox using scapy? b) is it possible to craft a packet using scapy and then use it (i.e. send_openflow) inside nox? regards, javier ___ 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] Accessing TCP sequence numbers on packet-in-events
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 ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] how to use discovery component?
So first off, maybe you have a reason, but in general, the hope is that you should have no reason to modify discovery.py. Rather than modify discovery.py to explicitly call your component, hopefully you should be able to simply handle discovery's Link_event. If you really do need to modify discovery.py to call your component explicitly, then as for why your code doesn't work, I don't think I have enough information to say. Assuming that your paths are right (you have a directory/package called my_experiment) and that in my_router.py you have a class/component called my_router... my best guess is that you didn't implement getInterface() in my_router in the expected way. Try adding the following to your my_router class: def getInterface (self): return my_router Hope that helps. -- Murphy On Oct 10, 2011, at 6:45 AM, hzy wrote: hi murpy: Thank you for your reply. it works now, but another problem comes up. This time I want the discovery component invoke the dic_all_path defined in my modle. So I add following codes in discovery component self._my_router = self.resolve(nox.coreapps.my_experiment.my_router.my_router) print self._my_router.dic_all_path I also tried these codes from nox.coreapps.my_experiment import my_router self._my_router = self.resolve(my_router.my_router print self._my_router.dic_all_path 00206|pyrt|ERR:unable to invoke a Python event handler: Traceback (most recent call last): File ./nox/lib/util.py, line 116, in f event.total_len, buffer_id, packet) File ./nox/netapps/discovery/discovery.py, line 163, in lambda discovery.lldp_input_handler(self,dp,inport,reason,len,bid,packet), File ./nox/netapps/discovery/discovery.py, line 312, in lldp_input_handler print self._my_router.dic_all_path AttributeError: 'NoneType' object has no attribute 'dic_all_path' any ideas. best regards. hzy 2011/10/9 Murphy McCauley jam...@nau.edu So, the discovery component is a class named discovery in a module named discovery in a package named discovery. So it's... discovery.discovery.discovery. You've only got discovery.discovery. I can see how it's a bit confusing. :) So try the following instead: self._discovery = self.resolve(discovery.discovery) Or alternatively, do: self._discovery = self.resolve(nox.netapps.discovery.discovery.discovery) (In this case, you don't even need the import statement) -- Murphy On Oct 9, 2011, at 1:21 AM, hzy wrote: hi all: Inorder to find interconnected links in my topology, i would like to use discovery.py. In my own component I want to check the adjacency_list which is a public attribute in discovery module. How can I use discovery from my component. I add the following codes, but it doesn't work. from nox.netapps.discovery import discovery self._discovery = self.resolve(discovery) print self._discovery.adjacency_list File ./nox/coreapps/my_experiment/my_router.py, line 499, in datapath_join_callback print self._discovery.adjacency_list AttributeError: 'NoneType' object has no attribute 'adjacency_list' any ideas? thanks for advance. best regards hzy ___ 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 use discovery component?
Whoops. I meant: def getInterface (self): return str(my_router) Sorry about that! -- Murphy On Oct 10, 2011, at 7:51 AM, Murphy McCauley wrote: So first off, maybe you have a reason, but in general, the hope is that you should have no reason to modify discovery.py. Rather than modify discovery.py to explicitly call your component, hopefully you should be able to simply handle discovery's Link_event. If you really do need to modify discovery.py to call your component explicitly, then as for why your code doesn't work, I don't think I have enough information to say. Assuming that your paths are right (you have a directory/package called my_experiment) and that in my_router.py you have a class/component called my_router... my best guess is that you didn't implement getInterface() in my_router in the expected way. Try adding the following to your my_router class: def getInterface (self): return my_router Hope that helps. -- Murphy On Oct 10, 2011, at 6:45 AM, hzy wrote: hi murpy: Thank you for your reply. it works now, but another problem comes up. This time I want the discovery component invoke the dic_all_path defined in my modle. So I add following codes in discovery component self._my_router = self.resolve(nox.coreapps.my_experiment.my_router.my_router) print self._my_router.dic_all_path I also tried these codes from nox.coreapps.my_experiment import my_router self._my_router = self.resolve(my_router.my_router print self._my_router.dic_all_path 00206|pyrt|ERR:unable to invoke a Python event handler: Traceback (most recent call last): File ./nox/lib/util.py, line 116, in f event.total_len, buffer_id, packet) File ./nox/netapps/discovery/discovery.py, line 163, in lambda discovery.lldp_input_handler(self,dp,inport,reason,len,bid,packet), File ./nox/netapps/discovery/discovery.py, line 312, in lldp_input_handler print self._my_router.dic_all_path AttributeError: 'NoneType' object has no attribute 'dic_all_path' any ideas. best regards. hzy 2011/10/9 Murphy McCauley jam...@nau.edu So, the discovery component is a class named discovery in a module named discovery in a package named discovery. So it's... discovery.discovery.discovery. You've only got discovery.discovery. I can see how it's a bit confusing. :) So try the following instead: self._discovery = self.resolve(discovery.discovery) Or alternatively, do: self._discovery = self.resolve(nox.netapps.discovery.discovery.discovery) (In this case, you don't even need the import statement) -- Murphy On Oct 9, 2011, at 1:21 AM, hzy wrote: hi all: Inorder to find interconnected links in my topology, i would like to use discovery.py. In my own component I want to check the adjacency_list which is a public attribute in discovery module. How can I use discovery from my component. I add the following codes, but it doesn't work. from nox.netapps.discovery import discovery self._discovery = self.resolve(discovery) print self._discovery.adjacency_list File ./nox/coreapps/my_experiment/my_router.py, line 499, in datapath_join_callback print self._discovery.adjacency_list AttributeError: 'NoneType' object has no attribute 'adjacency_list' any ideas? thanks for advance. best regards hzy ___ 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 use discovery component?
I don't know anything about pytutorial (it's not one of the mainlin NOX components), so I don't really know what to make of that. You tried implementing getInterface() like below on your my_router class? def getInterface (self): return str(my_router) And the results were the same? This is unrelated, but you also seem to be using a version of NOX that's over a year old. The destiny branch in particular has many bug fixes. -- Murphy On Oct 10, 2011, at 7:40 PM, hzy wrote: Hi murphy: Thank you for your reply, but I have added these codes in my component. This time I tried to invoke component pytutorial, so that you can get more information in your computer. So I add following codes in discovery component. self._pytutorial = self.resolve(nox.coreapps.tutorial.pytutorial.pyturorial) print self._pytutorial.mac_to_port 00478|pyrt|ERR:unable to invoke a Python event handler: Traceback (most recent call last): File ./nox/lib/util.py, line 116, in f event.total_len, buffer_id, packet) File ./nox/netapps/discovery/discovery.py, line 166, in lambda discovery.lldp_input_handler(self,dp,inport,reason,len,bid,packet), File ./nox/netapps/discovery/discovery.py, line 316, in lldp_input_handler print self._pytutorial.mac_to_port AttributeError: 'NoneType' object has no attribute 'mac_to_port' I was confused. In other hand, I accept your advise to handle discovery's Link_even. Since I am a newbie, can you give me some advice how to deal with Link_event in my component? Best regards. hzy 2011/10/10 Murphy McCauley jam...@nau.edu Whoops. I meant: def getInterface (self): return str(my_router) Sorry about that! -- Murphy On Oct 10, 2011, at 7:51 AM, Murphy McCauley wrote: So first off, maybe you have a reason, but in general, the hope is that you should have no reason to modify discovery.py. Rather than modify discovery.py to explicitly call your component, hopefully you should be able to simply handle discovery's Link_event. If you really do need to modify discovery.py to call your component explicitly, then as for why your code doesn't work, I don't think I have enough information to say. Assuming that your paths are right (you have a directory/package called my_experiment) and that in my_router.py you have a class/component called my_router... my best guess is that you didn't implement getInterface() in my_router in the expected way. Try adding the following to your my_router class: def getInterface (self): return my_router Hope that helps. -- Murphy On Oct 10, 2011, at 6:45 AM, hzy wrote: hi murpy: Thank you for your reply. it works now, but another problem comes up. This time I want the discovery component invoke the dic_all_path defined in my modle. So I add following codes in discovery component self._my_router = self.resolve(nox.coreapps.my_experiment.my_router.my_router) print self._my_router.dic_all_path I also tried these codes from nox.coreapps.my_experiment import my_router self._my_router = self.resolve(my_router.my_router print self._my_router.dic_all_path 00206|pyrt|ERR:unable to invoke a Python event handler: Traceback (most recent call last): File ./nox/lib/util.py, line 116, in f event.total_len, buffer_id, packet) File ./nox/netapps/discovery/discovery.py, line 163, in lambda discovery.lldp_input_handler(self,dp,inport,reason,len,bid,packet), File ./nox/netapps/discovery/discovery.py, line 312, in lldp_input_handler print self._my_router.dic_all_path AttributeError: 'NoneType' object has no attribute 'dic_all_path' any ideas. best regards. hzy 2011/10/9 Murphy McCauley jam...@nau.edu So, the discovery component is a class named discovery in a module named discovery in a package named discovery. So it's... discovery.discovery.discovery. You've only got discovery.discovery. I can see how it's a bit confusing. :) So try the following instead: self._discovery = self.resolve(discovery.discovery) Or alternatively, do: self._discovery = self.resolve(nox.netapps.discovery.discovery.discovery) (In this case, you don't even need the import statement) -- Murphy On Oct 9, 2011, at 1:21 AM, hzy wrote: hi all: Inorder to find interconnected links in my topology, i would like to use discovery.py. In my own component I want to check the adjacency_list which is a public attribute in discovery module. How can I use discovery from my component. I add the following codes, but it doesn't work. from nox.netapps.discovery import discovery self._discovery = self.resolve(discovery) print self._discovery.adjacency_list File ./nox/coreapps/my_experiment/my_router.py, line 499, in datapath_join_callback print self._discovery.adjacency_list AttributeError: 'NoneType' object has no attribute 'adjacency_list' any ideas? thanks for advance. best regards hzy
Re: [nox-dev] Configuring a NOX component
For Python components, it takes a single parameter, which is a dictionary. That dictionary has a key called arguments, which then holds the commandline arguments that were specified along with the component. I think the webserver component has an example of this. I can't remember if a way to read config file entries was ever added. For C++ components, it takes a pointer to a Configuration object, which has methods to retrieve commandline arguments and config file entries. Take a look in component.hh for some specifics, and you can look in jsonmessenger.cc for an example. Hope that helps. -- Murphy On Oct 7, 2011, at 8:26 AM, Shrutarshi Basu wrote: Hi, The Nox dev documentation says that I can write a configure() method to configure a NOX component prior to installing but it doesn't say anything about what the parameters to this method should be. I can't find a example that actually uses the configure method. Can someone give me a sketch of what a configure() method should look like (or point me to an example)? I'm assuming that we're supposed to pass parameters to this configure() method instead of directly to the component's init() method. Thanks, Shrutarshi -- 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] A question about network.graph.hh
.. 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 ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Setting up a Flowmod in several Openflow switches at once.
The buffer_id isn't required. Set it to -1 on the switches that aren't the one that it originated from. This could be clearer in the spec, but it's in there. Also, you might want to take a look at the routing components in NOX (e.g., sprouting), since installing flows along an optimal path is what they do (where optimal in this case means a minimal hop count). -- Murphy On Oct 5, 2011, at 1:34 AM, Sergio Jiménez Feijóo wrote: Hi, I'm developping an Openflow app which calculates the optimal path between two Openflow switches. Once my app knows the path to use it needs to set up a flowmod in all the switches involved in the path. The code of my app is triggered everytime a Packet_in_event happens. I've been taking a look at the learning switch example code in coreapps and seems that in order to create a fowmod you need acces to the buffer of the switch which triggered the event. If you are setting a flowmod in the switch which triggered the event that's not a problem because you can get the buffer from the Packet_in_event. const Packet_in_event pi = assert_castconst Packet_in_event(e); uint32_t buffer_id = pi.buffer_id; ofm-buffer_id = htonl(buffer_id); But my problem is that I also need to set flowmods in the other switches which haven't received a Packet_in_event (therefore I can't acces their buffers). The acces to the buffer is really necesary to set up a flowmod in a switch? Is there any way to do this? Thank you. ___ 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 Actions From Events in Python
Derek and I fixed this up quite a while ago. It's one of the commits that got lumped together and doesn't have a good commit message, but it's been in destiny for months now. (One day I may actually fix the commit log for it.) -- Murphy On Oct 5, 2011, at 2:39 PM, Christian Esteve Rothenberg wrote: Hi Derek, did you succeed in implementing the to_python() for the action list in flow_stats? Does someone have a patch for this issue? Thanks, Christian On Fri, Jan 28, 2011 at 11:51, James Murphy McCauley jam...@nau.edu wrote: Yeah, I think this looks like the right direction. I probably wouldn't have bothered writing a to_python for ofp_action_header since we know it's not used anywhere else, and would have just handled it in the one for Flow_stats itself, but this is not really here nor there. This is a fine use for reinterpret_cast (except for the last one which you probably noticed needs a little work ;) ). I don't think that the length of the actions are checked anywhere (I could be wrong on this), so it might be nice to make sure that the length field of an action actually matches the size of the struct you're casting it to. Really we should handle this gracefully (e.g., log it and don't Pythonize it), but personally, I'd be okay with just doing an assert, since I would not expect to ever actually see it, but an assert is better than a segfault if it does pop up. :) Of course, there's also the argument that we should be validating them earlier. Whatever. Up to you what (if anything) you want to do about it in any case. -- Murphy On Fri, 2011-01-28 at 16:50 +0900, Derek Cormier wrote: Without minding the typos, that is... On 01/28/2011 04:46 PM, Derek Cormier wrote: Ok I'll give it a try and submit a patch when I'm finished. Could you please tell me if the following is the right approach? template PyObject* to_python(const ofp_action_header a) { PyObject* dict = PyDict_New(); if (!dict) { return 0; } uint16_t type = ntohs(a.type); pyglue_setdict_string(dict, type, to_python(type)); pyglue_setdict_string(dict, length, to_python(ntohs(a.len)); /* depending on the action type, cast to the appropriate * action struct to get its fields. */ if (type == OFPAT_OUTPUT) { const ofp_action_output ao = reinterpret_castofp_action_output(a); uint16_t port = ntohs(ao.port); pyglue_setdict_string(dict, port, to_python(port)); /* max_len only has meaning when the destination port is the controller */ if (port == OFPP_CONTROLLER) { pyglue_setdict_string(dict, max_len, to_python(ntohs(ao.max_len))); } } else if (type == OFPAT_STRIP_VLAN) { /* nothing to set, no struct beyond the header */ } else if (type == OFPAT_SET_VLAN_VID) { const ofp_action_vlan_vid av = reinterpret_castofp_action_output(a); Is this the proper use of reinterpret cast? I've never had to use it before... -Derek On 01/28/2011 03:20 PM, James Murphy McCauley wrote: I believe the issue is that with the to_python() for ofp_flow_stats, we have no idea if the actions actually follow the ofp_flow_stats structure since, for example, someone could have just made an ofp_flow_stats struct and tried to pythonize it. I am not sure if this ever actually happens, but whatever. It's not provably a safe thing to do. However, the Flow_stats struct actually explicitly has the actions wrapped up into a vector, so it IS possible to safely pull them out of that. It just hasn't been done. The to_python() for Flow_stats should: Step one, convert the fields from the ofp_flow_stats struct itself into dict, which is done by just calling the to_python() for ofp_flow_stats. Step two, unpack v_actions from the Flow_stats struct into a list of dicts and throw it into dict too. Except instead of step two, we have /* XXX actions */. :) You should be able to just go ahead and implement it there. -- Murphy On Fri, 2011-01-28 at 14:50 +0900, Derek Cormier wrote: Hello, I was looking at pyglue.cc and it looks like actions are never included in python events. A comment says to use Flow_stats, but flow stats contains a vector ofp_action_header's. Since actions are variable-length, won't this cut off data when the action is longer than the header? (For example, ofp_action_dl_addr). So, is there any way to get actions in events like flow stats in? If not, how could we go about implementing this? 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 -- Christian ___ nox
Re: [nox-dev] Asking to run app with nox
I'm butting in here, but the reason that you can't find nox-new-py-app.py is undoubtedly because you're using the zaku branch. Please use the destiny branch instead. For recent versions of git, just do git checkout destiny in the top directory after cloning. -- Murphy On Oct 2, 2011, at 3:58 AM, Trinh Minh Tri wrote: Thank you very much Mr Aaron and Mr Fernando! I try to follow your suggestion but I still cannot make it work. Mr Aaron! Infact I don't understand what does it mean? - Copy code from src/nox/coreapps/examples/pyloop.py (you need to mirror everything except for the code under the install method) - Add your Python file(s) to NOX_RUNTIMEFILES in src/nox/apps/examples/Makefile.am - Updatesrc/nox/apps/examples/meta.json to include your new app - Make sure that “python” is a dependency (copying is the best approach) - After you're done, recompile following the same 3 steps (the build/ directory is already there now) I can follow only your first step: - Add your .py file to src/nox/coreapps/examples/ Could you give me some more specific instruction about it? Mr Fernando! I cannot find the nox-new-py-app.py file in my nox/src/scripts. There is only nox-new-c-app.py. And Could you help to give me some more detailed suggestions to use nox-new-py-app.py to make my python script to work with NOX controller. Thank you very much Trinh Minh Tri On Sun, Oct 2, 2011 at 3:44 PM, fernando farias fer...@yahoo.com.br wrote: Hi, I think that may be to use the scripts nox-new-c-app.py and nox-new-py-app.py can be a way more fast and easy to the deployment of new application in NOX. The location of the scripts is src/scripts great regards, 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: Trinh Minh Tri tmtr...@gmail.com Para: nox-dev@noxrepo.org Enviadas: Domingo, 2 de Outubro de 2011 1:29 Assunto: [nox-dev] Asking to run app with nox Hi NOX dev! I'm new in Nox but feel it's very interesting for network researching. I follow some introductions from nox website and can make the nox run with default application such as: ./nox_core -v -i ptcp:6633 pyswitch Now I'm trying to write an application for nox, for example: pyswitchv1.py, or more general my application contain many file located in 1 folder: pyswitchv1folder I run the command: ./nox_core -v -i ptcp:6633 pyswitchv1 but the nox_core reply that it cannot file the file pyswitchv1 to run. I follow the other file to put the symbolic link to the folder nox/build/src but it also doesn't work. I also try to run it with the folder: ./nox_core -v -i ptcp:6633 pyswitchv1folder and it also doesn't work. Would you instruct me how to make my program writted in python to work with nox? Thank you very much Trinh Minh Tri ___ 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 error: invalid action type 11
This may not be that helpful, but the code you've shown looks right to me. You might try looking at it on the wire using Wireshark, but I suspect it will look fine and that the problem is with the switch (which I know nothing about). -- Murphy On Sep 29, 2011, at 7:36 PM, Ali Sydney wrote: Hi Everyone, I posted this question on the OpenFlow list, but have yet get the issue resolved. Perhaps you may have a few suggestions? I am trying to use the min-rate feature to implement some level of QoS. Below are the details: 1. Using dpctl, I configured 2 queues (Queue 1 and 2) on Port 3 of the Pronto 3290 switch. 2. I attempted to map tcp and udp flows to these queues using the NOX controller that is directly connected to the switch (i.e. No FlowVisor in the mix). 3. I assumed the following actions would do the mapping: # Map tcp flows to Queue 1 of port 3 actions = [[openflow.OFPAT_ENQUEUE,[3,1]]] # Map udp flows to Queue 2 of port 3 actions = [[openflow.OFPAT_ENQUEUE,[3,2]]] but I'm getting the following errors: OpenFlow error: invalid action type 11 Can you please provide some feedback? Thanks. -Ali ___ 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] Multiple Nox with spanning_tree Running the same in the Machine
I think in this case, the other program is another instance of NOX being run simultaneously. :) So the last suggestion applies. The commandline to start the second instance should be something like: ./nox_core -v -i ptcp:6635 jsonmessenger=tcpport=2704 spanning_tree routing -- Murphy On Sep 28, 2011, at 2:08 PM, Kyriakos Zarifis wrote: It looks like either the socket was left open from an ungraceful shutdown last time you ran NOX, or another application happens to be using the port that jsonmessenger is trying to use. If I recall, that would be port 2703. If you run lsof -i | grep 2703 you should be able to see which application is using that port. If it is a zombie NOX (or some other program you don't care about) you can kill it and try rerunning. Alternatively (if a program you care about is using 2703), you can try to make jsonmessenger use another different port. I think the command for that would be jsonmessenger=tcpport=portnumber On Wed, Sep 28, 2011 at 1:33 PM, Rafael Lopes rafaell...@gmail.com wrote: When i try to run two nox with the spanning_tree i get this error below. First: Ok openflow@openflowvm:~/nox/build/src$ ./nox_core -v -i ptcp:6634 switch spanning_tree routing 1|nox|INFO:Starting nox_core (/home/openflow/nox/build/src/.libs/lt-nox_core) 2|nox|INFO:nox bootstrap complete Second: Error openflow@openflowvm:~/nox/build/src$ ./nox_core -v -i ptcp:6635 switch spanning_tree routing 1|nox|INFO:Starting nox_core (/home/openflow/nox/build/src/.libs/lt-nox_core) 2|nox|ERR:Cannot change the state of 'spanning_tree' to INSTALLED: 'spanning_tree' has an unmet dependency: 'jsonmessenger' ran into an error: bind: Address already in use any idea to solve it ? -- Rafael Lopes Gomes: - Msc. Candidate in Computer Science at University of Campinas (UNICAMP) - Member of LRC/UNICAMP and GERCOM/UFPA - http://www.lrc.ic.unicamp.br/~rafaellgom ___ 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] Matching flows on port numbers
I'd suggest that the first thing you do is examine the traffic from the controller to the switch. Wireshark with the OpenFlow dissector is the easiest way to do this. Take a look at the flow_mod on the wire and see if it looks like you think it should (whether tp_src and tp_dst are set right, etc.). -- Murphy On Sep 28, 2011, at 8:13 AM, Shrutarshi Basu wrote: Hi, I'm trying to install a flow that matches on IP as well as port numbers. I'm using the flow provided by calling extract_flow() on a packet as the argument to install_datapath_flow() but if I use 'dpctl dump-flows' on a switch the flow displayed does not have entries for tp_dst or tp_src. Is there something else I need to be doing in order to get matching on port numbers? 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] Unable to include route/routeinstaller.hh
Could you please post your config.log? -- Murphy On Sep 27, 2011, at 7:49 AM, andrea simeoni wrote: Hi guys, I have created a C++ component under the netapps folder. The component name is TrafficMonitor, and it needs to exploit some functionalities of the routeinstaller component. The problem is that when I try to include the routeinstaller source with #include route/routeinstaller.hh , when compiling I get the following error: from ../../../../../src/nox/netapps/TrafficMonitor/TrafficMonitor.hh:25, from ../../../../../src/nox/netapps/TrafficMonitor/TrafficMonitor.cc:1: ../../../../../src/nox/netapps/data/datatypes.hh:221: error: ‘to_python’ is not a template function ../../../../../src/nox/netapps/data/datatypes.hh:225: error: ‘to_python’ is not a template function ../../../../../src/nox/netapps/data/datatypes.hh:229: error: ‘to_python’ is not a template function ../../../../../src/nox/netapps/data/datatypes.hh:233: error: ‘to_python’ is not a template function ../../../../../src/nox/netapps/data/datatypes.hh:237: error: ‘to_python’ is not a template function ../../../../../src/nox/netapps/data/datatypes.hh:241: error: ‘to_python’ is not a template function ../../../../../src/nox/netapps/data/datatypes.hh:245: error: ‘to_python’ is not a template function ../../../../../src/nox/netapps/data/datatypes.hh:249: error: ‘to_python’ is not a template function In file included from ../../../../../src/nox/netapps/authenticator/flow_fn_map.hh:22, from ../../../../../src/nox/netapps/authenticator/flow_util.hh:34, from ../../../../../src/nox/netapps/routing/nat_enforcer.hh:21, from ../../../../../src/nox/netapps/routing/routing.hh:34, from ../../../../../src/nox/netapps/route/routeinstaller.hh:9, from ../../../../../src/nox/netapps/TrafficMonitor/TrafficMonitor.hh:25, from ../../../../../src/nox/netapps/TrafficMonitor/TrafficMonitor.cc:1: ../../../../../src/nox/netapps/authenticator/flow_in.hh:92: error: ‘to_python’ is not a template function ../../../../../src/nox/netapps/authenticator/flow_in.hh:96: error: ‘to_python’ is not a template function make[9]: *** [TrafficMonitor_la-TrafficMonitor.lo] Error 1 Helps are appreciated; thank you -- 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] Where I have to place my custom classes?
You need to add the other files to your component's Makefile.am, and then rerun boot.sh and configure (you may be able to skip configure; I can't remember). The hoststate component is a nice clean example of a C++ component consisting of multiple source files. -- Murphy On Sep 25, 2011, at 1:51 PM, andrea simeoni wrote: Hi guys, I'm writing a component that exploits some custom defined classes for working properly. Where I have to place such classes? If I define such classes in separate files, when launching the Make -j command they are ignored by the compiler. I have to define all I need in the Component.cc and Component.hh files? Thanks -- 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] Debugging call for help: Assertion '_M_ptr != 0'
For clarification of my earlier post: The race condition concerns tx_buf in lib/openflow.cc. If Openflow_connection::send_packet() is called by one thread at a time, tx_buf is always checked (via tx_buf.get()) to see if it's empty before it's sent, after which it's cleared (tx_buf.reset()). But when you have another thread calling it at the same time, this doesn't hold true anymore. After a tx_buf.get() check in Thread A, Thread B is getting in, checking tx_buf.get(), and then doing a tx_buf.reset(). When Thread A then tries to use tx_buf, it has now been reset() without Thread A's knowledge. And an amendment: I said earlier that the solution I'd suggest was rewriting your server thread as a cooperative thread. That'd now be my second choice. KK's suggestion is better -- if possible, rewrite your communication to use the messenger component instead. -- Murphy On Sep 23, 2011, at 2:55 AM, kk yap wrote: Hi Christian, I need to take a deeper look to give any constructive comment but your use of auto_ptr should be at fault. This can be a memory allocation problem. As Murphy hinted on, you might want to use the facilities available in NOX to help rather than write everything on your own. For example, messenger does binary messages on a TCP connection already, and it uses cooperative thread---so that should help. Regards KK On 22 September 2011 22:48, Murphy McCauley jam...@nau.edu wrote: I think this is a race condition because you're calling send_openflow_packet() from a non-cooperative thread. I think your best bet is probably to rewrite your server thread as a cooperative thread. There are other options... you could have queue which is consumed by a simple cooperative thread and does the actual sends from there. Or... I can't remember for sure if the cooperative threading library supports scheduling one thread group from a native thread, but... when you want to send from the native thread, schedule a cooperative thread (and then wait for it to run) which just blocks until you're done sending from the native thread. Or you could put locks into NOX's async output stuff (I would suggest not doing that). There are probably lots of other options too. I'd still suggest rewriting your server thread as a cooperative thread if possible. :) Hope that helps. -- Murphy On Sep 21, 2011, at 11:06 AM, Christian Esteve Rothenberg wrote: Dear NOX friends, we are facing a nasty bug and we would very much appreciate any help in debugging and understanding the root cause. We have been struggling for some time now... :( The code base is fairly simple and has worked well for some time, but for some reason it has started to crash: https://github.com/chesteve/RouteFlow/blob/master/rf-controller/src/nox/netapps/routeflowc/routeflowc.cc As fas as I can tell, the code has remained unchanged and only the datapath and application traffic (i.e., payload of packet-in and packet-out packets) has changed. This is the error we are seeing in NOX, a failed assertion: /usr/include/c++/4.5/backward/auto_ptr.h:194: element_type* std::auto_ptr_Tp::operator-() const [with _Tp = vigil::Buffer, element_type = vigil::Buffer]: Assertion '_M_ptr != 0' failed. Caught signal 6. 0xb74ae2be 64 (vigil::fault_handler(int)+0x4e) 0xb7748400 3068602152 (__kernel_sigreturn+0x0) 0xb71dc34e 296 (abort+0x17e) 0xb74ecc11 80 (vigil::Openflow_stream_connection::send_tx_buf()+0x121) 0xb74ece21 80 (vigil::Openflow_stream_connection::do_send_openflow(ofp_header const*)+0xc1) 0xb74ed7cf 80 (vigil::Openflow_connection::call_send_openflow(ofp_header const*)+0x2f) 0xb74ee14f 64 (vigil::Openflow_connection::send_openflow(ofp_header const*, bool)+0x5f) 0xb74eedae 96 (vigil::Openflow_connection::send_packet(vigil::Buffer const, ofp_action_header const*, unsigned int, unsigned short, bool)+0xfe) 0xb74eeeb9 96 (vigil::Openflow_connection::send_packet(vigil::Buffer const, unsigned short, unsigned short, bool)+0x79) 0xb75f18b4 96 (vigil::nox::send_openflow_packet_out(vigil::datapathid const, vigil::Buffer const, unsigned short, unsigned short, bool)+0x74) 0xb75ce7cc 48 (vigil::container::Component::send_openflow_packet(vigil::datapathid const, vigil::Buffer const, unsigned short, unsigned short, bool) const+0x3c) Using gdb, the backtrace is as follows: (gdb) bt #0 0xb772c367 in ?? () from /lib/ld-linux.so.2 #1 0xb772c979 in ?? () from /lib/ld-linux.so.2 #2 0xb7730a31 in ?? () from /lib/ld-linux.so.2 #3 0xb7736c40 in ?? () from /lib/ld-linux.so.2 #4 0xb7487dc2 in fgets () at /usr/include/bits/stdio2.h:255 #5 read_mem_map () at ../../../src/lib/fault.cc:79 #6 vigil::dump_backtrace () at ../../../src/lib/fault.cc:180 #7 0xb74882be in vigil::fault_handler (sig_nr=6) at ../../../src/lib/fault.cc:280 #8 signal handler called #9 0xb7722424 in __kernel_vsyscall () #10 0xb71b2e71 in raise (sig=6
Re: [nox-dev] command to drop the packet
The exact behavior of the switch is not specified in the OpenFlow spec, but basically it says that after some switch-specified time, buffers can be reused. When the switch runs out of buffer space, it is required to send the entire packet data to the controller with a bufid of -1. So you're right -- it could theoretically lead to running out of buffers (I have personally never seen this, but that doesn't necessarily indicate much). One way to kill the buffer should be to send it, but send it somewhere that doesn't work. For example, have the output port be OFPP_NONE. This strikes me as kind of hacky, though. Alternatively... send_openflow_packet() is actually overloaded. All the overloads result in sending an ofp_packet_out message, which takes a list of actions. The form you mention where action is a port number (e.g., OFPP_FLOOD in your example) is a shortcut -- this just creates an OFPAT_OUTPUT action. So you should just use one of the other forms of send_openflow_packet() which takes an explicit list of actions (or maybe it's an array -- I don't remember) and give it an empty action list. I think this should have the desired result. Hope that helps. -- Murphy On Sep 22, 2011, at 3:02 AM, sachin sharma wrote: Hi Murphy, If i do not send any reply to openflow switch then what would happen to the packet which is waiting in openflow switch buffer id () for controller response. I guess that the packets which are not completely send to controller, just wait for controller reply. May be after some timeout, openflow switch may drop the packet (from buffer) by default but this may give chance to buffer becoming full. Is this true in this context? thanks, --- On Thu, 22/9/11, Murphy McCauley jam...@nau.edu wrote: From: Murphy McCauley jam...@nau.edu Subject: Re: [nox-dev] command to drop the packet To: sachin sharma sharon_sac...@yahoo.co.in Cc: nox-dev@noxrepo.org Date: Thursday, 22 September, 2011, 3:18 PM OpenFlow switches do not forward by default, so to drop a packet, you simply don't forward it -- don't call send_openflow_packet() at all. Of course, this assumes you don't have a flow table entry that says to forward it already installed. If you do have such a rule, there's nothing you can do to stop an individual packet from being forwarded -- you'd have to uninstall the entry. -- Murphy On Sep 22, 2011, at 1:47 AM, sachin sharma wrote: Hi, I am interested to drop the packet from a particular buffer id. I found calling of following function from nox could help me in sending a command to openflow switch. send_openflow_packet(pi.datapath_id, buffer_id, action, pi.in_port, true); I do not know what to write in place of action, I know in case of flooding i should write action = OFPP_FLOOD. Can anyone please suggest me in this regards? Thanks Regards, Sachin Sharma ___ 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] Undefined symbol error running a NOX application. Compiling a NOX app with a linker flag.
In src/Makefile.am, around line 46 is something like: nox_core_LDFLAGS = \ Throw -lglpk in there too: nox_core_LDFLAGS = -lglpk \ Then re-run boot.sh in the top directory, and hopefully that'll do it. -- Murphy On Sep 22, 2011, at 8:33 AM, Sergio Jiménez Feijóo wrote: Hi everybody, I've spent the last months developping a NOX application. The goal of my app is to dynamically calculate the optimum layer 2 path of OpenFlow switches for a flow between a source PC and a destination PC. The criteria which determines which path should be picked could be anything you want. In my case the criteria is to minimize the total power consumption of all the OpenFlow switches and links of the network. In order find a propper solution which accomplishes the selected criteria I need to use a Linear Programming solver. The GNU Linear Programming Kit (GLPK) library works like a charm for this purpose. I've included the glpk.h library in my header file and the NOX app compiles without errors but when I try to run the app I get an undefined symbol error when the code reaches the glpk library function calls. I think this might be caused because the gcc linker is running without the -lglpk flag. How could I modify the app's makefile to add this missing flag? Thanks for your help. ___ 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] Debugging call for help: Assertion '_M_ptr != 0'
I think this is a race condition because you're calling send_openflow_packet() from a non-cooperative thread. I think your best bet is probably to rewrite your server thread as a cooperative thread. There are other options... you could have queue which is consumed by a simple cooperative thread and does the actual sends from there. Or... I can't remember for sure if the cooperative threading library supports scheduling one thread group from a native thread, but... when you want to send from the native thread, schedule a cooperative thread (and then wait for it to run) which just blocks until you're done sending from the native thread. Or you could put locks into NOX's async output stuff (I would suggest not doing that). There are probably lots of other options too. I'd still suggest rewriting your server thread as a cooperative thread if possible. :) Hope that helps. -- Murphy On Sep 21, 2011, at 11:06 AM, Christian Esteve Rothenberg wrote: Dear NOX friends, we are facing a nasty bug and we would very much appreciate any help in debugging and understanding the root cause. We have been struggling for some time now... :( The code base is fairly simple and has worked well for some time, but for some reason it has started to crash: https://github.com/chesteve/RouteFlow/blob/master/rf-controller/src/nox/netapps/routeflowc/routeflowc.cc As fas as I can tell, the code has remained unchanged and only the datapath and application traffic (i.e., payload of packet-in and packet-out packets) has changed. This is the error we are seeing in NOX, a failed assertion: /usr/include/c++/4.5/backward/auto_ptr.h:194: element_type* std::auto_ptr_Tp::operator-() const [with _Tp = vigil::Buffer, element_type = vigil::Buffer]: Assertion '_M_ptr != 0' failed. Caught signal 6. 0xb74ae2be 64 (vigil::fault_handler(int)+0x4e) 0xb7748400 3068602152 (__kernel_sigreturn+0x0) 0xb71dc34e 296 (abort+0x17e) 0xb74ecc11 80 (vigil::Openflow_stream_connection::send_tx_buf()+0x121) 0xb74ece21 80 (vigil::Openflow_stream_connection::do_send_openflow(ofp_header const*)+0xc1) 0xb74ed7cf 80 (vigil::Openflow_connection::call_send_openflow(ofp_header const*)+0x2f) 0xb74ee14f 64 (vigil::Openflow_connection::send_openflow(ofp_header const*, bool)+0x5f) 0xb74eedae 96 (vigil::Openflow_connection::send_packet(vigil::Buffer const, ofp_action_header const*, unsigned int, unsigned short, bool)+0xfe) 0xb74eeeb9 96 (vigil::Openflow_connection::send_packet(vigil::Buffer const, unsigned short, unsigned short, bool)+0x79) 0xb75f18b4 96 (vigil::nox::send_openflow_packet_out(vigil::datapathid const, vigil::Buffer const, unsigned short, unsigned short, bool)+0x74) 0xb75ce7cc 48 (vigil::container::Component::send_openflow_packet(vigil::datapathid const, vigil::Buffer const, unsigned short, unsigned short, bool) const+0x3c) Using gdb, the backtrace is as follows: (gdb) bt #0 0xb772c367 in ?? () from /lib/ld-linux.so.2 #1 0xb772c979 in ?? () from /lib/ld-linux.so.2 #2 0xb7730a31 in ?? () from /lib/ld-linux.so.2 #3 0xb7736c40 in ?? () from /lib/ld-linux.so.2 #4 0xb7487dc2 in fgets () at /usr/include/bits/stdio2.h:255 #5 read_mem_map () at ../../../src/lib/fault.cc:79 #6 vigil::dump_backtrace () at ../../../src/lib/fault.cc:180 #7 0xb74882be in vigil::fault_handler (sig_nr=6) at ../../../src/lib/fault.cc:280 #8 signal handler called #9 0xb7722424 in __kernel_vsyscall () #10 0xb71b2e71 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #11 0xb71b634e in abort () at abort.c:92 #12 0xb74c6c11 in __replacement_assert (this=0x93d7830) at /usr/include/c++/4.5/i686-linux-gnu/bits/c++config.h:326 #13 operator- (this=0x93d7830) at /usr/include/c++/4.5/backward/auto_ptr.h:194 #14 vigil::Openflow_stream_connection::send_tx_buf (this=0x93d7830) at ../../../src/lib/openflow.cc:824 #15 0xb74c6e21 in vigil::Openflow_stream_connection::do_send_openflow (this=0x93d7830, oh=0x9104c50) at ../../../src/lib/openflow.cc:844 #16 0xb74c77cf in vigil::Openflow_connection::call_send_openflow (this=0x93d7830, oh=0x9104c50) at ../../../src/lib/openflow.cc:248 #17 0xb74c814f in vigil::Openflow_connection::send_openflow (this=0x93d7830, oh=0x9104c50, block=true) at ../../../src/lib/openflow.cc:232 #18 0xb74c8dae in vigil::Openflow_connection::send_packet (this=0x93d7830, packet=..., actions=0xb64a6618, actions_len=8, in_port=65535, block=true) at ../../../src/lib/openflow.cc:445 #19 0xb74c8eb9 in vigil::Openflow_connection::send_packet (this=0x93d7830, packet=..., out_port=1, in_port=65535, block=true) at ../../../src/lib/openflow.cc:413 #20 0xb75cb8b4 in vigil::nox::send_openflow_packet_out (datapath_id=..., packet=..., out_port=1, in_port=65535, block=true) at ../../../src/builtin/nox.cc:435 #21 0xb75a87cc in vigil::container::Component::send_openflow_packet (this=0x92232f8, datapath_id=..., packet=..., out_port=1,
Re: [nox-dev] Running NOX on VmWare
I don't think we have enough information to answer your question. Which ARP messages are you talking about? What machine are they coming from and what are they asking for? And what's your purpose here? Are you going to add more VMs and connect them to virtual ports on VM2? (As you've described it, you seem to have a switch that isn't switching anything.) -- Murphy On Sep 14, 2011, at 11:01 AM, Candy Floss wrote: I have created two virtual machines in VmWare server. I have configured one machine as NOX controller and one as open switch. I added the routes and I'm able to ping each other. But when I start the NOX and the open switch the ARP messages are getting flooded on the machine. I have configured unique MAC address for each of the machines. My configuration is like this on VmWare server Virtual Machine 1 : Nox Controller eth0 192.170.35.1 netmask 255.255.0.0 Virtual Machine 2: Open Switch 1 eth0 192.170.40.1 netmask 255.255.0.0 Why the ARP messages flooding? Is my configuration right? Thanks, Candy ___ 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 Pronto 3290(2011.08.06)
I'm not aware of any incompatibility between NOX and this particular switch, though I am not one of the most likely to know about such problems. However, OpenFlow error type 3 code 0 indicates that the flow table is full... maybe your table is just full? -- Murphy On Sep 18, 2011, at 5:51 PM, Min-Hyup KANG wrote: Hi, All I'd like to know that it is compatible between NOX(zaku or destiny) and Pronto 3290(2011.08.06 firmware). Currently, I can not operate Simplerouting etc. I don't know exactly why nox is having a below message. If you have any solution, please let me know. 00175|routeinstaller|DBG:Install flow entry port0007:vlan:pcp:0 mac84:2b:2b:60:26:6e-84:2b:2b:60:38:03 proto0800 ip192.168.10.11-192.168.10.10 port8-0 with 1 actions 00176|openflow-event|ERR:received Openflow error packet from dpid=02aa: type=3, code=0, 80 bytes of data 00177|openflow-event|ERR:received Openflow error packet from dpid=02aa: type=3, code=0, 80 bytes of data Best Regards, Min-Hyup KANG ___ 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