交换机做镜像端口

交换机做镜像端口

示例: 交换机1口作为观察口,连接pc 使用wireshark抓包
3~13口是要抓包的口

华三交换机

[H3C]mirroring-group 1 local   //创建本地镜像端口组1
[H3C]mirroring-group 1 mirroring-port GigabitEthernet 1/0/3 to GigabitEthernet 1/0/13 both  //配置镜像端口3-13,both:监控入方向和出方向
[H3C]mirroring-group 1 monitor-port GigabitEthernet 1/0/1  //配置1口为镜像组1的观察口
##查看端口镜像配置
[H3C]dis mirroring-group all

在这里插入图片描述

华为交换机

[SW1]observe-port 1 interface GigabitEthernet 0/0/1 //配置1口为观察口1
[SW1]int gig 0/0/3 //进入3口
[SW1-GigabitEthernet0/0/3]port-mirroring to observe-port 1 both //把3口的出入流量镜像到观察口1
[SW1]port-group group-member GigabitEthernet 0/0/4 to GigabitEthernet 0/0/13 //临时选择4-13口
[SW1-port-group]port-mirroring to observe-port 1 both   //把4-13口的出入流量都镜像到观察口1口
##查看端口镜像配置
[H3C]dis port-mirroring

在这里插入图片描述

思科交换机

SW1<config>#monitor session 1 source interface gigabitEthernet 1/0/3- 13
SW1<config>#monitor session 1 destination interface gigabitEthernet 1/0/1
##查看端口镜像配置
SW1#show monitor

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_42906357/article/details/123707622