Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Configuring M, MX and T Series Routers for Discard Accounting with a Template

date_range 23-Nov-23

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.

content_copy zoom_out_map
[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:

content_copy zoom_out_map
[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.
                    }
                }
            }
        }
    }
}
footer-navigation