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

14-网络管理和监控命令参考

目录

20-Flow-monitor命令

本章节下载 20-Flow-monitor命令  (139.86 KB)

docurl=/cn/Service/Document_Software/Document_Center/Routers/Catalog/CR/CR16000-F/Command/Command_Manual/H3C_CR16000-F_CR-R7751PXX-6W102/14/201903/1159955_30005_0.htm

20-Flow-monitor命令


1 Flow-monitor

1.1  Flow-monitor配置命令

1.1.1  display flow-monitor

display flow-monitor命令用来显示Flow-monitor的表项信息。

【命令】

(独立运行模式)

display flow-monitor [ invalid ] [ verbose ] [ { ip | mpls [ label-position1 label-value1 [ label-position2 label-value2 [ label-position3 label-value3 ] ] ] } ] [ destination destination-address | interface interface-type interface-number | source source-address ] * [ slot slot-number ]

(IRF模式)

display flow-monitor [ invalid ] [ verbose ] [ { ip | mpls [ label-position1 label-value1 [ label-position2 label-value2 [ label-position3 label-value3 ] ] ] } ] [ destination destination-address | interface interface-type interface-number | source source-address ] * [ chassis chassis-number slot slot-number ]

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

invalid:显示非法表项信息。如果未指定本参数,则显示固化状态的流量表项。

verbose:显示流量表项的详细信息。如果未指定本参数,则显示流量表项的简要信息。

ip:指定显示IP流量表项。

mpls:指定显示MPLS流量表项。

label-position1 label-value1:显示指定标签位置label-position1且标签值为label-value1的MPLS流量表项,label-position1取值范围为1~6,label-value1取值范围为0~1048575。

label-position2 label-value2:显示指定标签位置label-position2且标签值为label-value2的MPLS流量表项,label-position2取值范围为1~6,label-value2取值范围为0~1048575。

label-position3 label-value3:显示指定标签位置label-position3且标签值为label-value3的MPLS流量表项,label-position3取值范围为1~6,label-value3取值范围为0~1048575。

destination destination-address:显示指定目的IP地址的流量表项信息,destination-address用于指定IP地址,格式为点分十进制。

interface interface-type interface-number:显示指定接口的流量表项信息,interface-type interface-number用来指定接口的类型和编号。

source source-address:显示指定源IP地址的流量表项信息,source-address用于指定IP地址,格式为点分十进制。

slot slot-number:显示指定单板上的Flow-monitor流表项信息。slot-number表示单板所在的槽位号。如果未指定本参数,将显示所有单板上的Flow-monitor流表项信息。(独立运行模式)

chassis chassis-number slot slot-number:显示指定成员设备上指定单板上的Flow-monitor流量表项信息。chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。如果未指定本参数,将显示所有成员设备上的Flow-monitor流量表项信息。(IRF模式)

【举例】

# 显示Flow-monitor的简要流量表项信息。(独立运行模式)

<Sysname> display flow-monitor

Total 1 matching IP flow monitor entries and 0 matching MPLS flow monitor entries on slot 1.

State: Fixed

Type Source          Destination     Protocol Direction Interface    VPN

     Labels

-------------------------------------------------------------------------------

IP   2.2.2.2         3.3.3.3         6        Inbound   GE1/0/2      vpn1

 

Total 1 matching IP flow monitor entries and 0 matching MPLS flow monitor entries on slot 2.

State: Unfixed

Type Source          Destination     Protocol Direction Interface    VPN

     Labels

-------------------------------------------------------------------------------

IP   4.4.4.4         3.3.3.3         6        Inbound   GE1/0/2      vpn1

表1-1 display flow-monitor命令显示信息描述表

字段

描述

Total 1 matching IP flow monitor entries and 0 matching MPLS flow monitor entries on slot 1.

1号接口板上总计获取到一条IP流量表项(独立运行模式)

State

流量表状态(显示非法表时无此项):

·     Fixed:表示固化状态

·     Unfixed:表示未固化状态

Type

三种流量类型:IP流量(IP)、不带IP选项的MPLS流量(MPLS)、带IP选项的MPLS流量(IP&MPLS)

Source

流量的源IP地址

Destination

流量的目的IP地址

Protocol

流量的协议号

Direction

流量的方向:

·     Inbound:表示入方向

·     Outbound:表示出方向

Interface

流量的入接口(对应入方向的流量)或者出接口(对应出方向的流量)

VPN

VPN名称,如果该字段显示为空则表示流不属于任何VPN

Labels

MPLS标签列表,标签列表中至多列出三层标签

 

# 显示Flow-monitor的详细流量表项信息。(独立运行模式)

<Sysname> display flow-monitor verbose

Total 1 matching IP flow monitor entries and 0 matching MPLS flow monitor entries on slot 1

State: Fixed

Type Source          Destination     Protocol Direction Interface    VPN

Labels

-------------------------------------------------------------------------------

IP   2.2.2.2         3.3.3.3         6        Inbound   GE1/0/2      vpn1

Packets: 283457          

Bytes  : 5339980

Entry created time:   11/01/2014, 00:01:03

First packet arrived: 11/01/2014, 00:01:03

Last packet arrived:  11/01/2014, 00:02:59

 

Total 1 matching IP flow monitor entries and 0 matching MPLS flow monitor entries on slot 2.

State: Unfixed

Type Source          Destination     Protocol Direction Interface    VPN

Labels

-------------------------------------------------------------------------------

IP   4.4.4.4         3.3.3.3         6        Inbound   GE1/0/2      vpn1

Packets: 283457          

Bytes  : 5339980

Entry created time:   11/01/2014, 10:03:03

First packet arrived: 11/01/2014, 10:03:03

Last packet arrived:  11/01/2014, 10:04:59

表1-2 display flow-monitor verbose命令显示信息描述表

字段

描述

Packets

属于该流量的报文数

Bytes

属于该流量的报文字节数

Entry created time

表项创建时间

First packet arrived

该流量首个报文的到达时间,如果表项中没有统计到报文则显示“N/A”

Last packet arrived

该流量最后一个报文的到达时间,如果表项中没有统计到报文则显示“N/A”

 

1.1.2  flow-monitor

flow-monitor命令用来开启Flow-monitor功能。

undo flow-monitor命令用来关闭Flow-monitor功能。

【命令】

flow-monitor { inbound | outbound }

undo flow-monitor { inbound | outbound }

【缺省情况】

Flow-monitor功能处于关闭状态。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

inbound:对入方向的用户流量开启Flow-monitor功能。

outbound:对出方向的用户流量开启Flow-monitor功能。

【举例】

# 在入方向上开启Flow-monitor功能。

<Sysname> system-view

[Sysname] flow-monitor inbound

1.1.3  flow-monitor add ip

flow-monitor add ip命令用来添加IP流量表项到流量表中。

【命令】

(独立运行模式)

flow-monitor add ip source source-address destination dest-address protocol protocol-number interface interface-type interface-number { inbound | outbound } [ vpn-instance vpn-instance-name ] [ slot slot-number ]

(IRF模式)

flow-monitor add ip source source-address destination dest-address protocol protocol-number interface interface-type interface-number { inbound | outbound } [ vpn-instance vpn-instance-name ] [ chassis chassis-number slot slot-number ]

【缺省情况】

流量表中不存在IP流量表项。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

ip:指定添加的IP流量表项。

source source-address:指定IP流量表项中报文的源IP地址,格式为点分十进制。

destination dest-address:指定IP流量表项中报文的目的IP地址,格式为点分十进制。

protocol protocol-number:指定IP流量表项中报文的协议号。协议号表示IPv4承载的协议类型,取值范围为0~255。常见的协议类型有ICMP(1)、IGMP(2)、TCP(6)、UDP(17)等。

interface interface-type interface-number:指定报文流经接口的类型和编号。

inbound:报文方向为入方向。

outbound:报文方向为出方向。

vpn-instance vpn-instance-name:指定VPN实例的名称,为1~31个字符的字符串,区分大小写。若未指定本参数,表示添加公网内的固化IP表项。

slot slot-number:在指定单板上添加IP流量表项。slot-number表示单板所在的槽位号。如果未指定本参数,将在所有单板上添加IP流量表项。(独立运行模式)

chassis chassis-number slot slot-number:在指定成员设备上添加固化IP表项。chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。如果未指定本参数,将在所有成员设备上添加固化IP表项。(IRF模式)

【使用指导】

如果待添加的表项在非法表中存在,则同时从非法表中删除。

【举例】

# 添加指定slot上的IP流量表项到流量表中。(独立运行模式)

<Sysname> system-view

[Sysname] flow-monitor add ip source 1.1.1.1 destination 2.2.2.2 protocol 6 interface gigabitethernet 1/0/1 inbound slot 1

【相关命令】

·     display flow-monitor

1.1.4  flow-monitor add mpls

flow-monitor add mpls命令用来添加MPLS流量表项到流量表中。

【命令】

(独立运行模式)

flow-monitor add mpls label-position1 label-value1 [ label-position2 label-value2 [ label-position3 label-value3 ] ] [ source source-address destination dest-address protocol protocol-number ] interface interface-type interface-number { inbound | outbound } [ vpn-instance vpn-instance-name ] [ slot slot-number ]

(IRF模式)

flow-monitor add mpls label-position1 label-value1 [ label-position2 label-value2 [ label-position3 label-value3 ] ] [ source source-address destination dest-address protocol protocol-number ] interface interface-type interface-number { inbound | outbound } [ vpn-instance vpn-instance-name ] [ chassis chassis-number slot slot-number ]

【缺省情况】

流量表中不存在MPLS流量表项。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

mpls:指定添加的MPLS流量表项。

label-position1 label-value1:添加指定标签位置label-position1且标签值为label-value1的MPLS流量表项,label-position1取值范围为1~6,label-value1取值范围为0~1048575。

label-position2 label-value2:添加指定标签位置label-position2且标签值为label-value2的MPLS流量表项,label-position2取值范围为1~6,label-value2取值范围为0~1048575。

label-position3 label-value3:添加指定标签位置label-position3且标签值为label-value3的MPLS流量表项,label-position3取值范围为1~6,label-value3取值范围为0~1048575。

source source-address:指定MPLS流量表项中报文的源IP地址,格式为点分十进制。

destination dest-address:指定MPLS流量表项中报文的目的IP地址,格式为点分十进制。

protocol protocol-number:指定MPLS流量表项中报文的协议号。协议号表示IPv4承载的协议类型,取值范围为0~255。常见的协议类型有ICMP(1)、IGMP(2)、TCP(6)、UDP(17)等。添加固化IP表项时该字段必须配置,添加固化MPLS表项时该字段可选。

interface interface-type interface-number:指定报文流经接口的类型和编号。

inbound:报文方向为入方向。

outbound:报文方向为出方向。

vpn-instance vpn-instance-name:指定VPN实例的名称,为1~31个字符的字符串,区分大小写。若未指定本参数,表示添加公网内的固化MPLS表项。

slot slot-number:在指定单板上添加MPLS流量表项。slot-number表示单板所在的槽位号。如果未指定本参数,将在所有单板上添加MPLS流量表项。(独立运行模式)

chassis chassis-number slot slot-number:在指定成员设备上添加MPLS流量表项。chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。如果未指定本参数,将在所有成员设备上添加MPLS流量表项。(IRF模式)

【使用指导】

如果待添加的MPLS流量表项在非法表中存在,则同时从非法表项中删除。

【举例】

# 添加指定slot上的MPLS流量表项到流量表中。(独立运行模式)

<Sysname> system-view

[Sysname] flow-monitor add mpls 1 20 2 23 3 12 source 1.1.1.1 destination 2.2.2.2 protocol 6 interface gigabitethernet 1/0/1 inbound slot 1

【相关命令】

·     display flow-monitor

1.1.5  flow-monitor delete ip

flow-monitor delete ip命令用来删除流量表中的IP流量表项。

【命令】

(独立运行模式)

flow-monitor delete ip source source-address destination dest-address protocol protocol-number interface interface-type interface-number { inbound | outbound } [ vpn-instance vpn-instance-name ] [ slot slot-number ]

(IRF模式)

flow-monitor delete ip source source-address destination dest-address protocol protocol-number interface interface-type interface-number { inbound | outbound } [ vpn-instance vpn-instance-name ] [ chassis chassis-number slot slot-number ]

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

ip:指定删除流量表中的IP流量表项。

source source-address:指定删除的IP流量表项中报文的源IP地址,格式为点分十进制。

destination dest-address:指定删除的IP流量表项中报文的目的IP地址,格式为点分十进制。

