Juniper Networks EX2500 User Manual

Page of 102
EX2500 Ethernet Switch Configuration Guide
82
„ Configuring Port Mirroring
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
... 
NOTE: 
Ingress and egress traffic is duplicated and sent to the monitor port after 
regular switch processing is complete.