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

H3C S3600系列以太网交换机 命令手册-RELEASE 1510(V1.04)

28-镜像命令

本章节下载  (148.91 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S3600/S3600-SI/Command/Command_Manual/S3600-SI_CM(V1.04)/200711/317223_30005_0.htm

28-镜像命令

  录

第1章 镜像命令... 1-1

1.1 S3600-EI镜像命令.. 1-1

1.1.1 display mirroring-group. 1-1

1.1.2 display qos-interface mirrored-to. 1-2

1.1.3 mirrored-to. 1-3

1.1.4 mirroring-group. 1-4

1.1.5 mirroring-group mirroring-port 1-5

1.1.6 mirroring-group monitor-port 1-6

1.1.7 mirroring-group reflector-port 1-6

1.1.8 mirroring-group remote-probe vlan. 1-7

1.1.9 mirroring-port 1-8

1.1.10 monitor-port 1-9

1.1.11 remote-probe vlan. 1-9

1.2 S3600-SI镜像命令.. 1-10

1.2.1 display mirror 1-10

1.2.2 display qos-interface mirrored-to. 1-11

1.2.3 mirrored-to. 1-11

1.2.4 mirroring-port 1-13

1.2.5 monitor-port 1-14

 


第1章  镜像命令

1.1  S3600-EI镜像命令

1.1.1  display mirroring-group

【命令】

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

【视图】

任意视图

【参数】

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

local:指定镜像组为本地端口镜像组。

remote-destination:指定镜像组为远程端口镜像的目的镜像组。

remote-source:指定镜像组为远程端口镜像的源镜像组。

all:所有的镜像组。

【描述】

display mirroring-group命令用来显示镜像组的参数设置。

本地镜像组显示信息包括:

l              镜像组组号。

l              镜像组类型:local

l              镜像组状态。

l              被监控端口信息。

l              监控端口信息。

远程镜像的目的镜像组显示信息包括:

l              镜像组组号。

l              镜像组类型:remote-destination

l              镜像组状态。

l              目的端口信息。

l              Remote-probe VLAN信息。

远程镜像的源镜像组显示信息包括:

l              镜像组组号。

l              镜像组类型:remote-source

l              镜像组状态。

l              源端口信息。

l              反射端口信息。

l              Remote-probe VLAN信息。

【举例】

# 显示端口镜像组的参数配置信息。

<H3C> display mirroring-group all

mirroring-group 2:

    type: local

    status: active

    mirroring port:

        GigabitEthernet1/1/1  both

    monitor port: GigabitEthernet1/1/4

1.1.2  display qos-interface mirrored-to

【命令】

display qos-interface { interface-type interface-number | unit-id } mirrored-to

【视图】

任意视图

【参数】

interface-type interface-number:交换机的端口。输入本参数,交换机将显示指定端口的参数配置。

unit-id:Unit ID。输入本参数,交换机将显示Unit上的参数配置。

【描述】

display qos-interface mirrored-to命令用来显示流镜像的参数设置。

显示信息包括:

l              端口名称和流镜像动作名称

l              流镜像的方向

l              进行流识别的ACL

l              镜像目的端口

相关配置可参考命令mirrored-to

【举例】

# 显示Gigabitethernet1/1/1上流镜像的参数配置。

<H3C> display qos-interface GigabitEthernet 1/1/1 mirrored-to

GigabitEthernet1/1/1: mirrored-to

 Inbound:

   Matches: Acl 2000 rule 0  running

     Mirrored to: monitor interface

1.1.3  mirrored-to

【命令】

mirrored-to { inbound | outbound } acl-rule { monitor-interface | cpu }

undo mirrored-to { inbound | outbound } acl-rule

【视图】

以太网端口视图

【参数】

inbound:对端口接收的数据包进行镜像。

outbound:对端口发送的数据包进行镜像。

acl-rule:下发的ACL,可以是多种ACL的组合。组合方式说明如下。

表1-1 组合下发ACL的方式

组合方式

acl-rule的形式

单独下发一个IP型ACL(包括基本ACL与高级ACL)中所有子规则

ip-group  acl-number

单独下发一个IP型ACL中一条子规则

ip-group acl-number rule rule-id

单独下发一个二层ACL中所有子规则

link-group acl-number

单独下发一个二层ACL中一条子规则

link-group acl-number rule rule-id

单独下发一个用户自定义ACL中所有子规则

user-group acl-number

单独下发一个用户自定义ACL中一条子规则

user-group acl-number rule rule-id

同时下发IP型ACL中一条子规则和二层型ACL的一条子规则

ip-group acl-number rule rule-id link-group acl-number rule rule-id

 

ip-group acl-number:表示基本或高级访问控制列表序号,取值范围为2000~3999。

link-group acl-number:表示二层访问控制列表序号,取值范围为4000~4999。

user-group acl-number:表示用户自定义的访问控制列表序号,取值范围为5000~5999。

rule rule-id:访问控制列表子规则序号,取值范围为0~65534。如果不指定则表示访问控制列表中的所有子项。

monitor-interface:指定将数据流镜像到监控端口。

cpu:指定将数据流镜像到CPU。

【描述】

mirrored-to命令用来引用ACL进行流识别,对匹配的报文进行流镜像。undo mirrored-to命令用来取消流镜像配置。

本命令对匹配指定ACL中动作为permit的规则有效。

不能在镜像目的端口上启动STP与LACP。流镜像不支持聚合同步,不支持配置拷贝。

只有指定了镜像源端口和镜像目的端口,镜像配置才能生效。

相关配置可参考命令display qos-interface mirrored-to,monitor-port

【举例】

# 对在端口GigabitEthernet1/1/1上匹配ACL 2000规则的报文进行流镜像,镜像至镜像端口GigabitEthernet1/1/4。

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface GigabitEthernet1/1/4

[H3C-GigabitEthernet1/1/4] monitor-port

[H3C-GigabitEthernet1/1/4] quit

[H3C] interface GigabitEthernet1/1/1

[H3C-GigabitEthernet1/1/1] mirrored-to inbound ip-group 2000 monitor-interface

1.1.4  mirroring-group

【命令】

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

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

【视图】

系统视图

【参数】

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

local:指定镜像组为本地端口镜像组。

remote-destination:指定镜像组为远程端口镜像的目的镜像组。

remote-source:指定镜像组为远程端口镜像的源镜像组。

all:删除镜像组时的参数,表示删除所有的镜像组。

【描述】

mirroring-group命令用来配置端口镜像组。undo mirroring-group命令用来删除端口镜像组。

【举例】

# 配置本地端口镜像组。

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] mirroring-group 1 local

