Configuring M, MX and T Series Routers for Discard Accounting with a Template
Flow monitoring version 9, which is based on RFC 3954, provides a way to organize flow data into templates. Version 9 also provides a way to actively monitor IPv4, IPv6, MPLS, and peer AS billing traffic. Version 9 is not supported on the AS-I PIC.
To activate templates in flow monitoring, you must configure a template and include that template in the version 9 flow monitoring configuration. Version 9 does not work in conjunction with versions 5 and 8.
To configure a version 9 template, include the template template-name statement
at the [edit services flow-monitoring version9] hierarchy
level. The Junos OS supports five different templates: ipv4-template, ipv6–template, mpls-template, mpls-ipv4-template, and peer-as-billing-template. To view the fields selected
in each of these templates, see Flow Monitoring
Version 9 Format Output Fields.
[edit services]
flow-monitoring {
version9 { # Specifies flow monitoring version 9.
template mpls { # Specifies template you are configuring.
template-refresh-rate {
packets 6000; # The default is 4800 packets and the range is 1–480000 packets.
seconds 90; # The default is 60 seconds and the range is 1–600 seconds.
}
option--refresh-rate {
packets 3000; # The default is 4800 packets and the range is 1–480000 # packets.
seconds 30; # The default is 60 seconds and the range is 1–600.
}
flow-active-timeout 60; # The default is 60 seconds and the range is # 10–600.
flow-inactive-timeout 30; # The default is 60 seconds and the range 10–600.
template-refresh-rate seconds 10; # The default is 600 seconds and the # range is 10–600
mpls-template {
label-positions [1 | 2 | 3]; # Specifies label position for the MPLS template.
}
}
}You can export to multiple templates at a time to a maximum of eight flow servers for AS PICs and
one flow server for all other PICs. To assign a template to a flow output, include
the template template-name statement at the
[edit forwarding options sampling output flow-server version9]
hierarchy level:
[edit]
forwarding-options {
sampling {
input {
family mpls {
rate 1;
run-length 1;
}
}
output {
flow-server 10.60.2.1 { # The IP address and port of the flow server.
port 2055;
source-address 192.0.2.1;
version9 { # Records are sent to the flow server using version 9 format.
template { # Indicates a template will organize records.
mpls; # Records are sent to the MPLS template.
}
}
}
}
}
}