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

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

目录

12-NetStream命令

本章节下载 12-NetStream命令  (293.73 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S12500/S12500X-AF/Command/Command_Manual/H3C_S12500X-AF_CR(R3606)/11/202208/1677571_30005_0.htm

12-NetStream命令


1 NetStream

1.1  NetStream配置命令

1.1.1  display ip netstream cache

display ip netstream cache命令用来查看NetStream流表项信息。

【命令】

display ip netstream cache [ verbose ] [ type { ip | ipl2 | l2 | mpls [ label-position1 label-value1 [ label-position2 label-value2 [ label-position3 label-value3 ] ] ] } ] [ destination destination-ip | destination-port destination-port | interface interface-type interface-number | protocol protocol | source source-ip | source-port source-port ] * [ arrived-time start-date start-time end-date end-time ] [ slot slot-number ]

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

verbose:显示NetStream流表项的详细信息。如果未指定本参数,将显示概要信息。

type:显示的流表项类型。如果未指定本参数,则显示所有类型的流表项。

ip:显示IP流表项。

ipl2:显示二三层混合流表项。

l2:显示二层流表项。

mpls:显示MPLS流表项。

label-position1 label-value1:显示标签为指定值的MPLS流表项。label-position1表示标签位置,取值范围为1~6,其中1表示最外层标签,6表示最内层标签,以此类推。label-value1表示标签值,取值范围为0~1048575。

label-position2 label-value2:显示标签为指定值的MPLS流表项。label-position2表示标签位置,取值范围为1~6,其中1表示最外层标签,6表示最内层标签,以此类推。label-value2表示标签值,取值范围为0~1048575。

label-position3 label-value3:显示标签为指定值的MPLS流表项。label-position3表示标签位置,取值范围为1~6,其中1表示最外层标签,6表示最内层标签,以此类推。label-value3表示标签值,取值范围为0~1048575。

destination destination-ip:显示指定目的IP地址的所有NetStream流表项信息,destination-ip用于指定IP地址,格式为点分十进制。该参数不支持显示二层流表项。

destination-port destination-port:显示指定目的端口的所有NetStream流表项信息,destination-port用于指定目的端口,取值范围为0~65535。该参数不支持显示二层流表项。

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

protocol protocol:显示指定协议的所有NetStream流表项信息,protocol用于指定协议号或者常见协议的名称,协议号的取值范围为0~255,常见协议的名称包括GRE、OSPF、TCP、UDP等。该参数不支持显示二层流表项。

source source-ip:显示指定源IP地址的所有NetStream流表项信息,source-ip用于指定IP地址,格式为点分十进制。该参数不支持二层流表项。该参数不支持显示二层流表项。

source-port source-port:显示指定源端口的所有流表项信息,source-port用于指定源端口,取值范围为0~65535。该参数不支持显示二层流表项。

arrived-time:显示指定时间内到达的所有NetStream流表项信息。不指定该参数时,表示对流的到达时间没有限制。

start-date:指定开始日期,格式为MM/DD/YYYY(月/日/年)或者YYYY/MM/DD(年/月/日),MM的取值范围为1~12,DD的取值范围与月份有关,YYYY的取值范围为2000~2035。

start-time:指定开始时间,格式为HH:MM:SS(小时:分钟:秒),HH取值范围为0~23,MM和SS取值范围为0~59。如果要配置成整分,则可以不输入秒;如果要配置成整点,则可以不输入分和秒。比如将start-time配置为0表示零点。

end-date:指定结束日期,格式为MM/DD/YYYY(月/日/年)或者YYYY/MM/DD(年/月/日),MM的取值范围为1~12,DD的取值范围与月份有关,YYYY的取值范围为2000~2035。

end-time:指定结束时间,格式为HH:MM:SS(小时:分钟:秒),HH取值范围为0~23,MM和SS取值范围为0~59。如果要配置成整分,则可以不输入秒;如果要配置成整点,则可以不输入分和秒。比如将end-time配置为0表示零点。

slot slot-number:指定单板。slot-number为单板所在的槽位号。如果不指定本参数,则表示指定所有单板。

【举例】

# 查看NetStream流表项的详细信息。

<Sysname> display ip netstream cache verbose

IP NetStream cache information:

  Active flow timeout             : 5 min

  Inactive flow timeout           : 300 sec

  Max number of entries           : 1000

  IP active flow entries          : 1

  MPLS active flow entries        : 1

  L2 active flow entries          : 0

  IPL2 active flow entries        : 0

  IP flow entries counted         : 10

  MPLS flow entries counted       : 20

  L2 flow entries counted         : 10

  IPL2 flow entries counted       : 20

  Last statistics resetting time  : 01/01/2000 at 00:01:02

 

IP packet size distribution (1103746 packets in total):

1-32   64   96  128  160  192  224  256 288  320  352  384  416  448  480

.249 .694 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000

 

 512  544  576 1024 1536 2048 2560 3072 3584 4096 4608 >4608

.000 .000 .027 .000 .027 .000 .000 .000 .000 .000 .000 .000

 

Protocol          Total Packets    Flows  Packets Active(sec) Idle(sec)

                  Flows /sec       /sec   /flow   /flow       /flow

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

TCP-Telnet      2656855     372        4       86          49        27

TCP-FTP         5900082      86        9        9          11        33

TCP-FTPD        3200453    1006        5      193          45        33

TCP-WWW       546778274   11170      887       12           8        32

TCP-other      49148540    3752       79       47          30        32

UDP-DNS       117240379     570      190        3           7        34

UDP-other      45502422    2272       73       30           8        37

ICMP           14837957     125       24        5          12        34

IP-other          77406       5        0       47          52        27

 

Type DstIP(Port)         SrcIP(Port)            Pro ToS VNI   If(Direct)  Pkts

     DstMAC(VLAN)           SrcMAC(VLAN)

     TopLblType(IP/Mask)    Lbl-Exp-S-List

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

IP   11.1.1.1(1024)      11.1.1.2(21)           6   128 10    GE1/0/1(I)  42996

     TCPFlag:      27

     DstMask:      24       SrcMask:      24       NextHop:      0.0.0.0

     DstAS:         0       SrcAS:         0       BGPNextHop:   0.0.0.0

     InVRF:      vpn2

     Bgp-community1:         0

     Bgp-community2:         0

     Bgp-community3:         0

     Bgp-community4:         0

     SamplerMode:Random     SamplerInt:  256

     Active:  120.600       Bytes/Pkt:   152

     First packet arrived: 10/28/2013, 14:10:03

     Last packet arrived:  10/28/2013, 14:21:03

IP&  172.16.1.1(68)      172.16.2.1(67)         17  64   N/A   GE1/0/3(I)  1848

MPLS LDP(4.4.4.4/24)        1:55-6-0

                            2:16-6-1

     TCPFlag:       0

     DstMask:      24       SrcMask:      24       NextHop:    172.16.2.10

     DstAS:         0       SrcAS:         0       BGPNextHop: 0.0.0.0

     InVRF:      vpn1

     Bgp-community1:         0

     Bgp-community2:         0

     Bgp-community3:         0

     Bgp-community4:         0

     SamplerMode:N/A        SamplerInt:    0

     Active:  5.542         Bytes/Pkt:  1426

     First packet arrived: 10/28/2013, 14:12:03

     Last packet arrived:  10/28/2013, 14:23:03

# 查看NetStream流表项的详细信息。

<Sysname> display ip netstream cache verbose

IP NetStream cache information:

  Active flow timeout             : 60 min

  Inactive flow timeout           : 10 sec

  Max number of entries           : 1000

  IP active flow entries          : 1

  MPLS active flow entries        : 2

  L2 active flow entries          : 1

  IPL2 active flow entries        : 1

  IP flow entries counted         : 10

  MPLS flow entries counted       : 20

  L2 flow entries counted         : 10

  IPL2 flow entries counted       : 20

  Last statistics resetting time  : 01/01/2000 at 00:01:02

 

IP packet size distribution (1103746 packets in total):

1-32   64   96  128  160  192  224  256 288  320  352  384  416  448  480

.249 .694 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000

 

 512  544  576 1024 1536 2048 2560 3072 3584 4096 4608 >4608

.000 .000 .027 .000 .027 .000 .000 .000 .000 .000 .000 .000

 

Protocol          Total Packets    Flows  Packets Active(sec) Idle(sec)

                  Flows /sec       /sec   /flow   /flow       /flow

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

TCP-Telnet      2656855     372        4       86          49        27

TCP-FTP         5900082      86        9        9          11        33

TCP-FTPD        3200453    1006        5      193          45        33

TCP-WWW       546778274   11170      887       12           8        32

TCP-other      49148540    3752       79       47          30        32

UDP-DNS       117240379     570      190        3           7        34

UDP-other      45502422    2272       73       30           8        37

ICMP           14837957     125       24        5          12        34

IP-other          77406       5        0       47          52        27

 

Type DstIP(Port)         SrcIP(Port)            Pro ToS VNI   If(Direct)  Pkts

     DstMAC(VLAN)           SrcMAC(VLAN)

     TopLblType(IP/Mask)    Lbl-Exp-S-List

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

IP   11.1.1.1(1024)      11.1.1.2(21)           6   128 N/A   Vlan1 (I)   42996

     TCPFlag:      27

     DstMask:      24       SrcMask:      24       NextHop:      0.0.0.0

     DstAS:         0       SrcAS:         0       BGPNextHop:   0.0.0.0

     InVRF:      vpn2

     Bgp-community1:         0

     Bgp-community2:         0

     Bgp-community3:         0

     Bgp-community4:         0

     SamplerMode:Random     SamplerInt:  256

     Active:  5.600         Bytes/Pkt:   152

     First packet arrived: 10/28/2013, 14:10:03

     Last packet arrived:  10/28/2013, 14:21:03

L2   0012-3f86-e94c(10)     0012-3f86-e86a(0)                 Vlan1(I)    1253

     Active:    5.510       Bytes/Pkt:   210

     First packet arrived: 10/28/2013, 14:10:00

     Last packet arrived:  10/28/2013, 14:21:03

MPLS LDP(3.3.3.3/24)        1:18-6-0                          Vlan2(O)    291

                            2:24-6-0

                            3:30-6-1

     SamplerMode:N/A        SamplerInt:    0

     Active:  5.084         Bytes/Pkt:   100

     First packet arrived: 10/28/2013, 14:10:01

     Last packet arrived:  10/28/2013, 14:21:03

IP&  192.168.123.1(2048) 192.168.1.1(0)         1   0   N/A   Vlan2(O)   10

L2   0012-3f86-e95d(0)      0012-3f86-e116(1008)

     TCPFlag:      27

     DstMask:      24       SrcMask:      24       NextHop:    192.168.1.2

     DstAS:         0       SrcAS:         0       BGPNextHop: 0.0.0.0

     OutVRF:     vpn1       InVRF:         0

     Bgp-community1:         0

     Bgp-community2:         0

     Bgp-community3:         0

     Bgp-community4:         0

     SamplerMode:N/A        SamplerInt:    0

     Active:   5030         Bytes/Pkt:    86

     First packet arrived: 10/28/2013, 14:10:04

     Last packet arrived:  10/28/2013, 14:21:03

IP&  172.16.1.1(68)      172.16.2.1(67)         17  64   N/A  Vlan3(I)  1848

MPLS LDP(4.4.4.4/24)        1:55-6-0

                            2:16-6-1

     TCPFlag:       0

     DstMask:      24       SrcMask:      24       NextHop:    172.16.2.10

     DstAS:         0       SrcAS:         0       BGPNextHop: 0.0.0.0

     InVRF:      vpn1

     Bgp-community1:         0

     Bgp-community2:         0

     Bgp-community3:         0

     Bgp-community4:         0

     SamplerMode:N/A        SamplerInt:    0

     Active:  5.542         Bytes/Pkt:  1426

     First packet arrived: 10/28/2013, 14:12:03

     Last packet arrived:  10/28/2013, 14:23:03

表1-1 display ip netstream cache命令显示信息描述表

字段

描述

IP NetStream information

NetStream流表项信息

Active flow timeout

活跃流的老化时间,单位为分钟

Inactive flow timeout

不活跃流的老化时间,单位为秒

Max number of entries

NetStream流缓存区中允许的最大流数

IP active flow entries

NetStream流缓存区中活跃的IP流数

MPLS active flow entries

NetStream流缓存区中活跃的MPLS流数

L2 active flow entries

NetStream流缓存区中活跃的二层流数

IPL2 active flow entries

NetStream流缓存区中活跃的二层和三层流数

IP flow entries counted

已经被统计的IP流数

MPLS flow entries counted

已经被统计的MPLS流数

L2 flow entries counted

已经被统计的二层流数

IPL2 flow entries counted

已经被统计的二层和三层流数

Last statistics resetting time

上次清除统计的时间

该字段只在执行了reset ip netstream statistics命令后才会显示为时间,否则显示为Never

IP packet size distribution (1103746 packets in total)

IP报文按大小分布情况,括号中为IP报文总数。

分布值按占IP报文总数的比率显示,只显示3位小数,如“.027”表示占IP报文总数的0.027

1-32   64   96  128  160  192  224  256  288

320  352  384  416  448  480 512  544  576

1024 1536 2048 2560 3072 3584 4096 4608

IP报文尺寸区间(报文长度不包括二层链路层的头)。长度不超过576字节时,以32字节为单位递增,例如:“1-32”是长度为1~32个字节的报文数目,“64”是长度为33~64字节的报文数。长度超过1024字节时,以512字节为单位递增,例如“1536”是长度为1025~1536字节的报文数。长度在577~1024间的报文记录在1024项中

Protocol     Total Flows     Packets /sec

Flows/sec   Packets/flow

Active(sec)/flow     Idle(sec)/flow

按协议分类的报文统计信息:协议类型、总流数、每秒的报文数、每秒的流数、平均每条流的报文数、平均每条流的活跃时间、平均每条流的非活跃时间

Type DstIP(Port)            SrcIP(Port)            Pro ToS VNI If(Direct)  Pkts

当前流缓存区中活跃流的IP层信息:流的类型、目的IP地址(目的端口号)、源IP地址(源端口号)、协议号、服务类型、VXLAN ID、接口名(方向)、包数

其中流的类型有五种:IP流(IP)、二层流(L2)、二三层混合流(IP&L2)、不带IP选项的MPLS流(MPLS)、带IP选项的MPLS流(IP&MPLS)

需要注意的是,对于ICMP报文只有Type和Code字段,因此用目的端口号的高8位为Type字段、低8位为Code字段,源端口号为0

对非VXLAN报文和不支持VXLAN的设备上,VNI字段显示为N/A

DstMAC(VLAN)          SrcMAC(VLAN)

当前流缓存区中活跃流的二层信息:目的MAC地址(目的VLAN ID)、源MAC地址(源VLAN ID)

TopLblType(IP/Mask)      : Lbl-Exp-S-List

当前流缓存区中活跃流的MPLS信息:栈顶标签的类型(栈顶标签对应的IP地址及掩码长度)、标签列表

标签列表中至多列出三层标签,mpls-position指定标签位置

TCPFlag:

DstMask:      SrcMask:             NextHop:

DstAS:           SrcAS:            BGPNextHop:

OutVRF:       InVRF:

Bgp-community1:

Bgp-community2:

Bgp-community3:

Bgp-community4:

SamplerMode:                     SamplerInt:

Active:       Bytes/Pkt:

First packet arrived:

Last packet arrived:

当前流缓存区中活跃流的其他信息:TCP标记、目的掩码、源掩码、路由下一跳、目的自治系统、源自治系统、BGP下一跳、出方向报文转发使用的VPN、入方向报文转发使用的VPN、‌BGP团体属性值、采样模式、采样间隔、流活跃时间、平均每个包的字节数、该流首个报文到达时间、该流最后一个报文到达时间

NetStream采样模式,目前支持以下几种:

·     N/A:表示不采样,统计所有报文

·     Random:表示随机采样

 

1.1.2  display ip netstream export

display ip netstream export命令用来查看NetStream统计输出报文的相关信息。

【命令】

display ip netstream export [ slot slot-number ]

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

slot slot-number:指定单板。slot-number为单板所在的槽位号。如果不指定本参数,则表示指定所有单板。

【使用指导】

不同的聚合方式使用不同的模板,使用该命令显示当前配置的所有聚合方式的统计输出报文的信息。

【举例】

# 查看NetStream统计输出信息。

<Sysname> display ip netstream export

IP export information:

  Flow source interface                             : HundredGigE1/0/1

  Flow destination VPN instance                     : VPN1

  Flow destination IP address (UDP)                 : 10.10.0.10 (30000)

  Version  5 exported flow number                   : 0

  Version  5 exported UDP datagram number (failed)  : 0 (0)

  Version  9 exported flow number                   : 20

  Version  9 exported UDP datagram number (failed)  : 2 (0)

  Version 10 exported flow number                   : 0

  Version 10 exported UDP datagram number (failed)  : 0 (0)

 

MPLS export information:

  Flow source interface                             : HundredGigE1/0/1

  Flow destination VPN instance                     : VPN1

  Flow destination IP address (UDP)                 : 10.10.0.10 (30000)

  Version  9 exported flow number                   : 20

  Version  9 exported UDP datagram number (failed)  : 2 (0)

  Version 10 exported flow number                   : 0

  Version 10 exported UDP datagram number (failed)  : 0 (0)

表1-2 display ip netstream export命令显示信息描述表

字段

描述

IP export information

版本5、版本9和版本10统计输出信息

Flow source interface

输出信息的源接口

Flow destination VPN instance

输出信息的目的地址所在的VPN

Flow destination IP address (UDP)

输出信息的目的IP地址(UDP端口号)

Version 5 exported flow number

使用版本5格式发送的流信息数

Version 5 exported UDP datagram number (failed)

使用版本5格式发送的UDP报文数(发送失败的报文数)

Version 9 exported flow number

使用版本9格式发送的流信息数

Version 9 exported UDP datagram number (failed)

使用版本9格式发送的UDP报文数(发送失败的报文数)

MPLS export information

版本9的MPLS流统计输出信息

L2 export information

二层流统计输出信息

protocol-port aggregation export information

协议-端口聚合的版本8统计输出信息

Version 8 exported flow number

使用版本8格式发送的流信息数

Version 8 exported UDP datagram number (failed)

使用版本8格式发送的UDP报文数(发送失败的报文数)

Version 10 exported flow number

使用版本10格式发送的流信息数

Version 10 exported UDP datagram number (failed)

使用版本10格式发送的UDP报文数(发送失败的报文数)

 

【相关命令】

·     ip netstream export host (system view)

·     ip netstream export host (aggregation view)

1.1.3  display ip netstream template

display ip netstream template命令用来查看NetStream模板的配置和状态信息。

【命令】

display ip netstream template [ slot slot-number ]

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

slot slot-number:指定单板。slot-number为单板所在的槽位号。如果不指定本参数,则表示指定主用主控板。

【使用指导】

不同的聚合方式使用不同的模板,使用该命令显示当前配置的所有聚合方式的模板信息。

【举例】

# 配置ip netstream template rfc7011后,查看NetStream模板信息(以版本10为例)。

<Sysname> display ip netstream template

 Flow template refresh frequency            : 1

 Flow template refresh interval             : 30 min

 Active flow templates                      : 2

 Created flow templates                     : 8

 

L3 outbound template:

 Template ID                : 3282

 Packets                    : 0

 Last template export time  : Never

 Field count                : 29

 Field type                   Field length (bytes)

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

 Out packets                  8

 Out bytes                    8

 First forwarded              4

 Last forwarded               4

 Input interface index        4

 Output interface index       4

 Source IPv4 address          4

 Destination IPv4 address     4

 Next hop IPv4 address        4

 Source AS                    4

 Destination AS               4

 L4 source port               2

 L4 destination port          2

 IP protocol version          1

 TCP flags                    1

 Protocol                     1

 Source ToS                   1

 Source address mask          1

 Destination address mask     1

 Direction                    1

 Forwarding status            1

 Out VPN ID                   2

 Sampling algorithm           1

 PAD                          1

 Sampling interval            4

 VXLAN ID                     4

 App ID                       4

 Bgp-community                65535

 VPN instance name            65535

 

L3 inbound template:

 Template ID                : 3281

 Packets                    : 0

 Last template export time  : Never

 Field count                : 29

 Field type                   Field length (bytes)

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

 In packets                   8

 In bytes                     8

 First forwarded              4

 Last forwarded               4

 Input interface index        4

 Output interface index       4

 Source IPv4 address          4

 Destination IPv4 address     4

 Next hop IPv4 address        4

 Source AS                    4

 Destination AS               4

 L4 source port               2

 L4 destination port          2

 IP protocol version          1

 TCP flags                    1

 Protocol                     1

 Source ToS                   1

 Source address mask          1

 Destination address mask     1

 Direction                    1

 Forwarding status            1

 In VPN ID                    2

 Sampling algorithm           1

 PAD                          1

 Sampling interval            4

 VXLAN ID                     4

 App ID                       4

 Bgp-community                65535

 VPN instance name            65535

表1-3 display ip netstream template命令显示信息描述表

字段

描述

Flow template refresh frequency

模板的包刷新率

Flow template refresh interval

模板的时间刷新率,单位为分钟

Active flow templates

当前激活的模板数

Created flow templates

创建的模板总数

L3 outbound template

L3出方向模板信息

L3 inbound template

L3入方向模板信息

Template ID

模板ID

Packets

使用该模板的发送报文数

Last template export time

该模板最近的一次输出时间

Field count

模板的域总数

Field type

域类型

Field length (bytes)

域长度,单位为字节

Out packets

输出的数据包个数

In packets

输入的数据包个数

Out bytes

输出的数据个数,单位为字节

In bytes

输入的数据个数,单位为字节

First forwarded

记录转发第一个报文时的系统时间,时间精确到毫秒

Last forwarded

记录转发最后一个报文时的系统时间,时间精确到毫秒

Input interface index

输入接口的索引

Output interface index

输出接口的索引

Source IPv4 address

源IP地址

Destination IPv4 address

目的IP地址

Next hop IPv4 address

下一跳地址

Source AS

源AS号

Destination AS

目的AS号

L4 source port

源端口号

L4 destination port

目的端口号

IP protocol version

IP协议版本号

TCP flags

TCP Flag

Protocol

四层协议类型

Source ToS

源服务类型

Source address mask

源地址掩码

Destination address mask

目的地址掩码

Direction

方向字段

Forwarding status

转发状态

Out VPN ID

出方向vpn索引

In VPN ID

入方向vpn索引(仅版本10支持)

Sampling algorithm

采样算法

PAD

空白占位符

Sampling interval

采样率

VXLAN ID

VXLAN ID(仅版本10支持)

App ID

应用类型

Bgp-community

BGP团体属性值(仅版本10支持)

未配置ip netstream template rfc7011时,该字段显示为Bgp-community1、Bgp-community2、Bgp-community3、Bgp-community4,字段取值长度固定为4字节;配置ip netstream template rfc7011后,该字段显示为Bgp-community,为可变长字段,最大可取65535字节

VPN instance name

VPN实例名称,公网实例显示为N/A

 

1.1.4  enable

enable命令用来开启聚合视图对应的聚合功能。

undo enable命令用来关闭聚合视图对应的聚合功能。

【命令】

enable

undo enable

【缺省情况】

NetStream聚合功能处于关闭状态。

【视图】

NetStream聚合视图

【缺省用户角色】

network-admin

【举例】

# 开启NetStream的BGP团体属性聚合功能。

<Sysname> system-view

[Sysname] ip netstream bgp-community

[Sysname-ns-aggregation-bgpcommunity] enable

【相关命令】

·     ip netstream aggregation

1.1.5  ip netstream

ip netstream命令用来在接口视图下开启NetStream功能。

undo ip netstream命令用来在接口视图下关闭NetStream功能。

【命令】

ip netstream { inbound | outbound }

undo ip netstream { inbound | outbound }

【视图】

接口视图

【缺省情况】

NetStream功能处于关闭状态。

【缺省用户角色】

network-admin

【参数】

inbound:对入方向的流量进行NetStream统计。

outbound:对出方向的流量进行NetStream统计。

【举例】

# 在接口HundredGigE1/0/1的入方向上开启NetStream功能。

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] ip netstream inbound

