To configure flow monitoring and accounting properties, include the following statements at the [edit interfaces] hierarchy level:
- mo-fpc/pic/port {
-
- unit logical-unit-number {
-
- family inet {
-
- accounting {
- destination-class-usage;
- source-class-usage direction;
- }
- }
-
- address address {
- destination address;
- }
-
- filter {
- group filter-group-number;
- input filter-name;
- output filter-name;
- }
-
receive-options-packets;
-
receive-ttl-exceeded;
- sampling direction;
- }
- }
- multiservice-options {
- (core-dump | no-core-dump);
- (syslog | no-syslog);
- }
- (at-fpc/pic/port | fe-fpc/pic/port | ge-fpc/pic/port) {
-
passive-monitor-mode;
- }
- so-fpc/pic/port {
-
- unit logical-unit-number {
-
passive-monitor-mode;
- }
- }
To configure flow monitoring and accounting properties, include the following statements at the [edit forwarding-options] hierarchy level:
-
accounting name {
-
-
output {
-
aggregate-export-interval seconds;
-
-
cflowd hostname {
-
-
aggregation {
- autonomous-system;
- destination-prefix;
- protocol-port;
-
- source-destination-prefix {
- caida-compliant;
- }
- source-prefix;
- }
-
autonomous-system-type (origin | peer);
-
port port-number;
-
version format;
- }
- flow-active-timeout seconds;
-
flow-inactive-timeout seconds;
-
-
interface interface-name {
-
engine-id number;
-
engine-type number;
-
source-address address;
- }
- }
- }
-
monitoring name {
-
-
family inet {
-
-
output {
-
cflowd hostname port port-number;
-
export-format format;
-
flow-active-timeout seconds;
-
-
flow-export-destination {
- collector-pic;
- }
-
flow-inactive-timeout seconds;
-
-
interface interface-name {
-
engine-id number;
-
engine-type number;
-
input-interface-index number;
-
output-interface-index number;
-
source-address address;
- }
- }
- }
-
next-hop-group [ group-names ] {
-
- interface interface-name {
- next-hop [ addresses ];
- }
- }
-
port-mirroring {
-
-
input {
-
-
family (inet | inet6) {
-
rate rate;
-
run-length number;
- }
- }
-
-
output {
-
-
interface interface-name {
-
next-hop address;
- }
-
no-filter-check;
- }
-
-
traceoptions {
-
-
file filename {
-
files number;
-
size bytes;
- (world-readable | no-world-readable);
- }
- }
- }
-
sampling {
-
disable;
-
-
input {
-
-
family (inet | mpls) {
-
max-packets-per-second number;
-
rate number;
-
run-length number;
- }
- }
-
-
output {
-
aggregate-export-interval seconds;
-
-
cflowd hostname {
-
-
aggregation {
- autonomous-system;
- destination-prefix;
- protocol-port;
-
- source-destination-prefix {
- caida-compliant;
- }
- source-prefix;
- }
-
autonomous-system-type (origin | peer);
-
-
version9 {
-
template template-name;
- }
- (local-dump | no-local-dump);
-
port port-number;
-
source-address address;
-
version format;
- }
-
-
file {
-
disable;
-
filename filename;
-
files number;
-
size bytes;
- (stamp | no-stamp);
- (world-readable | no-world-readable);
- }
-
flow-active-timeout seconds;
-
flow-inactive-timeout seconds;
-
-
interface interface-name {
-
engine-id number;
-
engine-type number;
-
source-address address;
- }
- }
-
-
traceoptions {
-
-
file filename {
-
files number;
-
size bytes;
- (world-readable | no-world-readable);
- }
- }
- }
![]() |
Note: For the complete [edit forwarding-options] hierarchy, see the JUNOS Policy Framework Configuration Guide. This section documents only the statements used in flow monitoring and accounting services. |
To configure cflowd version 9 properties, include the following statements at the [edit services] hierarchy level:
-
flow-monitoring {
-
-
version9 {
-
-
template template-name {
-
flow-active-timeout seconds;
-
flow-inactive-timeout seconds;
-
ipv4-template;
-
-
mpls-template {
-
label-position [ positions ];
- }
-
-
mpls-ipv4-template {
-
label-position [ positions ];
- }
-
option-refresh-rate packets packets seconds seconds;
-
template-refresh-rate packets packets seconds seconds;
- }
- }
- }
This chapter describes the following tasks for configuring traffic sampling and flow-monitoring properties: