Scroll to navigation

NFDUMP(1) General Commands Manual NFDUMP(1)

NAME

nfdumpflow display and analysis program

SYNOPSIS

nfdump -r flowpath [-w outfile] [-f filterfile] [-C config] [-R filelist] [-M dirlist] [-O order] [-t timewin] [-c num] [-a] [-A aggregation] [-b] [-B] [-I] [-D nameserver] [-G geoDB] [-s statistic] [-n num] [-o format] [-6] [-q] [-N] [-i ident] [-v flowfile] [-E flowfile] [-x flowfile] [-z] [-y] [-j] [-J num] [-X] [-Z] [-T] [-V] [-h] [filter]

DESCRIPTION

nfdump reads the flow data from one or more binary files, created by any nfdump collector nfcapd, nfpcapd and sfcapd. It processes and lists the flows in many different output formats and can create a wide range of statistics.

nfdump has a very powerful flow filter to process flows. The filter syntax is very similar to tcpdump, but adapted and extended for flow filtering. A flow filter may also contain arrays of many thousand IP addresses etc. to search for specific records.

nfdump can aggreagte flows according to a user defined number of elements. This masks certain elements and allows to sum up flow records matching the same values.

The combination of flow filtering and aggregation as input for any flow statistics allows complex flow processing. Pre-filtered and aggregated flow data may also be written back into a binary flow file, which again may be processed with nfdump

nfdump can enrich the listing of flows with geo location information and AS information, unless AS information is already available in the flow records. IP addresses can be tagged with a two letter country code, or with a longer location label containing the geographic region, country and city. The geo location and AS information is retrieved from the optional geoDB database, created by the geolookup program from the nfdump tools. geolookup uses the Maxmind database GeoDB or GeoLite2 to create a binary lookup database for nfdump Please check the geolooup(1) man page for more details.

The options are as follows:

flowpath
Reads flow records from this path. flowpath may be a single file, or a directory containing any number of flow files or sub directories. All files are processed in the order, as listed by the OS.
outfile
Writes all processed records into outfile instead of printing. The flowfile is a binary flow file and may be processed again with nfdump This can be useful to limit flows according to a flow filter and/or specific flow aggregation.
filterfile
Reads the flow filter from filterfile. This can be useful for very long or structured filters, with comments and long lists. Note: Any filter specified directly on the command line takes precedence over the filterfile.
config
Read more options from file config. nfdump tries to read by default %prefix/etc/nfdump.config. This may be overwritten by the environment valiable NFCONF which again may be overwritten by this option -C. In order to prevent reading any config file, even if it would exist set -C none. A config file is not required, but may be handy for often used output formats etc.
order
Sets an output order for records to be printed as text output. This order applies after all records processing, such as filtering, and aggregation and before printing.
Sort according to the number of flows
Sort according to (in)packets
Same as packets
Sort according to output packets
Sort according to (in)bytes
Same as bytes
Sort according to output bytes
Sort according to (in)packets per second
Same as ipps
Sort according to out packets per second
Sort according to (in)bytes per second
Same as bps
Sort according to output bytes per second
Sort according to (in)bytes per packet
Same as bpp
Sort according to output packets
Sort according to start time of flow - former -m
Sort according to end time of flows
Sort according to duration of flows
timewin
Set time window to process flows. This option is considered legacy andmay be replaced with a filter primitiv in future rleases. The time window is specified as: YYYY/MM/dd.hh:mm:ss[-YYYY/MM/dd.hh:mm:ss]. Any parts of the time spec may be omitted e.g YYYY/MM/dd expands to YYYY/MM/dd.00:00:00-infinity and processes all flow from a given day onwards. The time window may also be specified as +/- n. In this case it is relativ to the beginning or end of all flows. +10 means the first 10 seconds of all flows, -10 means the last 10 seconds of all flows.
num
Limit the number of records to be processed to the first num records, which passwd the filter.
Aggregate flow records. The default aggregation is done at connection level by taking the 5-tuple protocol, srcip, dstip, srcport and dstport. This way of aggregation may be overwritten by option -A
aggregation
Sets the list of elements in a flow record to be aggregated. aggregation is a ',' separated list of any number of v9/ipfix elements. The following elements are accepted:
IP protocol
Source IP address
Destination IP address
IPv4 source IP address with applied netmask
IPv6 source IP address with applied netmask
IPv4 destination IP address with applied netmask
IPv6 destination IP address with applied netmask
Apply netmask srcmask in netflow record for source IP
Apply netmask dstmask in netflow record for dest IP
Source port
Destination port
Source mask
Destination mask
Source vlan label
Destination vlan label
Source AS number
Destination AS number
BGP Next AS
BGP Previous AS
SNMP input interface number
SNMP output interface number
IP next hop
BGP next hop
In source MAC address
out destination MAC address
In destintation MAC address
Out source MAC address
Source type of service
Source type of Service
Destination type of Service
MPLS label 1
MPLS label 2
MPLS label 3
MPLS label 4
MPLS label 5
MPLS label 6
MPLS label 7
MPLS label 8
MPLS label 9
MPLS label 10
IP address of exporting router
observation domain ID
observation point ID
X-late source IP address, if compiled with NSEL support
X-late destination IP address, if compiled with NSEL support
X-late source port, if compiled with NSEL support
X-late destination port, if compiled with NSEL support

nfdump automatically compiles the appropriate output format for the selected aggregation elements unless an explicit output format -o is given. The automatic output format is identical to

-o 'fmt:%ts %td <fields> %pkt %byt %bps %bpp %fl'

where <fields> represents the selected aggregation tags.

Aggregate flow records as bidirectional flows. This automatically implies -a. Aggregation is done on connection level by taking the 5-tuple protocol, srcip, dstip, srcport and dstport The reverse order applies for the corresponding reverse flow. Input and output packets/bytes are counted and reported separately. Both flows are merged into a single record with corresponding input and output counters. An appropriate output format is selected automatically, which may be overwritten by any -o format option.
Similar to option -b but tries to guess the correct client to server direction. Automagically swaps flows if src port is < dst port for TCP and UDP flows and src port < 1024 and dst port > 1024. Some exporters do not really care sending the flows in proper order. It's considered to be a conveniency option.
Print flow statistics of a single file or the summary of all the files specified by -r flowpath.
Print for each flow file given by -r flowpath a one line summary, which can be easily used by gnu plot.
nameserver
Sets the nameserver to translate hostnames into IP addresses in filter expressions. See filter below for more details.
geoDB
Use geoDB as geo lookup DB for geo location and AS lookups. nfdump tries to read the environment variable NFGEODB for the path of geoDB. The option -G overwrites NFGEODB. In order to prevent reading any geoDB file, even if it would exist set -G none.
statistic [:p [/orderby]]
Generate the Top N flow record or flow element statistic. By optionally adding to statistic, the statistic is additionally split up into the transport layer protocols. By default the statistic is transport protocol independent. Each statistic may be ordered by the optional parameter orderby This can be or You may specify more than one orderby option, which results in the same statistic but ordered differently. If no orderby is given, the statistic is ordered by flows. You can specify as many -s flow element statistics as needed on the command line for the same run.

statistic can be:

aggregated netflow records.
source IP addresses
destination IP addresses
any (src or dst) IP addresses
next hop IP addresses
BGP next hop IP addresses
exporting router IP address
source ports
destination ports
any (source or destination) ports
type of service - default src
src type of service
dst type of service
flow directions ingress/egress
source AS numbers
destination AS numbers
2 letter geo source country code
2 letter geo destination country code
any (source or destination) AS numbers
input interface
output interface
any interface
input interface name
output interface name
src mask
dst mask
src vlan label
dst vlan label
any vlan label
input src MAC address
output dst MAC address
input dst MAC address
output src MAC address
any src MAC address
any dst MAC address
any input MAC address
any output MAC address
any mask
IP protocols
MPLS label 1
MPLS label 2
MPLS label 3
MPLS label 4
MPLS label 5
MPLS label 6
MPLS label 7
MPLS label 8
MPLS label 9
MPLS label 10
Internal SysID of exporter
nbar ID
ja3 hashes
observation domain ID
observation point ID
ingress vrf
egress vrf
ingress vrf name
egress vrf name

NSEL/ASA statistics

