forwarding-options {
port-mirroring {
family inet {
input {
rate 1;
run-length 1;
}
output {
interface ;
no-filter-check;
}
}
}
}
interfaces {
t1-1/0/3:3 {
description Customer-A;
unit 0 {
family inet {
filter {
output FILTER-PORT_MIRROR-ALL;
input FILTER-PORT_MIRROR-ALL;
}
}
}
}
firewall {
family inet {
filter FILTER-PORT_MIRROR-ALL {
term MIRROR-ALL {
then {
port-mirror;
accept;
}
}
}
}
OR------------------
Configuring Port Mirroring for Local Traffic Analysis
To mirror interface traffic or VLAN traffic on the switch to an interface on
the switch:
1. Choose a name for the port mirroring configuration—in this case,
employee-monitor, and specify the input—in this case, packets entering
ge-0/0/0 and ge-0/0/1:
[edit ethernet-switching-options]
user@switch# set analyzer employee-monitor input ingress interface ge–0/0/0.0
user@switch# set analyzer employee-monitor input ingress interface ge–0/0/1.0
2. Optionally, you can specify a statistical sampling of the packets by setting a ratio:
[edit ethernet-switching-options]
user@switch# set analyzer employee-monitor ratio 200
When the ratio is set to 200, 1 of every 200 packets is mirrored to the analyzer.
You can use statistical sampling to reduce the volume of mirrored traffic, as a high volume of
mirrored traffic can be performance intensive for the switch.
3. Configure the destination interface for the mirrored packets:
[edit ethernet-switching-options]
user@switch# set analyzer employee-monitor output interface ge-0/0/10.0
4. commit