1.1.5  mirroring-group mirroring-port

【命令】

mirroring-group group-id mirroring-port mirroring-port-list { both | inbound | outbound }

undo mirroring-group group-id mirroring-port mirroring-port-list

【视图】

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

【参数】

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

mirroring-port mirroring-port-list:指定镜像源端口列表。mirroring-port-list参数只是在系统视图下的参数,在以太网端口视图下没有这个参数。

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

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

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

【描述】

mirroring-group mirroring-port命令用来配置镜像源端口。undo mirroring-group mirroring-port命令用来取消镜像源端口配置。

【举例】

# 配置GigabitEthernet1/1/1为镜像源端口,并且对该端口接收的报文进行镜像。

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] mirroring-group 1 mirroring-port Gigabitethernet1/1/1 inbound

1.1.6  mirroring-group monitor-port

【命令】

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

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

【视图】

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

【参数】

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

monitor-port monitor-port:指定镜像目的端口。monitor-port参数只是在系统视图下的参数,在以太网端口视图下没有这个参数。

【描述】

mirroring-group monitor-port命令用来配置镜像目的端口。undo mirroring-group monitor-port命令用来取消镜像目的端口配置。

在配置镜像目的端口时应注意以下事项:

l              不能在镜像目的端口上启用LACP及STP;

l              远程镜像目的端口必须是Access口;

l              当端口被配置为远程镜像目的端口后,交换机不允许用户改变该端口的端口类型和缺省VLAN ID。

【举例】

# 配置GigabitEthernet1/1/4为镜像目的端口。

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] mirroring-group 1 monitor-port Gigabitethernet1/1/4

1.1.7  mirroring-group reflector-port

【命令】

mirroring-group group-id reflector-port reflector-port

undo mirroring-group group-id reflector-port reflector-port

【视图】

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

【参数】

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

