配置镜像端口监视流量

配置镜像端口监控流量

image-20250527165514136

1.配置监控端口和镜像端口(被监控)

AR3

<Huawei>sys
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 10.0.0.1 8

AR2(代替交换机)

<Huawei>sys    
[Huawei]observe-port interface Ethernet 0/0/2 #指定监控端口
[Huawei]interface Ethernet 0/0/3
[Huawei-Ethernet0/0/3]mirror to observe-port ?
  both      Assign Mirror to both inbound and outbound of an interface 
  inbound   Assign Mirror to the inbound of an interface  #--进端口的流量
  outbound  Assign Mirror to the outbound of an interface # --出端口的流量
[Huawei-Ethernet0/0/3]mirror to observe-port both # --将出入端口的流量同时发送到监控端口

2.抓包测试

image-20250527165321807

PC1 ping 网关

image-20250527165438729

成功被抓取

image-20250527165429824

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注