SlideShare a Scribd company logo
1 of 70
NetFlow
José Manuel Vega Monroy
      Malaga, Spain
     December, 2012
Agenda
• NetFlow
  – What it is, and how it works
  – Working with Flows
• Flow Exporting Protocols
  Implementations
  – Cisco NetFlow
  – IPFIX

• Flows and their applications
  – Uses for Flow
Network Flows
• “Packets or frames that have some
  common properties” (Typically: IP
  src/dst, Port src/dst, L4 Protocol, ToS,
  VLANid)
• Creation and expiration policy – what
  conditions start and stop a flow.
• By the way, it contains:
     –   Peers – flow source and destination
     –   Counters – packets, bytes, time
     –   Routing information – AS, network mask, interfaces
Network Flows
●
  Unidirectional or bidirectional
• Bidirectional flows can contain other
  information such as round trip time
  (RTT), TCP behavior.
• Application flows look past the
  headers to classify packets by their
  contents
• Aggregated flows – flows of flows
Unidirectional Flow with
  Source/Destination IP Key (L2)
                % telnet 10.0.0.2                                     Port #23
                            Ethernet frame



                        login:
00-B0-D0-86-BB-F7                                             00-14-22-01-23-45
                                             Ethernet frame




                         Active Flows
Flow       Source MAC                 Destination MAC

       1    00-B0-D0-86-BB-F7 00-14-22-01-23-45
       2    00-14-22-01-23-45 00-B0-D0-86-BB-F7
Unidirectional Flow with
  Source/Destination IP Key (L3)
                   % telnet 10.0.0.2                                 Port #23
                                   IP packet



                          login:
       10.0.0.1                                   IP packet      10.0.0.2


                              Active Flows
Flow              Source IP                    Destination IP

 1                10.0.0.1                            10.0.0.2
 2                10.0.0.2                            10.0.0.1
Unidirectional Flow with
  Source/Destination IP Key (L3)
                    % telnet 10.0.0.2                               Port #23
                      % ping 10.0.0.2
                                 ICMP request


                         login:
       10.0.0.1             ICMP echo reply                     10.0.0.2
                                        ICMP reply




                              Active Flows
Flow              Source IP             Destination IP

 1                10.0.0.1                           10.0.0.2
 2                10.0.0.2                           10.0.0.1
Bidirectional Flow with IP, Port,
              Protocol Key (L4)
                    % telnet 10.0.0.2
Port #32000                                                           Port #23
                      % ping 10.0.0.2
                               ICMP request


                        login:
       10.0.0.1            ICMP echo reply                        10.0.0.2
                                    ICMP reply




                          Active Flows
Flow    Source IP     Destination IP             Prot   srcPort       dstPort

 1      10.0.0.1         10.0.0.2                 TCP 32000 23
 2      10.0.0.1         10.0.0.2                  ICMP 0      0
Unidirectional Flow with IP,
          Port,Protocol Key (L4)
Port #32000       % telnet 10.0.0.2                                     Port #23
                    % ping 10.0.0.2
                               ICMP request



      10.0.0.1
                      login:
                                                                  10.0.0.2
                         ICMP echo reply
                                      ICMP reply



                         Active Flows

Flow Source IP      Destination IP             Prot   srcPort     dstPort

  1    10.0.0.1          10.0.0.2              TCP    32000     23
  2    10.0.0.2          10.0.0.1              TCP     23       32000
  3    10.0.0.1          10.0.0.2             ICMP        0        0
  4    10.0.0.2          10.0.0.1             ICMP        0        0
Application Flow (L7)
                 % firefox http://10.0.0.2:9090                Web server
                                                               Port #9090

                            HTTP request




    10.0.0.1            Content-Type:
                                                         10.0.0.2
                                 HTTP response




                         Active Flows

Flow Source IP       Destination IP              Application

 1 10.0.0.1             10.0.0.2                  HTTP
Aggregated Flow
                        Main Active flow table
Flow Source IP           Destination IP           prot    srcPort   dstPort


1       10.0.0.1          10.0.0.2               TCP     32000      23
2       10.0.0.2          10.0.0.1               TCP     23         32000
3       10.0.0.1          10.0.0.2               ICMP    0          0
4       10.0.0.2          10.0.0.1               ICMP    0          0

                   Source/Destination IP Aggregate
    Flow    Source IP           Destination IP

    1       10.0.0.1                  10.0.0.2
    2       10.0.0.2                  10.0.0.1
NetFlow Architecture
NetFlow Architecture
• Observation point
  – For example, an interface of a router
  – Associated with an Observation Domain

• Observation domain
  – Set of observation points in a domain

• NetFlow Exporter
  – Device with the NetFlow services enabled
  – Exports flows in the form of Flow Records

• NetFlow Collector
  – Receives Flow Records from one or more exporters,
    parsing and storing the real information
NetFlow Architecture
• Export Packet/Message
  – Packet/Message with a Packet/Message Header
    followed by one or more FlowSets , sent from the
    NetFlow Exporter to the NetFlow Collector

• Observation domain
  – Set of observation points in a domain

• NetFlow Exporter
  – Device with the NetFlow services enabled
  – Exports flows in the form of Flow Records

• NetFlow Collector
  – Receives Flow Records from one or more exporters,
    parsing and storing the information
NetFlow
Export Packet Format
NetFlow
     Export Packet Format
• Common header among export
  versions
• All except v1 have a sequence number
• Version specific data field where N
  records of data type are exported
• N is determined by the size of the flow
  definition. Packet size is kept under
  ~1480 bytes. No fragmentation on
  Ethernet.
Working with Flows
• Generating Process
  – Key Fields
  – Non-Key Fields

• Exporting Process
  – Types of flows
  – Sampling rates

• Collecting Process
  – Tools to Collect Flows (“Flow-tools”)

• Analyzing Process
  – More tools available, can write your own (nProbe)
Working with Flows
        Generating Process
• A Key with more elements will generate
  more flows.
• Greater number of flows leads to more post
  processing time to generate reports, more
  memory and CPU requirements for device
  generating flows.
• Depends on application. Traffic engineering
  vs. intrusion detection.
Working with Flows
      Generating Process
• Accounting information accumulated
  with flows: Packets, Bytes, Start
  Timestamp, End Timestamp.
• Network routing information – masks
  and autonomous system (AS) number.
Working with Flows
        Generating Process
• Passive monitor (transparent bridge)
     – A passive monitor (usually a unix host)
       receives all data, and generates flows.
     – Resource intensive, newer investments
       needed.
• Router or other existing network device
     – Router or other existing devices like switch,
       generate flows.
     – Sampling is possible.
Working with Flows
        Generating Process


Workstation A               Workstation B




   Flow probe connected
   to switch port in            Internet
   “ traffic mirror” mode
Passive Monitor
• Directly connected to a LAN segment via a
  switch port in “mirror” mode, optical splitter,
  or repeated segment
• Generate flows for all local LAN traffic
• Must have an interface or monitor
  deployed on each LAN segment
• More difficult to deploy, in general
• Support for more detailed flows –
  bidirectional and application
Working with Flows
      Generating Process
      LAN                            LAN




    LAN
                                       LAN



                            Internet
Flow collector
stores exported flows from router.
Router Collection
• Router will generate flows for traffic
  that is directed to the router
• In general, flows are not generated for
  local LAN traffic
• Limited to “simple” flow criteria (packet
  headers)
• Generally easier to deploy – no new
  equipment
Working with Flows
Generating Process
Working with Flows
Generating Flows
Working with Flows
Exporting Process
Working with Flows
        Exporting Process
• Conditions to export:
     – Inactive flows (no more packets received)
     – Long flows (flow lifetime)
     – Flow ends (for example, RST or FIN in TCP
       communication)
     – Internal contrains (for example, full cache or
       low memory)
Working with Flows
        Collecting Process
• Decoding using templates
     – If the Template Records have not still been
       received, the corresponding Flow Data
       Records should store till to receive that
       template
     – Template Records life time is limited
Flows Exporting Protocol
    implementations:
Cisco NetFlow

   IPFIX
Cisco NetFlow
•   Most popular
•   In the beginning, unidirectional flows
•   IPv4 unicast and multicast
•   Aggregated and unaggregated flows
•   Flows exported via UDP Datagram
•   Supported on IOS and CatOS platforms
•   Catalyst NetFlow is different implementation
Cisco NetFlow Versions
• 4 Unaggregated types (1,5,6,7)
• 14 Aggregated types (8.x, 9)
• The version defines what type of data is in
  the flow
• Each version has its own packet format:
  Export packet
• Version 1 does not have sequence numbers
  – no way to detect lost flows
• Some versions specific to Catalyst platform
NetFlow v1
• Key Fields: Src/Dst IP, Src/Dst Port,
  IP Protocol, ToS, Input interface
• Accounting (Non-Key Fields):
  Packets, Bytes, Start/End timestamp,
  Output interface
• Other: Bitwise OR of TCP flags.
NetFlow v5
• Key Fields: Src/Dst IP, Src/Dst Port,
  IP Protocol, ToS, Input interface
• Accounting (Non-Key Fields):
  Packets, Bytes, Start/End timestamp,
  Output interface
• Other: Bitwise OR of TCP flags,
  Source/Destination AS and IP Mask
• Packet format adds sequence
  numbers for detecting lost exports
NetFlow v5
●
  Packet format adds sequence
  numbers for detecting lost exports:
  Flow Sequence
●
  Only support for Ipv4 and
  unidirectional flows
• Not support for MPLS/VLAN
NetFlow v5
Export Packet Example
       IP/UDP packet
         NetFlow
        v5 header

        v5 record

           …

           …

        v5 record
NetFlow v5
         Export Packet (Header)
struct ftpdu_v5 {
  /* 24 byte header */
  u_int16 version;         /*   5 */
  u_int16 count;           /*   The number of records in the PDU */
  u_int32 sysUpTime;       /*   Current time in millisecs since router booted */
  u_int32 unix_secs;       /*   Current seconds since 0000 UTC 1970 */
  u_int32 unix_nsecs;      /*   Residual nanoseconds since 0000 UTC 1970 */
  u_int32 flow_sequence;   /*   Seq counter of total flows seen */
  u_int8 engine_type;      /*   Type of flow switching engine (RP,VIP,etc.) */
  u_int8 engine_id;        /*   Slot number of the flow switching engine */
  u_int16 reserved;
NetFlow v5
        Export Packet (Records)
 /* 48 byte payload */
   struct ftrec_v5 {
     u_int32 srcaddr;    /* Source IP Address */
     u_int32 dstaddr;    /* Destination IP Address */
     u_int32 nexthop;    /* Next hop router's IP Address */
     u_int16 input;      /* Input interface index */
     u_int16 output;     /* Output interface index */
     u_int32 dPkts;      /* Packets sent in Duration */
     u_int32 dOctets;    /* Octets sent in Duration. */
     u_int32 First;      /* SysUptime at start of flow */
     u_int32 Last;       /* and of last packet of flow */
     u_int16 srcport;    /* TCP/UDP source port number or equivalent */
     u_int16 dstport;    /* TCP/UDP destination port number or equiv */
     u_int8 pad;
     u_int8 tcp_flags; /* Cumulative OR of tcp flags */
     u_int8 prot;        /* IP protocol, e.g., 6=TCP, 17=UDP, ... */
     u_int8 tos;         /* IP Type-of-Service */
     u_int16 src_as;     /* originating AS of source address */
     u_int16 dst_as;     /* originating AS of destination address */
     u_int8 src_mask;    /* source address prefix mask bits */
     u_int8 dst_mask;    /* destination address prefix mask bits */
     u_int16 drops;
   } records[FT_PDU_V5_MAXFLOWS];
};
NetFlow v8
• Aggregated v5 flows
• Not all flow types available on all
  equipments
• Much less data to post process, but
  loses fine granularity of v5 – no IP
  addresses
NetFlow v8
Export Packet Example
  (AS Aggregation)
       IP/UDP packet
         NetFlow
        v8 header

        v8 record

           …

           …

        v8 record
NetFlow v8 AS agg.
                Export Packet
struct ftpdu_v8_1 {
   /* 28 byte header */
   u_int16 version;       /* 8 */
   u_int16 count;         /* The number of records in the PDU */
   u_int32 sysUpTime;     /* Current time in millisecs since router booted */
   u_int32 unix_secs;     /* Current seconds since 0000 UTC 1970 */
   u_int32 unix_nsecs;    /* Residual nanoseconds since 0000 UTC 1970 */
   u_int32 flow_sequence; /* Seq counter of total flows seen */
   u_int8 engine_type;    /* Type of flow switching engine (RP,VIP,etc.) */
   u_int8 engine_id;      /* Slot number of the flow switching engine */
   u_int8 aggregation;    /* Aggregation method being used */
   u_int8 agg_version;    /* Version of the aggregation export */
   u_int32 reserved;
   /* 28 byte payload */
   struct ftrec_v8_1 {
     u_int32 dFlows;     /* Number of flows */
     u_int32 dPkts;      /* Packets sent in duration */
     u_int32 dOctets;    /* Octets sent in duration */
     u_int32 First;      /* SysUpTime at start of flow */
     u_int32 Last;       /* and of last packet of flow */
     u_int16 src_as;     /* originating AS of source address */
     u_int16 dst_as;     /* originating AS of destination address */
     u_int16 input;      /* input interface index */
     u_int16 output;     /* output interface index */
   } records[FT_PDU_V8_1_MAXFLOWS];
};
NetFlow v9
• Flow format defined by user: Templates
      – Template descriptions are communicated from the
        router to the collector as well
