FlowMon Probe Handbook

The Liberouter Project Team

Version 1.3.0, revision 1.00, 03 Dec 2007

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. The license can be found at GNU web page.


Table of Contents

1. Introduction
FlowMon Probe
HW Parameters of FlowMon Probe
SW Parameters of FlowMon Probe
Typical Applications of FlowMon Probe
Obtaining FlowMon Package
Package Structure
Two Ways How to Use FlowMon Probe
2. Installing FlowMon Probe
System Requirements
Software Requirements
Hardware Requirements
Supported Cards
Supported Firmware
Supported Software
Installing COMBO6(X) Card
Inserting FlowMon Probe to the Network
FlowMon Probe at a Mirror Port
FlowMon Probe Connected via Network Tap
FlowMon Probe Inserted in a Line
FlowMon Probe Port Numbers
Building Package
Installing Package
Upgrading Package
liberouterpkg Tool
List of Installed Packages
Uninstalling Package
Switching Packages
3. Configuration of the FlowMon Probe
flowmon.conf(5) - FlowMon Probe Configuration File
Probe Parameters
Exporter Parameters
COMBO6(X) Parameters
flowmond(1) Parameters
XML Configuration Scheme
4. FlowMon Probe - Local Using
Starting Scripts
Loading Kernel Modules
Setting Up FlowMon Probe
Logging Probe Information
Examples of Using Scripts
FlowMon Probe Startup Script
Running Startup Script at the Boot Time
Stopping FlowMon Service
Status of the FlowMon Service
Flow Export
Repeater
Phyter Configuration
5. Using FlowMon Probe - Remote Configuration
How to Get It Work
Preparing Server
Preparing Manager PC
Web Frontend
Supported Web Browsers
FlowMon Probe and Web Frontend on the same Computer
Configuration Process Overview
User Interface Structure
Modules
Frontend Configuration
Frequently Used Configuration Issues
Remote Command Line Interface
User Interface Commands
Error Messages
6. Using FlowMon Probe with Collector
flowmoncol(1) Collector
NfSen Collector
7. Known HW and SW Limitations, Problems
8. FAQ
How Can I Find Out Version of FlowMon Probe Software Installed on My Computer?
"Device doesn't exist" error message
9. Contacting the FlowMon Team
Mailing Lists
Submitting Problem Reports
How to Report a Bug
Other COMBO6(X) Based Projects
10. FlowMon Developers Team
A. References
Bibliography

List of Figures

1.1. FlowMon Probe Monitoring Principle
1.2. NetFlow Principle
2.1. COMBO6X Card
2.2. FlowMon Probe Inserted at Mirror Port
2.3. FlowMon Probe Connected via Optical Splitter
2.4. FlowMon Probe Inserted in Line as a Repeater and Sending Data to Collector
2.5. FlowMon Probe COMBO-4SFPRO Card Port Numbers
2.6. FlowMon Probe COMBO-2XFP2 Card Port Numbers
2.7. Scheme of Installation Types
4.1. Scheme of the Repeater Connection
5.1. Scheme of the NETCONF Remote Configuration System
5.2. Frontend Deployment
5.3. Configuration Process Overview
5.4. Frontend GUI Structure
5.5. Using Quick Connect
5.6. Creating New Connection Profile
5.7. Connection Using Stored Connection Profile
5.8. FlowMon Status Report Summary
5.9. FlowMon Status Report Configuration
5.10. FlowMon Status Report Netconf
5.11. Configuring Probe Timeouts
5.12. Configuring Probe Sampling
5.13. Configuring Collectors
5.14. Frontend Version Information
6.1. NfSen Collector

List of Tables

2.1. COMBO6X Motherboard Compatibility
2.2. Tested GBICs
2.3. Supported Hardware
2.4. Supported Firmware

List of Examples

4.1. Basic Exporting of NetFlow Records to the Collector
4.2. Exporting Anonymized NetFlow Records
4.3. Testing Collector - Exporter Functionality by flowmoncol(1) Tool
5.1. Namespace Selection
5.2. Attribute Match Expression
5.3. Containment Nodes
5.4. Content Match Node Selecting All Sibling Nodes
5.5. Merging
5.6. Replacing
5.7. Creating
5.8. Deleting
5.9. Modifying Empty Datastore

Chapter 1. Introduction

This handbook describes FlowMon Probe itself, its installation, configuration and different ways how to use it.

You can check latest news about FlowMon Probe at our web sites: http://www.liberouter.org/ and http://www.flowmon.org/.

FlowMon Probe

The FlowMon Probe is a passive network monitoring device based on the COMBO6(X) technology. It is able to collect dynamic data about IP flows and export them to external collectors in the NetFlow version 5 and 9 format. The probe has great contribution to the safety and reliability of your network. You can obtain information about attacks and data transfers going in and out of your network. The probe is remotely configurable using web or terminal interface.

Figure 1.1. FlowMon Probe Monitoring Principle

FlowMon Probe Monitoring Principle

So far, NetFlow data are mostly generated by IP routers. In contrast, our NetFlow probe is designed as an autonomous device working essentially as a T-splitter: when inserted into a network link, the incoming traffic is passed directly to the original destination and a separate copy of the link data is processed by the probe in parallel. From the network perspective, the probe can be classified as a repeater that is invisible at both the network and link layer.

Using a specialized probe for gathering data about IP flows has several advantages over the traditional routerbased setup:

  • The probe does not appear as a hop in traceroute and thus remote attacks are virtually impossible.

  • Routers must concentrate on their main task - routing and forwarding. Consequently, the CPU cycles available for processing flow records are usually rather limited. The probe is much more flexible in this respect.

  • As a special case of the previous item, routers often enforce traffic sampling, especially on high-speed links. For some applications such as security analysis this is highly undesirable.

In contrast, standalone monitoring probe is essentially a stealth device - invisible at both Layer 3 and 2 - dedicating all its resources to the tasks of flow record acquisition and processing.

Figure 1.2. NetFlow Principle

NetFlow Principle

HW Parameters of FlowMon Probe

  • monitoring of two 1 Gbps ports at full speed (actually we support 1Gbps and 10Gbps speeds, lower speeds can be set via phyterctl tool)

  • precise timestamps, active and inactive timeouts

  • input sampling (Each packet is sampled with a probability on selected input interface.), sample and hold sampling (Each packet is sampled with a probability, if a packet is chosen and the flow it belongs to is not in the flow memory, a new item is created. However, after an item is created for a flow, unlike in sampled NetFlow, every subsequent packet belonging to the flow updates the item.)

  • repeater and splitter ports

SW Parameters of FlowMon Probe

  • export in NetFlow version 5 and NetFlow version 9

  • exporting to more collectors at the same time

  • anonymization and per collector filtering