reflector-port reflector-port:指定反射端口。reflector-port参数只是在系统视图下的参数,在以太网端口视图下没有这个参数。

【描述】

mirroring-group reflector-port命令用来配置反射端口。undo mirroring-group reflector-port命令用来取消反射端口配置。

在配置镜像反射端口时应注意以下事项:

l              反射端口必须是Access口;

l              不能在镜像反射端口上启用LACP及STP;

l              当端口被配置为远程镜像反射端口后,交换机不允许用户改变该端口的端口类型和缺省VLAN ID,也不能把反射端口加到其它VLAN中。

【举例】

# 配置GigabitEthernet1/1/2为反射端口。

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] mirroring-group 1 reflector-port GigabitEthernet1/1/2

1.1.8  mirroring-group remote-probe vlan

【命令】

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

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

【视图】

系统视图

【参数】

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

remote-probe vlan remote-probe-vlan-id:指定镜像组的Remote-probe VLAN。

【描述】

mirroring-group remote-probe vlan命令用来指定镜像组的Remote-probe VLAN。undo mirroring-group remote-probe vlan命令用来取消指定镜像组的Remote-probe VLAN。

【举例】

# 配置镜像组的Remote-probe VLAN为VLAN 100。

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] mirroring-group 1 remote-probe vlan 100

1.1.9  mirroring-port

【命令】

mirroring-port { inbound | outbound | both }

undo mirroring-port

【视图】

以太网端口视图

【参数】

inbound | outbound | both:表示被镜像报文的方向,inbound表示仅对端口接收的报文进行镜像,outbound表示仅对端口发送的报文进行镜像,both表示同时对端口接收和发送的报文进行镜像。

【描述】

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

相关配置可参考命令display mirroring-group

【举例】

# 配置以太网端口GigabitEthernet1/1/1为镜像源端口,并且对该端口的接收和发送的报文都进行镜像。

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface GigabitEthernet1/1/1

[H3C-GigabitEthernet1/1/1] mirroring-port both

1.1.10  monitor-port

【命令】

monitor-port

undo monitor-port

【视图】

以太网端口视图

【参数】

【描述】

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

交换机上只能配置一个镜像目的端口,所有的被镜像报文都将发送到这个镜像目的端口上。

相关配置可参考命令display mirroring-group

【举例】

# 配置GigabitEthernet1/1/4为镜像目的端口。

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface GigabitEthernet1/1/4

[H3C-GigabitEthernet1/1/4] monitor-port

1.1.11  remote-probe vlan

【命令】

remote-probe vlan enable

undo remote-probe vlan enable

【视图】

VLAN视图

【参数】

【描述】

remote-probe vlan enable命令用来将当前VLAN配置为 Remote-probe VLAN,输入该命令后系统会判断当前VLAN是否为动态VLAN,如果是,则命令执行失败,系统提示”Can not set dynamic VLAN as remote-probe VLAN!”。

undo remote-probe vlan enable命令用来将Remote-probe VLAN恢复为普通VLAN。

在配置Remote-probe VLAN之前,确认没有Access和Hybrid端口属于此VLAN;如果该VLAN包含Trunk端口,则端口的PVID不能是该VLAN。在使能Remote-probe VLAN以后,不建议向该VLAN内添加Access或Hybrid端口。

【举例】

# 将VLAN 5设置为Remote-probe VLAN。

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] vlan 5

[H3C-vlan5] remote-probe vlan enable

1.2  S3600-SI镜像命令

1.2.1  display mirror

【命令】

display mirror

【视图】

任意视图

【参数】

【描述】

display mirror命令用来显示镜像参数设置。显示信息包括:监控端口,被监控端口,镜像方向。

【举例】

# 显示端口镜像参数配置信息。

<H3C> display mirror

 Monitor-port:

   Ethernet1/0/1

 Mirroring-port:

   Ethernet1/0/2              both

1.2.2  display qos-interface mirrored-to

【命令】

display qos-interface { interface-type interface-number | unit-id } mirrored-to

【视图】

任意视图

【参数】

interface-type interface-number:交换机的端口。输入本参数,交换机将显示指定端口的参数配置。

unit-id:Unit ID。输入本参数,交换机将显示Unit上的参数配置。

【描述】

display qos-interface mirrored-to命令用来显示流镜像的参数设置。

显示信息包括:

