[Contents] [Prev] [Next] [Index] [Report an Error]


Configuring Flow-Based Statistics Collection

To configure J-Flow on a virtual router:

  1. Enable J-Flow statistics.
  2. Enable J-Flow statistics on the desired interfaces.
  3. (Optional) Define the sampling interval at which you want to collect statistics.
  4. (Optional) Customize the size of the main flow cache.
  5. (Optional) Define flow cache aging timers.
  6. (Optional) Specify to where you want to export J-Flow statistics.

Enabling Flow-Based Statistics

Use the ip flow statistics command to explicitly enable J-Flow.

NOTE: Issuing any configuration level commands implicitly enables J-Flow.


ip flow statistics

Enabling Flow-Based Statistics on an Interface

Use the ip route-cache flow sampled command to enable J-Flow on an interface.

NOTE: Issuing an interface-level flow command does not enable J-Flow on the virtual router. To enable J-Flow, issue the ip flow statistics command.


ip route-cache flow sampled

Defining a Sampling Interval

Use the ip flow-sampling-mode command to define the packet-sampling interval for the virtual router. The sampling interval specifies the rate at which the virtual router samples J-Flow information. This rate is used for all interfaces that have J-Flow enabled. Once you enable an interface, the virtual router samples 1 packet at the specified packet interval. The possible interval range is from 10 packets to 4 billion packets (the default).

NOTE: Packet sampling occurs individually for each processor. Because the router distributes packets over multiple processors, sampling occurs when each processor reaches the specified packet interval.


ip flow-sampling-mode packet-interval

Setting Cache Size

Use the ip flow-cache entries command to limit the number of main flow cache entries for the virtual router (as collected across all line modules that are running J-Flow). Once the cache size exceeds the flow-cache entry limit, the least recently used flow is removed.

The possible flow-cache range is 1,024 to 524,288 entries. The default is 65,536 entries.

ip flow-cache entries

Defining Aging Timers

Once the virtual router creates a flow in the cache, the flow can be removed at the expiration of either the active or the inactive timer.

Specifying the Activity Timer

Use the ip flow-cache timeout active command to specify a value for the activity timer. The activity timer measures the amount of time that the virtual router has been recording a datagram for a given flow. When this timer expires, the virtual router exports the flow cache entry from the cache and removes the entry. This process prevents active flows from remaining in the flow cache and allows collected data to appear in a timely manner. The possible range for the activity timer is 1 to 60 minutes. The default value is 30 minutes.

ip flow-cache timeout active

Specifying the Inactivity Timer

Use the ip flow-cache timeout inactive command to specify a value for the inactivity timer. The inactivity timer measures the length of time expired since the virtual router recorded the last datagram for a given flow. When this timer expires, the virtual router exports the flow cache entry from the cache and removes it. When, at a later time, another datagram begins that uses the same flow characteristics, the virtual router allocates a new flow cache entry, and the inactivity timer begins again. The possible range for the inactivity timer is from 10 to 600 seconds. The default value is 15 seconds.

ip flow-cache timeout inactive

Specifying Flow Export

Use the ip flow-export command to specify the location to which you want to export the J-Flow datagrams.

ip flow-export


[Contents] [Prev] [Next] [Index] [Report an Error]