NSEL/ASA event
NSEL/ASA extended event
NSEL/ASA translated src IP address
NSEL/ASA translated src port
NSEL/ASA translated dst IP address
NSEL/ASA translated dst port
NSEL/ASA ingress ACL
NSEL/ASA ingress ACE
NSEL/ASA ingress xACE
NSEL/ASA egress ACL
NSEL/ASA egress ACE
NSEL/ASA egress xACE

NAT statistics

NAT event
NAT src IP address
NAT src port
NAT dst IP address
NAT dst port

% nfdump -s srcip -s ip/flows/bytes -s record/bytes
num
Set the number of records to be printed to num. This option applies to -s statistics as well as to ordered output -O -or -aggreated -records -a The default is set to 10 for statistics and unlimited for the other use cases. To disable the limit, set num to 0.
format
Sets the output format to print flow records. has many different output formats already predefined. format may be one of the options below:

Print the full flow record on multiple lines. This prints all available information.
user
Print the flow records according the format user. This is a very flexible and powerful way to format flow records. See the section below for more details on how to compile your own format.
Print full record as a separate json object.
Legacy .csv format - will get removed in future releases. Please use json instead.
Legacy '|' separated format - will get removed in future releases. Please use json instead.

Already predefined fmt formats:

Print each flow on one line. Default format.
Print each flow on one line with more details
Same as line, but for bi-directional flows
Same as long, but for bi-directional flows
Same as line, but add country code to IPs. If a geoDB file is supplied this is the default output format
Same as long, but add country code to IPs
Print each flow on one line with even more details.
Print format for NSEL event records. Default format if NSEL/NAT support has been compiled in.
Print format for NAT event records.

The nfdump config file may contain additional formats. If you want to add new formats or change existing ones, check the config file.

IPv6 addresses are printed condensed in any defined format to prevent cluttering the output with large blank blocks. A condensed IPV6 uses max 16 characters. If it is longer, then the middle part of the IP is cut out and replaced be "..". For previewing an output, this fits most needs. For a listing with the full IPV6 addresses add option -6.

Print full length of IPv6 addresses in output instead of condensed.
Quiet mode. Suppress the header line and the statistics at the bottom of text outputs.
Print plain numbers in output without scaling. Easier for output parsing with 3rd party tools.
ident
Change the ident label in the file, specified by -r to ident
flowfile
Verify the consistency of flowfile and print the file parameters and number of records.
flowfile
Print the exporter and sampler list if found in flowfile. Additional statistics per exporter are printed with number of flows, packets and sequence errors.
flowfile
This options works on nfdump version 1.6.x files only and may get removed in future. Scans and prints extension maps located in flowfile
Compress flow files with LZO1X-1 compression. Fastest compression.
Compress flow files with LZ4 compression. Fast and efficient.
Compress flow files with bz2 compression. Slow but most efficient. May be used for archiving files or if you are really short of spce.
num
Change compression for any number of files given by option -r flowpath num: 0 uncompress, 1: LZO1X-1, 2: bz2, 3: LZ4 compression. This option may be used for archiving flow files and changing the compression to use less disk space.
Compiles the filter syntax and dumps the filter engine table to stdout. This is for debugging purpose only.
Check filter syntax and exit. Sets the return value accordingly.
filelist
Select a range of files. This option is mainly used by old NfSen and documented here as legacy opton.
  • /any/dir Read recursively all files in directory dir.
  • /dir/file Read all files beginning with file.
  • /dir/file1:file2 Read all files from file1 to file2.
When using in combination with a sub hierarchy: /dir/sub1/sub2/file1:sub3/sub4/file2 Read all files from sub1/sub2/file1 sub3/sub4/file2 iterating over all required hierarchy levels. Note: files are read in alphabetical order.
dirlist
Read the same file hierarchy from multiple directories. This option is mainly used by old NfSen and documented here as legacy option. Example: /any/path/to/dir1:dir2:dir3 etc. and will be expanded to the directories: /any/path/to/dir1, /any/path/to/dir2 and /any/path/to/dir3. Any number of colon separated directories may be given. The files to read are specified by -r or -R and are expected to exist in all the given directories. The options -r and -R must not contain any directories when used in combination with -M.
Tag IP addresses with a prepending cntrl-A character, to allow output parsers to hook in. This option is mainly used by old NfSen and documented here as legacy option.
Print nfdump version and exit.
Print help text on stdout with all options and exit.