1.1.6  ip netstream aggregation

ip netstream aggregation命令用来进入NetStream聚合视图。

undo ip netstream aggregation命令用来删除流聚合方式相应的配置。

【命令】

ip netstream aggregation { bgp-community | destination-prefix | prefix | prefix-port | protocol-port | source-prefix | tos-destination-prefix | tos-prefix | tos-protocol-port | tos-source-prefix }

undo ip netstream aggregation { bgp-community | destination-prefix | prefix | prefix-port | protocol-port | source-prefix | tos-destination-prefix | tos-prefix | tos-protocol-port | tos-source-prefix }

【缺省情况】

未配置NetStream流聚合方式。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

bgp-community:BGP团体属性聚合,根据NetStream流的输入、输出接口索引和BGP团体属性3个关键项对流分类。

destination-prefix:目的前缀聚合,根据NetStream流的目的自治系统号、目的掩码长度、目的前缀和输出接口索引4个关键项对流分类。

prefix:源和目的前缀聚合,根据NetStream流的源自治系统号、目的自治系统号、源掩码长度、目的掩码长度、源前缀、目的前缀、输入接口索引和输出接口索引8个关键项对流分类。

prefix-port:前缀端口聚合,根据NetStream流的源前缀、目的前缀、源掩码长度、目的掩码长度、ToS、协议号、源端口、目的端口、输入接口索引、输出接口索引10个关键项对流分类。

protocol-port:协议-端口聚合,根据NetStream流的协议号、源端口和目的端口3个关键项对流分类。

source-prefix:源前缀聚合,根据NetStream流的源自治系统号、源掩码长度、源前缀和输入接口索引4个关键项对流分类。

tos-destination-prefix:服务类型-目的前缀聚合,根据NetStream流的ToS、目的自治系统号、目的掩码长度、目的前缀和输出接口索引5个关键项对流分类。

tos-prefix:服务类型-前缀聚合,根据NetStream流的ToS、源自治系统号、源前缀、源掩码长度、目的自治系统号、目的掩码长度、目的前缀、输入接口索引和输出接口索引9个关键项对流分类。

tos-protocol-port:服务类型-协议-端口聚合,根据NetStream流的ToS、协议号、源端口、目的端口、输入接口索引和输出接口索引6个关键项对流分类。

tos-source-prefix:服务类型-源前缀聚合,根据NetStream流的ToS、源自治系统号、源前缀、源掩码长度和输入接口索引5个关键项对流分类。

【使用指导】

在聚合视图下,可以开启或关闭聚合功能,以及设置NetStream统计输出报文源接口、目的IP地址以及目的端口号。

如果一条流同时满足多个聚合方式,则该流会被统计到多个聚合流中。

【举例】

# 设置NetStream流聚合方式为BGP团体属性聚合,并进入NetStream BGP团体属性聚合视图。

<Sysname> system-view

[Sysname] ip netstream aggregation bgp-community

[Sysname-ns-aggregation-bgpcommunity]

【相关命令】

·     enable

·     ip netstream export host

·     ip netstream export source

1.1.7  ip netstream export host (aggregation view)

ip netstream export host命令用来配置NetStream统计输出报文的目的地址和目的UDP端口号。

undo ip netstream export host命令用来删除指定NetStream统计输出报文的目的地址或配置的所有地址。

【命令】

ip netstream export host ip-address udp-port [ vpn-instance vpn-instance-name ]

undo ip netstream export host [ ip-address [ vpn-instance vpn-instance-name ] ]

【缺省情况】

未配置NetStream统计输出报文的目的地址和目的UDP端口号。

【视图】

NetStream聚合视图

【缺省用户角色】

network-admin

【参数】

ip-address:NetStream统计输出报文的目的IP地址。

udp-port:NetStream统计输出报文的目的UDP端口号,取值范围为0~65535。

vpn-instance vpn-instance-name:指定NetStream统计输出报文的目的地址所属的VPN。vpn-instance-name表示MPLS L3VPN的VPN实例名称,为1~31个字符的字符串,区分大小写。如果未指定本参数,则表示NetStream统计输出报文的目的地址位于公网中。

