sFlow

sFlow, short for "sampled flow", is an industry standard for packet export at Layer 2 of the OSI model. It provides a means for exporting truncated packets, together with interface counters. Maintenance of the protocol is performed by the sFlow.org consortium,[1] the authoritative source of the sFlow protocol specifications. The current version of sFlow is v5.

Operation

sFlow uses sampling to achieve scalability[2] and is, for this reason, applicable to high speed networks (gigabit per second speeds and higher).[3] sFlow is supported by multiple network device manufacturers[4] and network management software vendors.[5]

An sFlow system consists of multiple devices performing two types of sampling: random sampling of packets[6] or application layer operations,[7] and time-based sampling of counters.[6] The sampled packet/operation and counter information, referred to as flow samples and counter samples respectively, are sent as sFlow datagrams to a central server running software that analyzes and reports on network traffic; the sFlow collector.[8]

Flow samples

Based on a defined sampling rate, an average of 1 out of n packets/operations is randomly sampled. This type of sampling does not provide a 100% accurate result, but it does provide a result with quantifiable accuracy.[9]

Counter samples

A polling interval defines how often the network device sends interface counters. sFlow counter sampling is more efficient than SNMP polling when monitoring a large number of interfaces.[10]

sFlow datagrams

The sampled data is sent as a UDP packet to the specified host and port. The official port number for sFlow is port 6343.[11] The lack of reliability in the UDP transport mechanism does not significantly affect the accuracy of the measurements obtained from an sFlow agent. If counter samples are lost then new values will be sent when the next polling interval has passed. The loss of packet flow samples results in a slight reduction of the effective sampling rate.

The UDP payload contains the sFlow datagram. Each datagram provides information about the sFlow version, the originating device’s IP address, a sequence number, the number of samples it contains and one or more flow and/or counter samples.

sFlow versions

Version Comment
v1 Initial version
v2 (Unknown)
v3 Adds support for extended_url information.[12]
v4 Adds support BGP communities.[12]
v5 Several protocol enhancements.[13] This is the current version, which is globally supported.

Related technologies

There are several other technologies that appear to be similar to sFlow, usually due to the word "flow" in their name, such as NetFlow and OpenFlow. These technologies are however fundamentally different from sFlow and several key differences can be identified:[14]

NetFlow, IPFIX

OpenFlow

OpenFlow is a protocol for network controllers (i.e., control plane) to communicate with switches or routers (i.e., data plane) in Software-defined networking. It should therefore be considered a flow-based configuration technology, rather than a flow-based monitoring technology.

See also

References

  1. "sFlow.org - Making the Network Visible". sFlow.org. Retrieved 2014-06-19.
  2. Jedwab, Jonathan; Phaal, Peter; Pinna, Bob (March 1992). "Traffic Estimation for the Largest Sources on a Network, Using Packet Sampling with Limited Storage". HP Labs. Retrieved 2010-10-23.
  3. Jasinska, Elisa (December 2006). "sFlow, I can feel your traffic". Amsterdam Internet Exchange (AMS-IX). Retrieved 2010-10-23.
  4. "sFlow Products: Network Equipment". sFlow.org.
  5. "sFlow Products: sFlow Collectors". sFlow.org. Retrieved 2010-10-23.
  6. 6.0 6.1 Phaal, Peter; Lavine, Marc (July 2004). "sFlow Version 5". sFlow.org. Retrieved 2014-06-26.
  7. Phaal, Peter; Jordan, Robert (July 2010). "sFlow Host Structures". sFlow.org. Retrieved 2010-10-23.
  8. "Traffic Monitoring using sFlow". sFlow.org. 2003. Retrieved 2010-10-23.
  9. Phaal, Peter; Panchen, Sonia (2002). "Packet Sampling Basics". sFlow.org. Retrieved 2010-10-23.
  10. Liu, G.; Neufeld, N. (December 2009). "Management of the LHCb network based on SCADA system". CERN. Retrieved 2010-10-23.
  11. "Port Numbers". IANA. Retrieved 2010-10-23.
  12. 12.0 12.1 Phaal, Peter; Panchen, Sonia; McKee, Neil (September 2001). "sFlow Datagram Format". InMon Corporation's sFlow: A Method for Monitoring Traffic in Switched and Routed Networks. IETF. RFC 3176. https://tools.ietf.org/html/rfc3176. Retrieved 2014-06-20.
  13. "sFlow Version 5". sFlow.org. Retrieved 2014-06-20.
  14. 14.0 14.1 Hofstede, Rick; Celeda, Pavel; Trammell, Brian; Drago, Idilio; Sadre, Ramin; Pras, Aiko. "Flow Monitoring Explained: From Packet Capture to Data Analysis with NetFlow and IPFIX". IEEE Communications Surveys & Tutorials (IEEE Communications Society) 16 (4): 28. doi:10.1109/COMST.2014.2321898.
  15. "Exporting MIB Variables using the IPFIX Protocol". IETF. Retrieved 2014-06-19.
  16. "IP Flow Information Export (IPFIX) Entities". IANA. Retrieved 2014-06-19.
  17. "Scalability and accuracy of packet sampling". sFlow.org. Retrieved 2014-06-19.

External links