交换机配置端口镜像

配置端口镜像

端口镜像是指设备复制一份从镜像端口流经的报文,并将此报文传送到指定的观察端口进行分析和监控。
配置1:1端口镜像

将一个镜像端口的报文复制到一个观察端口上。例如:将镜像端口10GE1/0/1入方向的报文复制到观察端口10GE1/0/2上。
<HUAWEI> system-view
[~HUAWEI] observe-port 1 interface 10ge 1/0/2
[*HUAWEI] interface 10ge 1/0/1
[*HUAWEI-10GE1/0/1] port-mirroring observe-port 1 inbound/outbound/both(这个命令是将接口的收/发/收发双向流量都镜像给服务器的端口)
[*HUAWEI-10GE1/0/1] commit
配置1:N端口镜像

将一个镜像端口的报文复制到N个不同的观察端口上。例如:将镜像端口10GE1/0/1入方向的报文复制到观察端口10GE1/0/2、10GE1/0/3上。
<HUAWEI> system-view
[~HUAWEI] observe-port 1 interface 10ge 1/0/2
[*HUAWEI] observe-port 2 interface 10ge 1/0/3
[*HUAWEI] interface 10ge 1/0/1
[*HUAWEI-10GE1/0/1] port-mirroring observe-port 1 inbound/outbound/both(这个命令是将接口的收/发/收发双向流量都镜像给服务器的端口)
[*HUAWEI-10GE1/0/1] port-mirroring observe-port 2 inbound/outbound/both(这个命令是将接口的收/发/收发双向流量都镜像给服务器的端口)
[*HUAWEI-10GE1/0/1] commit
配置N:1端口镜像

将N个镜像端口的报文复制到同一个观察端口上。例如:将镜像端口10GE1/0/1、10GE1/0/2入方向的报文复制到观察端口10GE1/0/3上。
<HUAWEI> system-view
[~HUAWEI] observe-port 1 interface 10ge 1/0/3
[*HUAWEI] interface 10ge 1/0/1
[*HUAWEI-10GE1/0/1] port-mirroring observe-port 1 inbound/outbound/both(这个命令是将接口的收/发/收发双向流量都镜像给服务器的端口)
[*HUAWEI-10GE1/0/1] quit
[*HUAWEI] interface 10ge 1/0/2
[*HUAWEI-10GE1/0/2] port-mirroring observe-port 1 inbound/outbound/both(这个命令是将接口的收/发/收发双向流量都镜像给服务器的端口)
[*HUAWEI-10GE1/0/2] commit

这个命令是将接口的收发双向流量都镜像给服务器的端口

posted @ 2019-10-10 12:32  大熊子  阅读(4122)  评论(0编辑  收藏  举报