March 8, 2016 - David Sokolik
How to configure sFlow on HP 25xx and 29xx switches
In this quick post I will go over the steps required to configure sFlow on HP 25xx and 29xx switches (Procurve/Aruba)
If you have the need to get full visibility of your network and you are wondering on how to accomplish this. I highly recommend on installing PRTG and using the sFlow sensor to geather data from your network devices.
Now while PRTG can gather data using SNMP and RMON (as well as via many other senors, PRTG is pretty awesome) on the free version you are limited to just 100 sensors now while you may think that 100 sensors is a lot considering that each SNMP / RMON sensor is per port on your switch its enough to have two 48 port switches to be out of senors.
In order to configure sFlow on your HP switch you must first have a hardset destination to where the switch will send the information too, so it is best to have a dedicated PRTG machine on your network.
The first thing you will do is access the switch console either via the console cable or ssh into its management IP.
Note: that in order to have sFlow working you must first set management IP on your switch on the default vLAN (vlan id 1)
to set the ip via the console run the following commands:
vlan 1 ip address YOUR_IP_/_SUBNET (for example: ‘vlan 1 ip address 192.168.1.10/24‘) this will set the management ip to 192.168.1.10 with subnet mask of 255.255.255.0
save configuration by issuing the ‘write memory‘ command
sFlow configuration, in the console run:
sflow 1 destination _YOUR_PRTG/SFLOW_SENSOR_IP SFLOW_PORT (for example: ‘sflow 1 destination 192.168.1.100 6343‘)
sflow 1 sampling all 50 (this will invoke a sample on all the switch ports every 50 packets, you can also specify a static port to sample using: ‘sflow 1 sampling 47 50‘, this will sample port 47)
sflow 1 polling all 20 (this will invoke a polling of our samples every 20 seconds, again you can set the polling to be on a specific port by using: ‘sflow 1 polling 47 20‘ this will pool from port 47 every 20 seconds)
‘write memory‘ (save the current configuration)