Typical Applications of FlowMon Probe

  • real-time network monitoring

  • network traffic analysis

  • users and applications monitoring

  • intelligent traffic and financial reporting

  • network security analysis

  • IP-based accounting/billing

  • capacity and topology planning

  • traffic load balancing

Obtaining FlowMon Package

FlowMon package is available via WWW download page: http://www.liberouter.org/clients

To verify that the downloaded files are genuine and complete SHA1 digests are available. Download both the CHECKSUM.SHA1 file and the package file to the same directory. Run the sha1sum(1) command to verify the package file e.g. flowmon-1.2.0.tgz:

$ cat CHECKSUM.SHA1 | grep flowmon-1.2.0.tgz | sha1sum -c
      

If there are any errors, they will be reported.

Package Structure

	/firmware      - COMBO6(X) card firmware (*.mcs files)
	/base          - source code for software tools and drivers
	  /mk                        - build system (makefiles)
	  /sys_sw/drivers            - kernel drivers
	  /sys_sw/hwtools            - necessary hardware tools for COMBO6(X) card
	  /sys_sw/lib*               - libraries necessary for other tools
	  /sys_sw/projects/flowmon   - exporters, testing programs, configuration
                                       and documentation for using FlowMon
	  /sys_sw/projects/netconf   - NETCONF protocol programs
	  /sys_sw/swtools/csxtool    - tool for handle COMBO6(X) XML files
	/doc           - FlowMon project documentation - FlowMon Handbook
	ERRATA         - list of known bugs and their solutions
	README         - short manual how to build, install and use FlowMon Probe
	RELNOTES       - differences against previous release
	  

Two Ways How to Use FlowMon Probe

There are two possibilities how to use FlowMon probe - either locally by flowmonlkm(1) and flowmon(1) programs (described in Chapter FlowMon Probe - local using) or remotely via remote command line interface or Web frontend (described in Chapter Using FlowMon Probe - remote configuration).

Chapter 2. Installing FlowMon Probe

System Requirements

Software Requirements

Compilation and installation process is covered by the build system located in the base/mk directory.

To build package you will need following tools (programs, libraries):

  • gmake 3.80 or later

  • autoconf 2.59 or later

  • automake 1.4 or later

  • gcc 3.0 or later

  • libxml2 2.6.16 or later (including devel sources)

  • libxslt 1.1.11 or later (including devel sources)

  • pciutils (lspci) 2.2.2 or later

  • lsof 4.72 or later

To run web configuration frontend you will need:

  • apache2 with

    • mod_ssl (to run over HTTPS)

  • php5 configured with

    • -with-xml

  • netconf (included in the package)

All scripts are running in /bin/sh shell interpreter so all scripts were created with aim to portability. But on all testing machine the /bin/sh program was actually Bash (/bin/bash). Therefore we recommend using Bash as a default shell.

To build kernel drivers needed by FlowMon package you will need fully configured Linux 2.4 or 2.6 kernel source tree. More installation and compilation details about kernel drivers are available in the README file inside base/sys_sw/drivers/linux directory.

Hardware Requirements

The FlowMon hardware has been designed to work on any PC-AT compatible computer running GNU/Linux or other "Unix-like" operating system. It has been tested only on computers that use the x86 family of processors. The hardware requirements necessary to run FlowMon are:

  • Intel Pentium or equivalent x86 based PC

  • COMBO6 - 32-bit/33 MHz PCI bus

  • COMBO6X - 64-bit/66 MHz PCI-X bus

The "sandwich" consisting of COMBO6(X) and an interface card (COMBO-4MTX, COMBO-4SFP, COMBO-4SFPRO or COMBO-2XFP) fits into one PCI slot.

Following table express our experience with COMBO6(X) card compatibility to some motherboards.

Table 2.1. COMBO6X Motherboard Compatibility

MB typeCOMBO6COMBO6X
Intel SE7501CW2compatiblecompatible
Intel SE7520BD2Dcompatiblecompatible
Intel S5000VSAcompatiblecompatible
Intel S5000PAL0compatiblecompatible
Intel SE7525GP2compatibleincompatible
Intel SE7221BK1-Ecompatibleincompatible

Following table displays list of compatible GBICs, which we have tested. We haven't found any non-compatible GBIC yet, all GBIC satisfying SFP/XFP MSA specification should work.

Table 2.2. Tested GBICs

Metallic 1Gbps (1000base-T) for COMBO-4SFPRO cardsOptical 1Gbps (1000BASE-LX and 1000BASE-SX) for COMBO-4SFPROOptical 10Gbps (10GBASE-SR and 10GBASE-LR) for COMBO-2XFP and COMBO-2XFP2 cards
Finisar FCLF-8521-3Agilent HFBR 57M5AP (850nm)JDSU JXP-01SWAA1 (850nm)
Linksys MGBT1Dell FTRJ-8519-7D (850nm)JDSU JXP-01LWAA1 (1310nm)
Methode Electronics SP7041MSFP-FO-0850-M8511-111 (850nm)Finisar FTRX-1411D3 (1310nm)
 Finisar FTRJ1321P1BTL (1310nm)Agilent (Avago) HFCT-721XPD (1310nm)


Supported Cards

This package can be used with the COMBO6(X) cards described in the following table.

Table 2.3. Supported Hardware

COMBO6 a PCI (32/33) card with XILINX FPGA
COMBO-4MTXadd-on card with four copper GE interfaces
COMBO-4SFPadd-on card with four SFP cages for GE interfaces
COMBO6X a PCI-X (64/66) card with XILINX FPGAs
COMBO-4SFPROadd-on card with four SFP cages for GE interfaces
COMBO-2XFPadd-on card with two XFP cages for 10GE interfaces

Figure 2.1. COMBO6X Card

COMBO6X Card

Note

You can find more information about COMBO6(X) cards at http://www.liberouter.org/hardware.php.

Supported Firmware

Supported firmware depends on the type of card you use.

Table 2.4. Supported Firmware

Mother CardAdd-on CardFirmwareFeatures
COMBO6COMBO-4MTX/COMBO-4SFP01_07Monitoring of one gigabit interface
Expiration of flowrecord can be controlled by TCP flags
Active timeout
Inactive timeout
Input sampling
Sample and Hold
Throughput 230Kpackets/s (shortest packets) or 750Mbit/s (longest packets)
64 K flowrecords
Repeater between port 0 and 1
No setup for GBIC - phyterctl and ibufctl not working
COMBO6XCOMBO-4SFPRO02_06Extension of COMBO-4MTX/4SFP + COMBO6 firmware
Monitoring of two one-gigabit interfaces
Network interface is identified in the flowrecord
Network interface for 1000/100/10Mbps with MTU control (=1526 Bytes)
Inactive timeout adapts according to flow-cache occupancy
Adaptive input sampling
64 K flowrecords
Full throughput (no matter of packet size)
LM83 temperature sensor controller connected via I2C
Mirror to port 2 and 3
03_02Same as 02_06 firmware, 512 K flowrecords with DRAM
COMBO-2XFP02_06Same features as COMBO-4SFPRO + COMBO6X firmware
Network interface only for 10Gbps

Firmware supports processing of Ethernet and all basic IPv4 and IPv6 headers:

  • ethernet L2 layer processing

    • MAC

    • 802.1Q - Ethernet VLANs (cannot be recursive)

    • MPLS - MPLS packets (MPLS tags are removed only), EoMPLS

  • IPv4 and IPv6 protocols are recognized, other protocols are unknown.

  • TCP, UDP, ICMP and ICMPv6 processing supported.

Supported Software

FlowMon software works on GNU/Linux OS with 2.4 and 2.6 kernels. The NetFlow v5 and v9 protocols are supported. The software has been tested on computers running Red Hat Enterprise Linux, CentOs, Ubuntu and Debian.

Installing COMBO6(X) Card

After plugging COMBO6(X) card into your PCI slot, you should test connection between the card and your PC. We use lspci(8) utility for this purpose. lspci(8) is a utility for displaying information about all PCI buses in the system and all devices connected to them. For correct recognition of the COMBO6(X) card you need update PCI ID Database used by lspci(8) or download pciutils-2.2.2 (program collection containing lspci(8) or later. If the lspci(8) output contains the following line your COMBO6(X) card is connected properly.

	$ lspci -d 18ec:
	03:01.0 Ethernet controller: Cesnet, z.s.p.o. COMBO6X (rev 01)
	04:02.0 Ethernet controller: Cesnet, z.s.p.o. COMBO6 (rev 01)
	

Note

Numbers at the beginning of the line can be different.

Inserting FlowMon Probe to the Network

There are three possibilities, how to insert FlowMon probe to the network - you can connect FlowMon probe at a mirror port of some network device, utilize network tap or insert into a line as a repeater.

FlowMon Probe at a Mirror Port

If you want to check FlowMon features you can simply mirror traffic from your router to the FlowMon probe.

Figure 2.2. FlowMon Probe Inserted at Mirror Port

FlowMon Probe Inserted at Mirror Port

FlowMon Probe Connected via Network Tap

Another way of how to connect FlowMon probe in your network is to utilize network tap, e.g. optical splitter (see figure below).

Figure 2.3. FlowMon Probe Connected via Optical Splitter

FlowMon Probe Connected via Optical Splitter

FlowMon Probe Inserted in a Line

In this case the FlowMon probe works as a T-splitter: when inserted into a network link, the traffic is passed directly to the original destination and a separate copy of link data is processed by the probe in parallel. From the network perspective, the probe can be classified as a repeater that is invisible at both the network and link layer. Description of this repeater mode is in the chapter Repeater.

Figure 2.4. FlowMon Probe Inserted in Line as a Repeater and Sending Data to Collector

FlowMon Probe Inserted in Line as a Repeater and Sending Data to Collector

FlowMon Probe Port Numbers

The general rule for numbering card ports is that the ports closer to the motherboard (PCI slot) have lower numbers, e.g. the closest port has number 0, the next one number 1 etc. See figures bellow for examples:

Figure 2.5. FlowMon Probe COMBO-4SFPRO Card Port Numbers

FlowMon Probe COMBO-4SFPRO Card Port Numbers


Figure 2.6. FlowMon Probe COMBO-2XFP2 Card Port Numbers

FlowMon Probe COMBO-2XFP2 Card Port Numbers


Building Package

pkgtool(1) helps to build, install and uninstall the FlowMon distribution package.

	$ tar -xzvf flowmon-XX.YY.ZZ.tgz
	$ cd flowmon-XX.YY.ZZ/base
	$ ./pkgtool --build
	

Note

Replace XX.YY.ZZ with the chosen package version number such as 1.3.0.

If this is the first Liberouter package you have ever installed, you can define installation directory with the --prefix=path option. But remember that this installation path MUST not exists (e.g. /usr/local is invalid installation path on most systems because this directory exists). This restriction is due to new installation framework which enables easy package uninstall or package switching. More information about these features can be found in the liberouterpkg section.

The --prefix option takes effect only during building package. If no prefix is set then /usr/local/liberouter path is used.

	$ ./pkgtool --build --prefix=/usr/local/flowmon
	

If you have previously installed some Liberouter package (nific, nic, ids, flowmon with liberouterpkg mechanism), the installation path is detected automatically as path used for the first installed package.

Remember that installation path given as --prefix parameter will contain next subdirectories for binaries, libraries, man pages, etc. These directories can be affected by future uninstalling or package switching so it could be used as installation directory only for Liberouter packages.

Installing Package

Installed tools are divided to three parts.

server

This is a default type of the installation that includes all necessary tools to control COMBO card, kernel drivers and NETCONF tools (server side as well as client side tools). All these tools will be installed to the installation directory (by default /usr/local/liberouter). To use this type of installation use --install option with server parameter

	# ./pkgtool --install=server
	

or simply use --install option without any parameter:

	# ./pkgtool --install
	

client

Only NETCONF-client side tools are installed in this case. These tools are included in the server and web installation too. To install only these tools, use --install option with client parameter

	# ./pkgtool --install=client
	

web

Last installation type enables to install FlowMon web configuration frontend into your Apache web server including NETCONF-client side tools needed by web configuration frontend.

	# ./pkgtool --install=web
	

Figure 2.7. Scheme of Installation Types

Scheme of Installation Types

You can use more than one type of installation (typically server and web) by specifying keywords separated by comma(s)

	# ./pkgtool --install=server,web
	

If you are going to use udev mechanism to creating device files, you can use pkgtool with --udev option. This option cause copying file with COMBO6(X) card rules (combo6.udev.rules) to the /etc/udev/rules directory.

	# ./pkgtool --install --udev
	

Note

--udev option takes effect only with --install option.

All FlowMon Probe tools come with its manual pages so for information about any tool (included configuration files) you can see these man pages by man(1) program, e.g.

        $ man flowmon_nf5
        $ man flowmon.conf
        

There are necessary following post-install steps:

  1. Export Liberouter environment variables generated by pkgtool. These variables were printed as last output of pkgtool --install command and they are environment variables are in the following form

            VARIABLE=value
            

    Please, use these lines as a parameter for export command like in following example:

            # ./pkgtool --install
            ...
            [pkgtool output]
            ...
            ###  Liberouter environment variables:
            CS_XML_INDEX_PATH=/usr/local/liberouter/mcs/index
    
            $ export CS_XML_INDEX_PATH=/usr/local/liberouter/mcs/index
            

    For permanent export of this variable add same line (export command) into the /etc/profile configuration file.

            export CS_XML_INDEX_PATH=/usr/local/liberouter/mcs/index
            

    Liberouter environment variables are prepared only if they are needed. So if pkgtool doesn't print any "Liberouter environment variables:" you doesn't need export any variable.

  2. Set PATH variable to point to installed FlowMon tools directory (${PREFIX}/bin)

            $ export PATH=/usr/local/liberouter/bin:$PATH
            

    For permanent PATH change add following line into the /etc/profile configuration file

            export PATH=/usr/local/liberouter/bin:$PATH
            

  3. Configure dynamic linker run time bindings by setting /etc/ld.so.conf to point to the FlowMon library directory (${PREFIX}/lib).

    Add /usr/local/liberouter/lib (by default) entry to the /etc/ld.so.conf file.

            # echo "/usr/local/liberouter/lib" >> /etc/ld.so.conf
            # ldconfig
            

  4. Set /etc/man.config file to point to the FlowMon man pages (${PREFIX}/man).

    Add line

              MANPATH /usr/local/liberouter/man
              

    entry to the /etc/man.config file (name of this file can little differ on different Linux distribution).

  5. If you want to load FlowMon kernel modules when the PC starts up, add following lines to the /etc/modules file.

    For COMBO6 card:

            libermemalloc
            combo6core
            combo6
            szedata
            netflow-ph1
    

    For COMBO6X card:

            libermemalloc
            combo6core
            combo6x
            szedata
            szedatax-c6pcr
    

    After this, you don't need to run flowmonlkm script any more.

    Note

    In some distribution (e.g. Red Hat Enterprise Linux 4) you have to use file /etc/rc.modules in place of /etc/modules file. This file contains commands to load kernel modules at boot time - it is actually script so it must be an executable file:

            # chmod +x /etc/rc.modules
    

    so such file will look like this:

            #!/bin/sh
            /sbin/modprobe libermemalloc
            /sbin/modprobe combo6core
            /sbin/modprobe combo6x
            /sbin/modprobe szedata
            /sbin/modprobe szedatax-c6pcr
    

  6. The FlowMon probe driver needs device files in the /dev/combosix/ and /dev/szedata/ directory. To create them, run the flowdevices script in the packages directory base/sys_sw/drivers/linux. These devices are removed after reboot, so you need to run this script after each reboot.

            # ./flowdevices
            

    To run FlowMon as a non-privileged user set r/w permissions on /dev/combosix/0 and /dev/szedata/0 devices.

    You have to change the permissions of the device files so that the non-privileged user that will execute the FlowMon tools has read-write access. For example, you can create a new group, say combo-rw, add that user to this group and change the file group ownership and permissions as follows:

            # chgrp combo-rw /dev/combosix/0 /dev/szedata/0
            # chmod 664 /dev/combosix/0 /dev/szedata/0
            

    Using recent 2.6 kernels it might be wanted to use the sysfs/udev mechanisms to create device files. For more details about udev see http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html

    Example udev rules are placed in the package in sys_sw/drivers/linux/combo6.udev.rules file. If you didn't use option --udev during package installation, copy this file to /etc/udev/rules.d directory and modify it (change group or permissions). Following line will create COMBO6(X) device files required by the FlowMon probe:

            KERNEL=="combosix[0-9]*", NAME="combosix/%n", GROUP="combo-rw", MODE="0664"
            KERNEL=="szedata[0-9]*", NAME="szedata/%n", GROUP="combo-rw", MODE="0664"
    

    Note

    Depending on your version of udevd you must adjust syntax of your udev rule file. Older versions of udevd require '=' character to match KERNEL key e.g. KERNEL="combosix[0-9]*". The newer one require '==' characters to match KERNEL key e.g. KERNEL=="combosix[0-9]*".

  7. Please copy (and rewrite any previous version) liberouterpkg script, located in the package base directory into your standard binary directory (e.g. /usr/local/bin/). This enables using liberouterpkg script as standard system tool

            $ liberouterpkg
            

    Note

    Path where the liberouterpkg script is placed must be different from used package installation path. More information about liberouterpkg can be found in the liberouterpkg section.

Upgrading Package

The flowmon-1.3.0 is the first Liberouter package using liberouterpkg tool enabling package switching and fully package uninstalling. If you have installed any previous Liberouter package without liberouterpkg, please remove it completely (including all libraries and drivers) to ensure proper behavior of the installed package.

More information about these features can be found in the liberouterpkg section.

If you are installing new version of previously installed package (e.g. you have installed flowmon-1.3.0 and now you are installing flowmon-1.3.1 package) you will be asked by pkgtool(1) to decide if you wish to keep your own (but may be obsolete) configuration files or to overwrite them with our default (but up-to-date) configuration files.

liberouterpkg Tool

liberouterpkg script is new tool covering new Liberouter package installation framework which enables safe and easy package uninstalling or simple package switching (and using different project packages on the same PC). To display all available functions of the liberouterpkg script use --help option

    $ liberouterpkg --help
    

liberouterpkg uses /etc/liberouter/packages.list configuration file that stores information about installed packages.

List of Installed Packages

liberouterpkg can be used to display list of all installed Liberouter packages

      # liberouterpkg --list
      # Installed packages:
      flowmon-1.3.0
      

or to display currently active package (only one package can be active at the same time)

      # liberouterpkg
      flowmon-1.3.0
      

Uninstalling Package

liberouterpkg tool is able to safely uninstall any previously installed Liberouter package (covered by new Liberouter package installation framework with liberouterpkg) by --uninstall=<PKG_ID> option where <PKG_ID> is a package identification string (that can be displayed by --list option)

      # liberouterpkg --uninstall=flowmon-1.3.0
      

Switching Packages

If you are using a flowmon package (flowmon-x.y.z package is active) you are unable to use tools from e.g. ids package. Using liberouterpkg script you can switch to any installed package and change this way currently active package. For switching packages use --switch=<PKG_ID> option where <PKG_ID> is a package identification string of a package that will be activated. List of available packages can be displayed by --list option)

      # liberouterpkg --switch=ids-1.0.0
      

Chapter 3. Configuration of the FlowMon Probe

This chapter describes key configuration files for the FlowMon Probe. The first section explains purpose of the flowmon.conf(5) configuration file used by FlowMon programs and describes its content. The second section describes FlowMon Probe XML configuration scheme used for describing FlowMon Probe parameters used during remote configuration.

flowmon.conf(5) - FlowMon Probe Configuration File

This section describes flowmon.conf(5) configuration file placed in the /etc/liberouter/ directory. This configuration file is read by FlowMon Probe starting ( flowmonlkm(1), flowmon(1)) and controlling ( flowmond(1)) programs.

flowmon.conf(5) is actually a list of definition of environment variables.

    VARNAME=VALUE
    

The file can contain blank lines or lines starting with '#' which are ignored by programs and can be used for comments.

You can freely modify this file and redefine default values of the probe settings. During installation of the next flowmon package version you will be inquired by pkgtool if you prefer to keep your own configuration file or to rewrite it with our up-to-date version. So you don't have to be worry to lose your changes. Up-to-date file is during installation process always copied to the $PREFIX/etc/liberouter (by default /usr/local/etc/liberouter) directory. So you can use this file as a backup copy.

Variable definitions are divided into several parts.

Probe Parameters

The first part contains variables specifying FlowMon Probe parameters. Please remember that these variables are used only by programs described in the Setting up FlowMon Probe section. Remote configuration uses more advanced, XML based configuration datastores, described in the XML configuration scheme section.

