- Community Home
- >
- Networking
- >
- Software Defined Networking
- >
- Adding a meter Openflow entry on 2920-24G
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-19-2016 04:25 AM
тАО10-19-2016 04:25 AM
Hi,
I am using hp 2920-24G Switch with the following version:
Aug 29 2016 12:09:14
WB.16.02.0012
485
Boot Image: Primary
Boot ROM Version: WB.16.03
Active Boot ROM: Primary
I using a floodlight controller and an aggregate OpenFlow instance. I was successfully able to create a meter with id =1.
HP-2920-24G(of-inst-aggregate)# sh openflow inst agg meter
OpenFlow Instance Meters
Meter ID : 1
Flow Count : 0
Input Packet Count : 0
Input Byte Count : 0
Duration : 152
Packet/Byte
Band Type Rate Count
--------- ---------------- --------------------
Drop 30000 kbps 0
I want to create a flow entry that would direct all packets coming from in-port 2 into meter 1 then out to port 3. I use the following floodlight REST call:
curl -X POST -d '{"switch":"00:02:48:0f:cf:0c:b1:c0", "name":"flow-mod-1","table": "100" ,"cookie":"0", "priority":"1000", "in_port":"2","active":"true","instruction_goto_meter":"1","actions":"output=3"}' http://127.0.0.1:8080/wm/staticflowpusher/json
A flow entry is created however the meter instruction is ignored.
Flow 2
Match
Incoming Port : 2 Ethernet Type : Any
Source MAC : Any Destination MAC : Any
Source MAC Mask : 000000-000000
Destination MAC Mask : 000000-000000
VLAN ID : Any VLAN Priority : Any
Source IP Address : Any
Destination IP Address : Any
IP Protocol : Any
IP ECN : Any IP DSCP : Any
Source Port : Any Destination Port : Any
Source Port Range : NA
Destination Port Range : NA
TCP Flags : NA
TCP Mask : NA
Attributes
Priority : 1000 Duration : 5 seconds
Hard Timeout : 0 seconds Idle Timeout : 0 seconds
Byte Count : NA Packet Count : 0
Flow Table ID : 100 Controller ID : 1
Cookie : 0xa000004039d1ad
Hardware Index: 17
Instructions
Apply Actions
Output : 3
If I send the same command but without the output action:
curl -X POST -d '{"switch":"00:02:48:0f:cf:0c:b1:c0", "name":"flow-mod-2","table": "100" ,"cookie":"0", "priority":"1000", "in_port":"2","active":"true","instruction_goto_meter":"1"}' http://127.0.0.1:8080/wm/staticflowpusher/json
The meter instruction is set correclty:
Flow 2
Match
Incoming Port : 2 Ethernet Type : Any
Source MAC : Any Destination MAC : Any
Source MAC Mask : 000000-000000
Destination MAC Mask : 000000-000000
VLAN ID : Any VLAN Priority : Any
Source IP Address : Any
Destination IP Address : Any
IP Protocol : Any
IP ECN : Any IP DSCP : Any
Source Port : Any Destination Port : Any
Source Port Range : NA
Destination Port Range : NA
TCP Flags : NA
TCP Mask : NA
Attributes
Priority : 1000 Duration : 48 seconds
Hard Timeout : 0 seconds Idle Timeout : 0 seconds
Byte Count : NA Packet Count : 4
Flow Table ID : 100 Controller ID : 1
Cookie : 0xa000004039d1ad
Hardware Index: 0
Instructions
Meter ID : 1
OpenFlow Instance Meters
Meter ID : 1
Flow Count : 1
Input Packet Count : 0
Input Byte Count : 0
Duration : 430
Packet/Byte
Band Type Rate Count
--------- ---------------- --------------------
Drop 30000 kbps 0
Thus, I am struggling to add a flow entry that would set the meter and then an output port action. If you think it is a problem related to floodlight and not the switch let me know and I can look into the issue in the floodlight forums.
Thank you very much,
Enas
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-19-2016 08:53 AM
тАО10-19-2016 08:53 AM
Re: Adding a meter Openflow entry on 2920-24G
Hello Enas,
The HPE Aruba 2920 does support an OpenFlow rule with both METER and APPLY {OUTPUT} instructions.
Would it possible for you to share the OpenFlow packet (as a .pcap) of the flow-mod sent from the FloodLight controller to the switch. That can help us conclude if the flow-mod had the meter instruction in it or not.
You could use the latest version of WireShark which does support OpenFlow dissection and look for the instructions in the flow-mod.
Thanks!
Abhay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2016 05:09 AM
тАО10-23-2016 05:09 AM
Re: Adding a meter Openflow entry on 2920-24G
Thanks Abhay for your reply,
It turns out it was a bug in the floodlight static flow pusher API. Using a floodlight module instead I was able to add a flow entry that sets the meter ID and then an output port action.
However, an unexpected behavior was observed when testing the meter. The meter I installed is as the following :
Band: Drop and Rate: 30000kbps.
When I run an Iperf TCP test between the two hosts without the meter I get around 980mbps, when I use the meter I get a max of 10mbps, what I was expecting is to get a throughput of around 30mbps.
Any thoughts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2016 05:23 AM
тАО10-23-2016 05:23 AM
Re: Adding a meter Openflow entry on 2920-24G
Hello Enas,
There are 2 types of meters that can be created on the switch. One that meters based on packets per second and the other based on the number of kilo bits per second.
This is determined based on the 'flags' field sent in the OFPT_METER_MOD add message.
/* Meter configuration flags */
enum ofp_meter_flags {
OFPMF_KBPS = 1 << 0, /* Rate value in kb/s (kilo-bit per second). */
OFPMF_PKTPS = 1 << 1, /* Rate value in packet/sec. */
OFPMF_BURST = 1 << 2, /* Do burst size. */
OFPMF_STATS = 1 << 3, /* Collect statistics. */
};
Can you confirm the meter is of type kbps and not pps? If it of type pps, it would explain why you don't see the egress rate to be 30mbps.
Thanks!
Abhay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2016 05:31 AM
тАО10-23-2016 05:31 AM
Re: Adding a meter Openflow entry on 2920-24G
Thanks for your reply,
Yes I have set the flag to 1 which creates a meter with type kbps.
HP-2920-24G(of-inst-aggregate)# sh openflow inst agg meter
OpenFlow Instance Meters
Meter ID : 1
Flow Count : 1
Input Packet Count : 8945
Input Byte Count : 13474167
Duration : 131
Packet/Byte
Band Type Rate Count
--------- ---------------- --------------------
Drop 30000 kbps 2114574
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2016 05:40 AM - edited тАО10-23-2016 05:41 AM
тАО10-23-2016 05:40 AM - edited тАО10-23-2016 05:41 AM
Re: Adding a meter Openflow entry on 2920-24G
The posts in this thread are rising a similar issue, however I am not sure of the two cases are related:
/t5/SDN-Development/HP3800-Metering-drop-policy/m-p/6849870/highlight/true#M695
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2016 08:44 PM
тАО10-23-2016 08:44 PM
Re: Adding a meter Openflow entry on 2920-24G
Hello Enas,
Are there any other flows in the OpenFlow instance that "some" of the packets in the iperf test stream could match on? Can you confirm all the packets of the test stream are hitting the rule with the meter attached?
Is it possible for you to dump all the flows on the switch when you run this test?
I tried a small test by creating a similar meter and attaching to a flow on Table 100 that matches on TCP packets and executes the a simple output to a physical port action. There were no other flows in the OpenFlow instance other than the miss flow.I pumped an ingress TCP stream of 1Gbps and verified the egress stream is rate limited to 30mbps.
Please note the meter rates are in bits per second and not bytes per second. I hope your calculations do take this into account.
Thanks!
Abhay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2016 03:55 AM
тАО10-24-2016 03:55 AM
Re: Adding a meter Openflow entry on 2920-24G
Hi Abhay,
May I know how are you generating the TCP stream ? Are you using iPerf ?
The thing is that when I tried the same test but with using UDP instead of TCP in iPerf (and created a flow entry that would match UDP traffic instead of TCP into the 30mbps meter) I get around 29mbps throughput, which is correct.
I have a feeling that TCP backoff mechanism when observing drops is affecting the throughput in the test.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2016 09:00 PM
тАО10-24-2016 09:00 PM
Re: Adding a meter Openflow entry on 2920-24G
Hello Enas,
No, I wasn't using iPerf. I was using a traffic generator to generate unintelligent TCP traffic streams.
Does iPerf reduce the traffic load when it encounters TCP backoffs?
Thanks!
Abhay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2016 12:25 AM
тАО10-25-2016 12:25 AM
Re: Adding a meter Openflow entry on 2920-24G
Hi Enas
With iperf you will have a fully state full tcp stream. This would imply that windowing would work like in the real world. Since you have a drop the tcp window would be aggressively reduced and then slowly scale back up till a drop is detected, and this would keep on happening. Since this is a tcp iperf it will by default attempt to use max mtu frames if it the default mtu of 1500 bytes(roughly 12000 bits), it should not take too much effort from iperf to step over the 30Mbps.
When using drops on tcp you should never see the rate limit throughput being reached, it will all ways be less and exponentially so. If you have your bucket rate closer to 1Gbps you should see less off a discrepancy but there will still be one.
Now with regards to iperf, not sure if you are using iperf2 or iperf3. But with a bit of command output we should be able to see more. I am hoping the interval resolution is high enough else we will have to look at a packet capture.
Add the following option to the iperf commands тАЬ-i 0.1тАЭ on both the client and server. You should be able to use the default 10 second interval. If the stream ramps up fast enough.
On iperf2 this will drop the interval to 0.5 seconds, on iperf3 this will drop the interval to 0.1 seconds for reporting.
If you can supply me the output from both client and server as shown below it would be great. It might be an option to go to iperf3 to increase the resolution if you are not on it.
Example with iperf2. I do not have a switch on hand so just using the loopback for sample output
Server:
gpr@ubuntu:~$ iperf -s -i 0.1
WARNING: interval too small, increasing from 0.10 to 0.5 seconds.
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 4] local 127.0.0.1 port 5001 connected with 127.0.0.1 port 50176
[ ID] Interval Transfer Bandwidth
[ 4] 0.0- 0.5 sec 2.74 GBytes 47.0 Gbits/sec
[ 4] 0.5- 1.0 sec 2.43 GBytes 41.7 Gbits/sec
[ 4] 1.0- 1.5 sec 2.65 GBytes 45.5 Gbits/sec
тАж Snipped тАж
[ 4] 9.5-10.0 sec 2.45 GBytes 42.2 Gbits/sec
[ 4] 0.0-10.0 sec 51.1 GBytes 43.9 Gbits/sec
Client:
gpr@ubuntu:~$ iperf -c 127.0.0.1 -i 0.1
WARNING: interval too small, increasing from 0.10 to 0.5 seconds.
------------------------------------------------------------
Client connecting to 127.0.0.1, TCP port 5001
TCP window size: 2.50 MByte (default)
------------------------------------------------------------
[ 3] local 127.0.0.1 port 50176 connected with 127.0.0.1 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 0.5 sec 2.74 GBytes 47.1 Gbits/sec
[ 3] 0.5- 1.0 sec 2.42 GBytes 41.6 Gbits/sec
[ 3] 1.0- 1.5 sec 2.65 GBytes 45.5 Gbits/sec
тАж Snipped тАж
[ 3] 9.5-10.0 sec 2.45 GBytes 42.2 Gbits/sec
[ 3] 0.0-10.0 sec 51.1 GBytes 43.9 Gbits/sec
Hope this helps.
Kind Regards
Gerhard Roets
HPE SDN CoE