flow-xlate

Name

flow-xlate -- Apply translations to selected fields of a flow.

Synopsis

flow-xlate [-fhl] [-0 AS0_substitution] [-b big|little] [-C comment] [-d debug_level] [-m privacy_mask] [-s scale] [-t src_tag_mask] [-T dst_tag_mask] [-V pdu_version] [-z z_level]

DESCRIPTION

The flow-xlate utility can translate between the non aggregated flow export versions (1,5,6,7) and modify some fields of a flow.

OPTIONS

-0 AS0_substitution

Cisco's NetFlow exports represent the local autonomous system as 0 instead of the real value. This option can be used to replace the 0 in the export with the a configured value. Unfortunately under certain configurations AS 0 can also represent a cache miss or non forwarded traffic so use with caution.

-b big|little

Byte order of output.

-C Comment

Add a comment.

-d debug_level

Enable debugging.

-f

Convert the source and destination IP addresses to network addresses using the mask bits in the flow. For example 128.146.1.7/16 would become 128.146/16

-h

Display help.

-l

Convert the source and destination IP addresses to legacy classful network addresses. For example 128.146.1.7 would become 128.146.0.0.

-m privacy_mask

Apply privacy_mask to the source and destination IP address of flows. For example a privacy_mask of 255.255.255.0 would convert flows with source/destination IP addresses 10.1.1.1 and 10.2.2.2 to 10.1.1.0 and 10.2.2.0 respectively.

-n version

Generate version type exports. Supported versions are:

    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

-s scale

Scale the flows and octets and packets fields by scale.

-t src_tag_mask

AND src_tag_mask with src_tag in flow.

-T dst_tag_mask

AND dst_tag_mask with dst_tag in flow.

-z z_level

Configure compression level to z_level. 0 is disabled (no compression), 9 is highest compression.

EXAMPLES

Convert the version 7 flows in flows.v7 to version 5, storing the result in flows.v5.

flow-xlate -V5 < flows.v7 > flows.v5

EXAMPLES

Summarize IP addresses to IP network numbers and generate a source prefix list report sorted by octets.

flow-xlate -f < flows | flow-stat -f9 -w -S2

BUGS

The scale option can overflow the 32 bit flow counters. This could be solved by detecting this condition and splitting the flow in two.

Translation between aggregated and non aggregated formats is not supported.

AUTHOR

Mark Fullmer

SEE ALSO

flow-tools(1)