• Flow records are sent from the router to the
  NetFlow Collector, with minimal template
  information, so that the NetFlow Collector can
  relate the records to the appropriate template
• Version 9 is independent of the underlying
  transport (UDP, TCP, SCTP, and so on)
NetFlow v9
NetFlow v9
• Support for Ipv6 and bidirectional flows
• Support for MPLS/VLAN
NetFlow v9
          Information Model
• FlowSet
  – Collection of Flow Records with similar structure
  – Identified by FlowS et Id (0-65535)
  – Flow Set Id, with value 0, for Template FlowS et
  – Flow Set Id, with value 1, for Options Template
    FlowS et
  – Flow Set Id, with values greater than 255, for Data
    FlowS et
NetFlow v9
         Information Model
• Template FlowSet
  – One or more Template Records
• Options Template FlowSet
  – One or more Options Template Records
• Data FlowSet
  – One or more Flow Data Records or Options
    Data Records
NetFlow v9
           Information Model
• Template Record
  – Defines the fields -type, length- in a Flow Data Record

• Flow Data Record
  – Record which contains real information values

• Options Template Record
  – Defines te fields -type, length, scope- in a Options Data
    Record

• Options Data Record
  – Record which contains configuration supply information -or
    for any another specific process- values and scope
NetFlow v9
Export Packet Example
NetFlow v9
Export Packet Example
IPFIX
• ITEF Standard, using Cisco NetFlow v9 as
  base
• Flow format defined by user: Templates
• No directly interoperable with NetFlow v9:
     –   FlowSet renamed to Set
     –   Count is now Length
     –   Sysuptime is removed, and exporttime is included
IPFIX
• Based on biflows:
    –   Data reduction (bandwidth-saving)
    –   Separation of “answered” traffic from
        “unanswered”
    –   Full reconstruction of TCP sessions
IPFIX
            Information Model
• Set
  –   Identified by S et Id (0-65535)
  –   Set Id, with values 0 and 1, not in us e
  –   Set Id, with value 2, for Te mplate S e t
  –   Set Id, with value 3, for Options Template S et
  –   Set Id, with values between 4 and 255, res erved
  –   Set Id, with values greater than 255, for Data S ets
IPFIX
Export Message
IPFIX
Export Message Example
Final Scenario
Flows and their Applications:
Uses for Flow
• Identification/Solving
   – Traffic classification
   – Flow-based Detection
   – DoS Traceback
• Traffic Analysis
   – Inter-AS traffic analysis
   – Reporting on application proxies
• Accounting
   – Cross verification from other sources
   – Can cross-check with SNMP data
Identification/Solving
      Traffic Classification
• Using DPI, based on: Protocol, source
  and destination ports
  – Protocol identification (TCP, UDP, ICMP)
  – Can define well known ports
  – Can identify well known P2P ports
  – Most common use
    • Proxy measurement - http , ftp
    • Rate limiting P2P traffic
Identification/Solving
         Flow-based Detection
• Monitor flows (i.e., Network and Transport
  Layer transactions) on the network and build
  baselines for what normal behavior looks
  like:
     –    Per interface
     –    Per prefix
     –    Per Transport Layer protocol & ports
     –    Build time-based buckets (e.g., 5 minutes, 30
          minutes, 1 hours, 12 hours, day of week, day of
          month, day of year)
Identification/Solving
        Flow-based Detection
• Once baselines are built anomalous activity can be
  detected
   – Pure rate-based (pps or bps) anomalies may be
     legitimate or malicious
   – Many misuse attacks can be immediately recognized,
     even without baselines (e.g., TCP SYN or RST floods)
   – Signatures can also be defined to identify “interesting”
     transactional data (e.g., proto udp and port 1434 and 404
     octets (376 payload) == slammer!)
   – Temporal compound signatures can be defined to detect
     with higher precision
Identification/Solving
     Traceback: Flow-based
• Trace attack by matching fingerprint/signature
  at each interface via passive monitoring:
  – Flow data (e.g., NetFlow, cflowd, sFlow, IPFIX)
  – Span Data
  – PSAMP (Packet Sampling, IETF PSAMP WG)
• Number of open source and commercial
  products evolving in market
• Non-intrusive, widely supported
Identification/Solving
Traceback: Flow-based
Detect Anomalous Events: SQL
       “Slammer” Worm*
Flow-based Commercial Tools
Traceback: Commercial Tool
Commercial Traceback:
    More Detail
Traffic Analysis
• Can see traffic based on source and
  destination AS
  – Source and destination AS derived
    through the routing table on the router
  – Introduces the need to run full mesh BGP
    at IXPs as well as transit and peering
  – Source and destination prefix based flows
    can be collected and plotted against
    external prefix to ASN data
Accounting
• Flow based accounting can be a good
  supplement to SNMP based
  accounting.
Questions

More Related Content

What's hot

netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptablesKernel TLV
 
Cisco Live Milan 2015 - BGP advance
Cisco Live Milan 2015 - BGP advanceCisco Live Milan 2015 - BGP advance
Cisco Live Milan 2015 - BGP advanceBertrand Duvivier
 
EBPF and Linux Networking
EBPF and Linux NetworkingEBPF and Linux Networking
EBPF and Linux NetworkingPLUMgrid
 
Troubleshooting BGP
Troubleshooting BGPTroubleshooting BGP
Troubleshooting BGPAPNIC
 
debugging openstack neutron /w openvswitch
debugging openstack neutron /w openvswitchdebugging openstack neutron /w openvswitch
debugging openstack neutron /w openvswitch어형 이
 
MikroTik & RouterOS
MikroTik & RouterOSMikroTik & RouterOS
MikroTik & RouterOSFaelix Ltd
 
OpenvSwitch Deep Dive
OpenvSwitch Deep DiveOpenvSwitch Deep Dive
OpenvSwitch Deep Diverajdeep
 
BGP Flowspec (RFC5575) Case study and Discussion
BGP Flowspec (RFC5575) Case study and DiscussionBGP Flowspec (RFC5575) Case study and Discussion
BGP Flowspec (RFC5575) Case study and DiscussionAPNIC
 
SRv6 Network Programming: deployment use-cases
SRv6 Network Programming: deployment use-cases SRv6 Network Programming: deployment use-cases
SRv6 Network Programming: deployment use-cases APNIC
 
Service Function Chaining with SRv6
Service Function Chaining with SRv6Service Function Chaining with SRv6
Service Function Chaining with SRv6Ahmed AbdelSalam
 
Wireshark course, Ch 03: Capture and display filters
Wireshark course, Ch 03: Capture and display filtersWireshark course, Ch 03: Capture and display filters
Wireshark course, Ch 03: Capture and display filtersYoram Orzach
 
