[nox-dev] Difference between hostname and host_netid
Hi All, This might be a lame question, but when I was reading the code of the authentication module, I found out that there are two ids associated with one host: the hostname(host_id) and host_netid(netid). Then I found out that they represent two identifiers in two structures: struct Host { int64_t name; GroupList groups; time_t auth_time; time_t last_active; uint32_t hard_timeout; std::list users; }; struct HostNetid { int64_t name; std::string addr_binding; AddressType addr_type; bool is_router; bool is_gateway; GroupList groups; boost::shared_ptr host; }; Could someone help me clarify what is the difference between these two identifiers? Why do we need two different ids to identify one host? Thanks very much in advance, -Zheng Cai ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] help for trying the GUI
Add the -v switch to your commandline and the JSON box at least should start working... -- Murphy On Wed, 2010-11-10 at 15:06 -0500, Christopher J. Tengi wrote: > KK, > What components must be included on the nox_core command line in > order for nox-gui.py to be able to talk to it? Are there any components > that must *not* be included? For example, I tried this: > > ./nox_core -i ptcp:6633 \ > switch switch_management \ > hostip hosttracker \ > lavi monitoring \ > discovery topology \ > messenger jsonmessenger > > but the GUI displays nothing useful in either window, and pressing the > "Send" button only results in a "jsonmessenger is not running" message > in the left-side window. > > Thanks, > /Chris > > On 10/21/2010 02:31 AM, kk yap wrote: > > Hi El, > > > > Try the instructions here? http://noxrepo.org/noxwiki/index.php/NOX_GUI > > > > Regards > > KK > > > > > > On 20 October 2010 13:18, el beckhov wrote: > >> hi, > >> i'm a student in montreal (canada) > >> i'm new with nox and i have some difficulty to download and try the GUI > >> can you please help me ? > >> thank you > >> PS: i don't know how to access the Destiny branch of the noxrepo > > ___ > > nox-dev mailing list > > nox-dev@noxrepo.org > > http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org > > ___ > nox-dev mailing list > nox-dev@noxrepo.org > http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] help for trying the GUI
that's right, and even discovery and topology will be invoked as dependencies of lavi_swlinks which is a dependency for monitoring, so you can remove them too. (in other words monitoring and jsonmessenger are all you need to actively invoke for the gui to work) On Wed, Nov 10, 2010 at 3:15 PM, kk yap wrote: > Hi Chris, > > You can remove messenger and lavi. Monitoring should have the rest of > the components needed as dependencies. > > ./nox_core -i ptcp:6633 \ > switch switch_management \ > hostip hosttracker \ >monitoring \ > discovery topology \ > jsonmessenger > > Regards > KK > > On 10 November 2010 14:42, Kyriakos Zarifis wrote: > > Hi there, > > Unfortunately I can't reproduce this, so some additional information > would > > help. Do you get any errors on the shell where you started the GUI? > > Also, what do you see when you click on the "components" button at the > > bottom of the left sife panel of the GUI? > > Regards, > > Kyriakos > > On Wed, Nov 10, 2010 at 12:06 PM, Christopher J. Tengi > > wrote: > >> > >> KK, > >>What components must be included on the nox_core command line in > order > >> for nox-gui.py to be able to talk to it? Are there any components that > must > >> *not* be included? For example, I tried this: > >> > >>./nox_core -i ptcp:6633 \ > >>switch switch_management \ > >>hostip hosttracker \ > >>lavi monitoring \ > >>discovery topology \ > >>messenger jsonmessenger > >> > >> but the GUI displays nothing useful in either window, and pressing the > >> "Send" button only results in a "jsonmessenger is not running" message > in > >> the left-side window. > >> > >>Thanks, > >>/Chris > >> > >> On 10/21/2010 02:31 AM, kk yap wrote: > >>> > >>> Hi El, > >>> > >>> Try the instructions here? > http://noxrepo.org/noxwiki/index.php/NOX_GUI > >>> > >>> Regards > >>> KK > >>> > >>> > >>> On 20 October 2010 13:18, el beckhov wrote: > > hi, > i'm a student in montreal (canada) > i'm new with nox and i have some difficulty to download and try the > GUI > can you please help me ? > thank you > PS: i don't know how to access the Destiny branch of the noxrepo > >>> > >>> ___ > >>> nox-dev mailing list > >>> nox-dev@noxrepo.org > >>> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org > >> > >> ___ > >> nox-dev mailing list > >> nox-dev@noxrepo.org > >> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org > > > > > > ___ > > nox-dev mailing list > > nox-dev@noxrepo.org > > http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org > > > > > ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] help to run NOX GUI
Hi, The commandline for NOX looks right. Can you send the NOX's output? I can't tell from only the GUI side. Thanks. Regards KK On 10 November 2010 07:07, el beckhov wrote: > hello , > i'm trying to run the GUI, it works but no topology is shown in the screen > (i can't see switch, hosts ...), the log is working fine but it doesn't show > the topology. > here is the components i run with nox_core: > ./nox_core -v -i ptcp:6633 pyswitch pyauthenticator lavi monitoring > jsonmessenger messenger > the error shown on the Nox_GUI shell is : > Traceback (most recent call last): > File "/home/x/Desktop/nox/src/gui/communication.py", line 169, in run > jsonmsg = simplejson.loads(msg) > File "/usr/lib/pymodules/python2.6/simplejson/__init__.py", line 307, in > loads > return _default_decoder.decode(s) > File "/usr/lib/pymodules/python2.6/simplejson/decoder.py", line 335, in > decode > obj, end = self.raw_decode(s, idx=_w(s, 0).end()) > File "/usr/lib/pymodules/python2.6/simplejson/decoder.py", line 353, in > raw_decode > raise ValueError("No JSON object could be decoded") > ValueError: No JSON object could be decoded > Sending ...{'command': 'request', 'node_type': 'all', 'type': 'lavi', 'xid': > 1} > Sending ...{'command': 'request', 'type': 'lavi', 'link_type': 'all', 'xid': > 2} > Sending ...{'command': 'subscribe', 'node_type': 'all', 'type': 'lavi', > 'xid': 3} > Sending ...{'command': 'subscribe', 'type': 'lavi', 'link_type': 'all', > 'xid': 4} > Sending ...{'command': 'subscribe', 'type': 'monitoring', 'msg_type': > 'linkutils', 'xid': 5} > and when i try to send the json command on the GUI > : {"type":"lavi","command":"request","node_type":"all"} the answer is : > jsonmessenger is not running !! > i already verified that all components are instantiated and work fine. > can you help me to resolve this pb ? > thank you > ___ > 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] Dependency package list for NOX installation
Thanks all for the package. I affirm that the package is for zaku and destiny. As for NOX 0.4, there is OpenFlow 1.0 wire-compatible version created via Srini's patches. Unfortunately, I do not know if we will support that moving forward, though I doubt it. Hope that clears up some doubts. Regards KK On 10 November 2010 12:32, Josh Smift wrote: > NR == Niky Riga > > NR> Date: Wed, 10 Nov 2010 14:27:49 -0500 > NR> > NR> I ran into this issue a while back, and the problem was probably that > NR> the machine was running out of memory > NR> while trying to do the parallel build. Limiting the number of jobs that > NR> run simultaneously (e.g. make -j 5) fixed > NR> the problem. > > That worked fine for me; I've updated the wiki with that info. > > I was also able to use 'make install' to create an installation rooted in > /usr, which seems to run fine (as long as you 'cd /usr/bin' first). I > haven't changed the "Note that nox_core must be run from the build/src > directory, and that the build directory must not be moved to a different > place in the file system." comment in the wiki, in case there are > circumstances where that's still true; if anyone knows more about what the > actual situation is, it might be worth updating. > > -Josh (j...@bbn.com) > > ___ > nox-dev mailing list > nox-dev@noxrepo.org > http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org > ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] help for trying the GUI
Hi Chris, You can remove messenger and lavi. Monitoring should have the rest of the components needed as dependencies. ./nox_core -i ptcp:6633 \ switch switch_management \ hostip hosttracker \ monitoring \ discovery topology \ jsonmessenger Regards KK On 10 November 2010 14:42, Kyriakos Zarifis wrote: > Hi there, > Unfortunately I can't reproduce this, so some additional information would > help. Do you get any errors on the shell where you started the GUI? > Also, what do you see when you click on the "components" button at the > bottom of the left sife panel of the GUI? > Regards, > Kyriakos > On Wed, Nov 10, 2010 at 12:06 PM, Christopher J. Tengi > wrote: >> >> KK, >> What components must be included on the nox_core command line in order >> for nox-gui.py to be able to talk to it? Are there any components that must >> *not* be included? For example, I tried this: >> >> ./nox_core -i ptcp:6633 \ >> switch switch_management \ >> hostip hosttracker \ >> lavi monitoring \ >> discovery topology \ >> messenger jsonmessenger >> >> but the GUI displays nothing useful in either window, and pressing the >> "Send" button only results in a "jsonmessenger is not running" message in >> the left-side window. >> >> Thanks, >> /Chris >> >> On 10/21/2010 02:31 AM, kk yap wrote: >>> >>> Hi El, >>> >>> Try the instructions here? http://noxrepo.org/noxwiki/index.php/NOX_GUI >>> >>> Regards >>> KK >>> >>> >>> On 20 October 2010 13:18, el beckhov wrote: hi, i'm a student in montreal (canada) i'm new with nox and i have some difficulty to download and try the GUI can you please help me ? thank you PS: i don't know how to access the Destiny branch of the noxrepo >>> >>> ___ >>> nox-dev mailing list >>> nox-dev@noxrepo.org >>> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org >> >> ___ >> nox-dev mailing list >> nox-dev@noxrepo.org >> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org > > > ___ > nox-dev mailing list > nox-dev@noxrepo.org > http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org > > ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] help for trying the GUI
Hi there, Unfortunately I can't reproduce this, so some additional information would help. Do you get any errors on the shell where you started the GUI? Also, what do you see when you click on the "components" button at the bottom of the left sife panel of the GUI? Regards, Kyriakos On Wed, Nov 10, 2010 at 12:06 PM, Christopher J. Tengi < te...@cs.princeton.edu> wrote: > KK, >What components must be included on the nox_core command line in order > for nox-gui.py to be able to talk to it? Are there any components that must > *not* be included? For example, I tried this: > >./nox_core -i ptcp:6633 \ >switch switch_management \ >hostip hosttracker \ >lavi monitoring \ >discovery topology \ >messenger jsonmessenger > > but the GUI displays nothing useful in either window, and pressing the > "Send" button only results in a "jsonmessenger is not running" message in > the left-side window. > >Thanks, >/Chris > > > On 10/21/2010 02:31 AM, kk yap wrote: > >> Hi El, >> >> Try the instructions here? http://noxrepo.org/noxwiki/index.php/NOX_GUI >> >> Regards >> KK >> >> >> On 20 October 2010 13:18, el beckhov wrote: >> >>> hi, >>> i'm a student in montreal (canada) >>> i'm new with nox and i have some difficulty to download and try the GUI >>> can you please help me ? >>> thank you >>> PS: i don't know how to access the Destiny branch of the noxrepo >>> >> ___ >> nox-dev mailing list >> nox-dev@noxrepo.org >> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org >> > > ___ > nox-dev mailing list > nox-dev@noxrepo.org > http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org > ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] help for trying the GUI
KK, What components must be included on the nox_core command line in order for nox-gui.py to be able to talk to it? Are there any components that must *not* be included? For example, I tried this: ./nox_core -i ptcp:6633 \ switch switch_management \ hostip hosttracker \ lavi monitoring \ discovery topology \ messenger jsonmessenger but the GUI displays nothing useful in either window, and pressing the "Send" button only results in a "jsonmessenger is not running" message in the left-side window. Thanks, /Chris On 10/21/2010 02:31 AM, kk yap wrote: Hi El, Try the instructions here? http://noxrepo.org/noxwiki/index.php/NOX_GUI Regards KK On 20 October 2010 13:18, el beckhov wrote: hi, i'm a student in montreal (canada) i'm new with nox and i have some difficulty to download and try the GUI can you please help me ? thank you PS: i don't know how to access the Destiny branch of the noxrepo ___ 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] Dependency package list for NOX installation
NR == Niky Riga NR> Date: Wed, 10 Nov 2010 14:27:49 -0500 NR> NR> I ran into this issue a while back, and the problem was probably that NR> the machine was running out of memory NR> while trying to do the parallel build. Limiting the number of jobs that NR> run simultaneously (e.g. make -j 5) fixed NR> the problem. That worked fine for me; I've updated the wiki with that info. I was also able to use 'make install' to create an installation rooted in /usr, which seems to run fine (as long as you 'cd /usr/bin' first). I haven't changed the "Note that nox_core must be run from the build/src directory, and that the build directory must not be moved to a different place in the file system." comment in the wiki, in case there are circumstances where that's still true; if anyone knows more about what the actual situation is, it might be worth updating. -Josh (j...@bbn.com) ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] Dependency package list for NOX installation
On 3 and 4 core systems, I have found that -j4 and -j5 respectively give the best build times anyway. -- Murphy On Nov 10, 2010, at 11:27 AM, Niky Riga wrote: > Josh Smift wrote: >> JBS> I found >> http://noxrepo.org/noxwiki/index.php/NOX_Installation#Dependencies, >> JBS> but I don't know what versions it's been tested with. (It hasn't been >> JBS> tested much -- I found (and fixed) a typo in the apt-get section.) >> >> I had another problem building just now, on an Ubuntu 10.04 system: When I >> compiled with 'make', it worked fine, but when I compiled with 'make -j' >> (as it says to do on that installation page), it didn't. (Although when I >> immediately re-ran the 'make -j', it errored out in a similar but >> different place.) >> >> Is this a known issue? If not, I can gather and send along more details. >> > I ran into this issue a while back, and the problem was probably that the > machine was running out of memory > while trying to do the parallel build. Limiting the number of jobs that run > simultaneously (e.g. make -j 5) fixed > the problem. > > --niky >> -Josh (j...@bbn.com) >> >> ___ >> nox-dev mailing list >> nox-dev@noxrepo.org >> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org >> > > > ___ > nox-dev mailing list > nox-dev@noxrepo.org > http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] Dependency package list for NOX installation
Josh Smift wrote: JBS> I found http://noxrepo.org/noxwiki/index.php/NOX_Installation#Dependencies, JBS> but I don't know what versions it's been tested with. (It hasn't been JBS> tested much -- I found (and fixed) a typo in the apt-get section.) I had another problem building just now, on an Ubuntu 10.04 system: When I compiled with 'make', it worked fine, but when I compiled with 'make -j' (as it says to do on that installation page), it didn't. (Although when I immediately re-ran the 'make -j', it errored out in a similar but different place.) Is this a known issue? If not, I can gather and send along more details. I ran into this issue a while back, and the problem was probably that the machine was running out of memory while trying to do the parallel build. Limiting the number of jobs that run simultaneously (e.g. make -j 5) fixed the problem. --niky -Josh (j...@bbn.com) ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
[nox-dev] Dependency package list for NOX installation
JBS> I found http://noxrepo.org/noxwiki/index.php/NOX_Installation#Dependencies, JBS> but I don't know what versions it's been tested with. (It hasn't been JBS> tested much -- I found (and fixed) a typo in the apt-get section.) I had another problem building just now, on an Ubuntu 10.04 system: When I compiled with 'make', it worked fine, but when I compiled with 'make -j' (as it says to do on that installation page), it didn't. (Although when I immediately re-ran the 'make -j', it errored out in a similar but different place.) Is this a known issue? If not, I can gather and send along more details. -Josh (j...@bbn.com) ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] Dependency package list for NOX installation
The noxrepo wiki has some info (Debian packages that pull in requirements, fairly up to date lists of packages, etc.), but it's pretty much all aimed at zaku/destiny. There's a tutorial on the openflow site somewhere that I think had a package list for the old master branch. But I'm pretty sure that was way, way, way after 0.4? IIRC, 0.4 does not speak OF wire protocol 1.0 (though it's so hard to say due to the version number inconsistencies). -- Murphy On Nov 10, 2010, at 8:35 AM, Nikhil Handigol wrote: > Is there a place where the dependency packages are listed for a clean > installation of various release versions of NOX? > > More specifically, I'm trying to do a clean installation of NOX 0.4 (wire > compatible with OpenFlow 1.0) on Ubuntu 10.04. Where can I find the list of > packages that I need to install for the compilation to go through? > > -/\/ > ___ > 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] Dependency package list for NOX installation
NH == Nikhil Handigol NH> Date: Wed, 10 Nov 2010 08:35:07 -0800 NH> NH> Is there a place where the dependency packages are listed for a clean NH> installation of various release versions of NOX? I found http://noxrepo.org/noxwiki/index.php/NOX_Installation#Dependencies, but I don't know what versions it's been tested with. (It hasn't been tested much -- I found (and fixed) a typo in the apt-get section.) Along those lines, there's a bug in the nox-dependencies package: It doesn't include git-core, which is required by the first step of the Installation section. Vaguely relatedly: The Verify Installation section says Note that nox_core must be run from the build/src directory, and that the build directory must not be moved to a different place in the file system. If I want to run the 'switch' module to handle default end user traffic, and think it would be better to run this somewhere system-wide rather than out of my homedir, what's the best way to do that? (Or is this not something I should want to be doing, ala KK's suggestion from a few weeks ago that NOX is not actually suitable for "production" use?) -Josh (j...@bbn.com) ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
[nox-dev] Dependency package list for NOX installation
Is there a place where the dependency packages are listed for a clean installation of various release versions of NOX? More specifically, I'm trying to do a clean installation of NOX 0.4 (wire compatible with OpenFlow 1.0) on Ubuntu 10.04. Where can I find the list of packages that I need to install for the compilation to go through? -/\/ ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
[nox-dev] help to run NOX GUI
hello , i'm trying to run the GUI, it works but no topology is shown in the screen (i can't see switch, hosts ...), the log is working fine but it doesn't show the topology. here is the components i run with nox_core: *./nox_core -v -i ptcp:6633 pyswitch pyauthenticator lavi monitoring jsonmessenger messenger* the error shown on the Nox_GUI shell is : *Traceback (most recent call last):* * File "/home/x/Desktop/nox/src/gui/communication.py", line 169, in run* *jsonmsg = simplejson.loads(msg)* * File "/usr/lib/pymodules/python2.6/simplejson/__init__.py", line 307, in loads* *return _default_decoder.decode(s)* * File "/usr/lib/pymodules/python2.6/simplejson/decoder.py", line 335, in decode* *obj, end = self.raw_decode(s, idx=_w(s, 0).end())* * File "/usr/lib/pymodules/python2.6/simplejson/decoder.py", line 353, in raw_decode* *raise ValueError("No JSON object could be decoded")* *ValueError: No JSON object could be decoded* *Sending ...{'command': 'request', 'node_type': 'all', 'type': 'lavi', 'xid': 1}* *Sending ...{'command': 'request', 'type': 'lavi', 'link_type': 'all', 'xid': 2}* *Sending ...{'command': 'subscribe', 'node_type': 'all', 'type': 'lavi', 'xid': 3}* *Sending ...{'command': 'subscribe', 'type': 'lavi', 'link_type': 'all', 'xid': 4}* *Sending ...{'command': 'subscribe', 'type': 'monitoring', 'msg_type': 'linkutils', 'xid': 5}* and when i try to send the json command on the GUI : {"type":"lavi","command":"request","node_type":"all"} the answer is : *jsonmessenger is not running* !! i already verified that all components are instantiated and work fine. can you help me to resolve this pb ? thank you ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
[nox-dev] Invitation to connect on LinkedIn
LinkedIn rodrigo braga requested to add you as a connection on LinkedIn: -- Minlan, I'd like to add you to my professional network on LinkedIn. - rodrigo Accept invitation from rodrigo braga http://www.linkedin.com/e/v6dlem-ggc988b6-13/IGggMGV6541HFszQdT-sndUt76URk6E/blk/I18756399_25/pmpxnSRJrSdvj4R5fnhv9ClRsDgZp6lQs6lzoQ5AomZIpn8_dj9vejAPdzkTe359bQJRdl9LrRxIbP8Md3wMdPsUe34LrCBxbOYWrSlI/EML_comm_afe/ View invitation from rodrigo braga http://www.linkedin.com/e/v6dlem-ggc988b6-13/IGggMGV6541HFszQdT-sndUt76URk6E/blk/I18756399_25/0RcBYVejcSdjsUckALqnpPbOYWrSlI/svi/ -- Why might connecting with rodrigo braga be a good idea? People rodrigo braga knows can discover your profile: Connecting to rodrigo braga will attract the attention of LinkedIn users. See who's been viewing your profile: http://www.linkedin.com/e/v6dlem-ggc988b6-13/wvp/inv18_wvmp/ -- (c) 2010, LinkedIn Corporation___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] [PATCH] support setting the binding IP address of TCP sockets for passive interfaces
Ooops. I remade this patch pretty much the same way a couple weeks ago, but apparently forgot to apply it. Sorry to make you go to the effort! Thanks. I'll take care of it. -- Murphy On Nov 10, 2010, at 1:27 AM, Romain Lenglet wrote: > Hi, > > This patch if for the zaku branch. > This is a remake of my old patch for the openflow-1.0 branch here: > http://noxrepo.org/pipermail/nox-dev_noxrepo.org/2010-August/001577.html > > This remade patch retains backward-compatibility with the current syntax for > the ptcp: and pssl: interfaces. > > I have no excuse for taking so long to re-submit that patch... ;( > > BR, > -- > Romain Lenglet > > On 11/10/10 18:21, romain.leng...@berabera.info wrote: >> From: Romain Lenglet >> >> Modify the nox_core command line arguments to accept the socket bind >> address for the ptcp: and pssl: interfaces. This is particularly >> important for the ptcp: method, as it can help improving security and >> performance in some cases. For instance, if a controller connects >> only to datapaths on the same host, using ptcp: and binding to >> 127.0.0.1 limits to connections from the localhost. Otherwise, pssl: >> must be used, which is less efficient. >> >> More precisely, support the following extra interface syntaxes: >> ptcp:[IP]:[PORT] in addition to ptcp:[PORT], and >> pssl:[IP]:[PORT]:KEY:CERT:CONTROLLER_CA_CERT in addition to >> pssl:[PORT]:KEY:CERT:CONTROLLER_CA_CERT. >> --- >> src/include/openflow.hh |8 +- >> src/lib/openflow.cc | 58 >> -- >> src/nox_main.cc | 11 ++-- >> 3 files changed, 59 insertions(+), 18 deletions(-) >> >> diff --git a/src/include/openflow.hh b/src/include/openflow.hh >> index 02e6f9f..5248bbb 100644 >> --- a/src/include/openflow.hh >> +++ b/src/include/openflow.hh >> @@ -284,13 +284,15 @@ class Passive_tcp_openflow_connection_factory >> : public Openflow_connection_factory >> { >> public: >> -Passive_tcp_openflow_connection_factory(uint16_t port); >> +Passive_tcp_openflow_connection_factory(const char* bind_ip, >> +uint16_t port); >> Openflow_connection* connect(int& error); >> void connect_wait(); >> std::string to_string(); >> bool passive() { return true; } >> private: >> Tcp_socket socket; >> +ipaddr bind_ip; >> uint16_t port; >> }; >> >> @@ -314,7 +316,8 @@ class Passive_ssl_openflow_connection_factory >> : public Openflow_connection_factory >> { >> public: >> -Passive_ssl_openflow_connection_factory(uint16_t port, const char *key, >> +Passive_ssl_openflow_connection_factory(const char* bind_ip, >> +uint16_t port, const char *key, >> const char *cert, >> const char *CAfile); >> Openflow_connection* connect(int& error); >> @@ -324,6 +327,7 @@ public: >> private: >> boost::shared_ptr config; >> Ssl_socket socket; >> +ipaddr bind_ip; >> uint16_t port; >> }; >> >> diff --git a/src/lib/openflow.cc b/src/lib/openflow.cc >> index e23cb20..f7ee232 100644 >> --- a/src/lib/openflow.cc >> +++ b/src/lib/openflow.cc >> @@ -1134,11 +1134,24 @@ Openflow_connection_factory* >> Openflow_connection_factory::create( >> ? atoi(tokens[2].c_str()) : OFP_TCP_PORT; >> return new Tcp_openflow_connection_factory(tokens[1], htons(port)); >> } else if (tokens[0] == "ptcp") { >> -uint16_t port = atoi(tokens[1].c_str()); >> +const char* bind_ip = "0.0.0.0"; >> +uint16_t port = 0; >> +if (tokens.size() == 2) { >> +port = atoi(tokens[1].c_str()); >> +} else if (tokens.size() == 3) { >> +if (tokens[1].size()> 0) { >> +bind_ip = tokens[1].c_str(); >> +} >> +port = atoi(tokens[2].c_str()); >> +} else { >> +log.err("ptcp connection name not in the form ptcp:[PORT] or >> ptcp:[IP]:[PORT]"); >> +exit(EXIT_FAILURE); >> +} >> if (!port) { >> port = OFP_TCP_PORT; >> } >> -return new Passive_tcp_openflow_connection_factory(htons(port)); >> +return new Passive_tcp_openflow_connection_factory(bind_ip, >> + htons(port)); >> } else if (tokens[0] == "ssl") { >> if (tokens.size() != 6) { >> log.err("ssl connection name not in the form >> ssl:HOST:[PORT]:KEY:CERT:CAFILE"); >> @@ -1152,17 +1165,33 @@ Openflow_connection_factory* >> Openflow_connection_factory::create( >> tokens[1], htons(port), tokens[3].c_str(), >> tokens[4].c_str(), tokens[5].c_str()); >> } else if (tokens[0] == "pssl") { >> -if (tokens.size() != 5) { >> -log.err("pssl connection name not in the form >> pssl:[POR
Re: [nox-dev] [PATCH] support setting the binding IP address of TCP sockets for passive interfaces
Hi, This patch if for the zaku branch. This is a remake of my old patch for the openflow-1.0 branch here: http://noxrepo.org/pipermail/nox-dev_noxrepo.org/2010-August/001577.html This remade patch retains backward-compatibility with the current syntax for the ptcp: and pssl: interfaces. I have no excuse for taking so long to re-submit that patch... ;( BR, -- Romain Lenglet On 11/10/10 18:21, romain.leng...@berabera.info wrote: From: Romain Lenglet Modify the nox_core command line arguments to accept the socket bind address for the ptcp: and pssl: interfaces. This is particularly important for the ptcp: method, as it can help improving security and performance in some cases. For instance, if a controller connects only to datapaths on the same host, using ptcp: and binding to 127.0.0.1 limits to connections from the localhost. Otherwise, pssl: must be used, which is less efficient. More precisely, support the following extra interface syntaxes: ptcp:[IP]:[PORT] in addition to ptcp:[PORT], and pssl:[IP]:[PORT]:KEY:CERT:CONTROLLER_CA_CERT in addition to pssl:[PORT]:KEY:CERT:CONTROLLER_CA_CERT. --- src/include/openflow.hh |8 +- src/lib/openflow.cc | 58 -- src/nox_main.cc | 11 ++-- 3 files changed, 59 insertions(+), 18 deletions(-) diff --git a/src/include/openflow.hh b/src/include/openflow.hh index 02e6f9f..5248bbb 100644 --- a/src/include/openflow.hh +++ b/src/include/openflow.hh @@ -284,13 +284,15 @@ class Passive_tcp_openflow_connection_factory : public Openflow_connection_factory { public: -Passive_tcp_openflow_connection_factory(uint16_t port); +Passive_tcp_openflow_connection_factory(const char* bind_ip, +uint16_t port); Openflow_connection* connect(int& error); void connect_wait(); std::string to_string(); bool passive() { return true; } private: Tcp_socket socket; +ipaddr bind_ip; uint16_t port; }; @@ -314,7 +316,8 @@ class Passive_ssl_openflow_connection_factory : public Openflow_connection_factory { public: -Passive_ssl_openflow_connection_factory(uint16_t port, const char *key, +Passive_ssl_openflow_connection_factory(const char* bind_ip, +uint16_t port, const char *key, const char *cert, const char *CAfile); Openflow_connection* connect(int& error); @@ -324,6 +327,7 @@ public: private: boost::shared_ptr config; Ssl_socket socket; +ipaddr bind_ip; uint16_t port; }; diff --git a/src/lib/openflow.cc b/src/lib/openflow.cc index e23cb20..f7ee232 100644 --- a/src/lib/openflow.cc +++ b/src/lib/openflow.cc @@ -1134,11 +1134,24 @@ Openflow_connection_factory* Openflow_connection_factory::create( ? atoi(tokens[2].c_str()) : OFP_TCP_PORT; return new Tcp_openflow_connection_factory(tokens[1], htons(port)); } else if (tokens[0] == "ptcp") { -uint16_t port = atoi(tokens[1].c_str()); +const char* bind_ip = "0.0.0.0"; +uint16_t port = 0; +if (tokens.size() == 2) { +port = atoi(tokens[1].c_str()); +} else if (tokens.size() == 3) { +if (tokens[1].size()> 0) { +bind_ip = tokens[1].c_str(); +} +port = atoi(tokens[2].c_str()); +} else { +log.err("ptcp connection name not in the form ptcp:[PORT] or ptcp:[IP]:[PORT]"); +exit(EXIT_FAILURE); +} if (!port) { port = OFP_TCP_PORT; } -return new Passive_tcp_openflow_connection_factory(htons(port)); +return new Passive_tcp_openflow_connection_factory(bind_ip, + htons(port)); } else if (tokens[0] == "ssl") { if (tokens.size() != 6) { log.err("ssl connection name not in the form ssl:HOST:[PORT]:KEY:CERT:CAFILE"); @@ -1152,17 +1165,33 @@ Openflow_connection_factory* Openflow_connection_factory::create( tokens[1], htons(port), tokens[3].c_str(), tokens[4].c_str(), tokens[5].c_str()); } else if (tokens[0] == "pssl") { -if (tokens.size() != 5) { -log.err("pssl connection name not in the form pssl:[PORT]:KEY:CERT:CAFILE"); +const char* bind_ip = "0.0.0.0"; +uint16_t port = 0; +const char* ssl_key = ""; +const char* ssl_cert = ""; +const char* ssl_cafile = ""; +if (tokens.size() == 5) { +port = atoi(tokens[1].c_str()); +ssl_key = tokens[2].c_str(); +ssl_cert = tokens[3].c_str(); +ssl_cafile = tokens[4].c_str(); +} else if (tokens.size() == 6) { +if (tokens[1].size()> 0) { +bind_ip = tokens[1].c_str(); +
[nox-dev] [PATCH] support setting the binding IP address of TCP sockets for passive interfaces
From: Romain Lenglet Modify the nox_core command line arguments to accept the socket bind address for the ptcp: and pssl: interfaces. This is particularly important for the ptcp: method, as it can help improving security and performance in some cases. For instance, if a controller connects only to datapaths on the same host, using ptcp: and binding to 127.0.0.1 limits to connections from the localhost. Otherwise, pssl: must be used, which is less efficient. More precisely, support the following extra interface syntaxes: ptcp:[IP]:[PORT] in addition to ptcp:[PORT], and pssl:[IP]:[PORT]:KEY:CERT:CONTROLLER_CA_CERT in addition to pssl:[PORT]:KEY:CERT:CONTROLLER_CA_CERT. --- src/include/openflow.hh |8 +- src/lib/openflow.cc | 58 -- src/nox_main.cc | 11 ++-- 3 files changed, 59 insertions(+), 18 deletions(-) diff --git a/src/include/openflow.hh b/src/include/openflow.hh index 02e6f9f..5248bbb 100644 --- a/src/include/openflow.hh +++ b/src/include/openflow.hh @@ -284,13 +284,15 @@ class Passive_tcp_openflow_connection_factory : public Openflow_connection_factory { public: -Passive_tcp_openflow_connection_factory(uint16_t port); +Passive_tcp_openflow_connection_factory(const char* bind_ip, +uint16_t port); Openflow_connection* connect(int& error); void connect_wait(); std::string to_string(); bool passive() { return true; } private: Tcp_socket socket; +ipaddr bind_ip; uint16_t port; }; @@ -314,7 +316,8 @@ class Passive_ssl_openflow_connection_factory : public Openflow_connection_factory { public: -Passive_ssl_openflow_connection_factory(uint16_t port, const char *key, +Passive_ssl_openflow_connection_factory(const char* bind_ip, +uint16_t port, const char *key, const char *cert, const char *CAfile); Openflow_connection* connect(int& error); @@ -324,6 +327,7 @@ public: private: boost::shared_ptr config; Ssl_socket socket; +ipaddr bind_ip; uint16_t port; }; diff --git a/src/lib/openflow.cc b/src/lib/openflow.cc index e23cb20..f7ee232 100644 --- a/src/lib/openflow.cc +++ b/src/lib/openflow.cc @@ -1134,11 +1134,24 @@ Openflow_connection_factory* Openflow_connection_factory::create( ? atoi(tokens[2].c_str()) : OFP_TCP_PORT; return new Tcp_openflow_connection_factory(tokens[1], htons(port)); } else if (tokens[0] == "ptcp") { -uint16_t port = atoi(tokens[1].c_str()); +const char* bind_ip = "0.0.0.0"; +uint16_t port = 0; +if (tokens.size() == 2) { +port = atoi(tokens[1].c_str()); +} else if (tokens.size() == 3) { +if (tokens[1].size() > 0) { +bind_ip = tokens[1].c_str(); +} +port = atoi(tokens[2].c_str()); +} else { +log.err("ptcp connection name not in the form ptcp:[PORT] or ptcp:[IP]:[PORT]"); +exit(EXIT_FAILURE); +} if (!port) { port = OFP_TCP_PORT; } -return new Passive_tcp_openflow_connection_factory(htons(port)); +return new Passive_tcp_openflow_connection_factory(bind_ip, + htons(port)); } else if (tokens[0] == "ssl") { if (tokens.size() != 6) { log.err("ssl connection name not in the form ssl:HOST:[PORT]:KEY:CERT:CAFILE"); @@ -1152,17 +1165,33 @@ Openflow_connection_factory* Openflow_connection_factory::create( tokens[1], htons(port), tokens[3].c_str(), tokens[4].c_str(), tokens[5].c_str()); } else if (tokens[0] == "pssl") { -if (tokens.size() != 5) { -log.err("pssl connection name not in the form pssl:[PORT]:KEY:CERT:CAFILE"); +const char* bind_ip = "0.0.0.0"; +uint16_t port = 0; +const char* ssl_key = ""; +const char* ssl_cert = ""; +const char* ssl_cafile = ""; +if (tokens.size() == 5) { +port = atoi(tokens[1].c_str()); +ssl_key = tokens[2].c_str(); +ssl_cert = tokens[3].c_str(); +ssl_cafile = tokens[4].c_str(); +} else if (tokens.size() == 6) { +if (tokens[1].size() > 0) { +bind_ip = tokens[1].c_str(); +} +port = atoi(tokens[2].c_str()); +ssl_key = tokens[3].c_str(); +ssl_cert = tokens[4].c_str(); +ssl_cafile = tokens[5].c_str(); +} else { +log.err("pssl connection name not in the form pssl:[PORT]:KEY:CERT:CAFILE or pssl:[IP]:[PORT]:KEY:CERT:CAFILE"); exit(EXIT_FAILURE); } -uint16_t port = atoi(tokens[1].c_str()); if (!port) { port = OFP_SSL_
Re: [nox-dev] [PATCH] set the nw_tos field for a flow in extract_flow()
Hi, This patch is against the zaku branch. This bug also exists in the openflow-1.0 branch. I didn't check if it exists in the destiny branch. On 11/10/10 17:02, romain.leng...@berabera.info wrote: From: Romain Lenglet --- src/nox/lib/util.py |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/nox/lib/util.py b/src/nox/lib/util.py index 076d419..bd0ee5a 100644 --- a/src/nox/lib/util.py +++ b/src/nox/lib/util.py @@ -387,6 +387,7 @@ def extract_flow(ethernet): attrs[core.NW_SRC] = p.srcip attrs[core.NW_DST] = p.dstip attrs[core.NW_PROTO] = p.protocol +attrs[core.NW_TOS] = p.tos p = p.next if isinstance(p, udp) or isinstance(p, tcp): @@ -403,6 +404,7 @@ def extract_flow(ethernet): attrs[core.NW_SRC] = 0 attrs[core.NW_DST] = 0 attrs[core.NW_PROTO] = 0 +attrs[core.NW_TOS] = 0 attrs[core.TP_SRC] = 0 attrs[core.TP_DST] = 0 return attrs ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
[nox-dev] [PATCH] set the nw_tos field for a flow in extract_flow()
From: Romain Lenglet --- src/nox/lib/util.py |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/nox/lib/util.py b/src/nox/lib/util.py index 076d419..bd0ee5a 100644 --- a/src/nox/lib/util.py +++ b/src/nox/lib/util.py @@ -387,6 +387,7 @@ def extract_flow(ethernet): attrs[core.NW_SRC] = p.srcip attrs[core.NW_DST] = p.dstip attrs[core.NW_PROTO] = p.protocol +attrs[core.NW_TOS] = p.tos p = p.next if isinstance(p, udp) or isinstance(p, tcp): @@ -403,6 +404,7 @@ def extract_flow(ethernet): attrs[core.NW_SRC] = 0 attrs[core.NW_DST] = 0 attrs[core.NW_PROTO] = 0 +attrs[core.NW_TOS] = 0 attrs[core.TP_SRC] = 0 attrs[core.TP_DST] = 0 return attrs -- 1.7.2.3 ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org