INACTIVE_TIMEOUT

Value of the inactive timeout in seconds.

This element specifies the inactive timeout in seconds, i.e., the amount of time after which a flow is classified as terminated and exported if no traffic has been seen for that interval. The value is an integer between 0 and 60.

ACTIVE_TIMEOUT

Value of the active timeout in seconds.

This element specifies the active timeout, i.e., the time period after which any flow that is still classified as active must be exported in order to keep the collectors informed about the flow. Active timeout is given in seconds and can be between zero and 1200 (20 min).

SAMPLING0_RATE

Sampling rate on IBUF0. Set value means rate 1:value and in this rate are packets sampled on input of interface 0. SAMPLING1_RATE is used to set sampling rate on IBUF1, but it is available only for COMBO6X card.

Sampling of incoming packets is the easiest way how to guarantee the measured bandwidth. It helps also to decrease number of new flows during attacks when every incoming packets belongs to new flow.

SAMPLING0_TYPE

Type of the sampling on IBUF0. Variable SAMPLING1_TYPE is used to set sampling type on IBUF1, but it is available only for COMBO6X card. Value 0 means constant sampling and value 1 means random sampling.

SAMPLE_HOLD_RATE

Sampling rate for the Sample and hold function. Set value means rate 1:value and in this rate are packets sampled.

Sample and hold method is quite similar to input sampling but with following twist. As with ordinary sampling, each packet is sampled with a probability. If a packet is chosen and the flow it belongs to is not in the flow memory, a new item is created. However, after an item is created for a flow, unlike in sampled NetFlow, every subsequent packet belonging to the flow updates the item.

SAMPLE_HOLD_TYPE

Type of the sampling for the Sample and hold function. Value 0 means constant sampling and value 1 means random sampling.

SAMPLE_HOLD_THRESHOLD

Value of the sample and hold threshold. It means the rate of flowrecord memory occupation from which start this method with sampling.

Exporter Parameters

The second part contains variables specifying FlowMon exporter(s) settings. Please remember that these variables are used only by programs described in the Setting up FlowMon Probe section, last variable FLOWMON_EXPN is only by startup scripts running at boot time. Remote configuration uses more advanced, XML based configuration datastores, described in the XML configuration scheme section.

COLLECTOR

Network address to the flow collector in the form host:port.

EXPORT_PROTOCOL

Specifies protocol for flow sending to the collector. Available values are 'NF5' for NetFlow v5 protocol and 'NF9' for NetFlow v9 protocol.

FLOWMON_EXPN

Contains command to run exporter at the boot time. Last character of the variable name is number of running exporter. Maximal number of exporter is 4 (numbered from 0 to 3) and it must be a gradual sequence (i.e. if you specify exporter 0 and 2, only number 0 will be started). More information about exporters can be found in the flowmon_nf5(1) or flowmon_nf9(1) man pages.

COMBO6(X) Parameters

The third part contains variables specifying Hardware parameters used for firmware design booting. These variables are used by all FlowMon starting and controlling programs.

COMBO6_DEVICE

This variable contains path to the combo6 device file.

FIRMWARE_PATH

Path to the storage of the firmware files. Value of this variable is automatically generated during building and installation process of the package.

FIRMWARE_IDN

Hardware identification string for the COMBO6 card (FIRMWARE_ID0), for COMBO6X card ( FIRMWARE_ID1) and for COMBO6X card with SDRAM (FIRMWARE_ID1_DDR).

Next part contains only one variable storing path to the installed FlowMon programs.

BINDIR

Path to the FlowMon programs. Value of this variable is automatically generated during building and installation process of the package.

flowmond(1) Parameters

The last part contains variables used only by flowmond(1) configuration daemon.

FLOWMOND_FIRMWARE_DESIGNXML

Path to the design.xml file which will be used for selecting and booting firmware by flowmond(1) program. Value of this variable is automatically generated during building and installation process of the package but can be changed by user.

FLOWMOND_HFE_PROG

Path to the HFE program which will be used for loading to the HFE processor by flowmod program. Value of this variable is automatically generated during building and installation process of the package but can be changed by user.

XML Configuration Scheme

Remote configuration programs use as source of the configuration data set of configuration files in XML format (configuration datastores). These files are located in the /etc/liberouter/netconf/ directory by default. This location can be changed in the netconf.conf(5) configuration file.

FlowMon Probe remote configuration uses three configuration datastores called running, startup and candidate (concrete filenames representing these datastores are defined in the netconf.conf(5) configuration file).

startup configuration datastore

This configuration datastore stores configuration data used at the device startup. Configuration daemon (flowmond(1)) reads this data at its startup and set the FlowMon Probe according to startup configuration data.

running configuration datastore

After initial setting up according to startup configuration data, configuration daemon creates running configuration datastore and copy there a content of the startup configuration datastore.

The FlowMon Probe is always set up according to configuration data stored in the running configuration datastore. If running configuration data is changed, configuration daemon changes FlowMon Probe parameters immediately.

When the configuration daemon is stopped, it removes running configuration datastore as well.

candidate configuration datastore

Note

The candidate configuration datastore can be used only by NETCONF manager user interface. Web configuration interface is not able to use this repository.

The candidate configuration datastore is used to hold configuration data that can be manipulated without impacting the device's current parameters. This datastore serves as a work place for creating and manipulating configuration data. Additions, deletions, and changes may be made to this data to construct the desired configuration data. A NETCONF commit operation may be performed at any time that causes the device's running configuration to be set to the value of the candidate configuration.

The user can discard any uncommitted changes to the candidate configuration by executing the NETCONF discard-changes operation reverting the content of the candidate configuration to the content of the running configuration.

candidate datastore is as well as other datastores shared among all NETCONF sessions connected to the FlowMon Probe. Therefore locking (by NETCONF lock operation)of the all datastore is highly recommended. In addition when the lock of the candidate datastore is released (by NETCONF unlock operation) the content of the datastore is reverted to the content of the running configuration.

Warning

Before starting to manipulate with this datastore, it is necessary to lock it by NETCONF lock operation. If target repository of any operation is not locked, every operation locks its target repository themselves before performing any change. Finally the target repository is again unlocked and therefore the content of the candidate datastore is reverted to the content of the running data.

