关于交换机端口镜像的原理百度下,很多。

简单介绍配置步骤:

Switch#show monitor
 No SPAN configuration is present in the system.      (之前没有配置过端口镜像)

Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#monitor session 1 source interface fastEthernet 0/3 both   (被监控的端口,"both"表示监控此端口接收与传输的流量,一般来说用"rx"即可)
Switch(config)#monitor session 1 destination interface fastEthernet 0/22   (将监控端口流量转发到此端口)
Switch(config)#end
Switch#show monitor
Session 1
---------
Type                   : Local Session
Source Ports           :
    Both               : Fa0/3
Destination Ports      : Fa0/22
    Encapsulation      : Native
          Ingress      : Disabled

Switch#

图如下: 

Cisco 3560端口镜像_SPAN