Navigating the YANGscape of network automation
Navigating the YANGscape of network automationNavigating the YANGscape of network automation
Navigating the YANGscape of network automationRoman Dodin
 
Real time analytics with Netty, Storm, Kafka
Real time analytics with Netty, Storm, KafkaReal time analytics with Netty, Storm, Kafka
Real time analytics with Netty, Storm, KafkaTrieu Nguyen
 
Homer metrics | LORENZO MANGANI Y FEDERICO CABIDDU - VoIP2DAY 2017
Homer metrics | LORENZO MANGANI Y FEDERICO CABIDDU - VoIP2DAY 2017Homer metrics | LORENZO MANGANI Y FEDERICO CABIDDU - VoIP2DAY 2017
Homer metrics | LORENZO MANGANI Y FEDERICO CABIDDU - VoIP2DAY 2017VOIP2DAY
 
The linux networking architecture
The linux networking architectureThe linux networking architecture
The linux networking architecturehugo lu
 
Cilium - Network security for microservices
Cilium - Network security for microservicesCilium - Network security for microservices
Cilium - Network security for microservicesThomas Graf
 

What's hot (20)

netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptables
 
Network and server performance monitoring training
Network and server performance monitoring trainingNetwork and server performance monitoring training
Network and server performance monitoring training
 
Cisco Live Milan 2015 - BGP advance
Cisco Live Milan 2015 - BGP advanceCisco Live Milan 2015 - BGP advance
Cisco Live Milan 2015 - BGP advance
 
EBPF and Linux Networking
EBPF and Linux NetworkingEBPF and Linux Networking
EBPF and Linux Networking
 
Troubleshooting BGP
Troubleshooting BGPTroubleshooting BGP
Troubleshooting BGP
 
debugging openstack neutron /w openvswitch
debugging openstack neutron /w openvswitchdebugging openstack neutron /w openvswitch
debugging openstack neutron /w openvswitch
 
MikroTik & RouterOS
MikroTik & RouterOSMikroTik & RouterOS
MikroTik & RouterOS
 
NETCONF YANG tutorial
NETCONF YANG tutorialNETCONF YANG tutorial
NETCONF YANG tutorial
 
Mikrotik Tutorial
Mikrotik TutorialMikrotik Tutorial
Mikrotik Tutorial
 
Quic illustrated
Quic illustratedQuic illustrated
Quic illustrated
 
OpenvSwitch Deep Dive
OpenvSwitch Deep DiveOpenvSwitch Deep Dive
OpenvSwitch Deep Dive
 
BGP Flowspec (RFC5575) Case study and Discussion
BGP Flowspec (RFC5575) Case study and DiscussionBGP Flowspec (RFC5575) Case study and Discussion
BGP Flowspec (RFC5575) Case study and Discussion
 
SRv6 Network Programming: deployment use-cases
SRv6 Network Programming: deployment use-cases SRv6 Network Programming: deployment use-cases
SRv6 Network Programming: deployment use-cases
 
Service Function Chaining with SRv6
Service Function Chaining with SRv6Service Function Chaining with SRv6
Service Function Chaining with SRv6
 
Wireshark course, Ch 03: Capture and display filters
Wireshark course, Ch 03: Capture and display filtersWireshark course, Ch 03: Capture and display filters
Wireshark course, Ch 03: Capture and display filters
 
Navigating the YANGscape of network automation
Navigating the YANGscape of network automationNavigating the YANGscape of network automation
Navigating the YANGscape of network automation
 
Real time analytics with Netty, Storm, Kafka
Real time analytics with Netty, Storm, KafkaReal time analytics with Netty, Storm, Kafka
Real time analytics with Netty, Storm, Kafka
 
Homer metrics | LORENZO MANGANI Y FEDERICO CABIDDU - VoIP2DAY 2017
Homer metrics | LORENZO MANGANI Y FEDERICO CABIDDU - VoIP2DAY 2017Homer metrics | LORENZO MANGANI Y FEDERICO CABIDDU - VoIP2DAY 2017
Homer metrics | LORENZO MANGANI Y FEDERICO CABIDDU - VoIP2DAY 2017
 
The linux networking architecture
The linux networking architectureThe linux networking architecture
The linux networking architecture
 
Cilium - Network security for microservices
Cilium - Network security for microservicesCilium - Network security for microservices
Cilium - Network security for microservices
 

Viewers also liked

How to Configure NetFlow v5 & v9 on Cisco Routers
How to Configure NetFlow v5 & v9 on Cisco RoutersHow to Configure NetFlow v5 & v9 on Cisco Routers
How to Configure NetFlow v5 & v9 on Cisco RoutersSolarWinds
 
Packet Tracer: SNMP, Netflow, Sys-log
Packet Tracer: SNMP, Netflow, Sys-logPacket Tracer: SNMP, Netflow, Sys-log
Packet Tracer: SNMP, Netflow, Sys-logRafat Khandaker
 
Cisco CSIRT Case Study: Forensic Investigations with NetFlow
Cisco CSIRT Case Study: Forensic Investigations with NetFlowCisco CSIRT Case Study: Forensic Investigations with NetFlow
Cisco CSIRT Case Study: Forensic Investigations with NetFlowLancope, Inc.
 
Plugging Network Security Holes Using NetFlow
Plugging Network Security Holes Using NetFlowPlugging Network Security Holes Using NetFlow
Plugging Network Security Holes Using NetFlowNetFlow Analyzer
 
An Evaluators Guide To Net Flow Tracker
An Evaluators Guide To Net Flow TrackerAn Evaluators Guide To Net Flow Tracker
An Evaluators Guide To Net Flow Trackereegger
 
Co se skrývá v datovém provozu? - Pavel Minařík
Co se skrývá v datovém provozu? - Pavel MinaříkCo se skrývá v datovém provozu? - Pavel Minařík
Co se skrývá v datovém provozu? - Pavel MinaříkSecurity Session
 
Network visibility and control using industry standard sFlow telemetry
Network visibility and control using industry standard sFlow telemetryNetwork visibility and control using industry standard sFlow telemetry
Network visibility and control using industry standard sFlow telemetrypphaal
 
NetFlow Monitoring for Cyber Threat Defense
NetFlow Monitoring for Cyber Threat DefenseNetFlow Monitoring for Cyber Threat Defense
NetFlow Monitoring for Cyber Threat DefenseCisco Canada
 
Manageengine Netflow analyzer - An Insight
Manageengine Netflow analyzer - An InsightManageengine Netflow analyzer - An Insight
Manageengine Netflow analyzer - An InsightSai Sundhar Padmanabhan
 
2.2 determining trust relationships
2.2 determining trust relationships2.2 determining trust relationships
2.2 determining trust relationshipsMuuluu
 
