• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

H3C S7500E系列以太网交换机 命令手册(Release 6100系列 V1.00)

22-端口镜像命令

本章节下载 22-端口镜像命令  (104.08 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S7500E/S7500E/Command/Command_Manual/H3C_S7500E_CM_(Release_6100_V1.00)/200912/658561_30005_0.htm

22-端口镜像命令


第1章  端口镜像配置命令

1.1  端口镜像配置命令

1.1.1  display mirroring-group

【命令】

display mirroring-group { group-id | all | local | remote-destination | remote-source }

【视图】

任意视图

【参数】

group-id:端口镜像组的组号,取值范围为1~4。

all:所有镜像组。

local:本地镜像组。

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

remote-source:远程源镜像组。

【描述】

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

不同的镜像组类型,其显示内容不同。设备将按照镜像组号的顺序进行显示。

【举例】

# 显示所有镜像组的信息。

<Sysname> display mirroring-group all

mirroring-group 1:

    type: local

    status: active

    mirroring port:

        Ethernet2/0/1  both

    monitor port: Ethernet2/0/10

mirroring-group 2:

    type: remote-source

    status: active

    mirroring port:

        Ethernet2/0/3  both

    monitor egress port: Ethernet2/0/11

    remote-probe vlan: 200

表1-1 display mirroring-group命令显示信息描述表

字段

描述

mirroring-group

端口镜像组的组号

type

镜像组的类型,包括local(本地镜像组)、remote-source(远程源镜像组)、remote-destination(远程目的镜像组)

status

镜像组的状态,active表示已经生效、inactive表示没有生效

mirroring port

镜像源端口

monitor port

镜像目的端口

monitor egress 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~4。

local:本地镜像组。

remote-source:远程源镜像组。

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

all:所有镜像组。

【描述】

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

创建镜像组的时候需要指定镜像组类型:

l              若在命令行中指定local参数,表示要创建本地镜像组;

l              若在命令行中指定remote-destination参数,表示要创建远程目的镜像组;

l              若在命令行中指定remote-source参数,表示要创建远程源镜像组。

删除镜像组的时候需要指定镜像组类型或者镜像组号:

l              若在命令行中指定group-id参数,表示删除端口镜像组号为group-id的镜像组;

l              若在命令行中指定all参数,表示删除所有的镜像组;

l              若在命令行中指定local参数,表示要删除本地镜像组;

l              若在命令行中指定remote-destination参数,表示要删除远程目的镜像组;

l              若在命令行中指定remote-source参数,表示要删除远程源镜像组。

【举例】

# 创建本地镜像组1。

<Sysname> system-view

[Sysname] mirroring-group 1 local

# 创建远程目的镜像组2。

<Sysname> system-view

[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~4。

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命令用来为镜像组删除源端口。

需要注意的是:

l              源端口不能为现有镜像组的成员端口;

l              不能为远程目的镜像组添加源端口。

【举例】

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

<Sysname> system-view

[Sysname] mirroring-group 1 mirroring-port Ethernet 2/0/1 to Ethernet 2/0/5 both

# 从镜像组1中删除某些源端口。

[Sysname] undo mirroring-group 1 mirroring-port Ethernet 2/0/1 to Ethernet 2/0/3 both

1.1.4  mirroring-group monitor-egress

【命令】

在系统视图下:

mirroring-group group-id monitor-egress monitor-egress-port-id

undo mirroring-group group-id monitor-egress monitor-egress-port-id

在以太网端口视图下:

mirroring-group group-id monitor-egress

undo mirroring-group group-id monitor-egress

【视图】

系统视图/以太网端口视图

【参数】

group-id:端口镜像组的组号,取值范围为1~4。

monitor-egress-port-id:镜像出端口,表示方式为interface-type interface-number。其中,interface-type为端口类型,interface-number为端口编号。

【描述】

mirroring-group monitor-egress命令用来为远程源镜像组配置出端口。undo mirroring-group monitor-egress命令用来取消为远程源镜像组配置的出端口。

需要注意的是:

l              只有远程源镜像组可以配置出端口,其它类型的镜像组不能配置出端口,已有出端口的镜像组不能再配置出端口;

l              出端口不能为现有镜像组的成员端口;

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

【举例】

# 在系统视图下为远程源镜像组1配置出端口Ethernet 2/0/1。

<Sysname> system-view

[Sysname] mirroring-group 1 remote-source

[Sysname] mirroring-group 1 monitor-egress Ethernet 2/0/1

# 在以太网端口视图下为远程源镜像组2配置出端口Ethernet 2/0/2。

<Sysname> system-view

[Sysname] mirroring-group 2 remote-source

[Sysname] interface Ethernet 2/0/2

[Sysname-Ethernet2/0/2] mirroring-group 2 monitor-egress

1.1.5  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~4。

monitor-port-id:目的端口,表示方式为interface-type interface-number。其中,interface-type为端口类型,interface-number为端口编号。

【描述】

mirroring-group monitor-port命令用来为已经创建的镜像组添加目的端口。undo mirroring-group monitor-port命令用来为已经创建的镜像组删除目的端口。

需要注意的是:

l              已经有目的端口的镜像组不能再添加目的端口;

l              目的端口不能为现有镜像组的成员端口;

l              不能为远程源镜像组配置目的端口;

l              远程镜像目的端口可以为Access、Trunk或Hybrid端口,远程镜像目的端口必须加入到远程镜像VLAN中;

l              指定的镜像组必须预先创建;

l              建议用户不要在目的端口上使能STP、RSTP或MSTP,否则可能会影响镜像功能的正常使用;

l              建议目的端口不用做其他用途,仅用于端口镜像。

【举例】

# 为远程目的镜像组1添加目的端口Ethernet 2/0/1。

<Sysname> system-view

[Sysname] mirroring-group 1 remote-destination

[Sysname] mirroring-group 1 monitor-port Ethernet 2/0/1

1.1.6  mirroring-group remote-probe vlan

【命令】

mirroring-group group-id remote-probe vlan rprobe-vlan-id

undo mirroring-group group-id remote-probe vlan rprobe-vlan-id

【视图】

系统视图

【参数】

group-id:端口镜像组的组号,取值范围为1~4。

rprobe-vlan-id:远程镜像VLAN ID,该VLAN必须已经存在。

【描述】

mirroring-group remote-probe vlan命令用来为远程源镜像组或者远程目的镜像组配置远程镜像VLAN。undo mirroring-group remote-probe vlan命令用来取消该配置。

需要注意的是:

l              只有远程源镜像组和远程目的镜像组可以配置远程镜像VLAN,本地镜像组不能配置远程镜像VLAN;已有远程镜像VLAN的镜像组不能再配置远程镜像VLAN;

l              配置远程镜像VLAN时,要求该VLAN为静态VLAN并预先创建。被配置成远程镜像VLAN后,该VLAN不能直接删除,必须先删除远程镜像VLAN的配置才能够删除这个VLAN。如果镜像组生效后,远程镜像VLAN被取消,那么该镜像组也将失效。

l              建议远程镜像VLAN不用做其他用途,仅用于远程镜像。

【举例】

# 为远程源镜像组1配置远程镜像VLAN 2。

<Sysname> system-view

[Sysname] mirroring-group 1 remote-source

[Sysname] mirroring-group 1 remote-probe vlan 2

1.1.7  mirroring-port

【命令】

[ mirroring-group group-id ] mirroring-port { both | inbound | outbound }

undo [ mirroring-group group-id ] mirroring-port { both | inbound | outbound }

【视图】

以太网端口视图

【参数】

group-id:端口镜像组的组号,取值范围为1~4。

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

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

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

【描述】

mirroring-port命令用来把本端口配置成镜像源端口。undo mirroring-port命令用来取消该配置。

需要注意的是:

l              如果没有指定镜像组号,默认的镜像组号为1;

l              源端口不能为现有镜像组的成员端口;

l              不能为远程目的镜像组添加源端口。

【举例】

# 把端口Ethernet 2/0/1加入到已创建的远程源镜像组2中。

<Sysname> system-view

[Sysname] mirroring-group 2 remote-source

[Sysname] interface Ethernet 2/0/1

[Sysname-Ethernet2/0/1] mirroring-group 2 mirroring-port both

1.1.8  monitor-port

【命令】

[ mirroring-group group-id ] monitor-port

undo [ mirroring-group group-id ] monitor-port

【视图】

以太网端口视图

【参数】

group-id:端口镜像组的组号,取值范围为1~4。

【描述】

monitor-port命令用来把本端口配置成镜像目的端口。undo monitor-port命令用来取消该配置。

需要注意的是:

l              如果没有指定镜像组号,默认的镜像组号为1;

l              已经有目的端口的镜像组不能再添加目的端口;

l              目的端口不能为现有镜像组的成员端口;

l              远程镜像目的端口可以为Access、Trunk或Hybrid端口,远程镜像目的端口必须加入到远程镜像VLAN中;

l              不能为远程源镜像组配置目的端口;

l              指定的镜像组必须预先创建;

l              建议用户不要在目的端口上使能STP、RSTP或MSTP,否则可能会影响镜像功能的正常使用;

l              建议目的端口不用做其他用途,仅用于端口镜像。

【举例】

# 把端口Ethernet 2/0/1配置成本地镜像组1的目的端口。

<Sysname> system-view

[Sysname] mirroring-group  1 local

[Sysname] interface Ethernet 2/0/1

[Sysname-Ethernet2/0/1] monitor-port

 

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们