SW1(config)#monitor session 1 source interface f0/0 //定义被监控的端口 
SW1(config)#monitor session 1 destination interface f0/12 //接分析工具的端口(PC抓包) 
SW1#show monitor session 1 //查看监控会话1 
Session 1 
--------- 
Source Ports: 
RX Only: None 
TX Only: None 
Both: fa0/0 
Source VLANs: 
RX Only: None 
TX Only: None 
Both: None 
Destination Ports: Fa0/12 
Filter VLANs: None 
SW2(config)#monitor session 1 source vlan 10 both //定义对指定VLAN的信息做双向的监控 
SW2(config)#monitor session 1 destination interface f0/12 //接分析工具的端口(PC抓包) 
SW2(config)#monitor session 1 source interface f0/0 - 8 both //对指定多个端口的信息做双向的监控 
SW2(config)#monitor session 1 destination interface f0/12 //接分析工具的端口(PC抓包)