Network security

What Is NetFlow? How Flow Monitoring Works and Why It Matters

NetFlow turns raw network traffic into compact flow records that show who talked to whom, when, and how much. Here is how it works and when to use it.

Cysoro Security TeamPublished · 8 min read
NETWORK SECURITYNetFlowExplainedWho talked to whom, how much,and when — without packet capture.SRCDSTTCP 443 • 1,284 packets842,110 bytes • 112 secondsFlow record • metadata only
Quick answer

NetFlow is a Cisco protocol, introduced in the 1990s, that collects metadata about IP traffic flows as they pass through a router, switch or firewall. It groups packets into flows by shared fields, exports compact records to a collector, and gives you visibility into who is talking to whom, how much bandwidth they use, and when — without capturing packet payloads.

Key takeaways

  • NetFlow records metadata about traffic flows, not packet payloads, so it is lightweight and scalable.
  • A flow is a unidirectional stream of packets sharing seven key fields, including source, destination, ports and protocol.
  • NetFlow v9 led to IPFIX, the IETF standard; sFlow is a different, sampling-based technology.

Your network carries thousands of conversations at once: video calls, backups, cloud syncs, and, sometimes, an attacker quietly moving data out. Full packet capture would record all of it, but at a cost few teams can afford. NetFlow gives you the summary instead.

What is NetFlow?

NetFlow is a Cisco IOS application that provides statistics on packets flowing through a router. It was introduced on Cisco routers around 1996 and has become one of the most widely deployed network monitoring technologies.

Instead of inspecting every packet in detail, a NetFlow-enabled device groups packets into flows and exports a compact record for each flow to a collector. The record answers three questions: who talked to whom, how much data moved, and when.

Because NetFlow exports metadata only, it is efficient enough to run at high speed and compact enough to store for long periods. That is why it is used for both performance monitoring and security analysis.

What is a network flow?

A network flow is a unidirectional stream of packets between a given source and destination that share the same key fields. If one key field differs, the packet belongs to a different flow.

Cisco defines a flow with seven key fields: source IP address, destination IP address, source port number, destination port number, Layer 3 protocol type, type of service, and input logical interface. Many explanations simplify this to the 5-tuple of source and destination addresses, source and destination ports, and protocol.

Think of a flow as one conversation in one direction. A video call between your laptop and a server is at least two flows: one in each direction. A web page that loads images from several servers creates many flows at once.

One NetFlow record: a single conversation, summarizedSource192.168.1.10 : 52341Destination203.0.113.44 : 443TCP • 14:02:11 – 14:04:031,284 packets • 842,110 bytes • ToS 0 • in: Gi0/1 • out: Gi0/2No payload captured — metadata only
A flow record summarizes one direction of one conversation. Illustration by Cysoro.

How does NetFlow work?

NetFlow monitoring follows a three-part architecture: an exporter, a collector and an analysis application. Each part has one job, and together they turn raw traffic into useful answers.

1. Flow exporter

The exporter is a router, switch, firewall or dedicated probe that observes traffic, groups packets into flows, and exports flow records. It keeps a cache of active flows and sends a record when a flow ends or times out.

NetFlow is usually enabled per interface, to limit load on the device and the volume of records exported. On very high-speed links, sampled NetFlow records only a subset of packets, which trades some precision for lower overhead.

2. Flow collector

The collector is a server or application that receives exported flow records, typically over UDP, and stores them for querying and visualization. Without a collector, flow records have nowhere to go and are lost.

3. Analysis application

The analysis application turns stored records into answers: top talkers, bandwidth by application, unusual destinations, and long-term trends. This is where you spot a backup hogging the link at 2 a.m., or a host suddenly talking to an unknown server abroad.

Cisco notes that NetFlow capture and export are performed independently on each device, and NetFlow need not be running on every router in the network. You can start with your internet edge and expand from there.

What are the NetFlow versions?

NetFlow has evolved from a fixed format to a flexible, template-based one. Version 5 is the most widely understood, version 9 added templates, and IPFIX standardized that template model.

