How do I enable sFlow on my HP Procurve 2800 series switch?
Posted in General, Network Problem Resolution, Network Traffic Analysis, sFlow on May 1st, 2009 by nathanh
Doing what I do here at the Support Desk, I’m always running across questions on how to enable NetFlow or sFlow on various models of switches and routers.
Most vendors remain relatively consistent in their configurations, so if you can enable flows on one, you can enable it on others.
But of course, there’s always the exception to the rule…
With that statement in mind, I’d like to introduce you to my nemesis; the H.P. Procurve 2800 series switch. This beast is nasty and can single-handedly eat up an entire day of your life trying to get to it to work.
Believe me, I know.
What you need to know:
To understand why this switch is so complicated to setup, you need to know that this switch does not follow the standards for sFlow sampling. For example, with this switch, your sFlow sampling has a lifespan. That means that after a specified amount of time, the switch just stops exporting sFlow samples.
Don’t ask me why it does that, but this option just supports my idea that H.P. didn’t anticipate anyone would want to use sFlow for continuous monitoring, as opposed to a quick troubleshooting solution.
So with this model, we need to come up with a way to keep that switch exporting sFlow, even when the configured sFlow lifespan has expired. To do this, we are going to make use of the CRONS scheduling application and also NET-SNMP to perform the SNMP GETS necessary to continuously re-enable sFlow sampling and polling on each of your ports.
To keep this blog viewer friendly, here are instructions on how to configure the H.P. 2800 switch for sFlow. Included in this download are the CRONS scheduler executable and the sample batch file that will perform the automated SNMP GETS to refresh the sFlow exports.
Please note that this batch file will need to be edited according to your personal network settings. Things such as the community string, IP address of the switch and preferred sampling rate will need to be adjusted.
I’ve included the four OID that will need to be run against every port on your switch in order to enable sFlow.
SNMP GET for sFlow sample rate:
snmpset -v1 -c public X.X.X.X 1.3.6.1.4.1.14706.1.1.5.1.3.11.1.3.6.1.2.1.2.2.1.1.port#.1 i: 1 —- This SNMP string will enable a port for sFlow sampling
snmpset -v1 -c public X.X.X.X 1.3.6.1.4.1.14706.1.1.5.1.4.11.1.3.6.1.2.1.2.2.1.1.port#.1 i: 50 —- This SNMP string will configure a port with a sampling rate of 1/50 packets
SNMP GET for sFlow polling interval:
snmpset -v1 -c public X.X.X.X 1.3.6.1.4.1.14706.1.1.6.1.3.11.1.3.6.1.2.1.2.2.1.1.port#.1 i: 1 —- This SNMP string will enable polling on a port
snmpset -v1 -c public X.X.X.X 1.3.6.1.4.1.14706.1.1.6.1.4.11.1.3.6.1.2.1.2.2.1.1.port#.1 i: 60 —- This SNMP string will configure a port to export sFlow every 60 seconds
May the Procurve gods watch over you.
-Nate
Tags: configuration, H.P., how to guide, Procurve 2800, sFlow, SNMP
Nate, I am trying to decide on a device that utilizes sFlow for my network that currently does not have any Flow capable devices on it. Reading this has removed the 2800 from my list of possibilities. Do you know if any of the other models in the ProCurve line have this same issue/problem?
For the most part, the H.P. Procurve family is very easy when it comes to setting up sFlow, with the exception of this model.
Of course, Murphy’s Law says that everyone has this switch.
I give the 3500 and 5400 series Procurves 2 thumbs up though.
But with CISCO entering the Server market, I heard that H.P. was going to counterattack by pumping more money towards the ProCurve family, which should make for some exciting models in development.
For sFlow I would consider http://www.force10networks.com or you may want to consider a NetFlow capable switch from http://www.enterasys.com.
Great, thank you guys so much.
[...] Setting up sFlow on the HP Procurve Lets take sFlow support for example. In the early days ~4 years ago, setting up sFlow on the Procurve was horribly difficult. It involved setting SNMP OIDs via a CLI, converting decimal IP addresses to HEX, scripting batch files to periodically (i.e. once per day) reset a decrementing timer so that it would continue to send sFlow. Telephone support from HP on this topic was terrible. We ended up being escalated to some guy who spoke horrible English that still couldn’t help us get it to work. We ended up returning the switch we purchased and buying from Alcatel which at the time was awesome. We figured it out sFlow on the procurve for a customer several months later and documented the process. It was a 4 hour process to help a customer set it up over the phone. Nathan blogged about sFlow on the procurve. [...]
[...] configurations for: Catalyst 6509 2810 Procurve ASA 5500 (CLI, ASDM) Cisco 7600 [...]