Definition of the FlowMon Probe XML configuration scheme can be found at http://www.flowmon.org/flowmon-probe/devel/config/flowmon-rng/.

Chapter 4. FlowMon Probe - Local Using

This chapter describes starting FlowMon Probe locally by flowmonlkm(1) and flowmon(1) programs. These programs serves to unrepeated start of the FlowMon Probe. If you wish to start the FlowMon Probe anytime you will reboot the PC, please see section FlowMon init.d script.

Starting Scripts

After building and installing package including post-install steps, all FlowMon tools (included man pages) are available as any other system tools. There are two main scripts to start the probe - flowmonlkm(1) and flowmon(1). Both scripts use flowmon.conf(5) configuration file.

Loading Kernel Modules

flowmonlkm(1) script is used for loading/removing FlowMon kernel modules. There are two main options for this script. Option -l is used for loading FlowMon kernel modules and option -r is used for removing these modules. Script uses lspci(8) utility to detect COMBO6(X) card.

When all kernel modules are loaded, csid(1) is able to detect type of plugged cards and provide more detailed information.

You should get following output on PC with installed

  • COMBO6 mother card and COMBO-4MTX add-on card:

            $ csid
            combo6 mtx2 xcv2000
    
  • COMBO6X mother card and COMBO-4SFPRO add-on card:

            $ csid
            combo6x sfpro xc2vp20
    

Note

Chips can be different on some cards, so don't worry about differing last part of the csid output

Setting Up FlowMon Probe

flowmon(1) is main start up script for the FlowMon probe. Script boots firmware files (according to FIRMWARE_PATH variable from the flowmon.conf(5)), setting up probe behavior and is able to start NetFlow protocol exporter. By default, the probe settings are set according to variables from flowmon.conf(5) configuration file. Optionally you can define your own settings by options given to the script. More detailed information you can get by -h option or from man page:

        $ flowmon -h
        $ man flowmon
        

You should get following output in the control buffer via dmesg(8) command after starting up FlowMon Probe:

        $ dmesg
        combo6#0: device 0xf1010100 (NETFLOW_1Gbps_Probe) successfully attached
	

Note

Both scripts (flowmon(1) as well as flowmonlkm(1)) using lsof(8) tool to detect any process using COMBO6(X) device(s). To run scripts properly you have to install lsof(8) tool. lsof(8) is utility to get information about files opened by processes.

Logging Probe Information

The FlowMon Probe logs important events to syslog using the user facility. To have these log messages saved to a file, you must configure the syslog daemon appropriately. In the case of the classical Unix syslogd daemon, add the following line to /etc/syslog.conf:

        user.*                  /var/log/user.log

Regarding to your Linux distribution see syslogd(8) and logrotate(8) documentation how to adjust log file rotation.

Examples of Using Scripts

Loading Kernel Modules and Running Exporter

        # flowmonlkm -l
	Loading FlowMon kernel modules for COMBO6X card.
	szedatax_c6pcr         13504  3
	szedata                31596  5 szedatax_c6pcr
	libermemalloc           4164  2 szedatax_c6pcr,szedata
	combo6x                13028  1 szedatax_c6pcr
	combo6                 20072  1 szedatax_c6pcr
	combo6core             24052  7 szedatax_c6pcr,combo6x,combo6
        $ flowmon -ec collector.liberouter.org:60000
        

Note

Server collector.liberouter.org is only example name of the collector host which doesn't exist. Use, please, your own (existing) collectors.

To make sure that the firmware was loaded correctly you can run csid(1):

        $ csid -s
        Board    : combo6
        Addon    : mtx2
        Chip     : xcv2000
        LAN ports: 4
        Firmware : ok
        SW       : 0xf1010002
        HW       : 0x00000006
        Text     : NETFLOW_1Gbps_Probe

HW number detected by csid -s reflects firmware version, e.g. HW : 0x00000006 reflects version NETFLOW_01_06.

Stopping Exporter and Removing Kernel Modules

To stop running exporter(s) and detach drivers, use flowmon(1) script with the -s option:

        $ flowmon -s
        

Then you can remove Flowmon loaded kernel modules by the flowmonlkm(1) script:

        # flowmonlkm -r
        

Listing Running Exporters

You can list all running exporters by system command ps(1) or use startup script:

	$  ps aux | grep flowmon
	flowmon   3023  12:19   0:11 flowmon_nf9 collector.liberouter.org 60000 -I 65535
	flowmon   3105  12:26   0:04 flowmon_nf5 -d localhost 3003
	

FlowMon Probe Startup Script

Startup scripts are used to start some service (or some script) at the machine boot time. Our sample startup script is used to automatically start up the FlowMon Probe (loads kernel modules if necessary, boots firmware and set up the probe behavior) anytime your PC is starting up. Sample script is stored in the package directory structure in the base/sys_sw/projects/flowmon/doc directory as a flowmon.rc file. It is prepared for use in the SysV init system (and tested on the Red Hat Linux distribution). Script is commented so you can get a lot of information directly from the script.

Startup script uses flowmon.conf(5) to start flow exporter(s).

Running Startup Script at the Boot Time

  1. copy flowmon.rc file to the /etc/rc.d/init.d/ directory and rename it to the flowmon

  2. run chkconfig(8) and add flowmon as new service

            # chkconfig --add flowmon
            

    To verify, everything is right, you can try to find flowmon in the list of services

            # chkconfig --list | grep flowmon
            

  3. reboot your system

Stopping FlowMon Service

To stop FlowMon (kill running exporters) go to the /etc/rc.d/init.d/ directory and use following command:

        # ./flowmon stop
        

This command causes stopping FlowMon but the service will be started again during next reboot. To switch off the FlowMon service, in the current runlevel, use chkconfig(8) with off option after service name (flowmon in our case):

        # chkconfig flowmon off
        

Last possibility is to remove FlowMon service from chkconfig(8) management:

        # chkconfig --del flowmon
        

Note

More detailed information you can find in the chkconfig(8) man page.

Status of the FlowMon Service

To show current status of the FlowMon Probe use option status. It displays all running FlowMon exporter(s).

        # ./flowmon status
	Loaded kernel modules for the FlowMon probe:
	netflow_ph1             7684  2
	szedata                21452  3 netflow_ph1
	libermemalloc           2948  2 netflow_ph1,szedata
	combo6                 13928  1 netflow_ph1
	combo6core             15956  4 netflow_ph1,combo6
	
	Running FlowMon exporter(s):
	flowmon_nf9 collector.liberouter.org 3002 -I 6553
        

Flow Export

To read data from HW and send them to collector you can run several instances of FlowMon exporters. Before running exporter you must start FlowMon probe (load kernel modules and run flowmon script).

