16.03.2014 Views

Policy Framework Configuration Guide - Juniper Networks

Policy Framework Configuration Guide - Juniper Networks

Policy Framework Configuration Guide - Juniper Networks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 14: Introduction to Traffic Sampling <strong>Configuration</strong><br />

Example: Configuring Active Flow Monitoring Using Version 9<br />

Traffic Sampling Examples<br />

In this example, you enable active flow monitoring using version 9. You specify a template<br />

mpls that you configure at the [edit services monitoring] hierarchy level. You also configure<br />

the traffic family mpls to sample MPLS packets.<br />

[edit forwarding-options]<br />

sampling {<br />

input {<br />

rate 1;<br />

run-length;<br />

}<br />

family inet {<br />

output {<br />

flow-server 10.60.2.1 { # The IP address and port of the host<br />

port 2055; # that collects the sampled traffic flows.<br />

source-address 3.3.3.1;<br />

version9 {<br />

template mpls; # Version 9 records are sent<br />

} # using the template named mpls<br />

}<br />

}<br />

The following sections provide examples of configuring traffic sampling:<br />

• Example: Sampling a Single SONET/SDH Interface on page 355<br />

• Example: Sampling All Traffic from a Single IP Address on page 356<br />

• Example: Sampling All FTP Traffic on page 357<br />

Example: Sampling a Single SONET/SDH Interface<br />

The following configuration gathers statistical sampling information from a small<br />

percentage of all traffic on a single SONET/SDH interface and collects it in a file named<br />

sonet-samples.txt.<br />

Create the filter:<br />

[edit firewall family inet]<br />

filter {<br />

sample-sonet {<br />

then {<br />

sample;<br />

accept;<br />

}<br />

}<br />

}<br />

Apply the filter to the SONET/SDH interface:<br />

[edit interfaces]<br />

Copyright © 2010, <strong>Juniper</strong> <strong>Networks</strong>, Inc.<br />

355

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!