Cisco switch selector layer2 or layer3
Cisco switch selector layer2 or layer3Cisco switch selector layer2 or layer3
Cisco switch selector layer2 or layer3IT Tech
 
Network protocols
Network protocolsNetwork protocols
Network protocolsIT Tech
 
How to configure flexible netflow export on cisco routers
How to configure flexible netflow export on cisco routersHow to configure flexible netflow export on cisco routers
How to configure flexible netflow export on cisco routersIT Tech
 
The feature licenses available for main cisco asa 5500 models
The feature licenses available for main cisco asa 5500 modelsThe feature licenses available for main cisco asa 5500 models
The feature licenses available for main cisco asa 5500 modelsIT Tech
 
How to configure Nagios in Fedora ?
How to configure Nagios in Fedora ?How to configure Nagios in Fedora ?
How to configure Nagios in Fedora ?Pankaj Rane
 
BGP Protocol Makes the Internet Work
BGP Protocol Makes the Internet WorkBGP Protocol Makes the Internet Work
BGP Protocol Makes the Internet WorkIT Tech
 
5. mrtg in nagios1 0
5. mrtg in nagios1 05. mrtg in nagios1 0
5. mrtg in nagios1 0aqpjuan
 
Ordering guide for cisco isr g2
Ordering guide for cisco isr g2Ordering guide for cisco isr g2
Ordering guide for cisco isr g2IT Tech
 
Computer repair -_a_complete_illustrated_guide_to_pc_hardware
Computer repair -_a_complete_illustrated_guide_to_pc_hardwareComputer repair -_a_complete_illustrated_guide_to_pc_hardware
Computer repair -_a_complete_illustrated_guide_to_pc_hardwareShripal Oswal
 

Viewers also liked (20)

How to Configure NetFlow v5 & v9 on Cisco Routers
How to Configure NetFlow v5 & v9 on Cisco RoutersHow to Configure NetFlow v5 & v9 on Cisco Routers
How to Configure NetFlow v5 & v9 on Cisco Routers
 
Packet Tracer: SNMP, Netflow, Sys-log
Packet Tracer: SNMP, Netflow, Sys-logPacket Tracer: SNMP, Netflow, Sys-log
Packet Tracer: SNMP, Netflow, Sys-log
 
Cisco CSIRT Case Study: Forensic Investigations with NetFlow
Cisco CSIRT Case Study: Forensic Investigations with NetFlowCisco CSIRT Case Study: Forensic Investigations with NetFlow
Cisco CSIRT Case Study: Forensic Investigations with NetFlow
 
Plugging Network Security Holes Using NetFlow
Plugging Network Security Holes Using NetFlowPlugging Network Security Holes Using NetFlow
Plugging Network Security Holes Using NetFlow
 
An Evaluators Guide To Net Flow Tracker
An Evaluators Guide To Net Flow TrackerAn Evaluators Guide To Net Flow Tracker
An Evaluators Guide To Net Flow Tracker
 
Co se skrývá v datovém provozu? - Pavel Minařík
Co se skrývá v datovém provozu? - Pavel MinaříkCo se skrývá v datovém provozu? - Pavel Minařík
Co se skrývá v datovém provozu? - Pavel Minařík
 
Network visibility and control using industry standard sFlow telemetry
Network visibility and control using industry standard sFlow telemetryNetwork visibility and control using industry standard sFlow telemetry
Network visibility and control using industry standard sFlow telemetry
 
NetFlow Monitoring for Cyber Threat Defense
NetFlow Monitoring for Cyber Threat DefenseNetFlow Monitoring for Cyber Threat Defense
NetFlow Monitoring for Cyber Threat Defense
 
Manageengine Netflow analyzer - An Insight
Manageengine Netflow analyzer - An InsightManageengine Netflow analyzer - An Insight
Manageengine Netflow analyzer - An Insight
 
2.2 determining trust relationships
2.2 determining trust relationships2.2 determining trust relationships
2.2 determining trust relationships
 
Cisco switch selector layer2 or layer3
Cisco switch selector layer2 or layer3Cisco switch selector layer2 or layer3
Cisco switch selector layer2 or layer3
 
Network protocols
Network protocolsNetwork protocols
Network protocols
 
How to configure flexible netflow export on cisco routers
How to configure flexible netflow export on cisco routersHow to configure flexible netflow export on cisco routers
How to configure flexible netflow export on cisco routers
 
Nagios
NagiosNagios
Nagios
 
The feature licenses available for main cisco asa 5500 models
The feature licenses available for main cisco asa 5500 modelsThe feature licenses available for main cisco asa 5500 models
The feature licenses available for main cisco asa 5500 models
 
How to configure Nagios in Fedora ?
How to configure Nagios in Fedora ?How to configure Nagios in Fedora ?
How to configure Nagios in Fedora ?
 
BGP Protocol Makes the Internet Work
BGP Protocol Makes the Internet WorkBGP Protocol Makes the Internet Work
BGP Protocol Makes the Internet Work
 
5. mrtg in nagios1 0
5. mrtg in nagios1 05. mrtg in nagios1 0
5. mrtg in nagios1 0
 
Ordering guide for cisco isr g2
Ordering guide for cisco isr g2Ordering guide for cisco isr g2
Ordering guide for cisco isr g2
 
Computer repair -_a_complete_illustrated_guide_to_pc_hardware
Computer repair -_a_complete_illustrated_guide_to_pc_hardwareComputer repair -_a_complete_illustrated_guide_to_pc_hardware
Computer repair -_a_complete_illustrated_guide_to_pc_hardware
 

Similar to Netflow slides

Hungary Usergroup - Midonet overlay programming
Hungary Usergroup - Midonet overlay programmingHungary Usergroup - Midonet overlay programming
Hungary Usergroup - Midonet overlay programmingMarton Kiss
 
SDN/OpenFlow #lspe
SDN/OpenFlow #lspeSDN/OpenFlow #lspe
SDN/OpenFlow #lspeChris Westin
 
Harmonia open iris_basic_v0.1
Harmonia open iris_basic_v0.1Harmonia open iris_basic_v0.1
Harmonia open iris_basic_v0.1Yongyoon Shin
 
Lab 4 marking
Lab 4 markingLab 4 marking
Lab 4 markingVNG
 
Krzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SP
Krzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SPKrzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SP
Krzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SPPROIDEA
 
Socket programming using java
Socket programming using javaSocket programming using java
Socket programming using javaUC San Diego
 
Design and Performance Characteristics of Tap-as-a-Service
Design and Performance Characteristics of Tap-as-a-ServiceDesign and Performance Characteristics of Tap-as-a-Service
Design and Performance Characteristics of Tap-as-a-Servicesoichi shigeta
 
