NetFlow, sFlow, IPFIX : monitoring and flow analytics
NetFlow (Cisco, 1996), sFlow (HP/InMy 2001) and IPFIX (standard IETF, 2013) sont les protocoles de monitoring de flux network. Essentiels for analyse trafic, détection anomalies, facturation ISP, security (Zeek/Bro, StealthWatch). Guide complet : différences, déploiement, collectors, use caits 2026.
NetFlow (Cisco)
- v5 : legacy, 7 champs fixes, IPv4 only
- v9 : templates configurables, IPv6, MPLS
- v10 (IPFIX, standard IETF) : supersedes v9
- Flex NetFlow : nouvelle architecture Cisco, champs personnalisables
- Sampled : 1:N packets sont analysés (réduit charge CPU)
sFlow (HP/InMon, Arista, Juniper)
- Always sampled (1:N, ex 1:1000)
- Plus léger que NetFlow (moins de CPU switch)
- Supporte trafic L2 (MAC/VLAN)
- Moins précis que NetFlow sur flux courts
- Recommandé : sampling rate 1:100 (campus) to 1:10000 (DC)
IPFIX (IETF standard)
- RFC 7011 (2013)
- Successeur normalisé de NetFlow v9
- Templates flexibles (flexible export)
- Multi-vendor (Cisco, Juniper, Arista, Nokia, Huawei)
- Support Bi-flow : couple flow A→B and B→A comme 1 enregistrement
Champs typiques (flow key)
- src-ip / dst-ip
- src-port / dst-port
- protocol (TCP=6, UDP=17, ICMP=1)
- tos (DSCP)
- input-interface / output-interface
- packets / bytes
- timestamps start/end
- TCP flags (SYN, ACK, FIN, RST)
Configuration Cisco Flex NetFlow
- flow record R-BASIC
- match ipv4 source address
- match ipv4 destination address
- match transport source-port
- match transport destination-port
- match ipv4 protocol
- collect counter bytes
- collect counter packets
- flow exporter E-COLLECTOR
- destination 10.0.0.50
- transport udp 2055
- flow monitor M-BASIC
- record R-BASIC
- exporter E-COLLECTOR
- interface Gi1/0/1
- ip flow monitor M-BASIC input
Configuration Juniper sFlow
- set protocols sflow sample-rate ingress 100
- set protocols sflow collector 10.0.0.50 udp-port 6343
- set protocols sflow interfathese ge-0/0/0 rate 100
- set protocols sflow polling-interval 20
Collectors populaires
- SolarWinds NTA (NetFlow Traffic Analyzer) : commercial, integrated Orion
- PRTG : commercial, simple SMB
- ManageEngine NetFlow Analyzer : commercial
- ntopng : open source, puissant
- Elastiflow (ELK stack) : open source, scalable
- Akvorado (Free, moderne 2024) : IPFIX + sFlow, data lake ClickHouse
- Cisco StealthWatch / Secure Network Analytics : SIEM-grade, security
- Kentik : cloud, leader grand compte
Use caits monitoring
- Top talkers : users/apps consommant le plus
- Saturation WAN : identifier flux qui saturent une liaison
- Capacity planning : trendings trafic 6-12 mois
- Anomaly detection : changement soudain de patterns
- Application analytics : which % de trafic = SaaS, Internet, intra-DC
- Facturation ISP (Trafic sortant par client)
Use caits security
- DDoS detection : volumétrie anormale sur dst port
- Data exfiltration : transfert sortant anormal (5 GB to 3h of matin)
- Lateral movement : host interne scannant autres hosts
- C2 beaconing : regular short connections vers IP suspecte
- Compromise detection : top new IPs contactés par endpoints
Limitations
- Visibilité L3/L4 uniquement (pas L7 app without DPI)
- Sampling perd précision sur petits flux
- Overhead CPU switch (10-20% typique)
- Stockage : 1 Gbps WAN = ~50 GB/jour flows non-sampled
Commander chez OPTINOC
Déploiement NetFlow/sFlow/IPFIX sur Cisco/Juniper/Arista + collecteur (StealthWatch, Elastiflow, Akvorado). Intégration SIEM. Devis sous 48h.
