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 i: 1 —- This SNMP string will enable a port for sFlow sampling

snmpset -v1 -c public X.X.X.X 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 i: 1 —- This SNMP string will enable polling on a port

snmpset -v1 -c public X.X.X.X i: 60 —- This SNMP string will configure a port to export sFlow every 60 seconds

May the Procurve gods watch over you.


Ryan Slosser author pic

Ryan Slosser

My name is Ryan. I work in development here at Plixer. I mostly deal with hardware deployment. I enjoy kayaking and fishing during the summer and skiing in the winter. People can count on me and I always give 100% unless I'm donating blood.


Leave a Reply