拓扑:
1.1.1.1--------R1-------------SWITCH----------------R2--------2.2.2.2
192.168.12.1 | 192.168.12.2
|
|
IPS
R1和R2属于vlan111
R1连交换机的接口是F0/11
R2连交换机的接口是F0/12
IDS连交换机的接口是F0/18
对telnet流进行TCP reset
第一次实验,镜像口没有进行封装,使用的是Native
SPAN配置:
Switch(config)#monitor session 1 source int f0/11 , f0/12
Switch(config)#monitor session 1 destination int f0/18 ingress vlan 111查看SPAN:
Switch#show mon sess 1
Session 1
---------
Type : Local Session
Source Ports :
Both : Fa0/11-12
Destination Ports : Fa0/18
Encapsulation: Native
Ingress: Disabled
对IDS发送的报文抓包

实验成功,这里IDS发送的tcp reset报文是不带标签的,所以这里的ingress vlan可以随便填写,没什么作用,效果一样
第二次实验,镜像口进行dot1q封装
SPAN配置:
Switch(config)#monitor session 1 source int f0/11 , f0/12
Switch(config)#monitor session 1 destination int f0/18 encapsulation dot1q ingress vlan 111查看SPAN:
Switch#show mon sess 1
Session 1
---------
Type : Local Session
Source Ports :
Both : Fa0/11-12
Destination Ports : Fa0/18
Encapsulation: DOT1Q
Ingress: Enabled, default VLAN = 111
这次default VLAN是111,可以看到,telnet的报文从SPAN口收到,已经打上dot1q标签了

对IDS发送的报文抓包:

可以看到IDS发送的reset报文是不带标签的,这样服务器能认识
如果这里default VLAN改成222,可以看到:
Switch(config)#monitor session 1 destination int f0/18 encapsulation dot1q ingress vlan 222
对IDS发送的报文抓包:

可以看到这里对vlan111打了dot1q标签,这样,服务器就不认识了,所以,也就不能进行reset了
最后总结:
貌似TCP reset只能用在string上,对单个SYN报文,我试验中没成功
IPS会辨识SPAN口收到的报文,如果收到的报文时打标签的,则发送的RESET报文也是打标签的,除非通过ingress指定对哪个VLAN的报文不进行打标签






