华为交换机端口镜像配置命令:创建镜像会话:mirror monitor session 配置镜像源端口:mirror monitor source interface 配置镜像目标端口:mirror monitor analyzer interface

华为交换机端口镜像配置命令
在华为交换机上配置端口镜像,需要使用以下命令:
1. 创建镜像会话
<code>mirror monitor session <session-name></code>
-
<session-name></session-name>:镜像会话名称,自定义即可。
2. 配置镜像源端口
<code>mirror monitor source interface <source-interface-type> <source-interface-number></code>
-
<source-interface-type></source-interface-type>:镜像源端口类型,如 Ethernet、GE 等。 -
<source-interface-number></source-interface-number>:镜像源端口号。
3. 配置镜像目标端口
<code>mirror monitor analyzer interface <analyzer-interface-type> <analyzer-interface-number></code>
-
<analyzer-interface-type></analyzer-interface-type>:镜像目标端口类型,如 Ethernet、GE 等。 -
<analyzer-interface-number></analyzer-interface-number>:镜像目标端口号。
4. 启用镜像会话
<code>mirror monitor session <session-name> enable</code>
示例
以下命令示例配置镜像会话,将 Ethernet 端口 1 流量镜像到 Ethernet 端口 2:
<code>mirror monitor session mirror1 mirror monitor source interface Ethernet 1 mirror monitor analyzer interface Ethernet 2 mirror monitor session mirror1 enable</code>
注意事项
- 镜像源端口和目标端口不能相同。
- 镜像会话创建后,流量才会被镜像。
- 镜像会话可以随时启用或禁用。











