3。Cat4000/6500 with CatOS set span命令 cat4k#set span 1/2 1/3 //把1/2得流量镜像到1/3
4。Cat4500/6500 with IOS 同2--Cat2950/3550/3750
方法四:VACL VACL=VLAN ACL=Security ACL 只能在Cat6500上使用
CatOS: c6509 (enable) set security acl ip MyCap permit tcp any any eq 443 c6509 (enable) set security acl ip MyCap permit tcp any eq 443 any c6509 (enable) set security acl ip MyCap permit ip any any capture //排除所有访问443端口的流量,其他流量都是感爱好的 c6509 (enable) commit security acl MyCap //定义一个security ACL的name c6509 (enable) set security acl map MyCap 100,101 //把security ACL应用到vlan 100和101上 c6509 (enable) set security acl capture-ports 3/1 //把capture的流量镜像到3/1端口上
IOS:
c6509(config)# access-list 100 permit ip any any c6509(config)# vlan access-map MyCap 10 c6509(config-access-map)# match ip address 100 c6509(config-access-map)# action forward capture c6509(config)# vlan filter MyCap vlan-list 200 , 201 c6509(config)# interface gi3/1 c6509(config-if)# switchport capture