华为S系列网管交换机配置端口镜像


端口镜像是指设备复制从镜像端口流经的报文,并将此报文传送到指定的观察端口进行分析和监控。根据观察端口的不同,端口镜像分为本地端口镜像和二层远程端口镜像。

端口镜像
将一个镜像端口的报文复制到一个观察端口上。例如:将镜像端口GE2/0/1入方向的报文(即接收到的报文)复制到观察端口GE1/0/1上,GE1/0/1与监控设备直连。
system-view
[HUAWEI] observe-port 1 interface gigabitethernet 1/0/1
[HUAWEI] interface gigabitethernet 2/0/1
[HUAWEI-GigabitEthernet2/0/1] port-mirroring to observe-port 1 inbound

N端口镜像
将一个镜像端口的报文复制到N个不同的观察端口上。例如:将镜像端口GE2/0/1入方向的报文(即接收到的报文)复制到观察端口GE1/0/1~GE1/0/3上,GE1/0/1~GE1/0/3与监控设备直连。

观察端口逐个进行配置
system-view
[HUAWEI] observe-port 1 interface gigabitethernet 1/0/1
[HUAWEI] observe-port 2 interface gigabitethernet 1/0/2
[HUAWEI] observe-port 3 interface gigabitethernet 1/0/3
[HUAWEI] interface gigabitethernet 2/0/1
[HUAWEI-GigabitEthernet2/0/1] port-mirroring to observe-port 1 inbound
[HUAWEI-GigabitEthernet2/0/1] port-mirroring to observe-port 2 inbound
[HUAWEI-GigabitEthernet2/0/1] port-mirroring to observe-port 3 inbound

观察端口批量进行配置(V200R005及后续版本支持)
system-view
[HUAWEI] observe-port 1 interface-range gigabitethernet 1/0/1 to gigabitEthernet 1/0/3
[HUAWEI] interface gigabitethernet 2/0/1
[HUAWEI-GigabitEthernet2/0/1] port-mirroring to observe-port 1 inbound

配置N:1端口镜像
将N个镜像端口的报文复制到一个观察端口上。例如:将镜像端口GE2/0/1~GE2/0/3入方向的报文(即接收到的报文)复制到观察端口GE1/0/1上,GE1/0/1与监控设备直连。
system-view
[HUAWEI] observe-port 1 interface gigabitethernet 1/0/1
[HUAWEI] interface gigabitethernet 2/0/1
[HUAWEI-GigabitEthernet2/0/1] port-mirroring to observe-port 1 inbound
[HUAWEI-GigabitEthernet2/0/1] quit
[HUAWEI] interface gigabitethernet 2/0/2
[HUAWEI-GigabitEthernet2/0/2] port-mirroring to observe-port 1 inbound
[HUAWEI-GigabitEthernet2/0/2] quit
[HUAWEI] interface gigabitethernet 2/0/3
[HUAWEI-GigabitEthernet2/0/3] port-mirroring to observe-port 1 inbound
[HUAWEI-GigabitEthernet2/0/3] quit

退出移动版
ICP备案号:晋ICP备18007549号-1
站长微信:15534641008