例:すべてのFTPトラフィックのサンプリング
以下の設定は、特定のイーサネットインターフェイスの出力パスでFTPを使用するパケットの割合が中程度に関する統計情報を収集し、 et-ftp-traffic.txtという名前のファイルに情報を収集します。
フィルターを作成します。
[edit firewall family inet]
filter ftp-stats {
term ftp-usage {
from {
destination-port [ftp ftp-data];
}
then {
sample;
accept;
}
}
}
インターフェイスにフィルターを適用します。
[edit interfaces]
et-7/0/2 {
unit 0 {
family inet {
filter {
input ftp-stats;
}
address 10.35.78.254/32 {
destination 10.35.78.4;
}
}
}
}
最後に、候補サンプルの 10% に関する統計を収集します。
[edit forwarding-options]
sampling {
input {
rate 10;
}
family inet {
output {
file {
filename et-ftp-traffic.txt;
files 50;
size 1m;
}
}
}
}