【使用指导】

若没有使能某类聚合功能,则无法通过display ip netstream export命令查看它的相关信息(包括目的地址的目的UDP端口号)。

若聚合视图下未通过本命令配置目的地址和目的UDP端口号,则使用系统视图下的配置;若聚合视图下通过本命令配置了目的地址和目的UDP端口号,则优先使用聚合视图下的配置。

不同聚合视图下可以配置相同的目的地址和目的UDP端口号。同一个聚合视图下最多可以配置4组目的地址,设备会同时向多个已配置的目的地址发送NetStream报文,实现目的主机的备份。当多次执行本命令时:

·     如果指定的VPN参数不同,则不管IP地址和UDP端口号是否相同,均会配置成功,表示配置了不同组的目的地址。

·     如果指定的VPN参数相同或均未指定VPN参数,但IP地址不同,则均会配置成功,表示配置了不同组的目的地址。如果IP地址相同,但UDP端口号不同,则后配置的UDP端口号生效。

聚合流统计输出报文会发给聚合类型对应的聚合视图下配置的所有目的地址。

【举例】

# 配置BGP团体属性聚合流的输出报文的目的IP地址为172.16.105.48,UDP端口号为5000。

<Sysname> system-view

[Sysname] ip netstream aggregation bgp-community

[Sysname-ns-aggregation-bgpcommunity] ip netstream export host 172.16.105.48 5000

【相关命令】

·     ip netstream aggregation

·     ip netstream export source

·     ip netstream export host (system view)

·     display ip netstream export

1.1.8  ip netstream export host (system view)

ip netstream export host命令用来配置NetStream统计输出报文的目的地址和目的UDP端口号。

undo ip netstream export host命令用来删除指定NetStream统计输出报文的目的地址或配置的所有地址。

【命令】

ip netstream export host ip-address udp-port [ vpn-instance vpn-instance-name ] [ slot slot-number ]

undo ip netstream export host [ ip-address [ vpn-instance vpn-instance-name ] ] [ slot slot-number ]

【缺省情况】

未配置NetStream统计输出报文的目的地址和目的UDP端口号。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

ip-address:NetStream统计输出报文的目的IP地址。

udp-port:NetStream统计输出报文的目的UDP端口号,取值范围为0~65535。

vpn-instance vpn-instance-name:指定NetStream统计输出报文的目的地址所属的VPN。vpn-instance-name表示MPLS L3VPN的VPN实例名称,为1~31个字符的字符串,区分大小写。如果未指定本参数,则表示NetStream统计输出报文的目的地址位于公网中。

slot slot-number:指定单板。slot-number为单板所在的槽位号。如果不指定本参数,则表示指定所有单板。

【使用指导】

若聚合视图下未配置目的地址和目的UDP端口号,则使用系统视图下的配置;若聚合视图下配置了目的地址和目的UDP端口号,则优先使用聚合视图下的配置。

多次执行本命令(无论指定的IP地址和UDP端口号是否一样),带slot参数的配置和不带slot参数的配置都可以同时存在。对于同一单板,设备会优先采用带slot参数的配置。对于没有单独配置的单板,设备会采用不带slot参数的配置。

系统视图下最多配置4组目的地址,设备会同时向多个已配置的目的地址发送NetStream报文,实现目的主机的备份。当多次执行本命令时:

·     如果指定的VPN参数不同,则不管IP地址和UDP端口号是否相同,均会配置成功,表示配置了不同组的目的地址。

·     如果指定的VPN参数相同或均未指定VPN参数,而IP地址不同,则均会配置成功,表示配置了不同组的目的地址。如果IP地址相同,但UDP端口号不同,则后配置的UDP端口号生效。

相同slot最多指定四组目的地址。

【举例】

# 配置全局NetStream统计输出报文的目的IP地址为172.16.105.48,UDP端口号为5000。

<Sysname> system-view

[Sysname] ip netstream export host 172.16.105.48 5000

【相关命令】

·     ip netstream aggregation

·     ip netstream export source

·     ip netstream export host (aggregation view)

·     display ip netstream export

1.1.9  ip netstream export rate

ip netstream export rate命令用来配置输出速率限制。

undo ip netstream export rate命令用来恢复缺省情况。

【命令】

ip netstream export rate rate

undo ip netstream export rate

【缺省情况】

NetStream统计输出报文的输出速率不受限制。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

rate:NetStream统计输出报文的输出速率限制,取值范围为1~1000,单位为每秒最多允许输出的报文个数。

【使用指导】

配置输出速率限制,即限制每秒钟输出的最多报文数。

当设备每秒生成的NetStream报文数量超过限制,设备会将这些报文保存到缓冲区稍候发送。如果设备生成NetStream报文速率过快,会导致缓冲区被占满。此时,为避免NetStream报文丢失,该命令将暂时失效,设备会尽力发送NetStream报文,直到缓冲区能正常工作为止。

【举例】

# 设置每秒最多允许10个报文被输出。

<Sysname> system-view

[Sysname] ip netstream export rate 10

1.1.10  ip netstream export source

ip netstream export source命令用来配置NetStream统计输出报文的源接口。

undo ip netstream export source命令用来恢复缺省情况。

【命令】

ip netstream export source interface interface-type interface-number

undo ip netstream export source

【缺省情况】

采用统计输出报文的出接口IP地址作为源接口的IP地址。

【视图】

系统视图

NetStream聚合视图

【缺省用户角色】

network-admin

【参数】

interface-type interface-number:NetStream统计输出报文的源接口,由接口类型和接口编号组成。

【使用指导】

通过本命令配置源接口后,会将NetStream统计输出报文的源IP地址设置为该接口的IP地址。

不同聚合视图下可以配置不同的源接口。

聚合视图下若未配置源接口,则使用系统视图下的配置。

【举例】

# 将NetStream统计输出报文源接口设置为HundredGigE1/0/1。

<Sysname> system-view

[Sysname] ip netstream export source interface hundredgige 1/0/1

# 将NetStream BGP团体属性聚合统计输出报文源接口设置为HundredGigE1/0/2。

<Sysname> system-view

[Sysname] ip netstream aggregation bgp-community

[Sysname-ns-aggregation-bgpcommunity] ip netstream export source interface hundredgige 1/0/2

【相关命令】

·     ip netstream aggregation

1.1.11  ip netstream export template refresh-rate

ip netstream export template refresh-rate 命令用来配置NetStream统计输出报文版本9或版本10模板的刷新率。

undo ip netstream export template refresh-rate 命令用来恢复缺省情况。

【命令】

ip netstream export template refresh-rate { packet packets | time minutes }

undo ip netstream export template refresh-rate { packet | time }

【缺省情况】

每隔20个包设备刷新一次版本9或版本10模板。

每隔30分钟设备刷新一次版本9或版本10模板。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

packet packets:NetStream统计输出报文版本9或版本10模板的包刷新率,取值范围为1~600,单位为包数,即每隔多少个包刷新一次模板,并通知NetStream服务器最新的模板格式。

time minutes:NetStream统计输出报文版本9或版本10模板的时间刷新率,取值范围为1~3600,单位为分钟,即每隔多少分钟刷新一次模板,并通知NetStream服务器最新的模板格式。

【使用指导】

版本9和版本10是基于模板方式的、支持自定义格式,由于NetStream服务器不会永久保存模板,所以设备需要定期通知NetStream服务器最新版本9或版本10模板格式。用户可以根据实际情况,配置版本9或版本10模板的包刷新率和时间刷新率,及时更新模板。

可以同时配置包刷新率和时间刷新率,只要满足任意一个刷新条件,设备就会将符合条件的模板发送给NetStream服务器。

【举例】

# 将NetStream统计输出报文版本9或版本10模板的包刷新率设为100。

<Sysname> system-view

[Sysname] ip netstream export template refresh-rate packet 100

1.1.12  ip netstream export version

ip netstream export version 5命令用来配置NetStream版本5的自治系统选项。

ip netstream export version 9命令用来配置NetStream版本9的自治系统选项和BGP下一跳选项。

ip netstream export version 10命令用来配置NetStream版本10的自治系统选项和BGP下一跳选项。

undo ip netstream export version命令用来恢复缺省情况。

【命令】

ip netstream export version 5 { origin-as | peer-as }

ip netstream export version { 9 | 10 } { origin-as | peer-as } [ bgp-nexthop ]

undo ip netstream export version

【缺省情况】

NetStream统计输出报文使用版本9,记录邻接自治系统(peer-as)信息,不记录BGP下一跳信息。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

origin-as:流信息中记录的自治系统号为起始自治系统号。

peer-as:流信息中记录的自治系统号为邻接自治系统号。

bgp-nexthop:流信息中记录BGP下一跳。

【使用指导】

NetStream流信息中会记录流的源IP地址及其对应的自治系统号;目的IP地址及其对应的自治系统号。设备会根据用户实际配置的自治系统参数来确定记录的自治系统号。版本9和版本10还可以配置是否记录BGP下一跳信息。

同一时间,Netstream只能使用一个版本输出报文,所以,多次执行本命令,最后一次执行的命令生效。

当设备上配置了聚合时,如果配置输出报文为版本5,则流统计信息采用版本8输出;如果配置输出为版本9,则流统计信息采用版本9输出;如果配置输出为版本10,则流统计信息采用版本10输出。

【举例】

# 将NetStream统计输出报文为版本5,并设置流信息中记录的自治系统号为起始自治系统号。

<Sysname> system-view

[Sysname] ip netstream export version 5 origin-as

1.1.13  ip netstream filter

ip netstream filter命令用来在接口上开启NetStream过滤功能。

undo ip netstream filter命令用来在接口上关闭NetStream过滤功能。

【命令】

ip netstream { inbound | outbound } filter acl acl-number

undo ip netstream { inbound | outbound } filter

【缺省情况】

NetStream过滤功能处于关闭状态,此时统计流经指定接口的所有IPv4报文。

【视图】

接口视图

【缺省用户角色】

network-admin

【参数】

inbound:入方向过滤,即对从当前接口收到的报文进行过滤统计。

outbound:出方向过滤,即对从当前接口发出的报文进行过滤统计。

acl acl-number:指定ACL的编号,取值范围及其代表的ACL类型如下:

·     2000~2999:表示基本ACL。

·     3000~3999:表示高级ACL。

·     4000~4999:表示二层ACL。

·     5000~5999:表示用户自定义ACL。

【使用指导】

NetStream过滤使用ACL来对报文进行过滤:

·     如果想通过NetStream只采集特定流的数据,配置ACL规则允许这些流通过。

·     如果想让NetStream不采集特定流的数据,配置ACL规则禁止这些流通过。

【举例】

# 在接口HundredGigE1/0/1上配置根据ACL 2003规则进行出方向过滤。

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] ip netstream outbound

[Sysname-HundredGigE1/0/1] ip netstream outbound filter acl 2003

1.1.14  ip netstream max-entry

ip netstream max-entry命令用来配置NetStream流缓存区中流表项的最大数目。

undo ip netstream max-entry命令用来恢复缺省情况。

【命令】

ip netstream max-entry max-entries

undo ip netstream max-entry

【缺省情况】

NetStream流缓存区中流表项的最大数目为1048576。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

max-entries:NetStream流缓存区中流表项的最大数目。取值范围为1000~2000000。

【使用指导】

max-entries参数值在各单板上单独生效,而不是各单板的总和。

多次执行ip netstream max-entry max-entries命令,最后一次执行的命令生效

本命令会向设备上的所有单板下发,所以对于不支持NetStream功能的单板,会反馈不支持的提示信息,但只要设备上存在一个支持NetStream功能的单板,该命令即可生效。

【举例】

# 设置NetStream流缓存区中流表项的最大数目为5000。

<Sysname> system-view

[Sysname] ip netstream max-entry 5000

1.1.15  ip netstream mpls

ip netstream mpls命令用来开启MPLS报文统计功能。

undo ip netstream mpls命令用来关闭MPLS报文统计功能。

【命令】

ip netstream mpls [ label-positions label-position1 [ label-position2 [ label-position3 ] ] ] [ no-ip-fields ]

undo ip netstream mpls

【缺省情况】

MPLS报文统计功能处于关闭状态。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

label-positions:统计的MPLS报文的标签位置。

label-position1:指定统计的MPLS报文的第一个标签位置,取值范围为1~6。

label-position2:指定统计的MPLS报文的第二个标签位置,取值范围为1~6。

label-position3:指定统计的MPLS报文的第三个标签位置,取值范围为1~6。

no-ip-fields:不统计IP选项。

【使用指导】

该命令不仅开启IPv4 NetStream对MPLS报文的统计功能,同时也开启了IPv6 NetStream对MPLS报文的统计功能。

若未指定任何参数,表示基于MPLS报文的首标签并且带有IP选项进行统计。

当需要统计MPLS报文的多个标签时,指定的标签位置不允许重复,最终统计的多个标签的位置依据从小到大的顺序取指定值。

【举例】

# 开启MPLS报文统计功能,基于MPLS报文的首标签并且不带IP选项进行统计。

<Sysname> system-view

[Sysname] ip netstream mpls no-ip-fields

1.1.16  ip netstream sampler

ip netstream sampler命令用来开启NetStream采样功能。

undo ip netstream sampler命令用来关闭NetStream采样功能。

【命令】

ip netstream { inbound | outbound } sampler sampler-name

undo ip netstream { inbound | outbound } sampler

【缺省情况】

NetStream采样功能处于关闭状态。

【视图】

接口视图

【缺省用户角色】

network-admin

【参数】

inbound:对入方向的报文进行采样。

outbound:对出方向的报文进行采样。

sampler sampler-name:采样器名称,为1~31个字符的字符串,不区分大小写。

【举例】

# 在接口HundredGigE1/0/1上开启NetStream采样功能,使用名为abc的采样器对入方向的报文进行采样,Netstream根据采样结果进行报文统计。

<Sysname> system-view

[Sysname] interface hundredgige 1/0/1

[Sysname-HundredGigE1/0/1] ip netstream inbound

[Sysname-HundredGigE1/0/1] ip netstream inbound sampler abc

 

1.1.17  ip netstream template rfc7011

ip netstream template rfc7011命令用来配置模板格式与RFC协议一致。

undo ip netstream template rfc7011命令用来恢复缺省情况。

【命令】

ip netstream template rfc7011

undo ip netstream template rfc7011

【缺省情况】

设备采用H3C私有的NetStream的模板格式。

【视图】

系统视图

【缺省用户角色】

network-admin

【使用指导】

缺省情况下,设备采用H3C私有的NetStream的模板格式。配置该命令后,NetStream将使用RFC7011协议定义的模板格式输出报文。设备端选用的模板格式必须和服务器端选用的模板格式保持一致。

该命令对IPv4和IPv6 NetStream模板格式同时生效。

【举例】

# 配置模板格式与RFC7011协议一致。

<Sysname> system-view

[Sysname] ip netstream template rfc7011

1.1.18  ip netstream timeout active

ip netstream timeout active命令用来配置流的活跃老化时间。

undo ip netstream timeout active命令用来恢复缺省情况。

【命令】

ip netstream timeout active minutes

undo ip netstream timeout active

【缺省情况】

流的活跃老化时间为5分钟。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

minutes:流的活跃老化时间,取值范围为1~5,单位为分钟。

【使用指导】

从采集到的第一个报文开始,该流在指定的时间内能被采集到,则该流属于活跃的流,指定的时间称为流的活跃老化时间。

【举例】

# 将流的活跃老化时间设置为5分钟。

<Sysname> system-view

[Sysname] ip netstream timeout active 5

【相关命令】

·     ip netstream timeout inactive

1.1.19  ip netstream timeout inactive

ip netstream timeout inactive命令用来配置流的不活跃老化时间。

undo ip netstream timeout inactive命令用来恢复缺省情况。

【命令】

ip netstream timeout inactive seconds

undo ip netstream timeout inactive

【缺省情况】

流的不活跃老化时间为300秒。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

seconds:流的不活跃老化时间,取值范围为10~320,单位为秒。

【使用指导】

从采集到的最后一个报文开始,该流在指定的时间内没有被采集到,则该流属于不活跃的流,指定的时间称为流的不活跃老化时间。

【举例】

# 将流的不活跃老化时间设置为60秒。

<Sysname> system-view

[Sysname] ip netstream timeout inactive 60

【相关命令】

·     ip netstream timeout active

1.1.20  ip netstream vxlan udp-port

ip netstream vxlan udp-port命令用来开启VXLAN报文统计功能。

undo ip netstream vxlan udp-port命令用来关闭VXLAN报文统计功能。

【命令】

ip netstream vxlan udp-port port-number

undo ip netstream vxlan udp-port

【缺省情况】

VXLAN报文统计功能处于关闭状态。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

port-number:NetStream统计VXLAN报文的目的UDP端口号,取值范围为1~65535。

【使用指导】

配置的port-number应该和需要统计的VXLAN报文的目的UDP端口号一致。

VXLAN报文的具体介绍请参见“VXLAN配置指导”中的“VXLAN”。

【举例】

# 开启VXLAN报文统计功能,统计VXLAN报文的目的UDP端口号为2。

<Sysname> system-view

[Sysname] ip netstream vxlan udp-port 2

1.1.21  netstream key

netstream key命令用来设置硬件为NetStream划分流的依据。

undo netstream key命令用来恢复缺省情况

【命令】

netstream key [ destination-ip | destination-mac | destination-port | flow-label | ip-tos | mpls-experimental1 | mpls-experimental2 | mpls-experimental3 | mpls-label1 | mpls-label2 | mpls-label3 | protocol | source-ip | source-mac | source-port | vxlan-destination-ip | vxlan-destination-mac | vxlan-destination-port | vxlan-flow-label | vxlan-ip-tos | vxlan-protocol | vxlan-source-ip | vxlan-source-mac | vxlan-source-port ] *

undo netstream key

【缺省情况】

缺省情况下,硬件为NetStream划分流的依据是destination-ipdestination-macprotocolsource-ipsource-mac

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

destination-ip:硬件为NetStream划分流的依据为报文的目的IP地址。

destination-mac:硬件为NetStream划分流的依据为报文的目的MAC地址。

destination-port:硬件为NetStream划分流的依据为报文的目的端口。

flow-label:硬件为NetStream划分流的依据为IPv6报文的流标签。

ip-tos:硬件为NetStream划分流的依据为报文IP头部中的TOS字段。

mpls-experimental1:硬件为NetStream划分流的依据为MPLS报文的第一层优先级字段。

mpls-experimental2:硬件为NetStream划分流的依据为MPLS报文的第二层优先级字段。

mpls-experimental3:硬件为NetStream划分流的依据为MPLS报文的第三层优先级字段。

mpls-label1:硬件为NetStream划分流的依据为MPLS报文的第一层标签。

mpls-label2:硬件为NetStream划分流的依据为MPLS报文的第二层标签。

mpls-label3:硬件为NetStream划分流的依据为MPLS报文的第三层标签。

protocol:硬件为NetStream划分流的依据为报文的协议类型。

source-ip:硬件为NetStream划分流的依据为报文的源IP地址。

source-mac:硬件为NetStream划分流的依据为报文的源MAC地址。

source-port:硬件为NetStream划分流的依据为报文的源端口。

vxlan-destination-ip:硬件为NetStream划分流的依据为VXLAN报文内层目的IP地址。

vxlan-destination-mac:硬件为NetStream划分流的依据为VXLAN报文内层目的MAC地址。

vxlan-destination-port:硬件为NetStream划分流的依据为VXLAN报文内层目的端口。

vxlan-flow-label:硬件为NetStream划分流的依据为VXLAN报文内层的IPv6报文的流标签。

vxlan-ip-tos:硬件为NetStream划分流的依据为VXLAN报文内层IP头部中的TOS字段。

vxlan-protocol:硬件为NetStream划分流的依据为VXLAN报文内层报文协议类型。

vxlan-source-ip:硬件为NetStream划分流的依据为VXLAN报文内层源IP地址。

vxlan-source-mac:硬件为NetStream划分流的依据为VXLAN报文内层源MAC地址。

vxlan-source-port:硬件为NetStream划分流的依据为VXLAN报文内层源端口。

【使用指导】

开启NetStream功能后,硬件会以一定依据将接口收到和发送的报文进行分类,并归集成流后,按周期发送给NetStream模块进行流量统计。使用本命令,用户可以设置硬件为NetStream划分流的依据,从而减少硬件对流的分类,简化NetStream模块的处理,提高NetStream模块的性能。

例如用户仅关注流的去向,则可以将硬件为NetStream划分流的依据设置为destination-ip。这样,硬件会将相同目的IP地址的报文归集成同一条流,不同目的IP地址的报文归集成同不同流,并将所有报文的其他参数(例如目的MAC地址、目的端口、源IP地址、源MAC地址、源端口等)设置为固定值。这些流发送给NetStream模块后,NetStream模块能迅速统计出某时间段内去往某IP地址的报文的情况。

如果用户仍需依据“七元组”来统计设备的流量,请将硬件为NetStream划分流的依据设置为destination-ipdestination-portip-tosprotocolsource-ipsource-port否则NetStream将认为用户不关心这些参数,会将所有流的这些参数设置为固定值。

如需NetStream对MPLS报文进行统计,则必须配置ip netstream mpls命令且接收流量端口必须配置mpls enable命令,且protocol必须设置成硬件为NetStream划分流的依据。并根据报文结构将mpls-experimental1mpls-experimental2mpls-experimental3mpls-label1mpls-label2mpls-label3中的至少一项设置成硬件为NetStream划分流的依据。

如需NetStream对VXLAN报文进行统计,则必须配置ip netstream vxlan udp-port命令,且source-portdestination-portprotocol必须设置成硬件为NetStream划分流的依据。从vxlan-destination-ipvxlan-destination-macvxlan-destination-portvxlan-flow-labelvxlan-ip-tosvxlan-protocolvxlan-source-ipvxlan-source-macvxlan-source-port中的至少一项设置成硬件为NetStream划分流的依据。

【举例】

# 设置硬件为NetStream划分流的依据为报文的源IP地址、目的IP地址、源端口号、目的端口号、协议类型和ToS。

<Sysname> system-view

[Sysname] netstream key source-ip destination-ip source-port destination-port protocol ip-tos

【相关命令】

·     ip netstream mpls

·     ip netstream vxlan udp-port

1.1.22  reset ip netstream statistics

reset ip netstream statistics命令用来将流缓存区中所有流强制老化,输出报文信息,并清空NetStream缓冲区的状态信息。

【命令】

reset ip netstream statistics

【视图】

用户视图

【缺省用户角色】

network-admin

【使用指导】

在执行清空缓冲区中老化流的动作时,命令行会给出提示,告知用户这个动作可能要持续几分钟,在这段时间内不能统计。

【举例】

# 将流缓存区中所有流老化,输出报文信息,并清空NetStream缓冲区的状态信息。

<Sysname> reset ip netstream statistics

This process may take a few minutes.

Netstream statistic function is disabled during this process.

 

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

新华三官网
联系我们