This is a small description, what the nfdump tools do and how they work.
Nfdump is distributed under the BSD license - see BSD-license.txt - and
can be downloaded at https://github.com/phaag/nfdump
The nfdump tools collect and process netflow data on the command line.
They are part of the NfSen project which is explained more detailed
at
http://www.ripe.net/ripe/meetings/ripe-50/presentations/ripe50-plenary-tue-nfsen-nfdump.pdf
The Web interface is a separate project and available at http://sourceforge.net/projects/nfsen/
Dec 1, 2014: Current stable version: 1.6.13
The documentation is incomplete. An update will follow.
/flow_base_dir/router1
/flow_base_dir/router2
nfcapd -w -D -l /flow_base_dir/router1 -p 23456
nfcapd -w -D -l /flow_base_dir/router2 -p 23457
interface fastethernet 0/0
ip route-cache flow
ip flow-exportip flow-export version 5
ip flow-cache timeout active 5
mls flow ip interface-full
mls flow ipv6 interface-full
mls nde sender version 5
mls aging fast time 4 threshold 2
mls aging normal 32
mls aging long 900
-r <single file> | Read a single file. |
-R </path/to/first-file:lastfile> | Read data from a sequence of files from /path/to/first-file to /path/to/last-file |
-M
/path/to/first-dir:next-dir:last-dir -r <single-file> -M /path/to/first-dir:next-dir:last-dir -R <first-file:last-file> |
Read from a
sequence of files from several directories: File sequence is: /path/to/first-dir/single-file /path/to/next-dir/single-file /path/to/last-dir/single-file or /path/to/first-dir/first-file .... /path/to/first-dir/last-file /path/to/next-dir/first-file .... /path/to/next-dir/last-file /path/to/last-dir/first-file .... /path/to/last-dir/last-file |
Specials: | |
-R
</path/to/directory> -M /path/to/first-dir:next-dir:last-dir -R . |
Read all files in a directory |
-R
</path/to/first-file> -M /path/to/first-dir:next-dir:last-dir -R <first-file> |
Read all files in a directory starting with a given file |
Flow Record:This format is rarely used, but contains any information available for this record.
Flags = 0x00000000
size = 52
mark = 0
srcaddr = 36.249.80.226
dstaddr = 92.98.219.116
First = 1125377992 [2005-08-30 06:59:52]
Last = 1125377992 [2005-08-30 06:59:52]
msec_first = 338
msec_last = 338
dir = 0
tcp_flags = 0
prot = 17
tos = 0
input = 5
output = 3
srcas = 1299
dstas = 0
srcport = 3040
dstport = 1434
dPkts = 1
dOctets = 404
Date flow start Duration Proto Src IP Addr:Port Dst IP Addr:Port Packets Bytes FlowsThe date and Duration of the flow are given in millisecond resolution. The number of flows is always 1 unless flows are aggregated. See below.
2005-08-30 06:59:52.338 0.001 UDP 36.249.80.226:3040 -> 92.98.219.116:1434 1 404 1
Date flow start Duration Proto Src IP Addr:Port Dst IP Addr:Port Flags Tos Packets Bytes FlowsExtended format: -o extended
2005-08-30 06:53:53.370 63.545 TCP 113.138.32.152:25 -> 222.33.70.124:3575 .AP.SF 0 62 3512 1
2005-08-30 06:53:53.370 63.545 TCP 222.33.70.124:3575 -> 113.138.32.152:25 .AP.SF 0 58 3300 1
Date flow start Duration Proto Src IP Addr:Port Dst IP Addr:Port Flags Tos Packets Bytes pps bps Bpp FlowsThis format gives most information on one line.
2005-08-30 06:53:53.370 63.545 TCP 113.138.32.152:25 -> 222.33.70.124:3575 .AP.SF 0 62 3512 0 442 56 1
2005-08-30 06:53:53.370 63.545 TCP 222.33.70.124:3575 -> 113.138.32.152:25 .AP.SF 0 58 3300 0 415 56 1
Time window: Aug 30 2005 06:53:53 - Aug 30 2005 06:54:56
Tag | Description | Tag | Description |
%ts | Start Time - first seen | %in | Input Interface num |
%te | End Time - last seen | %out | Output Interface num |
%td | Duration | %pkt | Packets |
%pr | Protocol | %byt | Bytes |
%sa | Source Address | %fl | Flows |
%da | Destination Address | %pkt | Packets |
%sap | Source Address:Port | %flg | TCP Flags |
%dap | Destination Address:Port | %tos | Tos |
%sp | Source Port | %bps | bps - bits per second |
%dp | Destination Port | %pps | pps - packets per second |
%sas | Source AS | %bpp | bps - Bytes per package |
%das | Destination AS |
-o “fmt:%ts %td %pr %sap -> %dap %pkt %byt %fl"
Date flow start Duration Proto Src IP Addr:Port Dst IP Addr:Port Packets Bytes FlowsThe middle part of each IPv6 address will be cutted, but should allow to identify addresses, though. If the full length of IPv6 addresses is required, add the digit '6' to the output format ( e.g. -o line6, -o long6, -o extended6 ) or add the option -6 ( e.g. -o extended -6 ).
2006-03-09 11:55:03.900 0.000 ICMP6 2005:62..2c:9c10.0 -> 2005:62..c000::d.0 1 104 1
Date flow start Duration Proto Src IP Addr:Port Dst IP Addr:Port Packets Bytes Flows
2006-03-09 11:55:03.900 0.000 ICMP6 2005:620:0:8:203:baff:fe2c:9c10.0 -> 2005:620:0:c000::d.0 1 104 1
Date flow start Duration Proto Src IP Addr:Port Dst IP Addr:Port Packets Bytes FlowsAggregate source IP address and destination port: -A srcip,dstport
2005-08-30 06:59:54.324 250.498 TCP 63.183.112.97:9050 -> 146.69.72.180:51899 12 2198 10
Date flow start Duration Proto Src IP Addr:Port Dst IP Addr:Port Flags Tos Packets Bytes pps bps Bpp FlowsAll other elements, not aggregated are set to '0'.
2005-08-30 06:59:25.137 213.697 TCP 32.249.32.48:0 -> 0.0.0.0:135 ...... 0 23 1104 0 41 48 13
2005-08-30 06:59:24.563 330.110 TCP 49.112.228.156:0 -> 0.0.0.0:1433 ...... 0 47943 2.2 M 145 55769 48 27864
2005-08-30 06:59:54.322 201.857 TCP 148.190.164.126:0 -> 0.0.0.0:36129 ...... 0 10 460 0 18 46 6
2005-08-30 06:59:54.257 48.768 TCP 92.90.57.46:0 -> 0.0.0.0:59501 ...... 0 5 230 0 37 46 2
record | Statistic about aggregated netflow records. |
srcip | Statistic about source IP addresses |
dstip | Statistic about destination IP addresses |
ip | Statistic about any (source or destination) IP addresses |
srcport | Statistic about source ports |
dstport | Statistic about destination ports |
port | Statistic about any (source or destination) ports |
srcas | Statistic about source AS numbers |
dstas | Statistic about destination AS numbers |
as | Statistic about any (source or destination) AS numbers |
inif | Statistic about input interface numbers |
outif | Statistic about output interface numbers |
if | Statistic about any ( input or output ) interface numbers |
proto | Statistic about protocol numbers |
Aggregated flows 850332Anonymizing Flows: -K <key>
Top 10 flows ordered by bytes:
Date flow start Duration Proto Src IP Addr:Port Dst IP Addr:Port Flags Tos Packets Bytes pps bps Bpp Flows
2005-08-30 06:50:11.218 700.352 TCP 126.52.54.27:47303 -> 42.90.25.218:435 ...... 0 1.4 M 2.0 G 2023 5.6 M 1498 1
2005-08-30 06:47:06.504 904.128 TCP 198.100.18.123:54945 -> 126.52.57.13:119 ...... 0 567732 795.1 M 627 2.5 M 1468 1
2005-08-30 06:47:06.310 904.384 TCP 126.52.57.13:45633 -> 91.127.227.206:119 ...... 0 321148 456.5 M 355 4.0 M 1490 1
2005-08-30 06:47:14.315 904.448 TCP 126.52.57.13:45598 -> 91.127.227.206:119 ...... 0 320710 455.9 M 354 4.0 M 1490 1
2005-08-30 06:47:14.316 904.448 TCP 126.52.57.13:45629 -> 91.127.227.206:119 ...... 0 317764 451.5 M 351 4.0 M 1489 1
2005-08-30 06:47:14.315 904.448 TCP 126.52.57.13:45634 -> 91.127.227.206:119 ...... 0 317611 451.2 M 351 4.0 M 1489 1
2005-08-30 06:47:06.313 904.384 TCP 126.52.57.13:45675 -> 91.127.227.206:119 ...... 0 317319 451.0 M 350 4.0 M 1490 1
2005-08-30 06:47:06.313 904.384 TCP 126.52.57.13:45619 -> 91.127.227.206:119 ...... 0 314199 446.5 M 347 3.9 M 1490 1
2005-08-30 06:47:06.321 790.976 TCP 126.52.54.35:59898 -> 132.94.115.59:2466 ...... 0 254717 362.4 M 322 3.7 M 1491 1
2005-08-30 06:47:14.316 904.384 TCP 126.52.54.35:59773 -> 55.107.224.187:11709 ...... 0 272710 348.5 M 301 3.1 M 1340 1
Top 10 Src IP Addr ordered by flows:
Date first seen Duration Src IP Addr Flows Packets Bytes pps bps bpp
2005-08-30 06:45:50.990 1147.332 125.67.123.234 109183 202523 13.1 M 176 96116 68
2005-08-30 06:45:02.928 1192.834 94.180.151.203 62794 219715 25.9 M 184 182294 123
2005-08-30 06:59:24.563 330.110 9.209.28.173 27864 47943 2.2 M 145 55769 48
2005-08-30 06:45:07.728 1190.594 125.248.33.146 17271 41942 5.7 M 35 40438 143
2005-08-30 06:59:16.431 341.892 138.5.122.251 12253 75925 39.2 M 222 962768 541
2005-08-30 06:59:48.111 310.211 130.195.23.210 11742 46928 3.2 M 151 86940 71
2005-08-30 06:59:54.066 304.257 255.93.216.43 11383 56943 4.5 M 187 123968 82
2005-08-30 06:59:53.362 304.894 219.182.16.57 11209 44784 2.0 M 146 54640 46
2005-08-30 06:47:06.503 1068.361 3.15.99.52 9000 16962 3.1 M 15 24415 192
2005-08-30 06:59:52.784 172.102 11.121.123.165 7176 7176 330096 41 15344 46
Top 10 IP Addr ordered by flows:
Date first seen Duration IP Addr Flows Packets Bytes pps bps bpp
2005-08-30 06:45:50.990 1147.332 125.67.123.234 234366 458197 30.2 M 399 221164 69
2005-08-30 06:45:02.928 1192.835 94.180.151.203 115841 428885 42.6 M 359 299577 104
2005-08-30 06:45:07.728 1190.594 125.248.33.146 28218 73178 7.8 M 61 55234 112
2005-08-30 06:59:24.563 330.110 9.209.28.173 27916 48086 2.2 M 145 55931 47
2005-08-30 06:59:48.111 310.212 130.195.23.210 23467 105779 7.9 M 340 212311 77
2005-08-30 06:59:53.362 304.960 219.182.16.57 22938 89563 4.0 M 293 109251 46
2005-08-30 06:59:54.066 304.257 255.93.216.43 22769 102496 7.6 M 336 210205 77
2005-08-30 06:59:16.431 341.892 138.5.122.251 21840 132119 45.3 M 386 1.1 M 359
2005-08-30 06:46:33.104 1102.656 129.251.42.241 20305 74505 5.8 M 67 43757 80
2005-08-30 06:47:07.272 1068.360 131.250.225.247 14452 36714 3.1 M 34 24078 87
Top 10 Dst Port ordered by packets:
Date first seen Duration Dst Port Flows Packets Bytes pps bps bpp
2005-08-30 06:45:55.150 1129.287 119 99 3.3 M 4.7 G 3079 34.1 M 1450
2005-08-30 06:45:47.858 1150.465 80 56282 1.4 M 135.1 M 1307 984959 94
2005-08-30 06:47:06.375 1032.270 435 5 1.4 M 2.0 G 1410 16.0 M 1488
2005-08-30 06:45:41.715 1157.052 0 40088 1.4 M 261.0 M 1225 1.8 M 192
2005-08-30 06:45:26.415 1171.905 6881 8898 592649 545.1 M 505 3.7 M 964
2005-08-30 06:47:06.310 1032.335 433 13 588268 814.3 M 569 6.3 M 1451
2005-08-30 06:45:02.928 1195.523 53 140178 481356 37.1 M 402 260537 80
2005-08-30 06:44:59.090 1199.038 4662 9238 344122 267.1 M 286 1.8 M 813
2005-08-30 06:45:50.990 1144.773 123 176044 302564 23.0 M 264 168866 79
2005-08-30 06:47:14.316 939.333 11709 4 272713 348.5 M 290 3.0 M 1339
Top 10 Dst Port ordered by bytes:
Date first seen Duration Dst Port Flows Packets Bytes pps bps bpp
2005-08-30 06:45:55.150 1129.287 119 99 3.3 M 4.7 G 3079 34.1 M 1450
2005-08-30 06:47:06.375 1032.270 435 5 1.4 M 2.0 G 1410 16.0 M 1488
2005-08-30 06:47:06.310 1032.335 433 13 588268 814.3 M 569 6.3 M 1451
2005-08-30 06:45:26.415 1171.905 6881 8898 592649 545.1 M 505 3.7 M 964
2005-08-30 06:47:06.321 1053.251 2466 30 255460 363.4 M 242 2.8 M 1491
2005-08-30 06:47:14.316 939.333 11709 4 272713 348.5 M 290 3.0 M 1339
2005-08-30 06:48:42.325 904.448 52911 5 191559 274.0 M 211 2.4 M 1499
2005-08-30 06:44:59.090 1199.038 4662 9238 344122 267.1 M 286 1.8 M 813
2005-08-30 06:45:41.715 1157.052 0 40088 1.4 M 261.0 M 1225 1.8 M 192
2005-08-30 06:47:06.313 1065.928 1101 83 173933 248.4 M 163 1.9 M 1497
Top 10 Dst Port ordered by pps:
Date first seen Duration Dst Port Flows Packets Bytes pps bps bpp
2005-08-30 06:45:55.150 1129.287 119 99 3.3 M 4.7 G 3079 34.1 M 1450
2005-08-30 07:02:55.248 0.002 39601 3 5 748 2499 2.9 M 149
2005-08-30 07:00:28.817 0.512 54286 1 1279 66882 2498 1045031 52
2005-08-30 06:47:06.375 1032.270 435 5 1.4 M 2.0 G 1410 16.0 M 1488
2005-08-30 06:45:47.858 1150.465 80 56282 1.4 M 135.1 M 1307 984959 94
2005-08-30 06:45:41.715 1157.052 0 40088 1.4 M 261.0 M 1225 1.8 M 192
2005-08-30 07:00:28.305 0.002 56997 2 2 92 999 367999 46
2005-08-30 07:03:55.859 0.064 47264 1 40 49456 624 5.9 M 1236
2005-08-30 06:47:06.310 1032.335 433 13 588268 814.3 M 569 6.3 M 1451
2005-08-30 07:02:44.692 0.064 8612 1 33 41848 515 5.0 M 1268
Time window: Aug 30 2005 06:44:54 - Aug 30 2005 07:04:58
Flows analysed: 1115890 matched: 1115890, Bytes read: 54486168
Sys: 2.286s flows/second: 488001.9 Wall: 2.386s flows/second: 467490.9