Creating a simple sFlow configuration profile for large scale deployments would reduce operational complexity and ensure consistent settings across all the devices in the network. One way to greatly simplify the configuration is to avoid interface level options and configure sFlow at the device level instead. Here are some thoughts:
Sensible defaults reduce the number of configuration parameters and provide an useful out of the box . The default counter polling interval is 30 seconds. The following formula generates reasonable default sampling rates:
default_sampling_rate = ifSpeed / 1000000, where ifSpeed is expressed in bits per second.
This calculation yields the following sampling rates for typical data center link speeds:
sampling.1G = 1 in 1,000
sampling.10G = 1 in 10,000
sampling.40G = 1 in 40,000
sampling.100G = 1 in 100,000
These default settings ensure that any traffic flow consuming 10% of link bandwidth will be detectable within seconds or less. The basis for this calculation and expected response times are given in the following article:
These exact sampling rates may not be realizable on all devices, but the sFlow standard allows the agent to pick the nearest achievable sampling rate when processing a configuration setting, so the device should simply implement the value that would apply had the sampling rate been set through the sFlow MIB or device CLI.
sFlow also has an IANA registered port (6343), so enabling sFlow on all ports on a switch could be as simple as the following two top level commands:
sflow destination 10.0.0.1
sflow enable
If the defaults aren't suitable in a particular environment, they can be selectively overridden, e.g. to change the sampling rate for 1G links:
sflow sampling 1G 2000
or to disable sampling for 40G links:
sflow sampling 40G 0
The particular syntax of the commands will vary from CLI to CLI, but it would be helpful if the semantics of the configurations were as uniform as possible between vendors.
However, more important for large scale configuration would be to agree standard settings for programmatic configuration of devices since these mechanisms simplify large scale configuration. Reducing the number of configuration options makes it much easier to configure sFlow through a variety of different mechanisms, including: NETCONF, REST, DHCP, and DNS-SD (
http://www.slideshare.net/netvis/dnssd).
Please comment.