FLOW-RECEIVE(1)

πŸ“¦ version 0.68.5.1, in fedora 43, fedora 44

πŸ’– flow-receive β€” bestie's guide to catching NetFlow packets πŸ’–

okay so this is flow-receive from the flow-tools manual set, section 1, and it's genuinely one of those little utilities that just works and nobody gives it credit for. sit down, grab a strawberry, let's get into it πŸ“


✨ NAME ✨

flow-receive β€” receive flow data with the NetFlow protocol.

like, it catches flows. NetFlow ones. that's the whole vibe. πŸ¦‹


✨ SYNOPSIS ✨

flow-receive [ -h ] [ -b big|little ] [ -C comment ] [ -d debug_level ]
             [ -o output_file ] [ -S stat_interval ] [ -V pdu_version ]
             [ -z z_level ] localip/remoteip/port

✨ DESCRIPTION ✨

so flow-receive is the utility that receives flows in NetFlow format. that's it, that's the job, and it slays at it. πŸ‘‘

here's the tea on how it decides what to accept, because this part is actually important, no cap:

  • when the remoteip is configured, only flows from that exporter get processed. this is the most secure and recommended configuration. do this. seriously. bestie, do this one. 🫢
  • when the localip is configured, flow-receive will only process flows sent to the localip IP address.
  • if remoteip is 0 (which means "not configured"), then flows from any source IP address are accepted. like, anyone. any rando on the internet. πŸ™ˆ

also, here's a fun one: multiple non aggregated PDU versions may be accepted at once. why would you want that?? because Cisco's Catalyst 6500 NetFlow implementation exports from both the supervisor and the MSFC with the same IP address and the same port, but with different export versions. iconic, honestly. so in that situation, the exports get stored in the format specified by the -V flag β€” or, if you didn't set one, whichever export type is received first wins. first come first served, no fighting. ✨


✨ OPTIONS ✨

  • -b big|little β€” byte order of the output. pick your endianness, live your truth. πŸ’…
  • -C Comment β€” add a comment. little note to your future self, we love that.
  • -d debug_level β€” enable debugging. turn the volume up on what's happening. πŸ”₯
  • -h β€” display help. the classic. the icon.
  • -o file β€” write to file instead of the standard out. redirect the vibes somewhere permanent. πŸ“
  • -S stat_interval β€” when you configure this, flow-receive will emit a timestamped message on stderr every stat_interval minutes, telling you counters like the number of flows received, packets processed, and lost flows. it's giving checking in on you. 😭
  • -V pdu_version β€” use pdu_version format for the output. here's the full menu, don't skip any, every single one is real:
    • 1 β€” NetFlow version 1 (No sequence numbers, AS, or mask)
    • 5 β€” NetFlow version 5
    • 6 β€” NetFlow version 6 (5+ Encapsulation size)
    • 7 β€” NetFlow version 7 (Catalyst switches)
    • 8.1 β€” NetFlow AS Aggregation
    • 8.2 β€” NetFlow Proto Port Aggregation
    • 8.3 β€” NetFlow Source Prefix Aggregation
    • 8.4 β€” NetFlow Destination Prefix Aggregation
    • 8.5 β€” NetFlow Prefix Aggregation
    • 8.6 β€” NetFlow Destination (Catalyst switches)
    • 8.7 β€” NetFlow Source Destination (Catalyst switches)
    • 8.8 β€” NetFlow Full Flow (Catalyst switches)
    • 8.9 β€” NetFlow ToS AS Aggregation
    • 8.10 β€” NetFlow ToS Proto Port Aggregation
    • 8.11 β€” NetFlow ToS Source Prefix Aggregation
    • 8.12 β€” NetFlow ToS Destination Prefix Aggregation
    • 8.13 β€” NetFlow ToS Prefix Aggregation
    • 8.14 β€” NetFlow ToS Prefix Port Aggregation
    • 1005 β€” Flow-Tools tagged version 5
  • -z z_level β€” configure compression level to z_level. 0 is disabled (no compression), 9 is highest compression. yes it goes both ways. yes that's a lot of squeezing. 🌸

✨ EXAMPLES ✨

listen on port 9800 on any local interface for exports from IP address 10.0.0.1, store the exports in flows

flow-receive 0/10.0.0.1/9800 > flows

listen on port 9800 on any local interface from any IP address, display the received flows with flow-print

flow-receive 0/0/9800 | flow-print

see how the middle one is 0?? that's the "any IP address" situation. you know the one. be careful with that one. πŸ’€


✨ BUGS ✨

it is not currently possible to convert between the aggregated formats (8.x) and the non aggregated formats (1,5,6,7). so like, pick a lane. 🚧

✨ AUTHOR ✨

Mark Fullmer <maf@splintered.net>


✨ SEE ALSO ✨

flow-tools(1)


and that's the whole page, bestie πŸŽ€ this one's from the flow-tools crew, dated 26 Август 2010 β€” that's August 26, 2010 for those of us who don't read Cyrillic month names, and honestly? iconic of it. go catch some flows. you got this. πŸ’œβœ¨πŸ¦‹

πŸ“¦ where this page comes from