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

Configuring Flow Aggregation to Use Version 9 Flow Templates

Use of version 9 allows you to define a flow record template suitable for IPv4 traffic, IPv6 traffic, MPLS traffic, or a combination of IPv4 and MPLS traffic. Templates and the fields included in the template are transmitted to the collector periodically, and the collector need not be aware of the router configuration.

Note: Version 9 requires that you install a services PIC, such as the Adaptive Services PIC or MultiServices PIC in the routing platform. On MX-series platforms, the MultiServices DPC fulfills this requirement. For more information on determining which services PIC is suitable for your routing platform, see Table 4 or the appropriate hardware documentation.

The following sections contain additional information:

Configuring the Traffic to be Sampled

To specify sampling of IPv4, IPv6, or MPLS traffic, include the appropriate configuration of the family statement at the [edit forwarding-options sampling input] hierarchy level:

[edit forwarding-options sampling input]
family (inet | inet6 | mpls) {
max-packets-per-second number;
rate number;
run-length number;

You can include either family inet or family mpls.

Configuring the Version 9 Template Properties

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

[edit services flow-monitoring version9]
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 | mpls-ipv4-template | mpls-template) {
label-position [ positions ];
}
}

The following details apply to the configuration statements:

Restrictions

The following restrictions apply to version 9 templates:

Fields Included in Each Template Type

The following fields are common to all template types:

The IPv4 template includes the following specific fields:

The IPv6 template includes the following specific fields:

The MPLS template includes the following specific fields:

The MPLS-IPv4 template includes all the fields found in the IPv4 and MPLS templates.

MPLS Sampling Behavior

This section describes the behavior when MPLS sampling is used on egress interfaces in various scenarios (label pop or swap) on provider routers (P routers). For more information on configuration and background specific to MPLS applications, see the JUNOS MPLS Applications Configuration Guide.

  1. You configure MPLS sampling on an egress interface on the P router and configure an MPLS flow aggregation template. The route action is label pop because penultimate hop popping (PHP) is enabled.

    Previously, IPv4 packets (only) would have been sent to the PIC for sampling even though you configured MPLS sampling. No flows should be created, with the result that the parser fails.

    With the current capability of applying MPLS templates, MPLS flows are created.

  2. As in the first case, you configure MPLS sampling on an egress interface on the P router and configure an MPLS flow aggregation template. The route action is label swap and the swapped label is 0 (explicit null).

    Resulting behavior is that MPLS packets are sent to PIC. The flow being sampled corresponds to the label before the swap.

  3. You configure a Layer 3 VPN network, in which a customer edge router (CE-1) sends traffic to a provider edge router (PE-A), through the P router, to a similar provider edge router (PE-B) and customer edge router (CE-2) on the remote end.

    Resulting behavior is that you cannot sample MPLS packets on the PE-A to P router link.

Verification

To verify the configuration properties, you can use the show services accounting aggregation template template-name name operational mode command.

All other show services accounting commands also support version 9 templates, except for show services accounting flow-detail and show services accounting aggregation aggregation-type. For more information about operational mode commands, see the JUNOS System Basics and Services Command Reference.

Examples: Configuring Version 9 Flow Templates

The following is a sample version 9 template configuration:

services {
flow-monitoring {
version9 {
template ip-template {
flow-active-timeout 20;
flow-inactive-timeout 120;
ipv4-template;
}
template mpls-template-1 {
mpls-template {
label-position [1 3 4];
}
}
template mpls-ipv4-template-1 {
mpls-ipv4-template {
label-position [1 5 7];
}
}
}
}
}

The following is a sample firewall filter configuration for MPLS traffic:

firewall {
family mpls {
filter mpls_sample {
term default {
then {
accept;
sample;
}
}
}
}
}

The following sample configuration applies the MPLS sampling filter on a networking interface and configures the AS PIC to accept both IPv4 and MPLS traffic:

interfaces {
at-0/1/1 {
unit 0 {
family mpls {
filter {
input mpls_sample;
}
}
}
}
sp-7/0/0 {
unit 0 {
family inet;
family mpls;
}
}
}

The following example applies the MPLS version 9 template to the sampling output and sends it to the AS PIC:

forwarding-options {
sampling {
input {
family mpls {
rate 1;
}
}
output {
flow-active-timeout 60;
flow-inactive-timeout 30;
cflowd 1.2.3.4 {
port 2055;
version9 {
template mpls-ipv4-template-1;
}
}
interface sp-7/0/0 {
source-address 1.1.1.1;
}
}
}
}

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