filter selects, which records will be further processed. If no filter is given, all records will be processed. Otherwise, only those flows matching the filter will be processed. Any IP address in a filter may be specified as IPv4 or IPv6.

The filter syntax is similar to tcpdump but adapted and extended for flow records. The filter can be either specified on the command line after all options or in a separate file. It can span several lines. Anything after a '#' is treated as a comment and ignored to the end of the line. There is virtually no limit in the length of the filter expression. All keywords are case insensitive.

A single filter primitiv filters a single element of a flow record. A filter consists of one or more primitives, which are linked together:

expr and expr
expr expr
expr and (expr)

Possible filter primitives:

file
Expands the content of file into the current filter

comp number
True if the comparison with the record counter matches number Each record gets assigned a record number at the time it is read from file. Therefore this record number is not unique and may change, depending on the order files are read.
string
True if the record ident field matches string. This filter can be used to filter out different sources.

 
True if source and destination IP of a record are IPv4 IPs.

 
True if source and destination IP of a record are IPv6 IPs.

protocol
True if the record protocol field matches protocol. protocol can be a symbolic name such as tcp, udp, icmp, ah, esp, ipip, and many more or a protocol number, such as 6, 17 for protocol and .

protocol
True if the record tunnel protocol field matches protocol. protocol may be a symbolic name or protocol number.

ipaddr
 
ipaddr
 
ipaddr
True if the respective IP field of the record matches ipaddr. ipaddr may be an IPv4 or IPv6 address or a symbolic hostname. In this case a DNS lookup resolves the hostname to one or more IP addresses. If more than one IP results, all IPs are chained together in an or chain. (IP or IP or IP). If ip is not specified with src or dst the source or destination IP may match.
ipaddr
is just a synonym for ip (See above)

[iplist]
 
[iplist]
 
[iplist]
True if the respective IP field of the record is in iplist. iplist is a space or ',' separated list of IP addresses or networks in CIDR notation. This is the prefered way to search in large list of IP addresses and networks and is much more efficient than to chain all IP addresses together. (IP1 or IP2 or IP3). The iplist may contain several hundreds to thousand IPs and/or networks. For just a few IPs use an or chain, otherwise use an iplist If ip is not specified with src or dst the source or destination IP may match.

network netmask
 
network netmask
 
network netmask
 
network/netbits
 
network/netbits
 
network/netbits
True if the respective IP field of the record matches the network if the corresponding netmask or netbits are applied to the IP address. If net is not specified with src or dst the source or destination IP may match.

geoloc
 
geocode
 
geocode
True, if the 2-letter country code resolved by geolookup of the source or destination IP address matches geocode. This filter works only, if a valid geoDB is specified. See geo location option above. The 2-letter country code corresponds to the maxmin DB definitions. if geo is not specified with src or dst the source or destination geo location code may match.

ipaddr
 
ipaddr
 
ipaddr
True if the respective tunnel IP field of the record matches ipaddr. If tunip is not specified with src or dst the source or destination tunnel IP may match.

comp num
 
comp num
 
comp num
True if the comparison of the respective port field matches num See comp for the comparator details. If port is not specified with src or dst the source or destination port may match.

[portlist]
 
[portlist]
 
[portlist]
True if the respective port field of the record is in portlist. portlist is a space or ',' separated list of port numbers. This is the prefered way to search in large list of port numbers and is much more efficient than to chain all ports together. (PORT1 or PORT2 or PORT3). portlist may contain several hundreds to thousand of port numbers. If port is not specified with src or dst the source or destination port may match.

num
 
num
True if the respective icmp field of the record matches num. This automatically implies proto icmp.

num
 
num
 
num
True if the respective fields of the record matches num engine type and ID are set by the exporting device, sysid refers to the nfdump collector internal assigned number. See also option -E above.

num
 
num
 
num
True if the respective interface fields of the record matches num. This ID may correspond to the SNMP ID of the interface but depends on the exporter. If if is not specified with in or out the input or output interface may match.

comp num
 
comp num
 
comp num
 
comp num
 
comp num
True if the comparison of the respective AS fields matches nfdump supports 32-bit AS numbers every where. Without or the source or destination AS may match. See comp for the comparator details.

[aslist]
 
[aslist]
 
