Configuring port mirroring, Figure 15: monitoring ports, Enable port mirroring – Juniper Networks EX2500 User Manual
Page 100: View the current configuration, Ex2500(config)# port-mirroring enable

EX2500 Ethernet Switch Configuration Guide
86
Configuring Port Mirroring
Figure 15: Monitoring Ports
As shown in Figure 15, port 2 is acting as a monitor port, receiving mirrored traffic
from three other switch ports: ingress traffic from port 4, egress traffic from port 7,
and both ingress and egress traffic from port 10. A sniffer could be attached to port
2 in order to monitor the mirrored traffic on ports 4, 7, and 10.
Configuring Port Mirroring
To configure port mirroring for the example shown in Figure 15:
1.
Specify the monitoring port, the mirroring port(s), and the port-mirror
direction.
ex2500(config)# port-mirroring monitor-port 2 mirroring-port 4 in
ex2500(config)# port-mirroring monitor-port 2 mirroring-port 7 out
ex2500(config)# port-mirroring monitor-port 2 mirroring-port 10 both
2.
Enable port mirroring.
ex2500(config)# port-mirroring enable
3.
View the current configuration.
ex2500# show port-mirroring
Port mirroring is enabled
Monitoring Ports Mirrored Ports
1
none
2
(4, in) (7, out) (10, both)
3
none
4
none
5
none
6
none
7
none
8
none
9
none
10
none
...
9
10
11
12
5
6
7
8
SP
L/A
17
18
19
20
13
14
15
16
21
22
23
24
MGMT
B
A
1
2
3
4
CON
RESET
EX2500
ST-A
SYS
FAN
ST-B
2
4
7
10
Monitor Port
Mirrored Traffic
Regular Switch Port Traffic
Ing
re
ss
Eg
re
ss
Ing
re
ss
Eg
re
ss
Ing
re
ss
Eg
re
ss
NOTE:
Ingress and egress traffic is duplicated and sent to the monitor port after
regular switch processing is complete.