A.2. Using the switch CLI to configure sFlow

Using this method you must access the switch using its web interface, ssh, or telnet and manually configure the switch to send sFlow to the IP address and UDP port that sFlowTrend-Pro is using to receive sFlow (see Section 13.5.3, “Configuring advanced options” for information on determining and configuring the IP address and UDP port). You should enable sFlow on 1 or more interfaces on the switch and set a sampling rate and configure a counter polling interval. The counter polling interval controls how frequently the interface counters will be exported as part of the sFlow data. We recommend a counter polling interval of 30 seconds. We recommend that you enable sFlow on all interfaces. You should also determine the SNMP read community string for the switch so that you can configure sFlowTrend-Pro with this community string. This will allow sFlowTrend-Pro to query the switch for interface and system names.

Some example CLI configurations for enabling sFlow globally are given in the following sections. The configurations are for sFlowTrend-Pro running on a system with IP address 10.1.2.5 and receiving sFlow data on UDP port 6343, with the sFlow agent address which uniquely identifies the switch explicitly set to 10.10.10.1 (where possible).

Many switches support a command to show the current sFlow configuration and to indicate whether data has been exported:

show sflow
                

See your switch documentation for more details.

A.2.1. Alcatel-Lucent OmniSwitch

-> ip interface loopback0 10.10.10.1
-> sflow receiver 1 name sFlowTrend address 10.1.2.5 udp-port 6343
-> sflow sampler 1 1/1-24 receiver 1 rate 128
-> sflow poller 1 1/1-24 receiver 1 interval 30
                
[Note] Note

The OmniSwitches also support the configuration of sFlow using SNMP.

A.2.2. Brocade (Foundry Networks)

config> int e 1/1 to 4/48 
interface> sflow forwarding 
config> sflow destination 10.1.2.5 6343
config> sflow sample 128 
config> sflow polling-interval 30 
config> sflow enable
                

A.2.3. D-Link

The following commands apply to the D-Link xStack® DGS-3600 series switch:

enable sflow
create sflow analyzer_server 1 owner analyzer1 timeout infinite collectoraddress 10.1.2.5
create sflow counter_poller ports all analyzer_server_id 1 interval 30
create sflow flow_sampler ports all analyzer_server_id 1 rate 128
            

A.2.4. Enterasys

set sflow receiver 1 owner analyzer1 timeout 180000
set sflow receiver 1 ip 10.1.2.5

#configure packet sampling instances on ports 1 through 12
#assign to sFlow Collector 1
set sflow port ge.1.1-12 sampler 1
set sflow port ge.1.1-12 sampler maxheadersize 128
set sflow port ge.1.1-12 sampler rate 128

#configure counter poller instances on ports 1 through 12
#assign to sFlow Collector 1
set sflow port ge.1.1-12 poller 1
set sflow port ge.1.1-12 poller interval 30            
            

A.2.5. Extreme Networks

enable sflow
configure sflow-agent 10.10.10.1
configure sflow-collector 10.1.2.5 port 6343
configure sflow sample-rate 128
configure sflow poll-interval 30
configure sflow backoff-threshold 50
enable sflow backoff-threshold
enable sflow ports all        
            

A.2.6. Force10 Networks

Force10(conf)# sflow enable
Force10(conf)# sflow collector 10.1.2.5 agent-addr 10.10.10.1 6343
Force10(conf)# sflow sample-rate 128
Force10(conf)# sflow polling-interval 30
            

A.2.7. H3C

<sysname> system-view
[Sysname] sflow agent ip 10.10.10.1
[Sysname] sflow collector ip 10.1.2.5 port 6343
[Sysname] sflow version 5
[Sysname] sflow interval 30
          
Then for each interface:
[Sysname] interface ethernet 1/0
[Sysname-Ethernet1/0] sflow enable inbound
[Sysname-Ethernet1/0] sflow sampling-mode random
[Sysname-Etherent1/0] sflow sampling-rate 128            
            
[Note] Note

Set the sampling-mode to random on all interfaces that support random sampling. Deterministic sampling is less accurate and should be avoided. The sampling direction should be set consistently across all interfaces, in this example enabling inbound sampling on all interfaces monitors all traffic paths through the switch and avoids double counting.

A.2.8. Juniper Networks

The best way to find the appropriate commands for sFlow on your Juniper switch is to search the Juniper web site. As a starting point, here is an example configuration:

sflow {
   polling-interval 30;
   sample-rate 128;
   collector 10.1.2.5 {
   udp-port 6343;
   }
   interfaces ge-0/0/0.0;
   interfaces ge-0/0/1.0;
   interfaces ge-0/0/2.0;
   interfaces ge-0/0/3.0;
   interfaces ge-0/0/4.0;
   interfaces ge-0/0/5.0;
   interfaces ge-0/0/6.0;
   interfaces ge-0/0/7.0;
   interfaces ge-0/0/8.0;
   interfaces ge-0/0/9.0;
   interfaces ge-0/0/10.0;
   interfaces ge-0/0/11.0;
   interfaces ge-0/0/12.0;
   interfaces ge-0/0/13.0;
   interfaces ge-0/0/14.0;
   interfaces ge-0/0/15.0;
   interfaces ge-0/0/16.0;
   interfaces ge-0/0/17.0;
   interfaces ge-0/0/18.0;
   interfaces ge-0/0/19.0;
   interfaces ge-0/0/20.0;
   interfaces ge-0/0/21.0;
   interfaces ge-0/0/22.0;
   interfaces ge-0/0/23.0 {
       polling-interval 30;
       sample-rate 128;
   }
}               
            

A.2.9. Netgear

sflow receiver 1 owner collector1 timeout 4294967295 ip 10.1.2.5
            

For each interface:

sflow sampler 1 rate 128
sflow poller 1 interval 30
            

A.2.10. ProCurve Networking by HP

All ProCurve switches that support sFlow (except the 9300 and 9400 series) can be configured using SNMP. In addition, the ProCurve 3500 and 5400 series switches can be configured to send sFlow using the CLI.

(config)# sflow 1 destination 10.1.2.5 6343
(config)# sflow 1 sampling ethernet A1-A24 128
(config)# sflow 1 polling ethernet A1-A24 30
            
[Note] Note

ProCurve 9300 and 9400 switches must be configured using the CLI using the syntax given for Foundry switches. All other ProCurve switches can also be configured using SNMP to send sFlow;