NetFlow vs sFlow Explained: Flow Data for the Network+ Exam

NetFlow and sFlow both tell you what traffic is crossing your network, and both are examinable on Network+. They answer the same question by entirely different methods, and that difference is the whole point.

NetFlow records every conversation and summarizes it. sFlow captures a random sample of individual packets. One is complete, the other is fast.

NetFlow

Developed by Cisco and now widely implemented. The device maintains a flow cache, grouping packets into conversations, and exports a summary record when each conversation ends or a timer expires.

A flow is traditionally identified by five fields — the 5-tuple: source IP, destination IP, source port, destination port, and protocol. Some implementations add the ingress interface and type of service, making it a 7-tuple.

Each exported record carries the tuple plus byte and packet counts, start and end timestamps, TCP flags, and often the next hop and AS numbers.

Crucially, NetFlow accounts for every packet. The counts are exact. That completeness is what makes it useful for billing, capacity planning and security analysis where you need to know the real volume of a transfer.

Versions worth knowing: v5 is the fixed-format classic, still everywhere; v9 introduced templates, which allowed IPv6 and MPLS fields; and IPFIX is the IETF standard based on v9, sometimes called NetFlow v10. J-Flow (Juniper), NetStream (Huawei) and Cflowd are vendor equivalents.

sFlow

sFlow — sampled flow — takes a different approach entirely. Rather than tracking conversations, it captures every nth packet at random, copies the first portion of it (typically the headers), and exports that immediately along with interface counters.

There is no flow cache and no state to maintain, which is why sFlow is usually implemented directly in switch ASICs and imposes almost no load. It also means data arrives in real time rather than when a flow expires.

The trade-off is statistical. At 1-in-1000 sampling, a large transfer is represented proportionally and the estimate is good. A short two-packet connection will very likely be missed entirely. sFlow gives you accurate proportions and unreliable completeness.

Side by Side

 NetFlow / IPFIXsFlow
MethodStateful flow cache, all packets accountedStateless random packet sampling
AccuracyExact countsStatistical estimate
Device loadHigher — memory and CPU for the cacheVery low — usually in hardware
TimelinessOn flow expiry, so delayedImmediate
LayerLayer 3 and 4Layer 2 onwards, including packet headers
Short flowsCapturedFrequently missed
OriginCisco; IPFIX is the IETF standardMulti-vendor standard, RFC 3176

What Neither Gives You

Both are metadata, not content. They tell you that host A sent 4 GB to host B on port 443 for twenty minutes. They do not tell you what was in it.

That is a limitation and an advantage at once. Flow data is far smaller than a packet capture, so you can retain months of it rather than hours — and it still works perfectly when the traffic is encrypted, which full packet capture largely does not. For detecting beaconing, data exfiltration by volume, lateral movement and scanning, flow data is often better than packet capture simply because you have enough history to see the pattern.

The comparison exams draw: full packet capture gives content but is expensive to store; flow data gives behaviour cheaply and at scale; SNMP gives interface counters but no per-conversation detail.

Choosing Between Them

Use NetFlow or IPFIX when you need exact accounting — chargeback, billing, precise capacity data, or security analysis where missing a small connection matters.

Use sFlow on high-throughput switches where flow caching would hurt, when you need real-time visibility, or when you want layer 2 detail and packet header samples.

Plenty of environments run both, on different parts of the network.

Network+ (N10-009) Exam Tips

  • NetFlow accounts for all traffic; sFlow samples. The discriminator, and the most likely question.
  • Know the 5-tuple: source IP, destination IP, source port, destination port, protocol.
  • IPFIX is the standardized version of NetFlow v9.
  • sFlow is lower overhead and better suited to very high-speed interfaces.
  • Both are metadata, not packet content.
  • Know the neighbours: SNMP for device polling, syslog for events, port mirroring or SPAN for full capture, and a packet analyzer such as Wireshark.
  • Flow data supports baselining and anomaly detection, which is a common scenario framing.

CySA+ and Security+ Angles

CySA+ (CS0-004) treats flow data as a core analyst source: identifying beaconing by regular intervals and consistent payload sizes, spotting exfiltration by outbound volume, detecting scanning by connection counts and fan-out, and scoping an incident by finding every host that talked to a known-bad destination. Reading flow records in a scenario is a realistic exam task.

Security+ (SY0-701) keeps it to recognition: NetFlow as a monitoring and log data source feeding a SIEM.

Key Takeaways

  • NetFlow tracks conversations with exact counts; sFlow samples packets statistically.
  • The 5-tuple defines a flow: source and destination IP, source and destination port, protocol.
  • IPFIX is the IETF standard derived from NetFlow v9.
  • sFlow is cheaper on the device and real-time; it misses short flows.
  • Both give metadata, not content, which is why they still work on encrypted traffic.
  • Flow data is the practical tool for beaconing, exfiltration and scanning detection.

Comments