FlowMon exporter has possibility to anonymize exported data, perform filtering, exporter sampling, use IPv4 or IPv6 transport etc. There are two versions FlowMon exporter, flowmon_nf5(1) for exporting in NetFlow version 5 export format and flowmon_nf9(1) for exporting in NetFlow version 9 export format.

Example 4.1. Basic Exporting of NetFlow Records to the Collector

Following example shows running two exporters, first one exporting in NetFlow version 5 to a port 60000 of a collector collector.liberouter.org, second one in NetFlow version 9 to a port 60001 of the same collector. Parameter -d runs exporter as a daemon.

	$ flowmon_nf5 -d collector.liberouter.org:60000
	$ flowmon_nf9 -d collector.liberouter.org:60001


Example 4.2. Exporting Anonymized NetFlow Records

Exporting NetFlow records from card 0 and interface 0 with anonymized source and destination IP address by applying block cipher.

	$ flowmon_nf9 -c 0:0 -a aes:fields=src,dst -d collector.liberouter.org:60000 


The exporter program will start sending flow records to the configured collector. To test that it is really the case, you can run a packet sniffer such as tcpdump(1) or ethereal(1), for example

	# tcpdump -i interface 'udp dst port collector_port'
	# tcpdump -i eth0 'udp dst port 60000'
	tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
	listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
	12:23:41.656669 IP exporter.flowmon.org.32768 > collector.liberouter.org.60000: UDP, length 1424
	12:23:41.667760 IP exporter.flowmon.org.32768 > collector.liberouter.org.60000: UDP, length 1424
	12:23:41.667798 IP exporter.flowmon.org.32768 > collector.liberouter.org.60000: UDP, length 1420
	...

You should see the NetFlow traffic sent by the flow exporter to the collector. To test basic collector functionality you can use flowmoncol(1) tool.

Example 4.3. Testing Collector - Exporter Functionality by flowmoncol(1) Tool

You can test basic FlowMon Probe functionality by running one instance of FlowMon exporter exporting flows to the localhost and collecting these flows by simple flowmoncol(1) collector.

	$ flowmon_nf5 -d localhost:60000
	$ flowmoncol -l 60000 -m 4
	seq 871320, dur 106 ms, in 0, proto 6, 195.113.123.86:36174 -> 82.208.7.33:80, 
	packets 17, octets 912, aps 53, bps 68830, pps 160
	seq 871320, dur 82 ms, in 0, proto 6, 147.231.249.66:3902 -> 77.75.72.72:80, 
	packets 4, octets 1689, aps 422, bps 164780, pps 48
	seq 871320, dur 40207 ms, in 0, proto 6, 195.113.168.70:49307 -> 80.239.235.195:443, 
	packets 11, octets 586, aps 53, bps 116, pps 0
	...


For further information please see exporter man page:

	$ man flowmon_nf5
	$ man flowmon_nf9
	

Repeater

Repeater duplicates data from PORT0 to PORT1 and vice versa. PORT2 and PORT3 are not utilized on COMBO-4SFP or COMBO-4MTX. COMBO-4SFPRO card is able to mirror traffic from PORT0 to PORT2 and from PORT1 to PORT3. Input streams from PORT0 and PORT1 are processed by IBUFs. In each IBUF Input Sampling rate can be set.

It is necessary to state that the repeater is independent on the state of the rest of firmware and software as well. It is only dependent on state of the FPGA chip and thus on the state of the host computer (power supply, firmware booting). So if you have connected the FlowMon probe directly in the link as repeater (see section FlowMon Probe Inserted in a Line), the built-in repeater starts to transfer packets in both directions between interfaces 0 and 1, and at the same time mirror packets to interfaces 2 and 3. If you choose this option it is recommended to use UPS (uninterruptable power supply) so the repeater is available during power failures.

During reloading or resetting card, it takes about 4 seconds to start repeating again. Also monitoring starts 4 seconds later after reset or reload.

Figure 4.1. Scheme of the Repeater Connection

Scheme of the Repeater Connection

Phyter Configuration

phyterctl(1) is tool used to display and change configuration of 4 interfaces available on COMBO-4SFPRO cards. The tool displays information about link status, resolved speed or duplex mode on link. phyterctl(1) is also able to change the advertised speed and duplex mode and provides r/w access to internal registers of the physical layer IC.

ibufctl(1) is used to display and change configuration of IBUF components in FlowMon COMBO6X designs.

	$ phyterctl -s100 -i0 ... advertise 100Mbps on interface 0
	$ ibufctl -s100 -i0 ... set 100Mbps input on interface 0

Example of phyterctl(1) listing with GBIC EEPROM information:

	$ phyterctl -c gbic
	Settings for card 0 (device /dev/combosix/0):
	------------------------------ Interface 0 ---
	Transceiver      FINISAR CORP.
	Model		 FCMJ-8521-3
	Phyter vendor    MARVELL
	Phyter model     88E1111 Gigabit PHY
	Speed            1000 Mb/s
	Mode             Full-duplex
	Link status      Up
	------------------------------ Interface 1 ---
	Transceiver      FINISAR CORP.
	Model            FCMJ-8521-3
	Phyter vendor    MARVELL
	Phyter model     88E1111 Gigabit PHY
	Speed            1000 Mb/s
	Mode             Full-duplex
	Link status      Up
	------------------------------ Interface 2 ---
	Transceiver      FINISAR CORP.
	Model            FCMJ-8521-3
	Phyter vendor    MARVELL
	Phyter model     88E1111 Gigabit PHY
	Link status      Down
	------------------------------ Interface 3 ---
	Transceiver      FINISAR CORP.
	Model            FCMJ-8521-3
	Phyter vendor    MARVELL
	Phyter model     88E1111 Gigabit PHY
	Speed            1000 Mb/s
	Mode             Full-duplex
	Link status      Up
	

More information can be found in the phyterctl(1) and ibufctl(1) man pages or in the README files placed in the base/sys_sw/hwtools/phyter/ and base/sys_sw/hwtools/ibufctl/ directories.

Note

COMBO card doesn't support autonegotiation and autoswitching between 10Mbps/100Mbps/1000Mbps. You need to use phyterctl(1) and ibufctl(1) tools.

Chapter 5. Using FlowMon Probe - Remote Configuration

Remote configuration of the FlowMon Probe is based on the NETCONF protocol. As you can see on the remote configuration system scheme the core of the system is made up of pair of the NETCONF protocol programs. On the server side system uses flowmond(1) configuration daemon program to change current settings of the FlowMon Probe. Client side of the NETCONF protocol implementation (netconf(1) program) has built-in command line interface (similar to e.g. sftp(1) program). netconf(1) can be also used as a backend for other user interfaces, as used for the Web frontend.

Figure 5.1. Scheme of the NETCONF Remote Configuration System

Scheme of the NETCONF Remote Configuration System

How to Get It Work

