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

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

目录

13-NetStream命令

本章节下载 13-NetStream命令  (298.22 KB)

docurl=/cn/Service/Document_Software/Document_Center/Routers/Catalog/SR_Router/SR8800-F/Command/Command_Manual/H3C_SR8800-F_CR-R7951PXX-6W102/14/202011/1358690_30005_0.htm

13-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 ]

(IRF模式)

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 ] [ chassis chassis-number 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表示单板所在的槽位号。如果未指定本参数,将显示所有单板上的信息。(独立运行模式)

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

【举例】

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

<Sysname> display ip netstream cache verbose

IP NetStream cache information:

  Active flow timeout               : 30 min

  Inactive flow timeout             : 30 sec

  Max number of entries             : 1331200

  IP active flow entries            : 2

  MPLS active flow entries          : 0

  L2 active flow entries            : 0

  IPL2 active flow entries          : 0

  IP flow entries counted           : 20

  MPLS flow entries counted         : 0

  L2 flow entries counted           : 0

  IPL2 flow entries counted         : 0

  Last statistics resetting time    : Never

 

IP packet size distribution (234 packets in total):

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

 .000 .487 .500 .000 .000 .000 .000 .012 .000 .000 .000 .000 .000 .000 .000

 

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

 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000

 

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

                   Flows   /sec        /sec    /flow    /flow        /flow

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

 UDP-other             8         0         0         1            1         30

 ICMP                  4         0         0         8           17         30

 UDP-NetBios           6         0         0        11           18         30

 TCP-Telnet            2         0         0        31           18         10

 

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

     DstMAC(VLAN)           SrcMAC(VLAN)

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

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

IP   12.1.1.2(2048)      123.1.1.2(0)        1   0   N/A   GE3/1/1(I) 4

     TCPFlag:       0

     DstMask:      32       SrcMask:      32       NextHop:          12.1.1.2

     DstAS:         0       SrcAS:         0       BGPNextHop:        0.0.0.0

     InVRF:       N/A

     Bgp-community1:0

     Bgp-community2:0

     Bgp-community3:0

     Bgp-community4:0

     SamplerMode: Fixed       SamplerInt: 1000

     Active:        3       Bytes/Pkt:    60

     First packet arrived: 02/19/2013, 13:07:01

     Last packet arrived:  02/19/2013, 13:07:04

IP   123.1.1.255(137)    123.1.1.2(137)      17  0   N/A   GE3/1/1(I) 12

     TCPFlag:       0

     DstMask:      32       SrcMask:      32       NextHop:           0.0.0.0

     DstAS:         0       SrcAS:         0       BGPNextHop:        0.0.0.0

     InVRF:       N/A

     Bgp-community1:0

     Bgp-community2:0

     Bgp-community3:0

     Bgp-community4:0

     SamplerMode: Fixed       SamplerInt: 1000

     Active:       31       Bytes/Pkt:    78

     First packet arrived: 02/19/2013, 13:06:26

     Last packet arrived:  02/19/2013, 13:06:57

表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 (234 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:表示不采样,统计所有报文

·     Fixed:表示固定采样

·     Random:表示随机采样

 

1.1.2  display ip netstream cache archive

display ip netstream cache archive命令用来查看保存到本地的Netstream流表项信息。

【命令】

(独立运行模式)

display ip netstream cache archive [ 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 ]

(IRF模式)

display ip netstream cache archive [ 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 ] [ chassis chassis-number 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地址,格式为点分十进制。该参数不支持显示二层流表项。

interface interface-type interface-number:显示指定接口的保存到本地的Netstream流表项信息,interface-type interface-number表示接口的类型和编号。

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

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

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

source-port source-port:显示指定源端口的保存到本地的Netstream流表项信息,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表示单板所在的槽位号。如果未指定本参数,将显示所有单板上的信息。(独立运行模式)

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

【举例】

# 查看2017年7月28日14:10:03到2017年7月28日14:23:03的保存到本地的Netstream流表项信息。

<Sysname> display ip netstream cache archive arrived-time 7/28/2017 14:10:03 7/28/2017 14:23:03

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    GE3/1/1(I)  42996

     First packet arrived: 7/28/2017, 14:20:03

     Last packet arrived:  7/28/2017, 14:21:03

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

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

                            2:16-6-1

     First packet arrived: 7/28/2017, 14:20:03

     Last packet arrived:  7/28/2017, 14:23:03

本命令的显示信息描述请参见表1-1

【相关命令】

·     ip netstream cache archive enable

1.1.3  display ip netstream export

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

【命令】

(独立运行模式)

display ip netstream export [ slot slot-number ]

(IRF模式)

display ip netstream export [ chassis chassis-number slot slot-number ]

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

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

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

【使用指导】

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

【举例】

# 查看NetStream统计输出信息。

<Sysname> display ip netstream export

as aggregation export information:

  Flow source interface                           : Not specified

  Flow destination VPN instance                   : Not specified

  Flow destination IP address (UDP)               : 4.1.1.1 (2000)

  Version  8 exported flow number                 : 5

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

  Version  9 exported flow number                 : 0

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

  Version 10 exported flow number                 : 0

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

 

protocol-port aggregation export information:

  Flow source interface                           : Not specified

  Flow destination VPN instance                   : Not specified

  Flow destination IP address (UDP)               : 4.1.1.1 (3000)

  Version  8 exported flow number                 : 5

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

  Version  9 exported flow number                 : 0

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

  Version 10 exported flow number                 : 0

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

 

source-prefix aggregation export information:

  Flow source interface                           : Not specified

  Flow destination VPN instance                   : Not specified

  Flow destination IP address (UDP)               : 4.1.1.1 (4000)

  Version  8 exported flow number                 : 4

  Version  8 exported UDP datagram number (failed): 4 (4)

  Version  9 exported flow number                 : 0

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

  Version 10 exported flow number                 : 0

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

 

destination-prefix aggregation export information:

  Flow source interface                           : Not specified

  Flow destination VPN instance                   : Not specified

  Flow destination IP address (UDP)               : 4.1.1.1 (6000)

  Version  8 exported flow number                 : 2

  Version  8 exported UDP datagram number (failed): 2 (2)

  Version  9 exported flow number                 : 0

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

  Version 10 exported flow number                 : 0

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

 

prefix aggregation export information:

  Flow source interface                           : Not specified

  Flow destination VPN instance                   : Not specified

  Flow destination IP address (UDP)               : 4.1.1.1 (7000)

  Version  8 exported flow number                 : 2

  Version  8 exported UDP datagram number (failed): 2 (2)

  Version  9 exported flow number                 : 0

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

  Version 10 exported flow number                 : 0

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

 

IP export information:

  Flow source interface                           : Not specified

  Flow destination VPN instance                   : Not specified

  Flow destination IP address (UDP)               : 4.1.1.1 (5000)

  Version  5 exported flow number                 : 5

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

  Version  9 exported flow number                 : 0

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

  Version 10 exported flow number                 : 0

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

 

IPL2 export information:

  Flow source interface                           : Not specified

  Flow destination VPN instance                   : Not specified

  Flow destination IP address (UDP)               : 4.1.1.1 (5000)

  Version  9 exported flow number                 : 0

  Version  9 exported UDP datagram number (failed): 0 (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

输出信息的源接口(Not specified表示未配置输出信息的源接口)

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.4  display ip netstream template

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

【命令】

(独立运行模式)

display ip netstream template [ slot slot-number ]

(IRF模式)

display ip netstream template [ chassis chassis-number slot slot-number  ]

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

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

chassis chassis-number slot slot-number:显示指定成员设备上指定单板的信息。chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。如果未指定本参数,将显示全局主用主控板上的信息。(IRF模式)

【使用指导】

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

【举例】

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

<Sysname> display ip netstream template

Flow template refresh frequency            : 20

 Flow template refresh interval             : 30 min

 Active flow templates                      : 4

 Created flow templates                     : 4

 

L2L3 outbound template:

 Template ID                : 3286

 Packets                    : 0

 Last template export time  : Never

 Field count                : 25

 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

 Source VLAN                  2

 Destination VLAN             2

 L4 source port               2

 L4 destination port          2

 IP protocol version          1

 TCP flags                    1

 Protocol                     1

 Source ToS                   1

 Direction                    1

 Sampling algorithm           1

 PAD                          1

 PAD                          1

 Sampling interval            4

 Bgp-community1               4

 Bgp-community2               4

 Bgp-community3               4

 Bgp-community4               4

 

L2L3 inbound template:

 Template ID                : 3285

 Packets                    : 0

 Last template export time  : Never

 Field count                : 25

 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

 Source VLAN                  2

 Destination VLAN             2

 L4 source port               2

 L4 destination port          2

 IP protocol version          1

 TCP flags                    1

 Protocol                     1

 Source ToS                   1

 Direction                    1

 Sampling algorithm           1

 PAD                          1

 PAD                          1

 Sampling interval            4

 Bgp-community1               4

 Bgp-community2               4

 Bgp-community3               4

 Bgp-community4               4

 

L3 outbound template:

 Template ID                : 3282

 Packets                    : 0

 Last template export time  : Never

 Field count                : 32

 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-community1               4

 Bgp-community2               4

 Bgp-community3               4

 Bgp-community4               4

 VPN instance name            65535

 

L3 inbound template:

 Template ID                : 3281

 Packets                    : 0

 Last template export time  : Never

 Field count                : 32

 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-community1               4

 Bgp-community2               4

 Bgp-community3               4

 Bgp-community4               4

 VPN instance name            65535

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

<Sysname> display ip netstream template

Flow template refresh frequency            : 20

 Flow template refresh interval             : 30 min

 Active flow templates                      : 4

 Created flow templates                     : 4

 

L2L3 outbound template:

 Template ID                : 3286

 Packets                    : 0

 Last template export time  : Never

 Field count                : 22

 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

 Source VLAN                  2

 Destination VLAN             2

 L4 source port               2

 L4 destination port          2

 IP protocol version          1

 TCP flags                    1

 Protocol                     1

 Source ToS                   1

 Direction                    1

 Sampling algorithm           1

 PAD                          1

 PAD                          1

 Sampling interval            4

 Bgp-community                65535

 

L2L3 inbound template:

 Template ID                : 3285

 Packets                    : 0

 Last template export time  : Never

 Field count                : 22

 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

 Source VLAN                  2

 Destination VLAN             2

 L4 source port               2

 L4 destination port          2

 IP protocol version          1

 TCP flags                    1

 Protocol                     1

 Source ToS                   1

 Direction                    1

 Sampling algorithm           1

 PAD                          1

 PAD                          1

 Sampling interval            4

 Bgp-community                65535

 

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

创建的模板总数

L2L3 outbound template

L2L3出方向模板信息

L2L3 inbound template

L2L3入方向模板信息

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 VLAN

源VLAN

Destination VLAN

目的VLAN

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索引

Sampling algorithm

采样算法

PAD

空白占位符

Sampling interval

采样率

VXLAN ID

Vxlan ID

App ID

应用类型

Bgp-community

BGP团体属性值

未配置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.5  enable

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

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

【命令】

enable

undo enable

【缺省情况】

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

【视图】

NetStream聚合视图

【缺省用户角色】

network-admin

【举例】

# 开启NetStream的自治系统聚合功能。

<Sysname> system-view

[Sysname] ip netstream aggregation as

[Sysname-ns-aggregation-as] enable

【相关命令】

·     ip netstream aggregation

1.1.6  ip netstream (interface view)

ip netstream命令用来开启接口NetStream功能。

undo ip netstream命令用来关闭接口NetStream功能。

【命令】

ip netstream { inbound | outbound }

undo ip netstream { inbound | outbound }

【视图】

接口视图

【缺省情况】

NetStream功能处于关闭状态。

【缺省用户角色】

network-admin

【参数】

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

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

【举例】

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

<Sysname> system-view

[Sysname] interface gigabitethernet 3/1/1

[Sysname-GigabitEthernet3/1/1] ip netstream inbound

1.1.7  ip netstream (system view)

ip netstream命令用来开启全局NetStream功能。

undo ip netstream命令用来关闭全局NetStream功能。

【命令】

ip netstream

undo ip netstream

【视图】

系统视图

【缺省情况】

NetStream功能处于关闭状态。

【缺省用户角色】

network-admin

【使用指导】

开启NetStream功能后,将开启所有接口入方向及出方向的NetStream功能。

【举例】

# 全局开启NetStream功能。

<Sysname> system-view

[Sysname] ip netstream

1.1.8  ip netstream aggregation

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

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

【命令】

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

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

【缺省情况】

未配置NetStream流聚合方式。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

as:自治系统聚合,根据NetStream流的源自治系统号、目的自治系统号、输入接口索引和输出接口索引4个关键项对流分类。

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-as:服务类型-自治系统聚合,根据NetStream流的ToS、源自治系统号、目的自治系统号、输入接口索引和输出接口索引5个关键项对流分类。

tos-bgp-nexthop:服务类型-BGP下一跳聚合,根据NetStream流的服务类型、BGP下一跳IP地址、输出接口索引3个关键项对流分类。服务类型-BGP下一跳聚合只在V9模板下生效。

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流聚合方式为自治系统聚合,并进入NetStream自治系统聚合视图。

<Sysname> system-view

[Sysname] ip netstream aggregation as

[Sysname-ns-aggregation-as]

【相关命令】

·     enable

·     ip netstream export host

·     ip netstream export source

1.1.9  ip netstream aging

ip netstream aging命令用来开启定时老化和TCP的FIN或RST报文触发老化功能。

undo ip netstream aging命令用来关闭定时老化和TCP的FIN或RST报文触发老化功能。

【命令】

ip netstream aging

undo ip netstream aging

【缺省情况】

定时老化和TCP的FIN或RST报文触发老化功能处于开启状态。

【视图】

系统视图

【缺省用户角色】

network-admin

【举例】

# 关闭定时老化和TCP的FIN或RST报文触发老化功能。

<Sysname> system-view

[Sysname] undo ip netstream aging

1.1.10  ip netstream cache archive enable

ip netstream cache archive enable命令用来开启NetStream流表项信息存档功能。

undo ip netstream cache archive enable命令用来关闭NetStream流表项信息存档功能。

【命令】

ip netstream cache archive enable

undo ip netstream cache archive enable

【缺省情况】

NetStream流表项信息存档功能处于关闭状态。

【视图】

系统视图

【缺省用户角色】

network-admin

【使用指导】

配置该命令后,Netstream将统计到的流表项信息保存到本地。

【举例】

# 开启NetStream流表项信息存档功能。

<Sysname> system-view

[Sysname] ip netstream cache archive enable

【相关命令】

·     display ip netstream cache archive

1.1.11  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端口号。每个NetStream聚合视图下最多配置4组目的地址,用来支持目的主机的备份。多次执行本命令:

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

·     如果指定的VPN参数相同,但IP地址不同,则均配置成功,表示不同组的目的地址。

·     如果指定的VPN参数相同,IP地址相同,但UDP端口号不同,则后配置的UDP端口号生效。

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

【举例】

# 配置自治系统聚合流的输出报文的目的IP地址为172.16.105.48,UDP端口号为5000。

<Sysname> system-view

[Sysname] ip netstream aggregation as

[Sysname-ns-aggregation-as] 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.12  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 ]

(IRF模式)

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

undo ip netstream export host [ ip-address [ vpn-instance vpn-instance-name ] ] [ chassis chassis-number 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表示单板所在的槽位号。如果未指定本参数,表示配置的是所有单板。(独立运行模式)

chassis chassis-number slot slot-number:将指定成员设备上指定单板流量的统计信息发送到配置的地址。chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。如果未指定本参数,表示配置的是所有成员设备上指定单板。(IRF模式)

【使用指导】

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

多次执行本命令,带slot参数的配置和不带slot参数的配置可以同时存在。对于同一单板,优先采用带slot参数的配置。对于没有单独配置的单板,会采用不带slot参数的配置。

系统视图下最多配置4组目的地址,用来支持目的主机的备份。多次执行本命令:

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

·     如果指定的VPN参数相同,但IP地址不同,则均配置成功,表示不同组的目的地址。

·     如果指定的VPN参数相同,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.13  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.14  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统计输出报文源接口设置为GigabitEthernet3/1/1。

<Sysname> system-view

[Sysname] ip netstream export source interface gigabitethernet 3/1/1

# 将NetStream自治系统聚合统计输出报文源接口设置为GigabitEthernet3/1/2。

<Sysname> system-view

[Sysname] ip netstream aggregation as

[Sysname-ns-aggregation-as] ip netstream export source interface gigabitethernet 3/1/2

【相关命令】

·     ip netstream aggregation

1.1.15  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.16  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.17  ip netstream max-entry

ip netstream max-entry命令用来配置NetStream流缓存区中流表项的最大数目及达到最大数目时的处理方式。

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

【命令】

ip netstream max-entry { aging | disable-caching }

undo ip netstream max-entry

【缺省情况】

达到流表项的最大数目时,强制老化部分流表项。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

aging:达到流表项的最大数目时,强制老化部分流表项。

disable-caching:达到流表项的最大数目时,禁止新建流表项。

【使用指导】

多次执行ip netstream max-entry { aging | disable-caching }命令,最后一次执行的命令生效。

【举例】

# 设置NetStream在达到流表项的最大数目时,禁止新建流表项。

<Sysname> system-view

[Sysname] ip netstream max-entry disable-caching

# 设置NetStream在达到流表项的最大数目时,强制老化部分流表项。

<Sysname> system-view

[Sysname] ip netstream max-entry aging

1.1.18  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.19  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个字符的字符串,不区分大小写。

【使用指导】

该命令不仅开启IPv4 NetStream采样功能,同时也开启了IPv6 NetStream采样功能。

【举例】

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

<Sysname> system-view

[Sysname] interface gigabitethernet 3/1/1

[Sysname-GigabitEthernet3/1/1] ip netstream inbound

[Sysname-GigabitEthernet3/1/1] ip netstream inbound sampler abc

1.1.20  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

【使用指导】

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

该命令对IPv4和IPv6 NetStream 模板输出同时生效。

【举例】

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

<Sysname> system-view

[Sysname] ip netstream template rfc7011

1.1.21  ip netstream timeout active

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

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

【命令】

ip netstream timeout active minutes

undo ip netstream timeout active

【缺省情况】

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

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

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

【使用指导】

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

【举例】

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

<Sysname> system-view

[Sysname] ip netstream timeout active 60

【相关命令】

·     ip netstream timeout inactive

1.1.22  ip netstream timeout inactive

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

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

【命令】

ip netstream timeout inactive seconds

undo ip netstream timeout inactive

【缺省情况】

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

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

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

【使用指导】

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

【举例】

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

<Sysname> system-view

[Sysname] ip netstream timeout inactive 60

【相关命令】

·     ip netstream timeout active

1.1.23  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保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们