(NET404) Making Every Packet Count
(NET404) Making Every Packet Count(NET404) Making Every Packet Count
(NET404) Making Every Packet CountAmazon Web Services
 
AWS re:Invent 2016: Making Every Packet Count (NET404)
AWS re:Invent 2016: Making Every Packet Count (NET404)AWS re:Invent 2016: Making Every Packet Count (NET404)
AWS re:Invent 2016: Making Every Packet Count (NET404)Amazon Web Services
 
Innovation is back in the transport and network layers
Innovation is back in the transport and network layersInnovation is back in the transport and network layers
Innovation is back in the transport and network layersOlivier Bonaventure
 
25.3.10 packet tracer explore a net flow implementation
25.3.10 packet tracer   explore a net flow implementation25.3.10 packet tracer   explore a net flow implementation
25.3.10 packet tracer explore a net flow implementationFreddy Buenaño
 
Networking in Docker Containers
Networking in Docker ContainersNetworking in Docker Containers
Networking in Docker ContainersAttila Kanto
 
OpenFlow tutorial
OpenFlow tutorialOpenFlow tutorial
OpenFlow tutorialopenflow
 

Similar to Netflow slides (20)

Hungary Usergroup - Midonet overlay programming
Hungary Usergroup - Midonet overlay programmingHungary Usergroup - Midonet overlay programming
Hungary Usergroup - Midonet overlay programming
 
SDN/OpenFlow #lspe
SDN/OpenFlow #lspeSDN/OpenFlow #lspe
SDN/OpenFlow #lspe
 
Harmonia open iris_basic_v0.1
Harmonia open iris_basic_v0.1Harmonia open iris_basic_v0.1
Harmonia open iris_basic_v0.1
 
Tcp ip
Tcp ipTcp ip
Tcp ip
 
Lab 4 marking
Lab 4 markingLab 4 marking
Lab 4 marking
 
Multipath TCP
Multipath TCPMultipath TCP
Multipath TCP
 
Krzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SP
Krzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SPKrzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SP
Krzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SP
 
Socket programming using java
Socket programming using javaSocket programming using java
Socket programming using java
 
Design and Performance Characteristics of Tap-as-a-Service
Design and Performance Characteristics of Tap-as-a-ServiceDesign and Performance Characteristics of Tap-as-a-Service
Design and Performance Characteristics of Tap-as-a-Service
 
(NET404) Making Every Packet Count
(NET404) Making Every Packet Count(NET404) Making Every Packet Count
(NET404) Making Every Packet Count
 
Future Internet protocols
Future Internet protocolsFuture Internet protocols
Future Internet protocols
 
AWS re:Invent 2016: Making Every Packet Count (NET404)
AWS re:Invent 2016: Making Every Packet Count (NET404)AWS re:Invent 2016: Making Every Packet Count (NET404)
AWS re:Invent 2016: Making Every Packet Count (NET404)
 
Innovation is back in the transport and network layers
Innovation is back in the transport and network layersInnovation is back in the transport and network layers
Innovation is back in the transport and network layers
 
25.3.10 packet tracer explore a net flow implementation
25.3.10 packet tracer   explore a net flow implementation25.3.10 packet tracer   explore a net flow implementation
25.3.10 packet tracer explore a net flow implementation
 
Socket programming
Socket programmingSocket programming
Socket programming
 
Clase 4. Routing IP.pdf
Clase 4. Routing IP.pdfClase 4. Routing IP.pdf
Clase 4. Routing IP.pdf
 
Icnd210 s08l02
Icnd210 s08l02Icnd210 s08l02
Icnd210 s08l02
 
Networking in Docker Containers
Networking in Docker ContainersNetworking in Docker Containers
Networking in Docker Containers
 
OpenFlow tutorial
OpenFlow tutorialOpenFlow tutorial
OpenFlow tutorial
 
OpenStack Ops Meetup
OpenStack Ops MeetupOpenStack Ops Meetup
OpenStack Ops Meetup
 

