FlowMon - IPFIX Export Plugin

logo-ics.png

Introduction

This site is a homepage of FlowMon IPFIX Export Plugin.

The FlowMon IPFIX Export Plugin allows to export flow records in IPFIX format using UDP, TCP or SCTP protocol. It is based on IPFIX protocol specification (RFC 5101) and it supports user-defined enterprise and variable length elements. The plugin ensures that each flow record is assigned to the matching IPFIX template, so that all available elements are exported to the collector. Moreover, new templates are created on demand.

The plugin is tested with FlowMon 3.x.x and provides an alternative to built in IPFIX plugin.
The plugin allows to map getters defined in input and process plugins to any IPFIX elements. IPFIX templates are generated for each combination of getters, that is used by exported flows, so there is no need to define them in advance.

Author

Petr Velan - velan@mail.muni.cz

Downloads

Version 1.2.0, release date: October 9, 2012 flowmon-export-ipfix-1.2.0.tar.gz

Version 1.2.1, release date: December 5, 2012 flowmon-export-ipfix-1.2.1.tar.gz

Version 1.3.2, release date: May 16, 2014 flowmon-export-ipfix-1.3.2.tar.gz

Doxygen documentation

Doxygen generated code documentation is available here.

Documentation

Requirements

The plugin was tested on CentOS 5, Scientific Linux 6 and OpenSuse 12.1

Compilation requires FlowMon development headers to be installed. The configure script checks for the header files and required utilities.

Install

To compile and install the plugin, follow these steps:

$ tar -xpzf flowmon-export-ipfix-*.tar.gz
$ cd flowmon-export-ipfix-*
$ ./configure
$ make && make install

Alternatively, on RPM-based systems it is possible to build RPM package and install it using package manager. Use following command to build the RPM package:

$ make rpm

The resulting rpm and srpm packages are located in RPMBUILD/RPMS and RPMBUIL/SRPMS directories

Usage

The plugin must be loaded to flowmonexp using -X option. Running flowmonexp with -l option shows help for all available plugins. The IPFIX export plugin is called ipfixx.

$ flowmonexp -X /path/to/flowmon-export-ipfix.so -l
$ flowmonexp -I pcap:device=eth0 -X /path/to/flowmon-export-ipfix.so -E ipfixx:host=localhost

Using the above mentioned settings the exporter will read traffic from eth0 interface and send resulting flows to localhost on default port. The flowmon-export-ipfix.so

Configuration

The main configuration file is called ipfix-template-file.txt and is located in /etc/flowmon/ directory. This is a cut down example of currently used configuration file:

# The configuration file has following format:
# GETTER_NAME		Enterprise ID	Element ID	Element length (bytes)

#STARTUP_TIME_MSEC	0		160		8
BYTES 			0		1		8
PACKETS			0		2		8
FLOW_START_MSEC 	0		152		8
FLOW_END_MSEC		0		153		8
INPUT_INTERFACE		0		10		2
OUTPUT_INTERFACE	0		14		2
L2_VLAN_0		0		58		2 # vlanId ingress
L2_VLAN_1		0		59		2 # postVlanId
L2_SRC_MAC		0		56		6
L2_DST_MAC		0		80		6
L3_PROTO		0		60		1
L3_IPV4_ADDR_SRC	0		8		4
L3_IPV4_ADDR_DST	0		12		4
L3_IPV4_TOS		0		5		1
L3_IPV6_ADDR_SRC	0		27		16
L3_IPV6_ADDR_DST	0		28		16
L4_PROTO		0		4		1
L4_TCP_FLAGS		0		6		1
L4_PORT_SRC		0		7		2
L4_PORT_DST		0		11		2
L4_ICMP_TYPE_CODE	0		32		2 # IPv4, getter for IPv6 is probably the same
L2_MPLS_0		0		70		3
L2_MPLS_1		0		70		3
# Following elements are IPFIX Enterprise Elements, 16982 is Private Enterprise Number of Masaryk University
SRC_GEO			16982		1		2
DST_GEO			16982		2		2
HTTP_USERAGENT		16982		10		8
HTTP_METHOD		16982		11		8
HTTP_DOMAIN		16982		12		8
STATUS_CODE		16982		13		1

It is possible to export the getters as any IPFIX elements. If the specified getter is missing, the getter is not used and vice versa.

Notes

The plugin creates flow packets with limited size to prevent fragmentation. If you are on Ethernet and using jumbo frames, you can alter this value in source header file. For further information please look at doxygen documentation.

BSD License

Copyright (C) 2012 Masaryk University, Institute of Computer Science
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in
   the documentation and/or other materials provided with the
   distribution.
3. Neither the name of the Masaryk University nor the names of its
   contributors may be used to endorse or promote products derived
   from this software without specific prior written permission.

This software is provided ``as is'', and any express or implied
warranties, including, but not limited to, the implied warranties of
merchantability and fitness for a particular purpose are disclaimed.
In no event shall the company or contributors be liable for any
direct, indirect, incidental, special, exemplary, or consequential
damages (including, but not limited to, procurement of substitute
goods or services; loss of use, data, or profits; or business
interruption) however caused and on any theory of liability, whether
in contract, strict liability, or tort (including negligence or
otherwise) arising in any way out of the use of this software, even
if advised of the possibility of such damage.

© 2012 Masaryk University - Institute of Computer Science - visit http://www.muni.cz/ics/