14-Flow-monitor命令
本章节下载: 14-Flow-monitor命令 (142.18 KB)
display flow-monitor命令用来显示Flow-monitor的流表项信息。
IRF模式:
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地址的Flow-monitor流表项信息,destination-address用于指定IP地址,格式为点分十进制。
interface interface-type interface-number:显示指定接口的Flow-monitor流表项信息,interface-type interface-number用来指定接口的类型和编号。
source source-address:显示指定源IP地址的Flow-monitor流表项信息,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
-------------------------------------------------------------------------------
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
-------------------------------------------------------------------------------
IP 4.4.4.4 3.3.3.3 6 Inbound GE1/0/2 vpn1
# 显示Flow-monitor的简要流表项信息。(IRF模式)
<Sysname> display flow-monitor
Total 1 matching IP flow monitor entries and 0 matching MPLS flow monitor entries on chassis 1 slot 1.
State: Fixed
Type Source Destination Protocol Direction Interface VPN
Labels
-------------------------------------------------------------------------------
IP 2.2.2.2 3.3.3.3 6 Inbound GE1/1/1/2 vpn1
Total 1 matching IP flow monitor entries and 0 matching MPLS flow monitor entries on chassis 1 slot 2.
State: Fixed
Type Source Destination Protocol Direction Interface VPN
Labels
-------------------------------------------------------------------------------
IP 4.4.4.4 3.3.3.3 6 Inbound GE1/1/2/3 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流表项(独立运行模式) |
Total 1 matching IP flow monitor entries and 0 matching MPLS flow monitor entries on chassis 1 slot 2. |
成员设备1的2号板上总计获取到一条IP流表项(IRF模式) |
· Fixed:表示固化状态 · Unfixed:表示未固化状态 |
|
三种流类型:IP流(IP)、不带IP选项的MPLS流(MPLS)、带IP选项的MPLS流(IP&MPLS) |
|
流的源IP地址 |
|
流的目的IP地址 |
|
流的方向: · Inbound:表示入方向 · Outbound:表示出方向 |
|
流的入接口(对应入方向的流)或者出接口(对应出方向的流) |
|
VPN名称,如果流不属于任何VPN,那么该项不显示 |
|
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
#显示Flow-monitor的详细流表项信息。(IRF模式)
<Sysname> display flow-monitor verbose
Total 1 matching IP flow monitor entries and 0 matching MPLS flow monitor entries on chassis 1 slot 1.
State: Fixed
Type Source Destination Protocol Direction Interface VPN
Labels
-------------------------------------------------------------------------------
IP 2.2.2.2 3.3.3.3 6 Inbound GE1/1/1/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 chassis 1 slot 2.
State: Fixed
Type Source Destination Protocol Direction Interface VPN
Labels
-------------------------------------------------------------------------------
IP 4.4.4.4 7.7.7.7 17 Inbound GE1/1/2/3 vpn1
Packets: 28345
Bytes : 533998
Entry created time: 11/01/2014, 10:01:03
First packet arrived: 11/01/2014, 10:01:03
Last packet arrived: 11/01/2014, 10:02:59
表1-1 display flow-monitor verbose命令显示信息描述表
flow-monitor命令用来开启Flow-monitor功能。
undo flow-monitor命令用来恢复缺省情况。
flow-monitor { inbound | outbound }
undo flow-monitor { inbound | outbound }
Flow-monitor功能处于关闭状态。
inbound:对入方向的用户流量开启Flow-monitor功能。
outbound:对出方向的用户流量开启Flow-monitor功能。
# 在入方向上开启Flow-monitor功能。
[Sysname] flow-monitor inbound
flow-monitor add ip命令用来添加固化IP表项到固化表中。如果待添加的表项在非法表中存在,则同时从非法表中删除。
IRF模式:
固化表中没有固化IP表项。
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表示单板所在的槽位号。如果未指定本参数,将在所有单板上添加固化表项。(独立运行模式)
chassis chassis-number slot slot-number:在指定成员设备上添加固化IP表项。chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。如果未指定本参数,将在所有成员设备上添加固化IP表项。(IRF模式)
【使用指导】
如果待添加的表项在非法表中存在,则同时从非法表中删除。
# 添加固化IP表项。
[Sysname] flow-monitor add ip source 1.1.1.1 destination 2.2.2.2 protocol 6 interface gigabitethernet 1/0/1 inbound
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表项。
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表示单板所在的槽位号。如果未指定本参数,将在所有单板上添加固化表项。(独立运行模式)
chassis chassis-number slot slot-number:在指定成员设备上添加固化MPLS表项。chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。如果未指定本参数,将在所有成员设备上添加固化MPLS表项。(IRF模式)
【使用指导】
如果待添加的表项在非法表中存在,则同时从非法表项中删除。
# 添加MPLS固化表项。
[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
flow-monitor delete ip命令用来删除固化表中的固化IP表项。
IRF模式:
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模式)
[Sysname] flow-monitor delete ip source 1.1.1.1 destination 2.2.2.2 protocol 6 interface gigabitethernet 1/0/1 inbound
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 ]
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表示单板所在的槽位号。如果未指定本参数,将在所有单板上删除固化表项。(独立运行模式)
chassis chassis-number slot slot-number:在指定成员设备上删除固化MPLS表项。chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。如果未指定本参数,将在所有成员设备上删除固化表项。(IRF模式)
# 删除固化MPLS表项。
[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
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 ]
slot slot-number:在指定单板上固化或者解固化。slot-number表示单板所在的槽位号。如果未指定本参数,将在所有单板上固化或者解固化。(独立运行模式)
chassis chassis-number slot slot-number:在指定成员设备上固化或者解固化。chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。如果未指定本参数,将在所有成员设备上固化或者解固化。(IRF模式)
#将当前固化表项由未固化状态设置为固化状态。
[Sysname] flow-monitor fixup
reset flow-monitor entry命令用来删除所有非法表项或者处于固化以及未固化状态的固化表项。
IRF模式:
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模式)
【使用指导】
关键字interface和source互斥。执行本命令时指定两者任一关键字,可以删除非固化表项,固化表项,或非法表项。
如果执行本命令时interface和source都不指定,则只能删除非固化或非法表项。
<Sysname> reset flow-monitor entry invalid
reset flow-monitor statistics命令用来删除固化表项的统计信息。
reset flow-monitor statistics [ slot slot-number ]
IRF模式:
reset flow-monitor statistics [ chassis chassis-number slot slot-number ]
slot slot-number:删除指定单板上固化表项的统计信息。slot-number表示单板所在的槽位号。如果未指定本参数,将删除所有单板上固化表项的统计信息。(独立运行模式)
chassis chassis-number slot slot-number:删除指定成员设备上固化表项的统计信息。chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。如果未指定本参数,将删除所有成员设备上固化表项的统计信息。(IRF模式)
# 删除固化表项的统计信息。
<Sysname> reset flow-monitor statistics
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!