Re: [nox-dev] Compare actions?
It is certainly possible to write program code that does this. The quickest is probably to compare the types, and if they equal, memcmp the structs. -Original Message- From: nox-dev-boun...@noxrepo.org [mailto:nox-dev-boun...@noxrepo.org] On Behalf Of Masoud Moshref Javadi Sent: Wednesday, August 10, 2011 3:10 AM To: nox-dev@noxrepo.org Subject: [nox-dev] Compare actions? Is there any way to compare two actions to see if they are the same type and have the same parameters? ___ 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] how to send packet from Nox to data-plane?
Hi, all, If the nox controller traps the ARP_request from a host, how can it send a (fake) ARP_reply to the host? Thanks, Yaxuan___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] how to send packet from Nox to data-plane?
In short, you construct an ARP reply in a buffer (exactly how you do this is up to you... if you're using Python, there's an ARP class in the packet library), and then send it to the appropriate switch as part of an OFPT_PACKET_OUT message. -- Murphy On Aug 10, 2011, at 12:31 AM, Yaxuan wrote: Hi, all, If the nox controller traps the ARP_request from a host, how can it send a (fake) ARP_reply to the host? Thanks, Yaxuan ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] How to send request and fetch reply
Can u please tell me how to do coding for this because i am new to this .If not possible that than please do give me the links of any tutorials of coding in this domain. Regards,Ali Ahmad From: yap...@stanford.edu Date: Tue, 9 Aug 2011 09:45:44 -0700 Subject: Re: [nox-dev] How to send request and fetch reply To: aliahmad...@hotmail.com CC: nox-dev@noxrepo.org Just listening for datapath_join_event. NOX send OFPT_FEATURES_REQUEST when a switch connects and the OFPT_FEATURES_REPLY is contained in the datapath_join_event. Regards KK On 9 August 2011 09:38, ali ahmad aliahmad...@hotmail.com wrote: Hy! I want to know, what's the procedure to send a request to controller like OFPT_FEATURES_REQUEST and how to receive the OFPT_FEATURES_REPLY message. In short what i have to code for the controller to do all this. ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
[nox-dev] Matching a part of a range with wildcard
How can we set rules with wildcards that do not cover all of the range. For example, I want to set a rule that match destination port numbers from 1 to 1024 or any other arbitrary ranges. Should I replicate what set_match method does? ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Matching a part of a range with wildcard
Ranges for port numbers are not an OpenFlow feature (at least not in 1.0), so the short answer is that doing this is impossible. I don't think anything to do with set_match() will help you, since set_match() just builds an OpenFlow match structure (and, again, port range matches are not an OpenFlow 1.0 feature). The longer answer is that you can install individual rules that exactly match port numbers. If you were interested in, say, five particular ports, installing five flows proactively with those five port numbers is probably a fine solution. But installing 1024 flows is probably not a good idea. A reactive approach scales better (at the cost of flow setup latency which includes a round trip from the switch to the controller) -- install a flow that matches on everything you're interested in *except* port number, wildcard the port number, and give it a send-to-controller action. When a packet hits this rule, it'll get sent to the controller, and you can install a new rule with a higher priority that exactly matches the port number used by that flow. Hope that helps. -- Murphy On Aug 10, 2011, at 6:03 AM, Masoud Moshref Javadi wrote: How can we set rules with wildcards that do not cover all of the range. For example, I want to set a rule that match destination port numbers from 1 to 1024 or any other arbitrary ranges. Should I replicate what set_match method does? ___ 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 a part of a range with wildcard
I think a recent discussion about range match for OpenFlow can be found in one of the Open vSwitch mailing list. Mathematically, a 2^W range will be converted to 2(W-1) prefixes in the worst case. For multi-dimension range rules, say ranges in F fields, one rule may converted to O(W^F) prefixes. In practice, I guess it might be the hardware switch architecture that why OpenFlow only supports prefix rules. Prefix rules are easily to be implemented on theTCAM-based forwarding tables of existing switches, while range ranges require more complicated ASIC design. However, I think packet classification algorithms may help efficient range match on software solutions, such as Open vSwitch or Network processor based switching devices (e.g. TILERA PRO64). Yaxuan -- Original -- From: Murphy McCauleyjam...@nau.edu; Date: Wed, Aug 10, 2011 09:24 PM To: Masoud Moshref Javadimoshr...@usc.edu; Cc: nox-devnox-dev@noxrepo.org; Subject: Re: [nox-dev] Matching a part of a range with wildcard Ranges for port numbers are not an OpenFlow feature (at least not in 1.0), so the short answer is that doing this is impossible. I don't think anything to do with set_match() will help you, since set_match() just builds an OpenFlow match structure (and, again, port range matches are not an OpenFlow 1.0 feature). The longer answer is that you can install individual rules that exactly match port numbers. If you were interested in, say, five particular ports, installing five flows proactively with those five port numbers is probably a fine solution. But installing 1024 flows is probably not a good idea. A reactive approach scales better (at the cost of flow setup latency which includes a round trip from the switch to the controller) -- install a flow that matches on everything you're interested in *except* port number, wildcard the port number, and give it a send-to-controller action. When a packet hits this rule, it'll get sent to the controller, and you can install a new rule with a higher priority that exactly matches the port number used by that flow. Hope that helps. -- Murphy On Aug 10, 2011, at 6:03 AM, Masoud Moshref Javadi wrote: How can we set rules with wildcards that do not cover all of the range. For example, I want to set a rule that match destination port numbers from 1 to 1024 or any other arbitrary ranges. Should I replicate what set_match method does? ___ 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] How to send request and fetch reply
Hi Ali, You can take a look at the datapathmem component. I suspect that does most of what you want. Regards KK On 10 August 2011 02:10, ali ahmad aliahmad...@hotmail.com wrote: Can u please tell me how to do coding for this because i am new to this .If not possible that than please do give me the links of any tutorials of coding in this domain. Regards, Ali Ahmad From: yap...@stanford.edu Date: Tue, 9 Aug 2011 09:45:44 -0700 Subject: Re: [nox-dev] How to send request and fetch reply To: aliahmad...@hotmail.com CC: nox-dev@noxrepo.org Just listening for datapath_join_event. NOX send OFPT_FEATURES_REQUEST when a switch connects and the OFPT_FEATURES_REPLY is contained in the datapath_join_event. Regards KK On 9 August 2011 09:38, ali ahmad aliahmad...@hotmail.com wrote: Hy! I want to know, what's the procedure to send a request to controller like OFPT_FEATURES_REQUEST and how to receive the OFPT_FEATURES_REPLY message. In short what i have to code for the controller to do all this. ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Matching a part of a range with wildcard
Agree. Packet classification algorithms can easily improve the performance. However, deploying PC into SDN is still an open and interesting question. On Aug 10, 2011, at 7:08, Yaxuan yaxuan...@gmail.com wrote: I think a recent discussion about range match for OpenFlow can be found in one of the Open vSwitch mailing list. Mathematically, a 2^W range will be converted to 2(W-1) prefixes in the worst case. For multi-dimension range rules, say ranges in F fields, one rule may converted to O(W^F) prefixes. In practice, I guess it might be the hardware switch architecture that why OpenFlow only supports prefix rules. Prefix rules are easily to be implemented on theTCAM-based forwarding tables of existing switches, while range ranges require more complicated ASIC design. However, I think packet classification algorithms may help efficient range match on software solutions, such as Open vSwitch or Network processor based switching devices (e.g. TILERA PRO64). Yaxuan -- Original -- From: Murphy McCauleyjam...@nau.edu; Date: Wed, Aug 10, 2011 09:24 PM To: Masoud Moshref Javadimoshr...@usc.edu; Cc: nox-devnox-dev@noxrepo.org; Subject: Re: [nox-dev] Matching a part of a range with wildcard Ranges for port numbers are not an OpenFlow feature (at least not in 1.0), so the short answer is that doing this is impossible. I don't think anything to do with set_match() will help you, since set_match() just builds an OpenFlow match structure (and, again, port range matches are not an OpenFlow 1.0 feature). The longer answer is that you can install individual rules that exactly match port numbers. If you were interested in, say, five particular ports, installing five flows proactively with those five port numbers is probably a fine solution. But installing 1024 flows is probably not a good idea. A reactive approach scales better (at the cost of flow setup latency which includes a round trip from the switch to the controller) -- install a flow that matches on everything you're interested in *except* port number, wildcard the port number, and give it a send-to-controller action. When a packet hits this rule, it'll get sent to the controller, and you can install a new rule with a higher priority that exactly matches the port number used by that flow. Hope that helps. -- Murphy On Aug 10, 2011, at 6:03 AM, Masoud Moshref Javadi wrote: How can we set rules with wildcards that do not cover all of the range. For example, I want to set a rule that match destination port numbers from 1 to 1024 or any other arbitrary ranges. Should I replicate what set_match method does? ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Matching a part of a range with wildcard
Thank you for your great answer. So it seems that ranges are only supported in network addresses. For IP fields, should I set NW_SRC_N_WILD and NW_DST_N_WILD fields in the passed dictionary? set_match uses these fields but it is not mentioned above install_datapath_flow method On 8/10/2011 6:24 AM, Murphy McCauley wrote: Ranges for port numbers are not an OpenFlow feature (at least not in 1.0), so the short answer is that doing this is impossible. I don't think anything to do with set_match() will help you, since set_match() just builds an OpenFlow match structure (and, again, port range matches are not an OpenFlow 1.0 feature). The longer answer is that you can install individual rules that exactly match port numbers. If you were interested in, say, five particular ports, installing five flows proactively with those five port numbers is probably a fine solution. But installing 1024 flows is probably not a good idea. A reactive approach scales better (at the cost of flow setup latency which includes a round trip from the switch to the controller) -- install a flow that matches on everything you're interested in *except* port number, wildcard the port number, and give it a send-to-controller action. When a packet hits this rule, it'll get sent to the controller, and you can install a new rule with a higher priority that exactly matches the port number used by that flow. Hope that helps. -- Murphy On Aug 10, 2011, at 6:03 AM, Masoud Moshref Javadi wrote: How can we set rules with wildcards that do not cover all of the range. For example, I want to set a rule that match destination port numbers from 1 to 1024 or any other arbitrary ranges. Should I replicate what set_match method does? ___ 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 a part of a range with wildcard
set_match should wildcard anything that is missing, so just don't specify them. -- Murphy On Aug 10, 2011 10:57 AM, Masoud Moshref Javadi moshr...@usc.edu wrote: Thank you for your great answer. So it seems that ranges are only supported in network addresses. For IP fields, should I set NW_SRC_N_WILD and NW_DST_N_WILD fields in the passed dictionary? set_match uses these fields but it is not mentioned above install_datapath_flow method On 8/10/2011 6:24 AM, Murphy McCauley wrote: Ranges for port numbers are not an OpenFlow feature (at least not in 1.0), so the short answer is that doing this is impossible. I don't think anything to do with set_match() will help you, since set_match() just builds an OpenFlow match structure (and, again, port range matches are not an OpenFlow 1.0 feature). The longer answer is that you can install individual rules that exactly match port numbers. If you were interested in, say, five particular ports, installing five flows proactively with those five port numbers is probably a fine solution. But installing 1024 flows is probably not a good idea. A reactive approach scales better (at the cost of flow setup latency which includes a round trip from the switch to the controller) -- install a flow that matches on everything you're interested in *except* port number, wildcard the port number, and give it a send-to-controller action. When a packet hits this rule, it'll get sent to the controller, and you can install a new rule with a higher priority that exactly matches the port number used by that flow. Hope that helps. -- Murphy On Aug 10, 2011, at 6:03 AM, Masoud Moshref Javadi wrote: How can we set rules with wildcards that do not cover all of the range. For example, I want to set a rule that match destination port numbers from 1 to 1024 or any other arbitrary ranges. Should I replicate what set_match method does? ___ 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 a part of a range with wildcard
No I don't want to wildcard whole range of a field, but just a part of its range. On 8/10/2011 12:00 PM, James McCauley wrote: set_match should wildcard anything that is missing, so just don't specify them. -- Murphy On Aug 10, 2011 10:57 AM, Masoud Moshref Javadi moshr...@usc.edu mailto:moshr...@usc.edu wrote: Thank you for your great answer. So it seems that ranges are only supported in network addresses. For IP fields, should I set NW_SRC_N_WILD and NW_DST_N_WILD fields in the passed dictionary? set_match uses these fields but it is not mentioned above install_datapath_flow method On 8/10/2011 6:24 AM, Murphy McCauley wrote: Ranges for port numbers are not an OpenFlow feature (at least not in 1.0), so the short answer is that doing this is impossible. I don't think anything to do with set_match() will help you, since set_match() just builds an OpenFlow match structure (and, again, port range matches are not an OpenFlow 1.0 feature). The longer answer is that you can install individual rules that exactly match port numbers. If you were interested in, say, five particular ports, installing five flows proactively with those five port numbers is probably a fine solution. But installing 1024 flows is probably not a good idea. A reactive approach scales better (at the cost of flow setup latency which includes a round trip from the switch to the controller) -- install a flow that matches on everything you're interested in *except* port number, wildcard the port number, and give it a send-to-controller action. When a packet hits this rule, it'll get sent to the controller, and you can install a new rule with a higher priority that exactly matches the port number used by that flow. Hope that helps. -- Murphy On Aug 10, 2011, at 6:03 AM, Masoud Moshref Javadi wrote: How can we set rules with wildcards that do not cover all of the range. For example, I want to set a rule that match destination port numbers from 1 to 1024 or any other arbitrary ranges. Should I replicate what set_match method does? ___ nox-dev mailing list nox-dev@noxrepo.org mailto: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 a part of a range with wildcard
Ah, sorry. Yes, set NW_SRC_N_WILD and NW_DST_N_WILD to specify the number of wildcarded bits for the NW_SRC and NW_DST entries (e.g., 0 for exact match, 8 for a /24 network, 32 is totally wild, etc.). -- Murphy On Aug 10, 2011, at 12:28 PM, Masoud Moshref Javadi wrote: No I don't want to wildcard whole range of a field, but just a part of its range. On 8/10/2011 12:00 PM, James McCauley wrote: set_match should wildcard anything that is missing, so just don't specify them. -- Murphy On Aug 10, 2011 10:57 AM, Masoud Moshref Javadi moshr...@usc.edu wrote: Thank you for your great answer. So it seems that ranges are only supported in network addresses. For IP fields, should I set NW_SRC_N_WILD and NW_DST_N_WILD fields in the passed dictionary? set_match uses these fields but it is not mentioned above install_datapath_flow method On 8/10/2011 6:24 AM, Murphy McCauley wrote: Ranges for port numbers are not an OpenFlow feature (at least not in 1.0), so the short answer is that doing this is impossible. I don't think anything to do with set_match() will help you, since set_match() just builds an OpenFlow match structure (and, again, port range matches are not an OpenFlow 1.0 feature). The longer answer is that you can install individual rules that exactly match port numbers. If you were interested in, say, five particular ports, installing five flows proactively with those five port numbers is probably a fine solution. But installing 1024 flows is probably not a good idea. A reactive approach scales better (at the cost of flow setup latency which includes a round trip from the switch to the controller) -- install a flow that matches on everything you're interested in *except* port number, wildcard the port number, and give it a send-to-controller action. When a packet hits this rule, it'll get sent to the controller, and you can install a new rule with a higher priority that exactly matches the port number used by that flow. Hope that helps. -- Murphy On Aug 10, 2011, at 6:03 AM, Masoud Moshref Javadi wrote: How can we set rules with wildcards that do not cover all of the range. For example, I want to set a rule that match destination port numbers from 1 to 1024 or any other arbitrary ranges. Should I replicate what set_match method does? ___ 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] inverted when IP to int
when I write: v=convert_to_ipaddr(0.1.0.0) logger.debug(v is +str(v)) the output is 256 and when I write v=convert_to_ipaddr(0.0.0.1) logger.debug(v is +str(v)) it is 16777216. It seems that it reverse the IP position of 4 numbers in IP. Why is it like this? ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] inverted when IP to int
It stores them in network byte order (big endian). If you're on a little endian machine (e.g., x86), these look backwards if you try to work with them as an integer. -- Murphy On Aug 10, 2011, at 4:32 PM, Masoud Moshref Javadi wrote: when I write: v=convert_to_ipaddr(0.1.0.0) logger.debug(v is +str(v)) the output is 256 and when I write v=convert_to_ipaddr(0.0.0.1) logger.debug(v is +str(v)) it is 16777216. It seems that it reverse the IP position of 4 numbers in IP. Why is it like this? ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
[nox-dev] get_link_load_ratio
Hi all,I am trying to get bandwidth using get_link_load_ratio method in linkload.cc1.Return-value of get_link_load_ratio is ratio of particular port, right ?2.and speed is total bandwidth of particular port(Mbps), right ?3. ratio * speed = using bandwidth(Mbps) of particular port, right ?please explain get_link_load_ratio method more easily. Best Regards, Min-Hyup KANG ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev