Skip to content

Instantly share code, notes, and snippets.

@narutaro
Last active January 22, 2016 22:03
Show Gist options
  • Save narutaro/5139c457ab2eaff9c6ed to your computer and use it in GitHub Desktop.
Save narutaro/5139c457ab2eaff9c6ed to your computer and use it in GitHub Desktop.
flowgen

The best NetFlow generator flowgen

me@vaio:~/NetFlow-Generator$ time ./flowgen -p 5555 -i 1 --dstaddr 1.1.1.1 -n 1000000 10.40.8.240 
collector = 10.40.8.240
count     = 1000000
spoof     = (none)
port      = 5555
wait      = 0 (msec)
interval  = 1
flowrec   = 30
debug     = 0
eng_type  = 1
eng_id    = 1
src_addr  = 10.0.0.1:254
dst_addr  = 1.1.1.1
nexthop   = 30.0.0.254
in_if     = 1
out_if    = 2
packets   = 10:1000
ocetets   = 300:300000
first     = 10:1000 (msec)
last      = 0 (msec)
src_port  = 1001-2000
dst_port  = 3001-4000
tcpflags  = 27
proto     = 6
tos       = 0
src_as    = 101-110
dst_as    = 201-210
src_mask  = 24
dst_mask  = 24

real	0m1.397s
user	0m1.392s
sys	0m0.004s
  • NetFlow can accomodate multiple flows in a packet. -f defines number of flows in a packet. default is 30.
  • -w defines wait time every time it sends a packet. The unit is ms.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment