Use nfcapd to collect NetFlow data. You can run multiple collectors on different ports to handle busy networks, collect all sources into a single directory, or split data into specific directories based on the source IP.
Run multiple collectors on different ports:
# Collector 1
nfcapd -D -S 2 -B 1024000 -w /flow_base_dir/router1 -p 23456
# Collector 2
nfcapd -D -S 2 -B 1024000 -w /flow_base_dir/router2 -p 23457
Collect all sources into the same directory:
nfcapd -D -S 2 -w /flow_base_dir/routers -p 23456
Split collected data per source (using IP matching):
nfcapd -D -S 2 -n router1,172.16.17.18,/flow_base_dir/router1 \
-n router2,172.16.17.20,/flow_base_dir/router2 -p 23456
Security Note: nfcapd does not have built-in access control. Use host-level security to filter IP addresses. No root privileges are required unless binding to ports below 1024.