[aslist]
 
[aslist]
 
[aslist]
True if the respective AS field of the record is in aslist. aslist is a space or ',' separated list of AS numbers. This is the prefered way to search in large list of AS numbers and is much more efficient than to chain all ports together. aslist may contain several hundreds to thousand of AS numbers. If as is not specified with src, dst, prev or next the source or destination AS may match.

bits
 
bits
 
bits
True if the respective mask bit field of the record matches bits If mask is not specified with src or dst the source or destination mask bits may match.

num
 
num
 
num
True if the respective vlan field of the record matches num If vlan is not specified with src or dst the source or destination vlan may match.

tcpflags
True if the respective tcp flags field of the record matches any of the given tcpflags. tcpflags is a string combination of all flags to be tested:
ACK.
SYN.
FIN.
Reset.
Push.
Urgent.
All flags on.
The order of the flags within tcpflags is not relevant. Flags not mentioned are treated as don't care. In order to get those flows with only the SYN flag set, use the syntax

flags S and not flags AFRPU

ipaddr
True if the ip address of the sending router matches ipaddr as valid IPv4/IPv6 address.

ipaddr
True if the field next-ip of the record matches ipaddr as valid IPv4/IPv6 address.

ipaddr
True if the field bgpnext-ip of the record matches ipaddr as valid IPv4/IPv6 address.

macaddr
 
macaddr
 
macaddr
 
macaddr
 
macaddr
 
macaddr
 
macaddr
True if the respective mac address field of the record matches macaddr By prepending mac with any combination of a direction specifier as defined by CISCO v9 the test is limited to those mac addresses only. Otherwise multiple matches are possible. Without any specifiers any mac address is tested against macaddr

comp number
True if the comparison of the mpls label N with N as mpls label number 1..10 matches number Filters according a specific number in the mpls label stack.

comp number
True if the comparison of the end of stack mpls label matches number

comp number
True if the comparison of the experimental bits 0..7 of mpls label N with N as mpls label number 1..10 matches number

comp num
 
comp num
 
comp num
True if the comparison of the packet counter in the flow record matches num. num may contain any valid scaling factor such as k, m, g Example: packets > 1k. For a single flow packets and in packets is equivalent and describes the number of packets from source to destination. In case of a bi-directional flow (sent by an exporter or combined by option --B ) the packet counter for the reverse flow can be tested with out packet

comp num
 
comp num
 
comp num
True if the comparison of the byte counter in the flow record matches num. num may contain any valid scaling factor such as k, m, g Example: bytes > 1k bytes and in bytes is equivalent and describes the number of bytes from source to destination. In case of a bi-directional flow (sent by an exporter or combined by option --B ) the byte counter for the reverse flow can be tested with out bytes

comp num
True if the comparison of the flow counter in the flow record matches num. num may contain any valid scaling factor such as k, m, g For each received flow, the flow counter is set to 1, unless the exporter sends this information. If multiple flows are aggregated, this counter is increased respectively.

num
True if the type of service field of the flow record matches num

direction
True, if the flow direction field in the flow record matches direction. direction may be ingress, egress, 0 for ingress, or 1 for egress

comp time
True if the calculated duration of a flow (tend - tstart) compares to time. The duration is specified in msec (milliseconds)

comp num
True if the calculated value of in-packets/duration (packets per second) compares with the number num. num may contain any valid scaling factor such as k, m, g

comp num
True if the calculated value of 8*in-bytes/duration (bits per second) compares with the number num. num may contain any valid scaling factor such as k, m, g

comp num
True if the calculated value of in-bytes/in-packets (bytes per packet) compares with the number num. num may contain any valid scaling factor such as k, m, g

comp number
 
comp number
True if the comparison of the observation domain ID or point ID field respectively matches number

payload filters
Some exporters, such as yaf or the nfdump collector nfpcap can send payload data along the netflow information. If such payloads are sent it can be filtered according the filter primitives below:

'string'
True if the string string is found in the payload data. string must be quoted with single or double quotes: 'string', “string”

'regex'
 
'regex' flags
True if regex matches the payload data. regex searches over the full payload length. A ' ' byte does not stop the match process. regex must be quoted with single or double quotes: 'regex' or “regex” The regex engine understands the following reduced syntax:

