当前位置:文档之家› H3C交换机端口镜像配置命令

H3C交换机端口镜像配置命令

端口镜像配置命令1.1 端口镜像配置命令1.1.1 display mirroring-group【命令】display mirroring-group { group-id| all | local | remote-destination | remote-source }【视图】任意视图【参数】group-id:端口镜像组的组号,取值范围为1~2。

all:所有镜像组。

local:本地镜像组。

remote-destination:远程目的镜像组。

remote-source:远程源镜像组。

【描述】display mirroring-group命令用来显示端口镜像组的信息。

不同的镜像组类型,其显示内容不同。

设备将按照镜像组号的顺序进行显示。

【举例】# 显示所有镜像组的信息。

<Sysname> display mirroring-group allmirroring-group 1:type: localstatus: activemirroring port:Ethernet1/0/1 bothEthernet1/0/2 bothmonitor port: Ethernet1/0/3mirroring-group 2:type: remote-sourcestatus: inactivemirroring port:Ethernet1/0/4 inboundreflector port:remote-probe vlan: 1900表1-1 display mirroring-group命令显示信息描述表1.1.2 mirroring-group【命令】mirroring-group group-id{ local | remote-source | remote-destination }undo mirroring-group{ group-id|local | remote-source|remote-destination | all } 【视图】系统视图【参数】group-id:端口镜像组的组号,取值范围为1~2。

local:本地镜像组。

remote-source:远程源镜像组。

remote-destination:远程目的镜像组。

all:所有镜像组。

【描述】mirroring-group命令用来创建镜像组。

undo mirroring-group命令用来删除镜像组。

创建镜像组的时候需要指定镜像组类型:●若在命令行中指定local参数,表示要创建本地镜像组;●若在命令行中指定remote-destination参数,表示要创建远程目的镜像组;●若在命令行中指定remote-source参数,表示要创建远程源镜像组。

删除镜像组的时候需要指定镜像组类型或者镜像组号:●若在命令行中指定group-id参数,表示删除端口镜像组号为group-id的镜像组;●若在命令行中指定all参数,表示删除所有的镜像组;●若在命令行中指定local参数,表示要删除本地镜像组;●若在命令行中指定remote-destination参数,表示要删除远程目的镜像组;●若在命令行中指定remote-source参数,表示要删除远程源镜像组。

需要注意的是:●S3610&S5510系列以太网交换机只支持配置1个本地镜像组或1个远程源镜像组,两者不能同时配置。

●如果本地端口镜像组的目的端口和流镜像的目的端口为不同的端口,则两者不能同时配置。

关于流镜像的详细介绍请参见本手册“QoS”部分。

【举例】# 创建本地镜像组1。

<Sysname> system-view[Sysname] mirroring-group 1 local# 创建远程目的镜像组2。

<Sysname> system-view[Sysname] mirroring-group 2 remote-destination1.1.3 mirroring-group mirroring-port【命令】mirroring-group group-id mirroring-port mirroring-port-list { inbound | outbound | both }undo mirroring-group group-id mirroring-port mirroring-port-list { inbound | outbound | both }【视图】系统视图【参数】group-id:端口镜像组的组号,取值范围为1~2。

mirroring-port-list:端口列表,表示多个端口。

表示方式为mirroring-port-list = { interface-type interface-number [ to interface-type interface-number ] }&<1-8>。

其中,interface-type为端口类型,interface-number为端口编号。

&<1-8>表示前面的参数最多可以输入8次。

inbound:表示仅对端口接收的报文进行镜像。

outbound:表示仅对端口发送的报文进行镜像。

both:表示对端口接收和发送的报文都进行镜像。

【描述】mirroring-group mirroring-port命令用来为已经创建的本地镜像组/远程源镜像组配置源端口。

undo mirroring-group mirroring-port命令用来为本地镜像组/远程源镜像组删除源端口。

需要注意的是:●源端口不能是现有镜像组的成员端口;●不能为远程目的镜像组添加源端口。

