Enhanced Flow Ingest with IPFIX IE 315 Support
Kentik is excited to announce an enhancement to our telemetry ingest capabilities with the support for IPFIX Information Element (IE) 315. Let’s dive into how this Information Element is used and why users should care about it.
Understanding the Flow Collection and Export Process
The flow collection process of network devices consist of three stages:
- sampling of the packets: selective capturing of the network packets to reduce data volume
- aggregation and caching: flow metadata and counters stored in device’s flow cache table
- export of the expired flows: sending flow data to a flow collector
During packet sampling, the information from the packet headers and device’s interfaces are extracted to form a unique identifier (key) for each flow in the flow cache table. New packets that match an existing flow key will increment flow’s byte and packet counters, while unmatched packets will trigger a creation of the new flow record.
Flows are exported to the collector based on two conditions:
- the inactive-timeout period: no new packets have been detected for a flow, which means that the flow is inactive.
- the active-timeout period: current state of flow counters is exported even though the flow is still active.
The Evolution of Flow Collection in Modern Networks
At the time when the flow collection technology was developed, traffic volumes were significantly lower and network devices could “afford” to capture and export data of all traffic flows. However, with today's networks where hundreds of devices are handling traffic at gigabits or terabits per second throughputs, complete flow capture has become impractical. To effectively manage these traffic volumes, the sampling has become a reality in most use cases with typical sampling rates ranging from one in a few hundred to one in several thousand packets.
For near real-time traffic analysis, users would generally set inactive-timeout at 15 seconds and active-timeout at 60 seconds. For DDoS detection use cases, these counters can be configured even with lower values. Given the high sampling rates and rapid flow expiration, the effectiveness of traditional flow caching on network devices is now questionable.
According to the research performed by Juniper Networks, with the flow sampling in the range of 1:1000s and active-timeout of 60 seconds, it is expected that around 90% of the exported flows will have only 1 packet matched. In such environments, the flow caching process on network devices does not bring much benefits. An alternative approach of directly exporting packet headers to a collector seems more effective and this is where IPFIX IE 315 comes into play.
Introducing IPFIX IE 315
IPFIX IE 315, known as dataLinkFrameSection, carries a sample of the network packet headers, starting from the L2 protocol header up to a maximum sample length determined by the network device capabilities. This capability varies by vendor and device models, but typically supports sampling of 64 to 160 bytes.
The typical IPFIX flow data record includes: ingress and egress interface index, flow direction, and the length and data of the sampled frame.
Vendor support
Juniper Networks
Juniper Networks offers support for IPFIX IE 315 through its IMON (Inline Monitoring) feature. It is supported on MPC10E and MPC11E linecards for MX-series devices, MX304, linecards LC480 and LC9600 for MX10K and certain line cards for PTX10K. The feature is implemented in hardware, so there is a minimal delay and no restrictions in the volume of exported data. It supports export of 64 to 126 bytes of packet’s header. More information about the implementation, configuration and support on devices can be found in Juniper’s technical documentation.
The flow data record includes the following IPFIX IEs:
IE Name | ID | Length (bytes) | Description |
---|---|---|---|
ingressInterface | 10 | 4 | SNMP index of the packet’s ingress interface |
egressInterface | 14 | 4 | SNMP index of the packet’s egress interface |
flowDirection | 61 | 1 | Direction of the packet sampling (0 - Ingress, 1 - Egress) |
dataLinkFrameSize | 312 | 2 | Length of the sampled data link (L2) frame |
dataLinkFrameSection | 315 | variable | Carries N octets from the selected data link frame |
Cisco
Cisco supports IPFIX IE 315 on its NCS 5000 and ASR 9000 devices. It uses slightly different flow records with IPFIX IE 410 (sectionExportedOctets) to store the length of the sampled frame section and does not include flow direction field. The size of exported frame is up to and including L4 header, to the maximum of 160 bytes that can be exported.
The flow data record includes the following IPFIX IEs:
IE Name | ID | Length (bytes) | Description |
---|---|---|---|
ingressInterface | 10 | 4 | SNMP index of the packet’s ingress interface |
egressInterface | 14 | 4 | SNMP index of the packet’s egress interface |
sectionExportedOctets | 410 | 2 | The observed length of the packet section |
dataLinkFrameSection | 315 | variable | Carries N octets from the selected data link frame |
Benefits of using IPFIX IE 315
The approach of IPFIX IE 315 shifts the packet decoding and metadata extraction work from a network device to a flow collector. This reduces the processing requirements on network devices and eliminates the need for maintaining a flow cache table, leading to lower CPU and memory usage and potentially simpler hardware designs. Moreover, the immediate export of packet samples enhances the detection time of DDoS attacks.
Support in Kentik
Kentik Flow ingest on the SaaS supports use of the IPFIX IE 315, with the Kentik’s default Device Type “NetFlow-enabled device”. The feature is also available on Kentik kproxy version 7.43.0 and it supports both Juniper and Cisco implementations.