6.3. Configuring Cflowd with CLI

This section provides information to configure Cflowd using the command line interface.

Topics in this section include:

6.4. Basic Cflowd Configuration

In order for Cflowd to be operational and sampling traffic:

  1. Cflowd must be enabled
  2. at least one collector must be configured and enabled
  3. sampling must be enabled on an interface applied to a port

The following example shows a Cflowd configuration:

A:NOK-1>config>cflowd# info detail
----------------------------------------------
     active-timeout 30
     cache-size 65536
     inactive-timeout 15
     overflow 1
     rate 1000
     collector 10.10.10.103:2055 version 9
          autonomous-system-type origin
          description "V9 collector"
          no shutdown
     exit
     template-retransmit 330
     exit
     no shutdown
----------------------------------------------
A:NOK-1>config>cflowd#

6.5. Common Configuration Tasks

This section provides a brief overview of the following common configuration tasks that must be performed to configure Cflowd:

6.5.1. Enabling Cflowd

Cflowd is disabled by default. Use the following CLI syntax to enable Cflowd:

CLI Syntax:
config# cflowd
no shutdown

The following example shows the default values when Cflowd is initially enabled. No collectors or collector options are configured.

A:NOK-1>config# info detail 
...
#------------------------------------------
echo "Cflowd Configuration"
#------------------------------------------
    cflowd
        active-timeout 30
        cache-size 65536
        inactive-timeout 15
        overflow 1
        rate 1000
        template-retransmit 600 
        no use-vtr-if-index
        no shutdown
    exit
#------------------------------------------
A:NOK-1>config#

6.5.1.1. Enabling Cflowd On a SAP

Use the following CLI syntax to enable Cflowd on a VPLS or Epipe SAP:

CLI Syntax:
config>service>vpls>sap# cflowd
no shutdown
CLI Syntax:
config>service>epipe>sap# cflowd
no shutdown

When Cflowd is configured on a SAP, all packets received are subject to analysis according to the global Cflowd configuration and exported according to the collector configurations.

The following example shows the default values when Cflowd is initially enabled on a VPLS SAP. The same defaults apply to Cflowd configured on an Epipe SAP.

*A:7705:Dut-A>config>service>vpls$ info
----------------------------------------------
            stp
                shutdown
            exit
            sap 1/1/1 create
                cflowd
                no shutdown
            exit
            sap 1/1/2 create
                cflowd
                no shutdown
            exit
            no shutdown
----------------------------------------------

6.5.2. Configuring Global Cflowd Parameters

The following common attributes apply to all instances of Cflowd:

  1. active timeout — controls the maximum time a flow record can be active before it will be automatically exported to the configured collectors
  2. inactive timeout — controls the minimum time before a flow is declared inactive. If the inactive timer expires and no new traffic is sampled for a flow, the flow is declared inactive and marked to be exported to the configured collectors
  3. cache size — defines the maximum size of the flow cache
  4. export mode — controls how exports are generated by the Cflowd process
  5. overflow — defines the percentage of flow records that are exported to all collectors if the flow cache size is exceeded
  6. rate — defines the system-wide sampling rate for Cflowd
  7. template retransmit— defines the interval (in seconds) before the version 9 and version 10 templates are retransmitted to all matching collectors

Use the following CLI commands to configure Cflowd parameters:

CLI Syntax:
config>cflowd#
active-timeout minutes
cache-size num-entries
export-mode {automatic | manual}
inactive-timeout seconds
overflow percent
rate sample-rate
template-retransmit seconds
no shutdown

The following example shows a global Cflowd configuration:

A:NOK-1>config>cflowd# info 
#------------------------------------------
        active-timeout 20
        inactive-timeout 10
        overflow 10
        rate 100
#------------------------------------------
A:NOK-1>config>cflowd# 

6.5.3. Configuring Cflowd Collector Parameters

To configure Cflowd collector parameters, enter the following commands:

CLI Syntax:
config>cflowd#
collector ip-address[:port] [version version]
description description-string
no shutdown
template-set {basic | mpls-ip | l2-ip}

If a specific collector UDP port is not identified, flows are sent to port 2055 by default.

The following example shows a basic configuration for Cflowd collectors:

A:NOK-1>config>cflowd# info
-----------------------------------------
        active-timeout 20
        inactive-timeout 10
        overflow 10
        rate 100
        collector 10.10.10.1:2000 version 9
            description "v9collector"
           template-set mpls-ip
        exit
        collector 10.10.10.2:5000 version 9
            description "Neighbor collector"
        exit
-----------------------------------------
A:NOK-1>config>cflowd# 

6.5.4. Specifying Cflowd Options on an IP Interface

When Cflowd is enabled on an interface, all packets received or transmitted are subject to analysis according to the global Cflowd configuration and exported according to the collector configurations.

The following must be configured to enable traffic sampling on the interface or SAP:

  1. Cflowd must be enabled
  2. at least one Cflowd collector must be configured and enabled
  3. Cflowd sampling parameters must be configured in the config>router>interface or config>service>ies/vprn>interface context.

The interface option must be selected to enable traffic sampling on an interface. If Cflowd is not enabled, traffic sampling will not occur on the interface.

6.5.4.1. Interface Configurations

CLI Syntax:
config>router>if# cflowd-parameters sampling
{unicast | multicast} type {interface} [direction {ingress-only | egress-only | both}]
no sampling {unicast | multicast}    

When enabled on a router interface, Cflowd extracts traffic flow samples from the interface for analysis. Sampling is supported in the ingress and/or egress direction.

6.5.4.2. Service Interfaces

When enabled on a service interface, Cflowd collects routed traffic flow samples through the router for analysis. Cflowd is supported on IES and VPRN service interfaces. Sampling is supported in the ingress and/or egress direction.

The following command is used to configure Cflowd parameters on an IES interface and the same syntax is used for the VPRN context.

CLI Syntax:
config>service>ies>interface# cflowd-parameters sampling {unicast | multicast} type {interface} [direction {ingress-only | egress-only | both}]
no sampling {unicast | multicast}  

6.6. Cflowd Configuration Management Tasks

This section provides a brief overview of the following Cflowd configuration management tasks:

6.6.1. Modifying Global Cflowd Parameters

Cflowd parameter modifications apply to all instances where Cflowd is enabled. Changes are applied immediately. Use the following commands to modify global Cflowd parameters:

CLI Syntax:
config>cflowd#
active-timeout minutes
no active-timeout
cache-size num-entries
no cache-size
export-mode {automatic | manual}
inactive-timeout seconds
no inactive-timeout
overflow percent
no overflow
rate sample-rate
no rate
[no] shutdown
template-retransmit seconds
no template-retransmit
[no] use-vrtr-if-index

The following example shows the Cflowd command syntax to modify configuration parameters:

Example:
config>cflowd# active-timeout 60
config>cflowd# no inactive-timeout
config>cflowd# overflow 2
config>cflowd# rate 10

The following example shows the modified Cflowd configuration:

A:NOK-1>config>cflowd# info 
#------------------------------------------
        active-timeout 60
        overflow 2
        rate 10
#------------------------------------------
A:NOK-1>config>cflowd# 

6.6.2. Modifying Cflowd Collector Parameters

Use the following commands to modify Cflowd collector parameters:

CLI Syntax:
config>cflowd#
collector ip-address[:port] [version version]
no collector ip-address[:port]
[no] description description-string
[no] shutdown
template-set {basic | mpls-ip | l2-ip}

The following example displays Cflowd modifications:

A:NOK-1>config>cflowd# info
-----------------------------------------
        active-timeout 60
        overflow 2
        rate 10
        collector 10.10.10.1:2000 version 9
            description "AS info collector"
        exit
        collector 10.10.10.2:5000 version 9
            description "Test collector"
        exit
-----------------------------------------
A:NOK-1>config>cflowd#