VersionRecord formatKey featureStatus today
v1FixedInitial releaseRarely used
v5FixedAdds BGP AS and flow sequence numbersStill common, simple to parse
v9Template-basedExporter defines fields; extensibleWidely used, basis for IPFIX
IPFIXTemplate-basedIETF standard (RFC 7011)Standard for multi-vendor flow export
sFlowSampled packetsSampling, not full flow accountingDifferent technology, often confused

NetFlow v5 uses a fixed record format with a fixed set of fields. NetFlow v9 introduced template-based records, meaning the exporter tells the collector which fields to expect and in what order. IPFIX took that model and standardized it as an IETF protocol in RFC 7011.

IPFIX took that model and standardized it as an IETF protocol in RFC 7011.

NetFlow vs IPFIX vs sFlow: what is the difference?

NetFlow, IPFIX and sFlow all describe network traffic, but they are not the same technology. Choosing the wrong one leads to gaps in accounting or forensics.

NetFlow is Cisco's original protocol family, with v5 and v9 as the main versions. IPFIX is the open IETF standard based on NetFlow v9, so it works across vendors and is the safer choice for mixed environments. sFlow is different again: it samples packets rather than accounting for every flow, which makes it lighter but less precise.

For most teams, the practical rule is simple: use IPFIX or NetFlow v9 where you need complete flow records for security and billing, and use sFlow only where sampling is acceptable and the link is too fast for full flow export. If your collector supports IPFIX, it will usually accept NetFlow v9 too.

What data does NetFlow collect?

For each flow, NetFlow records metadata such as source and destination IP addresses, port numbers and protocol, packet and byte counts, start and end timestamps, input and output interfaces, type of service and TCP flags.

It does not store packet payloads. That means it cannot show you the contents of an email, the URL in a web request or the file being downloaded. It can show you that a host contacted a suspicious address at an unusual hour, and how much data moved.

That limitation is also a strength. Flow records are small, so you can keep months of history for forensics and trend analysis. Full packet capture for the same period would need far more storage and would raise greater privacy concerns.

What is NetFlow used for?

NetFlow is used for bandwidth monitoring, capacity planning, troubleshooting, security analysis and usage-based billing. Cisco lists monitoring, analysis, planning, security and accounting among its main benefits.

  • Bandwidth and top talkers: see which users, hosts and applications use the most bandwidth, and when.
  • Capacity planning: track growth over months to plan upgrades before links saturate.
  • Troubleshooting: find where traffic is going, and whether a slow application is a network or server problem.
  • Security and forensics: spot denial-of-service attacks, scans, botnet traffic and data exfiltration, and replay the history of an incident.
  • Accounting and billing: measure usage by department, customer or application for chargeback or billing.
  • Traffic engineering: understand source-to-destination trends and balance load across paths.

For security, NetFlow is especially useful after an incident. Cisco notes that flow data is a valuable forensic tool for understanding and replaying the history of security incidents, and for identifying denial-of-service attacks, viruses and worms in real time.

NetFlow in three partsExporterrouter / switch / firewallgroups packets into flowsCollectorreceives recordsover UDP, stores themAnalyzertop talkers, trends,anomalies, forensicsStart at the internet edge, then expand to internal links that matter.
Exporter, collector and analyzer: the three parts of any NetFlow setup. Illustration by Cysoro.

How do you use NetFlow for security?

You use NetFlow for security by baselining normal traffic, then looking for deviations: new destinations, unusual ports, large transfers at odd hours, and hosts that suddenly talk to many others.

Common security patterns include a host scanning many addresses on one port, a server receiving a flood of small flows that suggests a denial-of-service attack, and a workstation uploading large volumes to an external address it has never contacted before. None of these need payload inspection to spot.

NetFlow also helps after an alert fires. If your endpoint tool flags a host, flow records can show what that host talked to, when, and how much data moved, which helps you scope the incident. Keep flow history for at least 30 to 90 days if you can, so you can look back when a new threat is disclosed.

Pair flow data with DNS checks when you investigate a strange destination. Our free DNS lookup can show what a domain resolves to.

Our what is my IP tool helps you confirm your own public address while you investigate.