flags are otional can be:

  • multiline
  • case insensitive matching

md5string
True, if the payload contains the start of an SSL/TLS handshake and the calculated jas value of the handshake matches md5string

True, if the payload contains the start of an SSL/TLS handshake and a valid ja3 value can be calculated. Useful to mask out all flow records with no SSL/TLS traffic in order to generate a -s ja3 statistic.

nprobe implemented elements

comp time
 
comp time
True, if the respective latency field in the flow record compares to time. time is specified in msec.

CISCO ASA, network security event logging (NSEL) and NAT event logging (NEL) specific filters:
 
NSEL specific filters:

event
True if the NSEL event type of an event record matches event which may be: ignore, create, term, delete, deny

comp number
True if the comparison of the NSEL event type of an event records matches number as a number.

reason
True if the event denied type of an event records matches reason which may be ingress, egress, interface, nosyn

comp num
True, if the comparison of the extended event field of the event record matches num

ipaddr
 
ipaddr
 
ipaddr
True, if the field of the translated source or destination IP address matches ipaddr if xip is specified without src or dst both IP addresses may match.

ipaddr
 
ipaddr
 
ipaddr
True, if the field of the translated source or destination IP address matches ipaddr if xport is specified without src or dst both ports may match.

network/mask
 
network/mask
 
network/mask
True if the translated source or destination IP address matches network if mask mask is applied. if xnet is specified without src or dst both IP addresses may match.

comp number
 
comp number
 
comp number
True if the comparison of the respective ingress field matches number

comp number
True if the comparison of the egress field matches number

NEL specific filters:
 
event
True if the NEL event type of an event record matches event. event may be add, delete

comp number
True if the comparison of the NEL event type of an event records matches number as a number.

ipaddr
 
ipaddr
 
ipaddr
True, if the field of the nat source or destination IP address matches ipaddr if nip is specified without src or dst both IP addresses may match.

It Cm nport Ar number

number
 
number
True, if the field of the nat source or destination port matches number if nip is specified without src or dst both ports may match.

number
True, if the field of the ingess vrf field of the event record matches number

comp number
 
comp number
 
comp number
True if the comparison of the start, step or end of the NAT port block in the event record matches number
 
 
True, if the source or destination port field matches the NAT port block range

comp
Many filter elements support the comparison with a number. The following comparators are supported for each of those filters: =, ==, >, <, >=, <= To prevent collisions with bash interpretion, alternative comparators are available: EQ, LT, GT, LE, GE If comp is omitted, '==' is assumed.

OUTPUT FORMAT

This section describes how output formats are compiled. nfdump has a lot of already pre-defined output formats such as raw, json, csv etc. One line formats as described for option -o can be compiled from various elements of a flow record. As a flow record can contains man different elements it is often useful to compile an output format for spcific needs.

Format description

The output format is specified by -o “fmt: stringstring contains the field tags to be printed as well as other characters if needed. A tag starts with a % sign followed by the field name. tags are separated by spaces from other tags. Characters or other strings, not starting with a % sign are copied literally to the output.

Example:

-o “fmt:%ts %td %pr %sap -> %dap %pkt %byt %fl”

This is the definition of the predined format line. It adds the elements tstart duration protocol source IP address/port followed by the literal characters -> and destination ip address/port packets, bytes, flows counter. Depending on the task, different output formats are required to see the required fields of a flow record. You can either extend a predefined format or specifiy a new one at the command line.

Example: Extend the predefined format long with the the IP address of the sending router

-o “fmt:%long %ra”

Predefined formats can be extended by simply add their name with a % sign somewhere in the format string. As described under the output option -o

Format definition

nfdump has already many formats predefined. Most of the time, these format are good enough. Sometimes you may need different formats, which can be compiled as described above. In order to prevent adding the same often used output format each time you run nfdump a new output format may be define in the config file nfdump.conf The file nfdump.conf.dist contains the definition of the already hard coded formats. These may be uncommented and changed according to the specific needs. New formats may be added using the following sytax:

fmt.newname = “fmt:%ts %td %pr %sap -> %dap %pkt %byt %fl”

with newname any new or existing definition of output formats. Existing formats are overwriten with the new definition.

Tag definition

The following list contains all tags, which are available to compile the output format:

Inserts the predefined format at this position. e.g. %line
Record counter. record numbers are assigned dynamically assigned while reading readed from file.
Netflow version.
Start Time - first seen
First seen - identical to %ts
Start Time, but in fractional seconds since the epoch (1970-01-01) UNIX format.
End Time - last seen
End Time, in fractional seconds
Time the flow was received by the collector
Time the flow was received, in fractional seconds
Duration of flow. Displayed in ddHHMMSS.msec
Transort protocol
Exporter ID
Engine Type/ID
Flowlabel
Source Address
Destination Address
Source Address:Port
Destination Address:Port
Source Address(country code):Port
Destination Address(country code):Port
Source Port
Destination Port
ICMP-type
ICMP-code
Source Network, mask applied
Destination Network, mask applied
Next-hop IP Address
BGP Next-hop IP Address
Router IP Address
Source AS
Destination AS
Next AS
Previous AS
Input Interface num
Output Interface num
Packets - default input
Input Packets
Output Packets
Bytes - default input
Input Bytes
Output Bytes
Flows
TCP Flags
Tos - default src
Src Tos
Dst Tos
Direction: ingress, egress
Src mask
Dst mask
Forwarding Status
Src vlan label
Dst vlan label
Input Src Mac Addr
Output Dst Mac Addr
Input Dst Mac Addr
Output Src Mac Addr
MPLS label 1
MPLS label 2
MPLS label 3
MPLS label 4
MPLS label 5
MPLS label 6
MPLS label 7
MPLS label 8
MPLS label 9
MPLS label 10
MPLS labels 1-10
bps - bits per second
pps - packets per second
bps - Bytes per package
src IP 2 letter country code
dst IP 2 letter country code
src IP geo location info
dst IP geo location info
new line char \n
input payload
ouput payload
nbar ID
ja3 hash
sni name in tls handshake
nbar name
observation domainID
observation pointID

NSEL specific formats
 
NSEL connection ID
NSEL event
NSEL extended event
NSEL Source security group tag
NSEL event time in msec
NSEL ingress ACL
NSEL egress ACL
NSEL XLATE src IP address
NSEL XLATE dst IP address
NSEL XLATE src port
NSEL SLATE dst port
Xlate Source Address:Port
Xlate Destination Address:Port
NSEL user name

NEL/NAT specific formats
 
NAT event - same as %evt
NAT ingress VRF ID
NAT egress VRF ID
NAT src IP address
NAT dst IP address
NAT src port
NAT dst port
NAT pool block start
NAT pool block end
NAT pool block step
NAT pool block size

Nprobe formats
 
Client latency
Server latency
Application latency

EXAMPLES

nfdump processes files created by any previous version of nfdump 1.6.x with some limitations for versions < 1.6.17. In order to convert flow files to the new 1.7.x binary format use the following command to read//write files:

% nfdump -r oldfile -w newfile

Print a statistic about the top 20 IP adresses, once sorted by flows and once by bytes

% nfdump -r flowfile -s ip/flows/bytes -n 20

Print two statistics, one about the source IP and one about the destination IP address limited to flow with either source or destination port 443

% nfdump -r flowfile -s srcip/bytes -s dstip/bytes -n 20 'port 443'

Print a statistic about the IP pairs, which exchanged most traffic.

% nfdump -r flowfile -s record/bytes -A srcip,dstip

Print all flows in raw format with a HTTP header in the payload even if flow is not on port 80.

% nfdump -r flowfile -o raw “payload regex 'GET|POST'”

Print a statistic about all ja3 md5 sums for those flows, which a valid ja3 can be calculated

% nfdump -r flowfile -s ja5 -n 0 'payload ja3 defined'

Aggregate all flows and write the result back to a binary file, sorted by the start time

% nfdump -r flowfile -a -Otstart -w newfile

RETURN VALUES

nfdump returns 0 on success and 255 if processing failed.

SEE ALSO

https://www.iana.org/assignments/ipfix/ipfix.xhtml

https://www.cisco.com/en/US/technologies/tk648/tk362/technologies_white_paper09186a00800a3db9.html

nfcapd(1) nfpcapd(1) sfcapd(1) geolookup(1)

BUGS

No software without bugs! Please report any bugs back to me.

July 22, 2023 Debian