Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Supported Platforms

Configuring Flow Aggregation to Use IPFIX Flow Templates

Use of IPFIX allows you to define a flow record template suitable for IPv4 traffic or IPv6 traffic. Templates are transmitted to the collector periodically, and the collector need not be aware of the router configuration. You can define template refresh rate, flow active timeout and inactive timeout.

The following sections contain additional information:

Configuring the IPFIX Template Properties

To define the IPFIX templates, include the following statements at the [edit services flow-monitoring version-ipfix] hierarchy level:

[edit services flow-monitoring IPFIX]template name {flow-active-timeout seconds;flow-inactive-timeout seconds;option-refresh-rate packets packets seconds seconds;template-refresh-rate packets packets seconds seconds;(ipv4-template | ipv6-template);}

The following details apply to the configuration statements:

  • You assign each template a unique name by including the template name statement.
  • You then specify each template for the appropriate type of traffic by including the ipv4-template or ipv6–template.
  • Within the template definition, you can optionally include values for the flow-active-timeout and flow-inactive-timeout statements. These statements have specific default and range values when they are used in template definitions; the default is 60 seconds and the range is from 10 through 600 seconds.
  • You can also include settings for the option-refresh-rate and template-refresh-rate statements within a template definition. For both of these properties, you can include a timer value (in seconds) or a packet count (in number of packets). For the seconds option, the default value is 600 and the range is from 10 through 600. For the packets option, the default value is 4800 and the range is from 1 through 480,000.
  • To filter IPV6 traffic on a media interface, the following configuration is supported:
    interfaces interface-name {unit 0 {family inet6 {sampling {input;output;}}}}

Restrictions

The following restrictions apply to IPFIX templates:

  • Outbound Routing Engine traffic is not sampled. A firewall filter is applied as output on the egress interface, which samples packets and exports the data. For transit traffic, egress sampling works correctly. For internal traffic, the next hop is installed in the Packet Forwarding Engine but sampled packets are not exported.
  • Flows are created only after the route record resynchronization operation is complete, which takes 120 seconds.
  • VLAN ID field is not valid for egress traffic, and returns a value of 0 for egress traffic.
  • The VLAN ID field is updated when a new flow record is created and so, any change in VLAN ID after the record has been created might not be updated in the record.

Fields Included in the IPv4 Template

  • IPv4 Source Address
  • IPv4 Destination Address
  • IPv4 TOS
  • IPv4 Protocol
  • L4 Source Port
  • L4 Destination Port
  • ICMP Type and Code
  • Input Interface
  • VLAN ID
  • IPv4 Source Mask
  • IPv4 Destination Mask
  • Source AS
  • Destination AS
  • IPv4 Next Hop Address
  • TCP Flags

    Output Interface

  • Number of Flow Bytes
  • Number of Flow Packets
  • Flow Start Time
  • Flow End Time
  • Flow End Reason

Fields Included in the IPv6 Template

  • IPv6 Source Address
  • IPv6 Destination Address
  • IPv6 TOS
  • IPv6 Protocol
  • L4 Source Port
  • L4 Destination Port
  • ICMP Type and Code
  • Input Interface
  • VLAN ID
  • IPv6 Source Mask
  • IPv6 Destination Mask
  • Source AS
  • Destination AS
  • IPv6 Next Hop Address
  • TCP Flags

    Output Interface

  • Number of Flow Bytes
  • Number of Flow Packets
  • Flow Start Time
  • Flow End Time
  • Flow End Reason

Verification

The following show commands are supported for IPFIX:

  • show services accounting flow inline-jflow fpc-slot fpc-slot
  • show services accounting errors inline-jflow fpc-slot fpc-slot
  • show services accounting status inline-jflow fpc-slot fpc-slot

Example: Configuring an IPFIX Flow Templates and Flow Sampling

The following is a sample IPFIX template configuration:

services {flow-monitoring {version-ipfix {template ipv4 {flow-active-timeout 60;flow-inactive-timeout 70;template-refresh-rate seconds 30;option-refresh-rate seconds 30;ipv4-template;}}}}
chassis;fpc 0 {sampling-instance s1;}

The following example applies the IPFIX template to enable sampling of traffic for billing:

forwarding-options {sampling {instance {s1 {input {rate 10;}family inet {output {flow-server 11.11.4.2 {port 2055;version-ipfix {template {ipv4;}}}inline-jflow {source-address 11.11.2.1;}}}}}}}

Published: 2012-12-04

Supported Platforms

Published: 2012-12-04