Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
packlogic-generic(3)		 SiLK Tool Suite	    packlogic-generic(3)

NAME
     packlogic-generic.so - Packing logic for the generic site

SYNOPSIS
      rwflowpack --packing-logic=packlogic-generic.so ...

DESCRIPTION
     This manual page describes the packlogic-generic.so plug-in that defines
     the packing logic that rwflowpack(8) may use to categorize flow records.
     (This document uses the term plug-in, but the builder of SiLK may choose to
     compile the packing logic into rwflowpack.  See the SiLK Installation Hand-
     book for details.)

   General Overview of rwflowpack
     The primary job of rwflowpack is to categorize flow records into one or
     more class and type pairs.  The class and type pair (also called a flow-
     type) are used by the analyst when selecting flow records from the data
     store using rwfilter(1).

     The settings that rwflowpack uses to categorize each flow record are deter-
     mined by two textual configuration files and a compiled plug-in that is re-
     ferred to as the packing logic.

     The first of the configuration files is silk.conf(5) which specifies the
     classes, types, and sensors that rwflowpack uses when writing files and
     that rwfilter uses when selecting flow files.

     The second configuration file is the sensor.conf(5) file.	This file con-
     tains multiple sensor blocks, where each block contains information which
     the packing logic uses to categorize flow records collected by the probes
     specified for that sensor.

     The combination of a silk.conf file and a particular packing logic plug-in
     define a site.  By having the configuration and packing logic outside of
     the core tools, users can more easily configure SiLK for their particular
     installation and a single installation of SiLK can support multiple sites.

     This manual page describes the packing logic for the generic site.  For a
     description of the packing logic at another site, see that site's manual
     page.

     *	 packlogic-twoway(3)

   Networks, Classes, and Types for the "generic" Site
     The packlogic-generic.so plug-in uses three network names to describe the
     logical address spaces that border the sensor:

     internal
	 the space that is being monitored

     external
	 the space outside the monitored network

     nullthe destination network for a flow that does not leave the router, be-
	 cause either the flow was blocked by the router's access control list
	 or its destination was the router itself---e.g., a BGP message

     The generic site assumes that all packets are either blocked by the sensor
     (that is, their destination is the null network), or that the packets cross
     the sensor so the source and destination networks always differ.

     The packing logic also assumes that the above networks completely describe
     the space around the sensor.  Since the null network is strictly a destina-
     tion network, any flow that does not originate from the external network
     must originate from the internal network.

     This allows the generic site to categorizes a flow record primarily by com-
     paring a flow record's source to the external network, and the packing
     logic contains no comparisons to the internal network

     The silk.conf file and packlogic-generic.so plug-in define a single class,
     all.

     The type assigned to a flow record within the all class is one of:

     in, inweb
	 Records whose source is the external network and whose destination is
	 not the null network represent incoming traffic.  The traffic is split
	 into multiple types, and these types allow the analysts to query a sub-
	 set of the flow records depending on their needs.  Each incoming flow
	 record is split into the one of incoming types using the following
	 rules:

	 inweb
	     Contains traffic where the protocol is TCP (6) and either the
	     source port or the destination port is one of 80, 443, or 8080

	 in  Contains all other incoming traffic.

     out, outweb
	 Records whose source is not the external network and whose destination
	 is not the null network represent outgoing traffic.  The traffic is
	 split among the types using rules similar to those for incoming traf-
	 fic.

     innull
	 Records whose source is the external network and whose destination is
	 the null network represent blocked incoming traffic.

     outnull
	 Records whose source is not the external network and whose destination
	 is the null network represent blocked outgoing traffic.

   Assigning a flow to source and destination networks
     Since the generic site uses the external network to determine a flow
     record's type, each sensor block in the sensor.conf(5) file must specify a
     definition for the external network.

     The sensor.conf file provides two ways to define a network: use the NET-ip-
     blocks statement to specify the NET network as a list of IP address blocks,
     or use the NET-interfaces statement to specify the NET network using a list
     of SNMP interfaces.

     For the source network of a flow record to be considered external, either
     the source IP (SiLK field "sIP") must appear in the list of external-ip-
     blocks or the incoming SNMP interface (SiLK field "in") must appear in the
     list of external-interfaces.  Note: If the probe block that specifies where
     the flow was collected contains an interface-values vlan statement, the
     SiLK "in" field contains the VLAN ID.

     For the destination network of a flow record to be considered null, either
     the destination IP ("dIP") must appear in the list of null-ipblocks or the
     outgoing SNMP interface ("out") must appear in the list of null-interfaces.

     Consider the following two sensors:

      sensor S2
	ipfix-probes S2
	external-ipblocks 172.16.0.0/16
	internal-ipblocks 172.20.0.0/16
      end sensor

      sensor S3
	ipfix-probes S3
	external-interfaces 17,18,19
	internal-interfaces 21,22,23
      end sensor

     A flow record collected at probe S2 whose "sIP" is 172.16.1.1 is considered
     incoming, regardless of the destination IP.

     A flow record collected at probe S3 whose "in" is 27 is considered outgo-
     ing.  (Since "in" does not match the external-interfaces, the record is
     considered outgoing even though "in" does not match the internal-interfaces
     either.)

     There are two constructs in the sensor.conf file that help when specifying
     these lists:

     1.  The NET-interfaces or NET-ipblocks statement in a sensor block may use
	 remainder to denote interfaces or IP blocks that do not appear else-
	 where in the block.

     2.  A group block can be used to give a name to a set of IP blocks or SNMP
	 interfaces which a sensor block can reference.

     For details, see the sensor.conf(5) manual page.

   Valid sensors
     When using the packlogic-generic.so plug-in, the sensor blocks in the sen-
     sor.conf file supports the following types of probes:

     *	 ipfix

     *	 netflow-v5

     *	 netflow-v9

     In addition, each sensor block must meet the following rules:

     *	 Either external-interfaces or external-ipblocks must be specified.
	 And,

     *	 A sensor cannot mix NET-ipblocks and NET-interfaces, with the exception
	 that null-interfaces are always allowed.  And,

     *	 Only one network on the sensor may use remainder.  And,

     *	 If a sensor contains only one NET-ipblocks statement, that statement
	 may not use remainder.  (The NET-interfaces statement does not have
	 this restriction.)

   Packing logic code
     This section provides the logic used to assign the class and type at the
     generic site.

     A single sensor block will assign the flow record to a single class and
     type, and processing of the flow for that sensor block stops as soon as a
     type is assigned.	When multiple sensor blocks reference the same probe,
     the flow records collected by that probe are processed by each of those
     sensor blocks.

     A flow record is always assigned to the class all.

     A textual description of the code used to assign the type is shown here.
     As of SiLK 3.8.0, the type may be determined by the presence of certain IP-
     FIX or NetFlowV9 information elements.

     *	 If "sIP" matches external-ipblocks or "in" matches external-interfaces,
	 then

	 *   If "dIP" matches null-ipblocks or "out" matches null-interfaces,
	     pack as innull.  Else,

	 *   Pack as in or inweb.

     *	 If "dIP" matches null-ipblocks or "out" matches null-interfaces, pack
	 as outnull.  Else,

     *	 Pack as out or outweb.

     *	 Potentially modify the type: If the probe has a quirks setting that in-
	 cludes "firewall-event" and if the incoming record contains the "fire-
	 wallEvent" or "NF_F_FW_EVENT" information element whose value is 3
	 (flow denied), change the type where the flow is packed as follows:

	 *   If the flow was denied due to an ingress ACL ("NF_F_FW_EXT_EVENT"
	     of 1001), pack as innull.

	 *   If the flow was denied due to an egress ACL ("NF_F_FW_EXT_EVENT" of
	     1002), pack as outnull.

	 *   If the flow's current type is innull, in, or inweb, pack as innull.

	 *   If the flow's current type is outnull, out, or outweb, pack as out-
	     null.

SEE ALSO
     rwfilter(1), rwflowpack(8), sensor.conf(5), silk.conf(5), pack-
     logic-twoway(3), silk(7), SiLK Installation Handbook

SiLK 3.22.2			   2026-08-27		    packlogic-generic(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=packlogic-generic&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help