What are the limitations of NetFlow?

NetFlow has three main limits: it sees metadata, not content; it can miss short flows if sampling is on; and it struggles where traffic is encrypted or tunneled in ways that hide the real destination.

Because it does not inspect payloads, NetFlow cannot tell you whether a transfer was a legitimate backup or stolen data. It can only tell you the volume, timing and destination. You need endpoint or proxy logs to answer the content question.

Sampling is a second trade-off. On very fast links, sampling reduces load but can miss small or short-lived flows, which are exactly the ones an attacker might use. Use sampling only where full flow export is not practical, and note it in your records.

Finally, NetFlow adds load to the exporting device and generates traffic to the collector. Enable it on the interfaces that matter, monitor the exporter's CPU, and make sure the collector can keep up, or you will lose records at the moment you need them most.

How do you get started with NetFlow?

Getting started with NetFlow takes four steps: pick a collector, enable export on your edge device, verify records are arriving, and build a baseline before you start alerting.

  1. Choose a collector and analyzer. Pick a tool that accepts NetFlow v5, v9 and IPFIX, so you are not locked to one vendor.
  2. Enable export on your internet edge. Start with the interface facing your ISP, in both directions if your device supports it.
  3. Verify the flow. Check that records arrive at the collector, that timestamps are correct, and that the volume matches your link usage.
  4. Build a baseline for two to four weeks. Learn your normal top talkers, peak hours and regular destinations before you set alert thresholds.
  5. Add security use cases one at a time. Start with top talkers and new external destinations, then add scanning and exfiltration checks.

Do not try to monitor every interface on day one. A working edge deployment with a good baseline beats a sprawling deployment that nobody trusts.

The bottom line

NetFlow gives you network visibility without the cost of full packet capture. It groups packets into flows, exports compact metadata records, and lets you answer who talked to whom, how much, and when.

Start at your internet edge, use IPFIX or NetFlow v9 where you can, keep history for forensics, and pair flow data with DNS and endpoint logs when you investigate. You can start that investigation today with our free DNS lookup.

Frequently asked questions

What is NetFlow in simple terms?

NetFlow is a way for routers and switches to summarize network traffic. Instead of recording every packet, it groups packets into flows and sends a short summary — who talked to whom, for how long, and how much data moved — to a collector for analysis.

Does NetFlow capture packet contents?

No. NetFlow records metadata only: addresses, ports, protocol, packet and byte counts, timestamps and interfaces. It does not see payloads, URLs or file contents, which makes it lightweight and more privacy-friendly than full packet capture.

What is the difference between NetFlow and IPFIX?

IPFIX is the IETF standard based on NetFlow version 9. NetFlow v9 introduced template-based records, and IPFIX standardized that model in RFC 7011. In practice, many tools accept both, and vendors often use the names interchangeably.

What is the difference between NetFlow and sFlow?

NetFlow groups all packets into flows and exports a record per flow. sFlow samples a subset of packets and exports those samples. NetFlow gives more complete accounting; sFlow is lighter on very high-speed links but less precise for billing or forensics.

What port does NetFlow use?

NetFlow records are traditionally exported using UDP, most commonly to port 2055 on the collector, although the port is configurable. The collector listens on that UDP port and stores the records for analysis.

Is NetFlow still used today?

Yes. NetFlow, IPFIX and similar flow protocols remain widely used for bandwidth monitoring, capacity planning, DDoS detection and security forensics, especially where full packet capture would be too heavy or too costly.

Do I need special hardware for NetFlow?

No. NetFlow is built into many Cisco routers and switches, and most enterprise network devices support NetFlow, IPFIX or a similar flow export. You also need a collector and an analysis application to store and make sense of the records.

Sources

  1. Cisco — NetFlow Configuration Guide, Cisco IOS Release 15M&T
  2. Wikipedia — NetFlow
  3. ManageEngine — What Is NetFlow?
  4. Netdata — What Is NetFlow? Network Flow Monitoring Explained
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against Cisco's NetFlow configuration guide and the IETF IPFIX standard (RFC 7011).

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free