Netflow slides

  • 1. NetFlow José Manuel Vega Monroy Malaga, Spain December, 2012
  • 2. Agenda • NetFlow – What it is, and how it works – Working with Flows • Flow Exporting Protocols Implementations – Cisco NetFlow – IPFIX • Flows and their applications – Uses for Flow
  • 3. Network Flows • “Packets or frames that have some common properties” (Typically: IP src/dst, Port src/dst, L4 Protocol, ToS, VLANid) • Creation and expiration policy – what conditions start and stop a flow. • By the way, it contains: – Peers – flow source and destination – Counters – packets, bytes, time – Routing information – AS, network mask, interfaces
  • 4. Network Flows ● Unidirectional or bidirectional • Bidirectional flows can contain other information such as round trip time (RTT), TCP behavior. • Application flows look past the headers to classify packets by their contents • Aggregated flows – flows of flows
  • 5. Unidirectional Flow with Source/Destination IP Key (L2) % telnet 10.0.0.2 Port #23 Ethernet frame login: 00-B0-D0-86-BB-F7 00-14-22-01-23-45 Ethernet frame Active Flows Flow Source MAC Destination MAC 1 00-B0-D0-86-BB-F7 00-14-22-01-23-45 2 00-14-22-01-23-45 00-B0-D0-86-BB-F7
  • 6. Unidirectional Flow with Source/Destination IP Key (L3) % telnet 10.0.0.2 Port #23 IP packet login: 10.0.0.1 IP packet 10.0.0.2 Active Flows Flow Source IP Destination IP 1 10.0.0.1 10.0.0.2 2 10.0.0.2 10.0.0.1
  • 7. Unidirectional Flow with Source/Destination IP Key (L3) % telnet 10.0.0.2 Port #23 % ping 10.0.0.2 ICMP request login: 10.0.0.1 ICMP echo reply 10.0.0.2 ICMP reply Active Flows Flow Source IP Destination IP 1 10.0.0.1 10.0.0.2 2 10.0.0.2 10.0.0.1
  • 8. Bidirectional Flow with IP, Port, Protocol Key (L4) % telnet 10.0.0.2 Port #32000 Port #23 % ping 10.0.0.2 ICMP request login: 10.0.0.1 ICMP echo reply 10.0.0.2 ICMP reply Active Flows Flow Source IP Destination IP Prot srcPort dstPort 1 10.0.0.1 10.0.0.2 TCP 32000 23 2 10.0.0.1 10.0.0.2 ICMP 0 0
  • 9. Unidirectional Flow with IP, Port,Protocol Key (L4) Port #32000 % telnet 10.0.0.2 Port #23 % ping 10.0.0.2 ICMP request 10.0.0.1 login: 10.0.0.2 ICMP echo reply ICMP reply Active Flows Flow Source IP Destination IP Prot srcPort dstPort 1 10.0.0.1 10.0.0.2 TCP 32000 23 2 10.0.0.2 10.0.0.1 TCP 23 32000 3 10.0.0.1 10.0.0.2 ICMP 0 0 4 10.0.0.2 10.0.0.1 ICMP 0 0
  • 10. Application Flow (L7) % firefox http://10.0.0.2:9090 Web server Port #9090 HTTP request 10.0.0.1 Content-Type: 10.0.0.2 HTTP response Active Flows Flow Source IP Destination IP Application 1 10.0.0.1 10.0.0.2 HTTP
  • 11. Aggregated Flow Main Active flow table Flow Source IP Destination IP prot srcPort dstPort 1 10.0.0.1 10.0.0.2 TCP 32000 23 2 10.0.0.2 10.0.0.1 TCP 23 32000 3 10.0.0.1 10.0.0.2 ICMP 0 0 4 10.0.0.2 10.0.0.1 ICMP 0 0 Source/Destination IP Aggregate Flow Source IP Destination IP 1 10.0.0.1 10.0.0.2 2 10.0.0.2 10.0.0.1
  • 13. NetFlow Architecture • Observation point – For example, an interface of a router – Associated with an Observation Domain • Observation domain – Set of observation points in a domain • NetFlow Exporter – Device with the NetFlow services enabled – Exports flows in the form of Flow Records • NetFlow Collector – Receives Flow Records from one or more exporters, parsing and storing the real information
  • 14. NetFlow Architecture • Export Packet/Message – Packet/Message with a Packet/Message Header followed by one or more FlowSets , sent from the NetFlow Exporter to the NetFlow Collector • Observation domain – Set of observation points in a domain • NetFlow Exporter – Device with the NetFlow services enabled – Exports flows in the form of Flow Records • NetFlow Collector – Receives Flow Records from one or more exporters, parsing and storing the information
  • 16. NetFlow Export Packet Format • Common header among export versions • All except v1 have a sequence number • Version specific data field where N records of data type are exported • N is determined by the size of the flow definition. Packet size is kept under ~1480 bytes. No fragmentation on Ethernet.
  • 17. Working with Flows • Generating Process – Key Fields – Non-Key Fields • Exporting Process – Types of flows – Sampling rates • Collecting Process – Tools to Collect Flows (“Flow-tools”) • Analyzing Process – More tools available, can write your own (nProbe)
  • 18. Working with Flows Generating Process • A Key with more elements will generate more flows. • Greater number of flows leads to more post processing time to generate reports, more memory and CPU requirements for device generating flows. • Depends on application. Traffic engineering vs. intrusion detection.
  • 19. Working with Flows Generating Process • Accounting information accumulated with flows: Packets, Bytes, Start Timestamp, End Timestamp. • Network routing information – masks and autonomous system (AS) number.
  • 20. Working with Flows Generating Process • Passive monitor (transparent bridge) – A passive monitor (usually a unix host) receives all data, and generates flows. – Resource intensive, newer investments needed. • Router or other existing network device – Router or other existing devices like switch, generate flows. – Sampling is possible.
  • 21. Working with Flows Generating Process Workstation A Workstation B Flow probe connected to switch port in Internet “ traffic mirror” mode
  • 22. Passive Monitor • Directly connected to a LAN segment via a switch port in “mirror” mode, optical splitter, or repeated segment • Generate flows for all local LAN traffic • Must have an interface or monitor deployed on each LAN segment • More difficult to deploy, in general • Support for more detailed flows – bidirectional and application
  • 23. Working with Flows Generating Process LAN LAN LAN LAN Internet Flow collector stores exported flows from router.
  • 24. Router Collection • Router will generate flows for traffic that is directed to the router • In general, flows are not generated for local LAN traffic • Limited to “simple” flow criteria (packet headers) • Generally easier to deploy – no new equipment
  • 28. Working with Flows Exporting Process • Conditions to export: – Inactive flows (no more packets received) – Long flows (flow lifetime) – Flow ends (for example, RST or FIN in TCP communication) – Internal contrains (for example, full cache or low memory)
  • 29. Working with Flows Collecting Process • Decoding using templates – If the Template Records have not still been received, the corresponding Flow Data Records should store till to receive that template – Template Records life time is limited
  • 30. Flows Exporting Protocol implementations:
  • 31. Cisco NetFlow IPFIX
  • 32. Cisco NetFlow • Most popular • In the beginning, unidirectional flows • IPv4 unicast and multicast • Aggregated and unaggregated flows • Flows exported via UDP Datagram • Supported on IOS and CatOS platforms • Catalyst NetFlow is different implementation
  • 33. Cisco NetFlow Versions • 4 Unaggregated types (1,5,6,7) • 14 Aggregated types (8.x, 9) • The version defines what type of data is in the flow • Each version has its own packet format: Export packet • Version 1 does not have sequence numbers – no way to detect lost flows • Some versions specific to Catalyst platform
  • 34. NetFlow v1 • Key Fields: Src/Dst IP, Src/Dst Port, IP Protocol, ToS, Input interface • Accounting (Non-Key Fields): Packets, Bytes, Start/End timestamp, Output interface • Other: Bitwise OR of TCP flags.
  • 35. NetFlow v5 • Key Fields: Src/Dst IP, Src/Dst Port, IP Protocol, ToS, Input interface • Accounting (Non-Key Fields): Packets, Bytes, Start/End timestamp, Output interface • Other: Bitwise OR of TCP flags, Source/Destination AS and IP Mask • Packet format adds sequence numbers for detecting lost exports
  • 36. NetFlow v5 ● Packet format adds sequence numbers for detecting lost exports: Flow Sequence ● Only support for Ipv4 and unidirectional flows • Not support for MPLS/VLAN
  • 37. NetFlow v5 Export Packet Example IP/UDP packet NetFlow v5 header v5 record … … v5 record
  • 38. NetFlow v5 Export Packet (Header) struct ftpdu_v5 { /* 24 byte header */ u_int16 version; /* 5 */ u_int16 count; /* The number of records in the PDU */ u_int32 sysUpTime; /* Current time in millisecs since router booted */ u_int32 unix_secs; /* Current seconds since 0000 UTC 1970 */ u_int32 unix_nsecs; /* Residual nanoseconds since 0000 UTC 1970 */ u_int32 flow_sequence; /* Seq counter of total flows seen */ u_int8 engine_type; /* Type of flow switching engine (RP,VIP,etc.) */ u_int8 engine_id; /* Slot number of the flow switching engine */ u_int16 reserved;
  • 39. NetFlow v5 Export Packet (Records) /* 48 byte payload */ struct ftrec_v5 { u_int32 srcaddr; /* Source IP Address */ u_int32 dstaddr; /* Destination IP Address */ u_int32 nexthop; /* Next hop router's IP Address */ u_int16 input; /* Input interface index */ u_int16 output; /* Output interface index */ u_int32 dPkts; /* Packets sent in Duration */ u_int32 dOctets; /* Octets sent in Duration. */ u_int32 First; /* SysUptime at start of flow */ u_int32 Last; /* and of last packet of flow */ u_int16 srcport; /* TCP/UDP source port number or equivalent */ u_int16 dstport; /* TCP/UDP destination port number or equiv */ u_int8 pad; u_int8 tcp_flags; /* Cumulative OR of tcp flags */ u_int8 prot; /* IP protocol, e.g., 6=TCP, 17=UDP, ... */ u_int8 tos; /* IP Type-of-Service */ u_int16 src_as; /* originating AS of source address */ u_int16 dst_as; /* originating AS of destination address */ u_int8 src_mask; /* source address prefix mask bits */ u_int8 dst_mask; /* destination address prefix mask bits */ u_int16 drops; } records[FT_PDU_V5_MAXFLOWS]; };
  • 40. NetFlow v8 • Aggregated v5 flows • Not all flow types available on all equipments • Much less data to post process, but loses fine granularity of v5 – no IP addresses
  • 41. NetFlow v8 Export Packet Example (AS Aggregation) IP/UDP packet NetFlow v8 header v8 record … … v8 record
  • 42. NetFlow v8 AS agg. Export Packet struct ftpdu_v8_1 { /* 28 byte header */ u_int16 version; /* 8 */ u_int16 count; /* The number of records in the PDU */ u_int32 sysUpTime; /* Current time in millisecs since router booted */ u_int32 unix_secs; /* Current seconds since 0000 UTC 1970 */ u_int32 unix_nsecs; /* Residual nanoseconds since 0000 UTC 1970 */ u_int32 flow_sequence; /* Seq counter of total flows seen */ u_int8 engine_type; /* Type of flow switching engine (RP,VIP,etc.) */ u_int8 engine_id; /* Slot number of the flow switching engine */ u_int8 aggregation; /* Aggregation method being used */ u_int8 agg_version; /* Version of the aggregation export */ u_int32 reserved; /* 28 byte payload */ struct ftrec_v8_1 { u_int32 dFlows; /* Number of flows */ u_int32 dPkts; /* Packets sent in duration */ u_int32 dOctets; /* Octets sent in duration */ u_int32 First; /* SysUpTime at start of flow */ u_int32 Last; /* and of last packet of flow */ u_int16 src_as; /* originating AS of source address */ u_int16 dst_as; /* originating AS of destination address */ u_int16 input; /* input interface index */ u_int16 output; /* output interface index */ } records[FT_PDU_V8_1_MAXFLOWS]; };
  • 43. NetFlow v9 • Flow format defined by user: Templates – Template descriptions are communicated from the router to the collector as well • Flow records are sent from the router to the NetFlow Collector, with minimal template information, so that the NetFlow Collector can relate the records to the appropriate template • Version 9 is independent of the underlying transport (UDP, TCP, SCTP, and so on)
  • 45. NetFlow v9 • Support for Ipv6 and bidirectional flows • Support for MPLS/VLAN
  • 46. NetFlow v9 Information Model • FlowSet – Collection of Flow Records with similar structure – Identified by FlowS et Id (0-65535) – Flow Set Id, with value 0, for Template FlowS et – Flow Set Id, with value 1, for Options Template FlowS et – Flow Set Id, with values greater than 255, for Data FlowS et
  • 47. NetFlow v9 Information Model • Template FlowSet – One or more Template Records • Options Template FlowSet – One or more Options Template Records • Data FlowSet – One or more Flow Data Records or Options Data Records
  • 48. NetFlow v9 Information Model • Template Record – Defines the fields -type, length- in a Flow Data Record • Flow Data Record – Record which contains real information values • Options Template Record – Defines te fields -type, length, scope- in a Options Data Record • Options Data Record – Record which contains configuration supply information -or for any another specific process- values and scope
  • 51. IPFIX • ITEF Standard, using Cisco NetFlow v9 as base • Flow format defined by user: Templates • No directly interoperable with NetFlow v9: – FlowSet renamed to Set – Count is now Length – Sysuptime is removed, and exporttime is included
  • 52. IPFIX • Based on biflows: – Data reduction (bandwidth-saving) – Separation of “answered” traffic from “unanswered” – Full reconstruction of TCP sessions
  • 53. IPFIX Information Model • Set – Identified by S et Id (0-65535) – Set Id, with values 0 and 1, not in us e – Set Id, with value 2, for Te mplate S e t – Set Id, with value 3, for Options Template S et – Set Id, with values between 4 and 255, res erved – Set Id, with values greater than 255, for Data S ets
  • 57. Flows and their Applications:
  • 58. Uses for Flow • Identification/Solving – Traffic classification – Flow-based Detection – DoS Traceback • Traffic Analysis – Inter-AS traffic analysis – Reporting on application proxies • Accounting – Cross verification from other sources – Can cross-check with SNMP data
  • 59. Identification/Solving Traffic Classification • Using DPI, based on: Protocol, source and destination ports – Protocol identification (TCP, UDP, ICMP) – Can define well known ports – Can identify well known P2P ports – Most common use • Proxy measurement - http , ftp • Rate limiting P2P traffic
  • 60. Identification/Solving Flow-based Detection • Monitor flows (i.e., Network and Transport Layer transactions) on the network and build baselines for what normal behavior looks like: – Per interface – Per prefix – Per Transport Layer protocol & ports – Build time-based buckets (e.g., 5 minutes, 30 minutes, 1 hours, 12 hours, day of week, day of month, day of year)
  • 61. Identification/Solving Flow-based Detection • Once baselines are built anomalous activity can be detected – Pure rate-based (pps or bps) anomalies may be legitimate or malicious – Many misuse attacks can be immediately recognized, even without baselines (e.g., TCP SYN or RST floods) – Signatures can also be defined to identify “interesting” transactional data (e.g., proto udp and port 1434 and 404 octets (376 payload) == slammer!) – Temporal compound signatures can be defined to detect with higher precision
  • 62. Identification/Solving Traceback: Flow-based • Trace attack by matching fingerprint/signature at each interface via passive monitoring: – Flow data (e.g., NetFlow, cflowd, sFlow, IPFIX) – Span Data – PSAMP (Packet Sampling, IETF PSAMP WG) • Number of open source and commercial products evolving in market • Non-intrusive, widely supported
  • 64. Detect Anomalous Events: SQL “Slammer” Worm*
  • 67. Commercial Traceback: More Detail
  • 68. Traffic Analysis • Can see traffic based on source and destination AS – Source and destination AS derived through the routing table on the router – Introduces the need to run full mesh BGP at IXPs as well as transit and peering – Source and destination prefix based flows can be collected and plotted against external prefix to ASN data
  • 69. Accounting • Flow based accounting can be a good supplement to SNMP based accounting.