Re: [nox-dev] Need help regarding querying statistics from switches
I apologize if you stated this already and I missed it, but what versions NOX and switch software are you using? Thanks, Keith On Sun, 13 Dec 2009 11:17:01 -0800, Guanyao Huang wrote: > I dont think the flow table entries expire quickly, because I find out > only initially the new packet is sent to the controller. Later packets > already have entries. > > It seems I dont have priority to use dpctl dump-flows command. I can > telnet to the switches and run showflow command, which shows the flows > are correct, with increasing size. > > Even if I use wildcards=0x to get all flow entries and use a > short interval to query flow statistics (500 ms), the returned sizes > are still always 0. > > Now, even reading port statistics doesnt work. Returned value is 0. > > The code is already posted to this email. ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] Need help regarding querying statistics from switches
On Thu, 10 Dec 2009 18:02:57 -0800, Guanyao Huang wrote: > In my topology I periodically ping between hosts. However, I find the > packet_count and byte_count from the switch are always 0. I am > confirmed that I successfully received ofp_flow_stats from the desired > switch. The central controller maintains flow information and I query > flows with desired nw_proto, nw_src, nw_dst, tp_src, tp_dst, and > in_port. Other fields I use wildcard. How frequent are the pings and how are the flows being installed. One possibility here is that the flows are being installed with a timeout shorter than the interval between pings. If that is the scenario, the behavior could be: 1. ping arrives at switch 2. switch does not find a matching flow, forwards to controller for decision. 3. controller installs flow in switch to match future pings with a soft timeout. The controller may not count the stats from the initial ping packet received in step 2 as being part of this new flow. 4. nothing matches flow for the soft timeout. flow is removed from switch. 5. goto step 1 Might this be what is happening? --- Keith ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] Is something wrong with noxrepo web server?
Everything should be back up and running properly now. The initial problem was a configuration mistake I made on the server. Resolving that was made more difficult due to a problem at our hosting provider that resulted in poor networking performance and an inability for me to log in to fix it. If anyone sees further problems, please let us know. Thanks, Keith On Wed, 02 Dec 2009 10:51:34 -0800, Keith Amidon wrote: > On Wed, 2 Dec 2009 10:38:56 -0800, Seung Yi wrote: > > I just tried to read the Nox Manual pages from noxrepo.org (specifically, > > "Components" link under "Developing with NOX" section) and it asked me to > > login. The pop-up says "The server noxrepo.org:80 at Onix Partner requires a > > username and password". If something is broken, could someone please take a > > look? Also, if anyone has offline snapshot of the Nox Manual pages, could > > you share? (I'm trying to finish up something quick and now is bad time to > > lose these pages :( ). > > I'm looking into this now but unfortunately we also seem to be > experiencing some problems with the server itself. I'll post an update > as soon as I've made some progress. > > --- Keith ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] Is something wrong with noxrepo web server?
On Wed, 2 Dec 2009 10:38:56 -0800, Seung Yi wrote: > I just tried to read the Nox Manual pages from noxrepo.org (specifically, > "Components" link under "Developing with NOX" section) and it asked me to > login. The pop-up says "The server noxrepo.org:80 at Onix Partner requires a > username and password". If something is broken, could someone please take a > look? Also, if anyone has offline snapshot of the Nox Manual pages, could > you share? (I'm trying to finish up something quick and now is bad time to > lose these pages :( ). I'm looking into this now but unfortunately we also seem to be experiencing some problems with the server itself. I'll post an update as soon as I've made some progress. --- Keith ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] Twisted reactor inquiry
I'm not an expert on any of this so someone more knowledgeable may need to correct me, but basically I believe the reactor is automatically started for you by NOX. One example of using the reactor in the "full" release on noxrepo is the webserver component in src/nox/webapps/webserver/webserver.py. It is a bit complicated due a bunch of code to deal with switching sessions from HTTP to HTTPS, etc. However, you can see how the Twisted bits are imported at the beginning of the module and how the web server is registered with the reactor. Note that reactor.run() is never explicitly called. --- Keith On Thu, 2009-07-30 at 22:14 -0700, David Tubat wrote: > Good day to all, > > I am currently trying to learn programming in python along with nox and I > have a question with regards to twisted. > > I have tried to create a simple python component with a simple invocation to > reactor.run(). However, when I try to run the component with nox I seem to be > getting an exception thrown by a certian pyoxidereactor.py. I am not sure if > my thinking is correct but I am guessing that the sources under coreapps/pyrt > contains the twisted support for nox and it is the sources under this that I > should use? > > Best regards, > David > > > > > > > ___ > nox-dev mailing list > nox-dev@noxrepo.org > http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] Problem with nox_core webserver
Hi Nicolas, You've encountered a bug. The patch below should resolve the issue, however it might not get you much further as the webserver component doesn't supply any content by itself but just provides a server that other components can register with to provide content. Thus if you run the webserver as you are after applying the patch you'll just get back a page stating the server is uninitialized. If you'd like to create your own pages, there is an example component containing some documentation in src/nox/webapps/webserver/dummywebpage.py. You can run this component with the command: sudo ./nox_core -v -i ptcp: pyswitch dummywebpage Hopefully this is enough to get you started. --- Keith diff --git a/src/nox/webapps/webserver/webserver.py b/src/nox/webapps/webserver/webserver.py index 8434435..04adee0 100644 --- a/src/nox/webapps/webserver/webserver.py +++ b/src/nox/webapps/webserver/webserver.py @@ -79,6 +79,25 @@ def get_current_session(request): def redirect(request, uri): # TBD: make handle child links automatically, normalize URI, etc. return redirectTo(uri, request) + + +class UninitializedRes(resource.Resource): +def __init__(self): + resource.Resource.__init__(self) + self.render_POST = self.render_GET + +def getChild(self, name, request): + return self + +def render_GET(self, request): + request.setResponseCode(500) + request.setHeader("Content-Type", "text/html") + msg = "NOX Webserver not yet initialized. " + \ + "Please wait a moment and refresh the page." + request.write(msg) + request.finish() + return server.NOT_DONE_YET + class NoxStaticSrvr(static.File): """Subclass of twisted file that sets cache-control as we want.""" @@ -253,23 +272,6 @@ class webserver(Component): def install(self): # Setup twisted.web instance for pages -class UninitializedRes(resource.Resource): -def __init__(self): - resource.Resource.__init__(self) - self.render_POST = self.render_GET - -def getChild(self, name, request): - return self - -def render_GET(self, request): - request.setResponseCode(500) - request.setHeader("Content-Type", "text/html") - msg = "NOX Webserver not yet initialized. " + \ - "Please wait a moment and refresh the page." - request.write(msg) - request.finish() - return server.NOT_DONE_YET - class RootRes(resource.Resource): def __init__(self, component): resource.Resource.__init__(self) On Tue, 2009-05-19 at 12:24 +0200, Nicolas Perrenoud wrote: > Hi! > > I saw that a webserver module was distrubuted with nox. So i tried to > run it: > > sudo ./nox_core -v -i pctp: pyswitch webserver > > I can reacht the server via browser, but i always get the following > error on the site: > > : global name 'UninitializedRes' is not defined > > and the following error on the console: > > 00144|reactor|ERR:Unhandled Error > Traceback (most recent call last): > File > "/usr/lib/python2.5/site-packages/twisted/protocols/basic.py", line 231, > in dataReceived > why = self.lineReceived(line) > File "/usr/lib/python2.5/site-packages/twisted/web/http.py", > line 1067, in lineReceived > self.allContentReceived() > File "/usr/lib/python2.5/site-packages/twisted/web/http.py", > line 1108, in allContentReceived > req.requestReceived(command, path, version) > File "/usr/lib/python2.5/site-packages/twisted/web/http.py", > line 626, in requestReceived > self.process() > --- --- > File "/usr/lib/python2.5/site-packages/twisted/web/server.py", > line 149, in process > resrc = self.site.getResourceFor(self) > File "/usr/lib/python2.5/site-packages/twisted/web/server.py", > line 567, in getResourceFor > return resource.getChildForRequest(self.resource, request) > File > "/usr/lib/python2.5/site-packages/twisted/web/resource.py", line 50, in > getChildForRequest > resource = resource.getChildWithDefault(pathElement, request) > File > "/usr/lib/python2.5/site-packages/twisted/web/resource.py", line 150, in > getChildWithDefault > return self.getChild(path, request) > File "./nox/webapps/webserver/webserver.py", line 398, in getChild > return UninitializedRes() > exceptions.NameError: global name 'UninitializedRes' is not defined > > > Am I missing some arguments for the webserver, or is it itself buggy? Is > there some documentation about the modules anyway (yes I read the > whitepaper and all i c
Re: [nox-dev] Inputs on how to emulate new more complicated networks using NOX
I provided the example "2 host 2 switch" configuration awhile ago. I'm not sure I can reproduce your problem in my environment as my VMs are probably not running the same OS, etc. as yours. For what it is worth, with that configuration in my VM setup I find that at startup the vigil1 VM gets an IP address on the interface connected to the "host" computer via DHCP, but the vigil2 VM does not. I've not investigated deeply why this is, but suspect it has to do with the default way the OS in my VMs attempt to bring up interfaces. It's also been suggested this may be a VDE issue, but I haven't had time to investigate further. In any case, I have to manually bring up the interface to the "host" on vigil2. The only thing that is tricky about this is identifying the correct interface since vigil2 has multiple interfaces. To determine the correct interface, look at the output printed when the VMs are started. I've selected the two important lines for my situation: ... slirpvde -daemon -socket /home/keith/vm/vde/ctls2 -dhcp ... screen -c /home/keith/vm/vigil2.screenrc -dm -S vigil2 -e ^Oo vdeq kvm --mod 700 -m 32 \ -hda hda.dsk -kernel kernel.bin -append 'root=/dev/hda1 console=ttyS0 apm=power-off noapic ' -nographic \ -net nic,model=rtl8139,vlan=1,macaddr=50:54:00:00:00:04 -net vde,vlan=1,sock=/home/keith/vm/vde/ctls2 \ -net nic,model=rtl8139,vlan=2,macaddr=50:54:00:00:00:05 -net vde,vlan=2,sock=/home/keith/vm/vde/ctls3 \ -net nic,model=rtl8139,vlan=4,macaddr=50:54:00:00:00:06 -net vde,vlan=4,sock=/home/keith/vm/vde/ctls5 \ -snapshot ... In the first line shown, slirpvde was supposed to run DHCP on /home/keith/vm/vde/ctls2. This was what should have given vigil2 an IP by DHCP but didn't work. In the second line, notice that /home/keith/vm/vde/ctls2 is associated with the nic with macaddr 50:54:00:00:00:04. With this information, you can identify the interface on vigil2 by looking at the output of 'ifconfig -a' run within that VM: ... eth1 Link encap:Ethernet HWaddr 50:54:00:00:00:04 ... Since the HWaddr of eth1 matches, that must be the one connected to the "host". The network that is created for the connections to the "host" is 10.0.2.0 with the host on 10.0.2.2. I manually give an address to the eth1 interface in the vigil2 VM with the command: ifconfig eth1 10.0.2.16 netmask 255.255.255.0 After this, I can ping the host computer, and I can connect secchan to a controller running on the host using the 10.0.2.2 address. As I said, I'm not sure whether you are experiencing the same issues as I am. Hopefully this account at least gives you some hints for where to look to resolve your issues. --- Keith On Wed, 2009-04-08 at 14:43 -0500, Zheng Cai wrote: > Hi, > > I have tried both "ifconfig of0 10.0.0.5" and "secchan nl:0 > tcp:10.0.2.2:975" on vigil2 too, but the behavior is still the same. > I.e., after 45 seconds, the switch tables start to contain active flows > and forward end host traffic, but still with error messages "Could not > connect to controller, failing open". > > However, I found out that, on the nox_core side, warning messages "(dhcp > parse) warning DHCP packet data too short to parse header: data len 86" > keep popping up. Was this the reason for such behavior? If so, any > suggestions on how to solve this issue? > > (BTW I used the latest NOX version, downloaded the kernel.bin and > openflow_mod.so and secchan from noxrepo.org. I used in-band control, > ran nox_core with the "pyswitch" application. I added the nl:0 dp, and > all eth interfaces to the dp except the one connecting the host, on both > vigil1 and vigil2) > > Thanks a million, > ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] Inputs on how to emulate new more complicated networks using NOX
The number of VMs and their connectivity are specified in the vms.conf file. As an example, here is a file with four VMs total, two acting as switches (vigil1 & vigil2) and two acting as regular machines (end1 and end2), one connected to each switch. To add more VMs, just add new names to the VMS line. The "SWITCHES" provide the connectivity for the VMs connected to them using the *_NETS lines as a regular (non-openflow) switch would. --- Keith SWITCHES="s1 s2 s3 s4 s5" s1_SLIRP=yes s2_SLIRP=yes VMS="vigil1 vigil2 end1 end2" end1_NETS="s4" vigil1_NETS="s1 s3 s4" end2_NETS="s5" vigil2_NETS="s2 s3 s5" On Thu, 2009-04-02 at 06:34 -0400, Surabhi Diwan wrote: > Hi All, > > I did the virtual test environment setup using NOX with 1 controller, > 1 switch and 2 virtual QEMU machines as suggested in the wiki. > I want to build upwards from this configuration and have more nodes > and switches under the purview of the NOX controller. > > Could you please suggest what would be the best way to emulate more > complicated (close to real life networks) using the NOX controller. > > Thanks a lot! > Regards, > Surabhi > > ___ > nox-dev mailing list > nox-dev@noxrepo.org > http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] Segmentation fault when running NOX in amd64 machine
I'm afraid I don't have any idea what the problem is from the information supplied. I do have another question about the setup however. It sounds like you are running a 64-bit NOX with 32-bit OpenFlow Linux switches. Are those switches running in 32-bit KVMs on the 64-bit machine? While I don't know of any reason why it shouldn't work, to my knowledge we have not done any mixed 64-bit controller 32-bit switch testing. On my setup where I run a 64-bit NOX I also use 64-bit switches in KVMs. I'm pretty busy with other activities but when I can get an hour or two free I'll try running a mixed setup to see if I can recreate the problem. --- Keith On Wed, 2008-07-16 at 11:26 -0700, kk yap wrote: > Hi, > > Attached is the verbose output. The error occurs when the OpenFlow > switches are being brought up. The core dump shows the attached. Any > advice? > > Regards > KK > > == > GNU gdb 6.4.90-debian > Copyright (C) 2006 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you are > welcome to change it and/or distribute copies of it under certain conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "x86_64-linux-gnu"...BFD: > /home/ykk/nox/noxcore/src/.libs/lt-nox_core: don't know how to handle > OS specific section `.gnu.hash' [0x6ff6] > "/home/ykk/nox/noxcore/src/.libs/lt-nox_core": not in executable > format: File format not recognized > > Core was generated by `/home/ykk/nox/noxcore/src/.libs/lt-nox_core -v > -i ptcp:2525 pyrouting pyauthent'. > Program terminated with signal 11, Segmentation fault. > #0 0x2ad2287c3f67 in ?? () > > > 2008/7/11 Martin Casado <[EMAIL PROTECTED]>: > > Can you paste a trace using -v ? If you gdb the core file, what line is it > > faulting on? You might want to try deleting testing.sqlite and re-running > > ... > > > > btw, to run gdb on a libtool binary > > > > libtool --mode=execute gdb nox_core core > > > > .martin > > > >> Hi, > >> > >> I was trying to run NOX in a Dell AMD64 machine. The whole > >> compilation process was okay. I am using openflow/linux kernel > >> binaries compiled on an i386 machine, while compiling the NOX on the > >> AMD. The nox_core binary run fine, until after a while, the following > >> error appears. I can run the setup properly on the i386 machine and > >> so I wonder why it fails on this machine. > >> > >> $ ./nox_core -i ptcp:2525 pyauthenticator pyrouting > >> NOX 0.2.1 (nox_core), compiled Jul 10 2008 16:37:53 > >> Compiled with OpenFlow 0x84 (exp) > >> 1|sqlite3-impl|WARN:Transactional storage file not given in the > >> command line; defaulting to 'testing.sqlite' > >> Caught signal 11. > >> 0x2b8cd5719132 6668976 (vigil::fault_handler(int)+0x22) > >> 0x00d12190 > >> 0x50540003 > >> Segmentation fault (core dumped) > >> > >> Anyone in the know? > >> > >> Thanks. > >> > >> Regards > >> KK > >> > >> ___ > >> nox-dev mailing list > >> nox-dev@noxrepo.org > >> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org > >> > > > ___ > nox-dev mailing list > nox-dev@noxrepo.org > http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org