This section describes step-by-step process to prepare server (PC with installed COMBO6(X) card) and manager PC (any PC with Linux OS connected to the Internet).

Preparing Server

Server is a PC machine with installed COMBO6(X) card. To install all necessary tools, please follow steps described in the Building package and Installing package section. For installing you have to select server installation type:

        # ./pkgtool --install=server
        

flowmond(1) is one of the most important server program. It provides firmware booting, setting up all parameters and starting and controlling exporter programs. flowmond(1) must be always running on the server machine. For starting flowmond(1) the flowmond.rc script is used. This script is prepared for use in the SysV init system (and tested on the Red Hat Linux distribution).

Using flowmond.rc Startup Script

  1. copy flowmond.rc file to the /etc/rc.d/init.d/ directory and rename it to the flowmond

  2. run chkconfig(8) and add flowmond as new service

            # chkconfig --add flowmond
            

    To verify, everything is right, you can try to find flowmond in the list of services

            # chkconfig --list | grep flowmond
            

  3. reboot your system or run flowmond script manually

              # /etc/init.d/flowmond start
            

If the flowmond(1) doesn't start automatically, one of possible problems can be the wrong BINDIR variable set in the flowmon.conf(5) configuration file. So please check, that directory represented by this variable contains the FlowMon programs (csxtool(1), flowmond(1), etc.).

Setting Up netconf.conf(5) Configuration File

Configuration file netconf.conf(5) is stored in the /etc/liberouter/ directory. This file contains paths to various files used during remote configuration. You should make sure that these paths exist and the access rights enables r/w rights for all users you want to use the FlowMon remote configuration system.

netconf.conf(5) is actually a list of definition of environment variables.

          VARNAME=VALUE
        

The file can contain blank lines or lines starting with '#' are ignored by programs and can be used for comments. The meanings of the variables are as follows.

running

The filename (including absolute path) of the file storing running configuration datastore. Running configuration datastore is created by flowmond(1) program when it starts so you never should create this file manually.

The file is created with r/w access right for user and group as the flowmond(1) is running. By default, the flowmond(1) started at a boot time is running as root (user as well as group). To change this behavior and run flowmond(1) as e.g. flowmon user (and e.g. liberouter group), you have to edit flowmond startup script and change following lines:

          # start flowmond configuration daemon
          # change parameter -u to run flowmond with specific user's rights
          $BINDIR/flowmond -u root -g root
        

to

          # start flowmond configuration daemon
          # change parameter -u to run flowmond with specific user's rights
          $BINDIR/flowmond -u flowmon -g liberouter
        

But then, please check out that user flowmon (or liberouter group) is able to create a file in the directory where the running datastore should be stored. To better protection of the configuration data, ONLY user flowmon (or liberouter group) should be able to write to this directory. Remember, that in this case, only user flowmon (or members of liberouter group) will be able to successfully configure the FlowMon Probe remotely.

startup

The filename (including absolute path) of the file storing startup configuration datastore. This file must be created manually. Please, make sure, that user (or group) of user (or group) running flowmond(1) is able to write and read this file. By default this file is writable only by root.

candidate

The filename (including absolute path) of the file storing candidate configuration datastore. This file is dynamically created and changed by netconf-agent(1) program. Please make sure, that all users you want to use the FlowMon remote configuration system are able to create a file in the directory where the candidate configuration datastore should be stored. This can be done by creating a group of users that will configure the FlowMon Probe remotely. Directory containing configuration datastores then will be writable only by this group.

comm_key

Specifies the filename (including absolute path) of the file representing the key (token) for the communication between flowmond(1) and netconf-agent(1)(s) programs. This file should be placed in the directory where only users, you want to use the FlowMon remote configuration system, are able to write.

daemon_in

Specifies the filename (including absolute path) of the file representing communication pipe from netconf-agent(1) program to the flowmond(1). This file should be placed in the directory where only users, you want to use the FlowMon remote configuration system, are able to write.

daemon_out

Specifies the filename (including absolute path) of the file representing communication pipe from flowmond(1) program to the netconf-agent(1). This file should be placed in the directory where only users, you want to use the FlowMon remote configuration system, are able to write.

xsl_keys

Specifies the filename (including absolute path) of the file with XSL stylesheet to add key-nodes to the XML configuration datastore. These key-nodes are then used by the netconf-agent(1) program during subtree filtering.

Proper XSL stylesheets are part of the installation package.

xsl_stats

Specifies the filename (including absolute path) of the file with XSL stylesheet to add nodes containing the FlowMon Probe state information to the XML configuration datastore. This stylesheet is used in the implementation of NETCONF get command.

Proper XSL stylesheets are part of the installation package.

Setting Up SSH Daemon

Port Number

The FlowMon remote configuration system uses the SSH to built-up secured NETCONF connection between server and manager PC. To enable the NETCONF connection over SSH, you have to edit sshd(8) configuration file sshd_config(5).

In the sshd_config(5) configuration file you have to enable SSH connection on the port 830 (this port was assigned to the NETCONF over SSH connection by IANA. This can be done by adding following line to the configuration file.

          Port 830
          

Warning

If you are using default SSH port 22, make sure that you have uncommented this line in the configuration file.

              Port 22
              

You can also use (on your own risk) any other port to establish NETCONF connection. NETCONF manager program netconf(1) as well as Web frontend enable to specify the port number used for the NETCONF connection.

SSH Subsystem

The FlowMon remote configuration system uses SSH subsystem mechanism. To enable netconf-agent(1) as SSH subsystem, you have to add following line to the sshd_config(5) configuration file.

          Subsystem       netconf /usr/local/liberouter/bin/netconf-agent
          

Note

Notice that the /usr/local/liberouter/bin/netconf-agent is only example (and default) path to the netconf-agent(1) program. You have to use your own path to this program.

Preparing Manager PC

Manager PC is a computer with the Linux OS used to remote FlowMon Probes managing. You can choose the type of remote configuration between CLI and Web configuration interface. To install all necessary tools, please follow steps described in the Building package and Installing package section. For installing you have to select client (for only CLI) or web (for CLI and Web interface) installation type:

        # ./pkgtool --install=web
        

After installing necessary tools, everything is prepared and you can start configuring the FlowMon Probe remotely.

Web Frontend

FlowMon Probe Configuration Interface is easy to use web based graphical user interface for configuring the FlowMon Probe remotely. It can be used for configuring main probe parameters like timeouts and sampling and for setting-up collectors. It provides probe status report, which can be used for monitoring basic state information like current state of packet counters, probe uptime or status of probe interfaces. Administrators can import and export probe configuration as XML file for backup purposes using simple graphical interface.

Figure 5.2. Frontend Deployment

Frontend Deployment


Common deployment scenario is that multiple FlowMon Probes are configured using single web interface running on dedicated web server. Frontend allows administrator to define and store connection profile for each FlowMon Probe device (figure).