l              端口名称和流镜像动作名称

l              流镜像的方向

l              进行流识别的ACL

l              镜像目的端口

相关配置可参考命令mirrored-to

【举例】

# 显示Gigabitethernet1/1/1上流镜像的参数配置。

<H3C> display qos-interface GigabitEthernet 1/1/1 mirrored-to

GigabitEthernet1/1/1: mirrored-to

 Inbound:

   Matches: Acl 2000 rule 0  running

     Mirrored to: monitor interface

1.2.3  mirrored-to

【命令】

mirrored-to { inbound | outbound } acl-rule { monitor-interface | cpu }

undo mirrored-to inbound acl-rule

【视图】

以太网端口视图

【参数】

inbound:对端口接收的数据包进行镜像。

outbound:对端口发送的数据包进行镜像。

acl-rule:下发的ACL,可以是多种ACL的组合。组合方式说明如下。

表1-2 组合下发ACL的方式

组合方式

acl-rule的形式

单独下发一个IP型ACL(包括基本ACL与高级ACL)中所有子规则

ip-group  acl-number

单独下发一个IP型ACL中一条子规则

ip-group acl-number rule rule-id

单独下发一个二层ACL中所有子规则

link-group acl-number

单独下发一个二层ACL中一条子规则

link-group acl-number rule rule-id

单独下发一个用户自定义ACL中所有子规则

user-group acl-number

单独下发一个用户自定义ACL中一条子规则

user-group acl-number rule rule-id

同时下发IP型ACL中一条子规则和二层型ACL的一条子规则

ip-group acl-number rule rule-id link-group acl-number rule rule-id

 

ip-group acl-number:表示基本或高级访问控制列表序号,取值范围为2000~3999。

link-group acl-number:表示二层访问控制列表序号,取值范围为4000~4999。

user-group acl-number:表示用户自定义的访问控制列表序号,取值范围为5000~5999。

rule rule-id:访问控制列表子规则序号,取值范围为0~65534。如果不指定则表示访问控制列表中的所有子项。

monitor-interface:指定将数据流镜像到监控端口。

cpu:指定将数据流镜像到CPU。

【描述】

mirrored-to命令用来引用ACL进行流识别,对匹配的报文进行流镜像。undo mirrored-to命令用来取消流镜像配置。

本命令对匹配指定ACL中动作为permit的规则有效。

不能在镜像目的端口上启动STP与LACP。流镜像不支持聚合同步,不支持配置拷贝。

只有指定了镜像源端口和镜像目的端口,镜像配置才能生效。

相关配置可参考命令display qos-interface mirrored-to,monitor-port

【举例】

# 对在端口GigabitEthernet1/1/1上匹配ACL 2000规则的报文进行流镜像,镜像至镜像端口GigabitEthernet1/1/4。

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface GigabitEthernet1/1/4

[H3C-GigabitEthernet1/1/4] monitor-port

[H3C-GigabitEthernet1/1/4] quit

[H3C] interface GigabitEthernet1/1/1

[H3C-GigabitEthernet1/1/1] mirrored-to inbound ip-group 2000 monitor-interface

1.2.4  mirroring-port

【命令】

mirroring-port { inbound | outbound | both }

undo mirroring-port

【视图】

以太网端口视图

【参数】

inbound | outbound | both:表示被镜像报文的方向,inbound表示仅对端口接收的报文进行镜像,outbound表示仅对端口发送的报文进行镜像,both表示同时对端口接收和发送的报文进行镜像。

【描述】

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

相关配置可参考命令display mirror

【举例】

# 配置以太网端口GigabitEthernet1/1/1为镜像源端口,并且对该端口的接收和发送的报文都进行镜像。

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface GigabitEthernet1/1/1

[H3C-GigabitEthernet1/1/1] mirroring-port both

1.2.5  monitor-port

【命令】

monitor-port

undo monitor-port

【视图】

以太网端口视图

【参数】

【描述】

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

交换机上只能配置一个镜像目的端口,所有的被镜像报文都将发送到这个镜像目的端口上。

相关配置可参考命令display mirror

【举例】

# 配置GigabitEthernet1/1/4为镜像目的端口。

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface GigabitEthernet1/1/4

[H3C-GigabitEthernet1/1/4] monitor-port

 

 

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

新华三官网
联系我们