protocol protocol-number:指定删除的IP流量表项中报文的协议号。表示IPv4承载的协议类型,取值范围为0~255。常见的协议类型有ICMP(1)、IGMP(2)、TCP(6)、UDP(17)等。

interface interface-type interface-number:用来指定报文流经接口的类型和编号。

inbound:报文方向为入方向。

outbound:报文方向为出方向。

vpn-instance vpn-instance-name:VPN实例的名称,为1~31个字符的字符串,区分大小写。若未指定本参数,表示添加公网内的固化IP表项。

slot slot-number:在指定单板上删除IP流量表项。slot-number表示单板所在的槽位号。如果未指定本参数,将在所有单板上删除固化IP流量表项。(独立运行模式)

chassis chassis-number slot slot-number:在指定成员设备上删除IP流量表项。chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。如果未指定本参数,将在所有成员设备上删除IP流量表项。(IRF模式)

【举例】

# 删除指定slot上的流量表中的IP流量表项。(独立运行模式)

<Sysname> system-view

[Sysname] flow-monitor delete ip source 1.1.1.1 destination 2.2.2.2 protocol 6 interface gigabitethernet 1/0/1 inbound slot 1

【相关命令】

·     display flow-monitor

1.1.6  flow-monitor delete mpls

flow-monitor delete mpls命令用来删除流量表中的MPLS流量表项。

【命令】

(独立运行模式)

flow-monitor delete mpls label-position1 label-value1 [ label-position2 label-value2 [ label-position3 label-value3 ] ] [ source source-address destination dest-address protocol protocol-number ] interface interface-type interface-number { inbound | outbound } [ vpn-instance vpn-instance-name ] [ slot slot-number ]

(IRF模式)

flow-monitor delete mpls label-position1 label-value1 [ label-position2 label-value2 [ label-position3 label-value3 ] ] [ source source-address destination dest-address protocol protocol-number ] interface interface-type interface-number { inbound | outbound } [ vpn-instance vpn-instance-name ] [ chassis chassis-number slot slot-number ]

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

mpls:指定删除的MPLS流量表项。

label-position1 label-value1:删除指定标签位置label-position1且标签值为label-value1的MPLS流量表项,label-position1取值范围为1~6,label-value1取值范围为0~1048575。

label-position2 label-value2:删除指定标签位置label-position2且标签值为label-value2的MPLS流量表项,label-position2取值范围为1~6,label-value2取值范围为0~1048575。

label-position3 label-value3:删除指定标签位置label-position3且标签值为label-value3的MPLS流量表项,label-position3取值范围为1~6,label-value3取值范围为0~1048575。

source source-address:指定删除的MPLS流量表项中报文的源IP地址,格式为点分十进制。

destination dest-address:指定删除的MPLS流量表项中报文的目的IP地址,格式为点分十进制。

protocol protocol-number:指定删除MPLS流量表项中报文的协议号。表示IPv4承载的协议类型,取值范围为0~255。常见的协议类型有ICMP(1)、IGMP(2)、TCP(6)、UDP(17)等。

interface interface-type interface-number:用来指定报文流经接口的类型和编号。

inbound:报文方向为入方向。

outbound:报文方向为出方向。

vpn-instance vpn-instance-name:VPN实例的名称,为1~31个字符的字符串,区分大小写。若未指定本参数,表示添加公网内的固化MPLS表项。

slot slot-number:在指定单板上删除MPLS流量表项。slot-number表示单板所在的槽位号。如果未指定本参数,将在所有单板上删除MPLS流量表项。(独立运行模式)

chassis chassis-number slot slot-number:在指定成员设备上删除MPLS流量表项。chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。如果未指定本参数,将在所有成员设备上删除MPLS流量表项。(IRF模式)

【举例】

# 删除指定slot上的流量表中的MPLS流量表项。(独立运行模式)

<Sysname> system-view

[Sysname] flow-monitor delete mpls 1 23 2 20 3 12 source 1.1.1.1 destination 2.2.2.2 protocol 6 interface gigabitethernet 1/0/1 inbound slot 1

【相关命令】

·     display flow-monitor

1.1.7  flow-monitor fixup

flow-monitor fixup命令用来将流量表的状态设置为固化状态。

undo flow-monitor fixup命令用来将流量表的状态设置为未固化状态,同时删除所有的非法表项。

【命令】

(独立运行模式)

flow-monitor fixup [ slot slot-number ]

undo flow-monitor fixup [ slot slot-number ]

(IRF模式)

flow-monitor fixup [ chassis chassis-number slot slot-number ]

undo flow-monitor fixup [ chassis chassis-number slot slot-number ]

【缺省情况】

流量表为未固化状态。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

slot slot-number:在指定单板上固化或者解固化。slot-number表示单板所在的槽位号。如果未指定本参数,将在所有单板上固化或者解固化。(独立运行模式)

chassis chassis-number slot slot-number:在指定成员设备上固化或者解固化。chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。如果未指定本参数,将在所有成员设备上固化或者解固化。(IRF模式)

【举例】

# 将指定slot上的当前流量表的状态设置为固化状态。(独立运行模式)

<Sysname> system-view

[Sysname] flow-monitor fixup slot 1

【相关命令】

·     display flow-monitor

1.1.8  reset flow-monitor entry

reset flow-monitor entry命令用来批量删除流量表项。

【命令】

(独立运行模式)

reset flow-monitor entry [ invalid ] [ ip | mpls ] [ interface interface-type interface-number ] [ slot slot-number ] [ source slot source-slot-number ]

(IRF模式)

reset flow-monitor entry [ invalid ] [ ip | mpls ] [ interface interface-type interface-number ] [ chassis chassis-number slot slot-number ] [ source chassis source-chassis-number slot source-slot-number ]

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

invalid:删除非法表项。如果没有指定该参数,表示删除处于固化或未固化状态的流量表项。

ip:指定删除表项类型为IP流量。

mpls:指定删除表项类型为MPLS流量。

interface interface-type interface-number:用来指定被删除表项统计的接口,由接口类型和接口编号组成。

slot slot-number:删除指定单板上的处于未固化状态的流量表项或非法表项。slot-number表示单板所在的槽位号。如果未指定本参数,将删除所有单板上的处于未固化状态的流量表项或非法表项。(独立运行模式)

chassis chassis-number slot slot-number:删除指定成员设备上的处于未固化状态的流量表项或非法表项。chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。如果未指定本参数,将删除所有成员设备上的处于未固化状态的流量表项或非法表项。(IRF模式)

source:删除来自指定单板上的固化状态的流量表项或非法表项。配置该参数用于流量来源板拔出时,删除原来流量生成的固化表项或者非法表项。

slot source-slot-number:删除来自指定单板上的固化状态的流量表项或非法表项。source-slot-number表示单板所在的槽位号。如果未指定本参数,则执行删除指定单板上的处于未固化状态的流量表项或非法表项。(独立运行模式)

chassis source-chassis-number slot source-slot-number:删除来自指定成员设备上的固化状态的流量表项或非法表项。chassis-number表示设备在IRF中的成员编号,source-slot-number表示单板所在的槽位号。如果未指定本参数,则执行删除指定设备上的处于未固化状态的流量表项或非法表项。((IRF模式)

【使用指导】

关键字interfacesource互斥。执行本命令时指定两者任一关键字,可以删除未固化的流量表项,固化的流量表项,或非法表项。

如果执行本命令时interfacesource都不指定,则只能删除未固化的流量表项或非法表项。

【举例】

# 删除指定slot上的所有的非法表项。(独立运行模式)

<Sysname> reset flow-monitor entry invalid slot 1

【相关命令】

·     display flow-monitor

1.1.9  reset flow-monitor statistics

reset flow-monitor statistics命令用来删除已固化的流量表项的统计信息。

【命令】

(独立运行模式)

reset flow-monitor statistics [ slot slot-number ]

(IRF模式)

reset flow-monitor statistics [ chassis chassis-number slot slot-number ]

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

slot slot-number:删除指定单板上已固化的流量表项的统计信息。slot-number表示单板所在的槽位号。如果未指定本参数,将删除所有单板上已固化的流量表项的统计信息。(独立运行模式)

chassis chassis-number slot slot-number:删除指定成员设备上已固化的流量表项的统计信息。chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。如果未指定本参数,将删除所有成员设备上已固化的流量表项的统计信息。(IRF模式)

【举例】

# 删除指定slot上的已固化的流量表项的统计信息。(独立运行模式)

<Sysname> reset flow-monitor statistics slot 1

【相关命令】

·     display flow-monitor

 

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

新华三官网
联系我们