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命令用来显示端口镜像组的信息。
不同的镜像组类型,其显示内容不同。设备将按照镜像组号的顺序进行显示。 【举例】
# 显示所有镜像组的信息。
type: remote-source status: inactive mirroring port:
Ethernet1/0/4 inbound reflector port: remote-probe vlan: 1900
表1-1 display mirroring-group命令显示信息描述表
字段 mirroring-group type 描述 端口镜像组的组号 镜像组的类型,包括local(本地镜像组)、remote-source(远程源镜像组)、remote-destination(远程目的镜像组) 镜像组的状态,active表示已经生效、inactive表示没有生效 镜像源端口 镜像目的端口 反射端口 status mirroring port monitor port reflector port remote-probe vlan 远程镜像VLAN
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] mirroring-group 1 local # 创建远程目的镜像组2。
[Sysname] mirroring-group 2 remote-destination
1.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] 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 both
1.1.4 mirroring-group monitor-port 【命令】
mirroring-group group-id monitor-port monitor-port-id undo 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] mirroring-group 1 remote-destination