【举例】# 为已存在的镜像组1添加源端口。

<Sysname> system-view[Sysname] mirroring-group 1 mirroring-port Ethernet 1/0/1 to Ethernet 1/0/5 both# 从镜像组1中删除某些源端口。

[Sysname] undo mirroring-group 1 mirroring-port Ethernet 1/0/1 to Ethernet 1/0/3 both1.1.4 mirroring-group monitor-port【命令】mirroring-group group-id monitor-port monitor-port-idundo mirroring-group group-id monitor-port monitor-port-id【视图】系统视图【参数】group-id:端口镜像组的组号,取值范围为1~2。

monitor-port-id:目的端口,表示方式为interface-type interface-number。

其中,interface-type为端口类型,interface-number为端口编号。

【描述】mirroring-group monitor-port命令用来为已经创建的本地镜像组/远程目的镜像组配置目的端口。

undo mirroring-group monitor-port命令用来为本地镜像组/远程目的镜像组删除目的端口。

需要注意的是:●已经有目的端口的镜像组不能再添加目的端口;●目的端口不能是现有镜像组的成员端口;●本地端口镜像组的目的端口不能为聚合成员端口;●不能为远程源镜像组配置目的端口;●指定的镜像组必须预先创建;●建议用户不要在目的端口上开启STP、RSTP或MSTP,否则可能会影响镜像功能的正常使用。

【举例】# 为远程目的镜像组1添加目的端口Ethernet 1/0/1。

<Sysname> system-view[Sysname] mirroring-group 1 remote-destination[Sysname] mirroring-group 1 monitor-port Ethernet 1/0/11.1.5 mirroring-group reflector-port【命令】在系统视图下:mirroring-group group-id reflector-port reflector-port-idundo mirroring-group group-id reflector-port reflector-port-id在端口视图下:mirroring-group group-id reflector-portundo mirroring-group group-id reflector-port【视图】系统视图/以太网端口视图【参数】group-id:端口镜像组的组号,取值范围为1~2。

reflector-port-id:反射端口,表示方式为interface-type interface-number。

其中,interface-type为端口类型,interface-number为端口编号。

【描述】mirroring-group reflector-port命令用来为远程源镜像组配置反射端口。

undo mirroring-group reflector-port命令用来为远程源镜像组删除反射端口。

需要注意的是:●只有远程源镜像组可以配置反射端口,其它类型的镜像组不能配置反射端口,已有反射端口的镜像组不能再配置反射端口;●反射端口不能是现有镜像组的成员端口、聚合组成员端口,不能配置QinQ功能;必须是Access端口且属于缺省VLAN。

●端口的双工模式、端口速率、MDI属性取值均为缺省值时,才能将端口配置为反射端口;将某个端口配置为反射端口后,不能再修改此端口双工模式、端口速率、MDI属性的取值,即这些属性只能为缺省值。

●建议用户不要在反射端口连接网线,不要在反射端口上配置下列功能:STP、RSTP、MSTP、802.1x、IGMP Snooping、静态ARP和MAC地址学习功能,否则可能会影响镜像功能的正常使用。

【举例】# 在系统视图下为远程源镜像组1配置反射端口Ethernet 1/0/1。

<Sysname> system-view[Sysname] mirroring-group 1 remote-source[Sysname] mirroring-group 1 reflector-port Ethernet 1/0/1# 在以太网端口视图下为远程源镜像组1配置反射端口Ethernet 1/0/1。

<Sysname> system-view[Sysname] interface Ethernet 1/0/1[Sysname-Ethernet1/0/1] mirroring-group 1 reflector-port1.1.6 mirroring-group remote-probe vlan【命令】mirroring-group group-id remote-probe vlan rprobe-vlan-idundo mirroring-group group-id remote-probe vlan rprobe-vlan-id【视图】系统视图【参数】group-id:端口镜像组的组号,取值范围为1~2。

相关主题