步骤1:配置会话1中源端口为14,目的端口为15,端口15将监控端口14的进出数据
Ruijie(config)#monitor session 1 source interface fastEthernet 0/14 both
Ruijie(config)#monitor session 1 destination interface fastEthernet 0/15
Ruijie(config)#exit
Ruijie#show monitor session 1
sess-num: 1
span-type: LOCAL_SPAN
src-intf:
FastEthernet 0/14 frame-type Both
dest-intf:
FastEthernet 0/15
Ruijie#
步骤2:测试端口15的监控效果
选择3台测试用计算机,例如:PC4,PC5,PC6,将这3台计算机的网卡1禁用,设置网卡2的IP地址在同一网段,例如3台计算机分别为11.11.11.4,11.11.11.5,11.11.11.6,然后启用这3台计算机的网卡2。在机柜中将测试用的3台计算机网卡2的网线接入已配置的交换机的相应端口例如分别接入f0/14, f0/15,f0/16,接着在f0/15口连接的测试计算机PC5上打开wirshark,在PC4上ping 11.11.11.6(PC6的IP地址),观测PC5能否收到ICMP交互数据包。
步骤3:取消步骤1中SPAN的配置
Ruijie(config)#no monitor session 1
Ruijie(config)#
Ruijie#*Feb 26 15:09:05: %SYS-5-CONFIG_I: Configured from console by console
Ruijie#show monitor session 1