Hands-on tutorial

Tutorials · Monitoring

How to See Who Uses Your Bandwidth With NetFlow, IPFIX or sFlow

Export flow records from switches and gateways to a collector, and answer the questions SNMP cannot: which users, applications and destinations fill the link.

Intermediate9 min6 steps

Before you start

  • A switch or gateway that exports NetFlow v9, IPFIX or sFlow
  • A flow collector (open-source or commercial) on a server
  • Firewall rules that allow the export to the collector

Step by step

  1. Know the difference

    NetFlow and IPFIX summarise every conversation (flow) on the device. sFlow samples packets, for example 1 in 1,000, which scales to very fast switches. Both answer 'who talks to whom, how much'.

  2. Choose where to export

    Export from the internet gateway for internet usage and from core switches for internal traffic. Avoid exporting the same traffic twice.

  3. Configure the exporter

    Point the device at the collector's address and port, set active and inactive timeouts (for example 60 and 15 seconds) or the sampling rate.

    sflow collector 10.0.20.15 6343
    sflow sampling-rate 1000
    sflow interface gi1/0/49
    
  4. Check the collector receives data

    Within a minute the collector should list the exporter and its interfaces. If not, check routing, firewall rules and the UDP port.

  5. Build useful views

    Top talkers, top applications and top destinations per site and per hour. Save a view for the internet link and one for the server VLAN.

  6. Use it

    When the link is full, look at top talkers for that moment. Use monthly reports to plan upgrades and to spot unusual destinations that may indicate malware.

Commands are generic, industry-standard examples. Exact syntax and menu names vary by model and firmware; check your device's manual on the Documentation page.

Pro tips

  • Flow data contains user activity: restrict access and set retention.
  • Keep the collector's clock in sync with NTP so flows line up with logs.
  • Combine flow data with DNS logs to name destinations.