NFWare glossary CGNAT & networking

What Is NetFlow? Definition, How It Works, and Versions

Traffic records and NAT event export

Published Dec 1, 2026← Browse all terms

NetFlow is a Cisco-origin technology for collecting and exporting information about network traffic. Devices send records to collectors so operators can analyze communication patterns and traffic volumes. Template-based NetFlow v9 can also carry operational records such as NAT mapping events, depending on the exporter and collector.

What Is NetFlow?

In a typical traffic-monitoring deployment, a device groups observed packets into flows, maintains selected counters and exports records for analysis. The collector receives those records; an analyzer turns them into searches, reports or alerts. This provides a compact view of traffic rather than a continuous full packet capture.

The name covers different export versions and implementation features. NetFlow v5 has a fixed record structure. NetFlow v9 uses templates to describe its records and is documented in RFC 3954, an Informational RFC. IPFIX subsequently standardized an evolved export protocol.

NetFlow is not confined to Cisco devices. Other vendors implement compatible export formats, but the version, fields and collector support still need to match. A device's ability to export ordinary traffic records does not establish support for NAT event logging.

What Is a Flow?

A traffic flow groups packets according to selected key fields at an observation point during a time interval. A common starting point is:

  • Source IP address
  • Destination IP address
  • Source port
  • Destination port
  • Transport protocol

Traditional NetFlow keys can also include the input interface and IP type of service. Flexible implementations let operators choose additional keys and non-key fields. Direction, observation point and timeout policy matter: request and response traffic normally appear in separate unidirectional records, and one long connection can produce several records.

Typical records contain addresses, ports, counters and timestamps. They show selected characteristics of communication, not the complete application conversation. A port number alone does not reliably identify an application, and encrypted traffic remains encrypted unless another system can inspect it.

How Does NetFlow Work?

Observation and export

For traffic measurement, packets update entries in a flow cache or another supported metering structure. An inactive timeout can expire a quiet flow, while an active timeout can report a continuing flow. Sampling, hardware resources and the configured record determine what is observed and exported.

The exporter sends records to a collector, commonly over UDP. The collector and analytics functions may be part of the same product or separate systems. Reporting latency includes cache timers, export scheduling and collector processing, so “flow monitoring” does not guarantee immediate visibility.

Templates in NetFlow v9

A v9 template lists the field types and lengths used by related data records. The collector must receive the template before it can interpret those records. Templates need refresh and restart handling; they are scoped to the exporter and observation domain rather than being globally unique.

The v9 Source ID distinguishes observation domains from the same exporter. Sequence numbers can help reveal missed export packets. They do not reconstruct the lost records, and template loss can prevent decoding even when later data arrives.

Transport and ports

UDP export has no delivery acknowledgment or retransmission at the transport layer. Congestion, exporter queues or collector overload can therefore leave gaps. Monitor reception and decoding as well as export counters.

There is no universal NetFlow destination port. Values such as 2055, 9995 and 9996 are common conventions; configure the exporter to use the port and version accepted by the collector. A port number alone does not identify the record format or provide encryption.

NetFlow Versions and Flexible NetFlow

PropertyNetFlow v5NetFlow v9
Record formatFixedTemplate-based
Address-family fieldsIPv4Can describe IPv4 and IPv6 records
ExtensibilityLimited by the fixed formatFields described by templates
NAT event suitabilityFixed traffic record lacks a general NAT event schemaCan describe NAT events when the exporter implements the required fields
Collector requirementDecode the v5 structureMaintain templates and understand exported fields

Do not treat ingress or egress monitoring as a property determined solely by the export version. Observation direction and hardware support are implementation features. Likewise, a v9 capability does not mean every device exports every IPv6, tunnel or NAT field.

Flexible NetFlow is Cisco's configurable measurement framework, not another name for the v9 wire format. It includes flow records, monitors, exporters and optional sampling. Supported platforms can export using v9 or IPFIX, as described in the Cisco Flexible NetFlow overview.

Where and How NetFlow Is Used in NAT and CGNAT

NAT changes addressing information. NAPT translates ports as well, allowing CGNAT deployments to share public addresses among subscribers. Traffic observed outside the translator may show only the shared public endpoint.

For this reason, NAT event export serves a different purpose from a bandwidth summary. It records which translation or port allocation existed and when it changed. NetFlow v9 can transport these records when a device exports suitable templates and the collector understands their fields. A generic v5 flow record is not a substitute for that event history.

What a NAT lookup needs

Suppose a TCP connection uses this illustrative mapping:

Internal: 10.24.8.15:51514
Public:   203.0.113.10:40001
Protocol: TCP
Context:  VRF 7

An operator investigating a reported public endpoint needs its address, port, protocol and timestamp. The matching NAT record must cover the relevant time interval; ports can be reused after a mapping ends. The internal address and VRF can then be correlated with subscriber-assignment or access-session records.

The result identifies a translation associated with a network endpoint. It does not by itself identify a person or establish address ownership. Clock alignment, timezone handling, complete event history and the correct exporter context are essential to a meaningful lookup.

NAT records in NFWare vCGNAT

The NFWare NAT logging guide documents NetFlow export using RFC 3954 and the following log choices:

Log typeRecorded information
address-mapCreation/deletion of address mappings; excludes ports and destinations
port-mapCreation/deletion of address and port mappings; excludes destinations
sessionSession start/end and internal, translated and destination endpoints
port-blockPBA block allocation/release; excludes destinations

Example configuration for port-mapping events:

nat log type port-map enable
nat log server 0 type netflow ip 192.0.2.50 port 2055
nat log enable
show nat log counters

Use a reachable collector, its configured port and an unused server ID. 192.0.2.50 is a documentation address. These commands illustrate the documented configuration; they have not been executed on a working device.

NFWare's templates carry fields such as event time, original and translated endpoints, protocol, VRF and event type, according to log choice. Its Source ID separates per-core streams. The guide provides template-refresh controls. Confirm decoding and storage at the collector; a sent counter alone does not prove receipt.

Designing a usable NAT archive

Choose the event detail required by the operational question. An address-only record cannot distinguish individual translated ports. A port-block allocation record describes a range and lifetime rather than every destination contacted. Session records provide more detail and can increase event volume.

Monitor exporter drops, network loss, template reception and collector capacity. Preserve exporter identity and stream context across restarts. A sampled traffic report can be useful for planning but should not be assumed to provide every NAT mapping event needed for traceability. Keep subscriber correlation and retention policies aligned with the actual record content.

NetFlow vs IPFIX vs sFlow

AspectNetFlowIPFIXsFlow
BasisCisco-origin family of export formatsIETF export standard derived from v9Specification maintained by sFlow.org
Typical observationsFlow measurements; v9 can also carry supported eventsFlow measurements and structured events, including NAT recordsPacket samples and periodically polled counters
FormatFixed v5 or template-based v9Template-basedStructured sample datagrams
SamplingCan be enabled, depending on implementationCan describe sampled measurementsStatistical packet sampling is a central mechanism
Key compatibility checkVersion and field supportTemplates, Information Elements and observation domainsSample types and counter interpretation

IPFIX has its own version and decoding rules. A collector supporting NetFlow v9 does not automatically support IPFIX or every NAT template; verify the exact record fields and event meanings.

The sFlow v5 specification combines packet sampling with counter polling. Its packet selection is statistical, rather than a rule that always exports every Nth packet. Sampled packet headers can contain different information from a flow summary. Neither an unsampled NetFlow configuration nor IPFIX alone guarantees loss-free, exact accounting.

NetFlow Use Cases

  • Traffic monitoring: identify major sources, destinations and volumes within the configured observation coverage.
  • Capacity planning: use historical trends, accounting for sampling and missing records.
  • Security investigations: detect unusual connection patterns or volumes and correlate them with other evidence.
  • Accounting: support usage calculations when counters, sampling, delivery and scope fit the purpose.
  • NAT traceability: export mapping or allocation events from supported translators and correlate external reports with internal endpoints.
  • Troubleshooting: investigate communication changes alongside packet captures, application logs and other telemetry.

For operators, observation coverage and collector reliability determine how useful the records are. Developers building decoders need to preserve template and stream context. IPv4 brokers and address holders should distinguish operational use of an address at a particular time from allocation, transfer rights or routing authorization.

NetFlow at a Glance

AttributeDetail
OriginCisco; compatible export formats are also implemented elsewhere
Common versionsFixed-format v5 and template-based v9
PipelineExporter to collector, followed by analysis
Common transportUDP with a configured destination port
Typical contentSelected flow fields and counters; supported v9 exporters can send NAT events
Related standardIPFIX, with a separate message format and information model
Operational concernSampling, export loss, templates and collector field support

Frequently Asked Questions

What does NetFlow do?

It exports selected traffic information to collectors for analysis. Depending on the implementation, NetFlow v9 can also export events such as NAT mapping changes.

What is the difference between NetFlow and IPFIX?

IPFIX is an IETF standard derived from NetFlow v9. It has a distinct protocol format and Information Element model. Support for one format does not guarantee support for the other.

What port does NetFlow use?

There is no universal destination port. UDP ports such as 2055, 9995 and 9996 are common conventions, but exporter and collector settings must match.

What is the difference between NetFlow v5 and v9?

v5 uses a fixed IPv4 record structure. v9 uses templates and can describe additional fields and address families, subject to exporter and collector support.

How is NetFlow used in NAT?

A supported NAT device can export v9 records for mapping, session or port-block events. The collector uses translated endpoints, protocol and time context to locate relevant records, then correlates them with subscriber data where needed.

How does NetFlow differ from sFlow?

NetFlow commonly exports flow measurements, which may themselves be sampled. sFlow combines statistical packet samples and counter polling. Their records and accuracy limits differ; neither label guarantees a complete history of every connection.

Conclusion

NetFlow provides visibility into selected traffic observations, and template-based v9 can also transport NAT event records. Choose the export version, fields and observation coverage according to the operational question. For CGNAT traceability, validate the entire chain from mapping generation through template decoding and storage to subscriber correlation.

Talk to NFWare

Let’s talk about
your network.

Have a question about CGNAT or load balancing? Tell us what you’re working on.

[email protected]
CGNATLoad balancingNetwork virtualization
Contact our team

Read our Privacy Policy to learn how we handle your information.

If the form does not load, open the contact form.