Configuring the BNG as an IPFIX Mediator to Collect and Export IPFIX Data
IPFIX mediation uses the ipfix
analytics service
agent. The service agent uses input and output plug-ins specific to
IPFIX. The plug-ins configure aspects of the collecting and exporting
functions for the mediator, such as TCP ports and the collector address.
The input plug-in takes in the IPFIX flow data from the downstream
devices. The output plug-in converts the data to the IPFIX format
and exports it to the IPFIX collector. Data conversion is particularly
important because users may have a variety of exporting devices using
different formats. Converting the formats to a common form on the
mediator alleviates the need to have specific collectors for different
formats.
Your configuration for the output plug-in determines whether the IPFIX mediator sends records to the collector over a TCP connection or a TLS connection:
When you configure any of the certificate options (
collector-ca-certificate
,collector-certificate-key
, orcollector-certificate
), the mediator attempts to make a TLS connection.If none of the certificate options is configured, the mediator attempts to make a TCP connection.
To configure IPFIX mediation:
In the following sample configuration, the input plug-in is configured so that the IPFIX mediator accepts up to 125 TCP connections from its downstream devices. Records are accepted in the RI-ipfix-1 routing instance. The TCP port is not configured, so the plug-in listens on the default port, 4739.
[edit services analytics agent service-agents ipfix] user@host# set inputs input-ipfix parameters maximum-connections 125 user@host# set inputs input-ipfix parameters vrf-name RI-ipfix-1
The following example configuration for the output plug-in specifies that:
Records are exported to the collector at 198.51.100.200.
If the connection to the collector is not successful, the plug-in attempts to make the connection at 15-second intervals.
The configuration includes paths for collector certificates, so the export connection is over TLS rather than TCP.
The TCP port is not configured, so the collector is expected to listen on the default port, 4740.
No routing instance is configured for the collector, so it accepts packets in the default routing instance.
user@host# edit services analytics agent service-agents ipfix user@host# set outputs output-ipfix parameters collector-address 198.51.100.200 user@host# set outputs output-ipfix parameters collector-ca-certificate /var/tmp/ca.pem user@host# set outputs output-ipfix parameters collector-certificate /var/tmp/client.pem user@host# set outputs output-ipfix parameters collector-certificate-key /var/tmp/example.com.key user@host# set outputs output-ipfix parameters collector-connection-retry-interval 15