No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Command Reference

S1720, S2700, S5700, and S6720 V200R011C10

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
NetStream Configuration Commands

NetStream Configuration Commands

NOTE:

NetStream collects statistics and analyzes service traffic. During service provisioning, personal data may be involved. You have an obligation to make privacy policies and take measures according to the applicable law of the country to protect personal data.

Command Support

Only the S5720HI supports NetStream.

collect counter

Function

The collect counter command allows the flexible flow statistics exported to the NetStream Collector (NSC) to contain the number of bytes and packets.

The undo collect counter command restores the default setting.

By default, the flexible flow statistics exported to the NSC do not contain the number of bytes or packets.

Format

collect counter { bytes | packets }

undo collect counter { bytes | packets }

Parameters

Parameter

Description

Value

bytes

Indicates that the flexible flow statistics exported to NSC contain the number of bytes.

-

packets

Indicates that the flexible flow statistics exported to NSC contain the number of packets.

-

Views

Flexible flow statistics template view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

To obtain richer flow statistics, configure whether flexible flow statistics contain the number of bytes and packets.

Prerequisites

A flexible flow statistics template has been created using the ip netstream record command.

Precaution

If a flexible flow statistics template has been applied to an interface, the template configuration cannot be modified or deleted.

Example

# Configure the flexible flow statistics template record1 to export the flexible flow statistics containing the number of packets to the NSC.

<HUAWEI> system-view
[HUAWEI] ip netstream record record1
[HUAWEI-record-record1] collect counter packets
Related Topics

collect interface

Function

The collect interface command allows the flexible flow statistics exported to the NSC to contain the indexes of inbound and outbound interfaces.

The undo collect interface command restores the default setting.

By default, the flexible flow statistics exported to the NSC do not contain the index of inbound or outbound interface.

Format

collect interface { input | output }

undo collect interface { input | output }

Parameters

Parameter

Description

Value

input

Indicates that the flexible flow statistics exported to the NSC contain the index of inbound interface.

-

output

Indicates that the flexible flow statistics exported to the NSC contain the index of outbound interface.

-

Views

Flexible flow statistics template view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

To obtain richer flow statistics, configure whether flexible flow statistics exported to the NSC contain indexes of inbound and outbound interfaces.

Prerequisites

A flexible flow statistics template has been created using the ip netstream record command.

Precaution

If a flexible flow statistics template has been applied to an interface, the template configuration cannot be modified or deleted.

Example

# Configure the flexible flow statistics template record1 to export the flexible flow statistics containing the inbound interface index to the NSC.

<HUAWEI> system-view
[HUAWEI] ip netstream record record1
[HUAWEI-record-record1] collect interface input
Related Topics

display ip netstream record

Function

The display ip netstream record command displays the configuration of a flexible flow statistics template.

Format

display ip netstream record { all | name record-name }

Parameters

Parameter

Description

Value

all

Displays configurations of all flexible flow statistics templates.

-

name record-name

Displays the configuration of a flexible flow statistics template specified by record-name.

The flexible flow statistics template must be existed.

Views

All views

Default Level

3: Management level

Usage Guidelines

After you create and configure a flexible flow statistics template using the ip netstream record command, you can run the display ip netstream record command to view the configuration of the template.

Example

# Display the configuration of the flexible flow statistics template test0.

<HUAWEI> display ip netstream record name test0
ip netstream record test0
 match ip source-address
 match ip destination-address
Table 16-69  Description of the display ip netstream record command output

Item

Description

ip netstream record record-name

The flexible flow statistics template is record-name.

You can run the ip netstream record command to configure this parameter.

match ip x

This template aggregates flows based on the x, and x can be:
  • protocol: IP protocol aggregation of IPv4 and IPv6 flows.
  • dscp: DSCP priority aggregation of IPv4 and IPv6 flows.
  • source-address: source IP address aggregation of IPv4 and IPv6 flows.
  • destination-address: destination address aggregation of IPv4 and IPv6 flows.
  • source-port: source port number aggregation of IPv4 and IPv6 flows.
  • destination-port: destination port number aggregation of IPv4 and IPv6 flows.
  • flow-label: IPv6 flow label aggregation. This aggregation method applies only to IPv6 flows.

You can run the match ip command to configure this field.

Related Topics

display ip netstream statistics

Function

The display ip netstream statistics command displays the NetStream flow statistics.

Format

display ip netstream statistics slot slot-id

Parameters

Parameter

Description

Value

slot slot-id

Specifies the slot ID.

The value depends on the actual configuration.

Views

All views

Default Level

3: Management level

Usage Guidelines

Usage Scenario

After NetStream is configured, you can run the display ip netstream statistics command to view NetStream statistics.

Precautions

After each statistics item in the command output reaches the maximum value, it is reset to 0. To ensure accurate statistics about NetStream flows, it is recommended to run the reset ip netstream statistics command to clear statistics about current NetStream flows before running the display ip netstream statistics command.

Example

# Display the NetStream flow statistics of the device.

<HUAWEI> display ip netstream statistics slot 0
 =====Netstream statistics:=====
 Origin/Flexible ingress entries  : 572
 Origin/Flexible ingress packets  : 56122
 Origin/Flexible ingress octets   : 6762976
 Origin/Flexible egress entries   : 57
 Origin/Flexible egress packets   : 3588
 Origin/Flexible egress octets    : 394680
 Origin/Flexible total entries    : 629
 Handle origin entries            : 620
 Handle As aggre entries          : 12
 Handle ProtPort aggre entries    : 11
 Handle SrcPrefix aggre entries   : 10
 Handle DstPrefix aggre entries   : 15
 Handle Prefix aggre entries      : 7
 Handle AsTos aggre entries       : 6
 Handle ProtPortTos aggre entries : 5
 Handle SrcPreTos aggre entries   : 5
 Handle DstPreTos aggre entries   : 4
 Handle PreTos aggre entries      : 1
 Record test handle entries : 0
Table 16-70  Description of the display ip netstream statistics command output

Item

Description

Netstream statistics

-

Origin/Flexible ingress entries Total number of incoming original flows or flexible flows.
Origin/Flexible ingress packets Total number of packets in incoming original flows or flexible flows.
Origin/Flexible ingress octets Total number of bytes in incoming original flows or flexible flows.
Origin/Flexible egress entries Total number of outgoing original flows or flexible flows.
Origin/Flexible egress packets Total number of packets in outgoing original flows or flexible flows.
Origin/Flexible egress octets Total number of bytes in outgoing original flows or flexible flows.
Origin/Flexible total entries

Total number of original flows or flexible flows of the real-time statistics.

Handle origin entries Number of processed incoming and outgoing original flows.
Handle As aggre entries Number of processed incoming and outgoing AS aggregation flows.
Handle ProtPort aggre entries Number of processed incoming and outgoing protocol-port aggregation flows.
Handle SrcPrefix aggre entries Number of processed incoming and outgoing source-prefix aggregation flows.
Handle DstPrefix aggre entries Number of processed incoming and outgoing destination-prefix aggregation flows.
Handle Prefix aggre entries Number of processed incoming and outgoing prefix aggregation flows.
Handle AsTos aggre entries Number of processed incoming and outgoing AS-ToS aggregation flows.
Handle ProtPortTos aggre entries Number of processed incoming and outgoing protocol-port-ToS aggregation flows.
Handle SrcPreTos aggre entries Number of processed incoming and outgoing source-prefix-ToS aggregation flows.
Handle DstPreTos aggre entries Number of processed incoming and outgoing destination-prefix-ToS aggregation flows.
Handle PreTos aggre entries Number of processed incoming and outgoing prefix-ToS aggregation flows.
Record test handle entries Number of flows processed using the flexible flow statistics template test.

display netstream

Function

The display netstream command displays the NetStream configurations.

Format

display netstream { all | global | interface interface-type interface-number }

Parameters

Parameter

Description

Value

all

Displays all the NetStream configurations, including:

  • NetStream configurations in the system view
  • NetStream configurations in the aggregation view
  • NetStream configurations in the flexible flow statistics view
  • NetStream configurations in the interface view

-

global

Displays the global NetStream configurations, including:

  • NetStream configurations in the system view
  • NetStream configurations in the aggregation view
  • NetStream configurations in the flexible flow statistics view

-

interface interface-type interface-number

Displays the NetStream configurations on a specified interface.

The parameter interface-type interface-number specifies the interface type and number.

-

Views

All views

Default Level

3: Management level

Usage Guidelines

This command displays the NetStream configurations for both IPv4 and IPv6 flows.

Example

# Display all the NetStream configurations.

<HUAWEI> display netstream all
system                                                                          
ip netstream export version 9                                                   
ip netstream export source 10.1.1.1                                             
ip netstream export host 10.0.0.2 6000                                          
ip netstream export host 10.5.5.5 6000                                           
ipv6 netstream export version 9                                                 
ipv6 netstream export host 10.0.0.3 6000                                        
ip netstream record test                                                        
ip netstream aggregation destination-prefix                                     
 enable                                                                         
 export version 9                                                               
ip netstream aggregation protocol-port                                          
 export version 9                                                               
                                                                                
slot 0                                                                          
GigabitEthernet0/0/1                                                           
 ip netstream inbound 
Table 16-71  Description of the display netstream all command output

Item

Description

system The global NetStream configuration.

ip netstream export version version

The field version indicates the version of the exported packets carrying IPv4 original flow statistics. This field is displayed only when the ip netstream export version command has been executed. If the version retains the default setting, this field is not displayed.

ip netstream export host ip-address port-number

The field ip-address indicates the destination address of the exported packets carrying IPv4 flow statistics, and port-number is the UDP port. This field is displayed only when the ip netstream export host command has been executed in the system view.

ip netstream export source ip-address

The field ip-address indicates the source address of the exported packets carrying IPv4 flow statistics. This field is displayed only when the ip netstream export source command has been executed. If the source address is not specified, the outbound interface IP address is used.

ipv6 netstream export version version

The field version indicates the version of the exported packets carrying IPv6 original flow statistics. This field is displayed only when the ipv6 netstream export version command has been executed. If the version retains the default setting, this field is not displayed.

ipv6 netstream export host ip-address port-number

The field ip-address indicates the destination address of the exported packets carrying IPv6 flow statistics, and port-number is the UDP port. This field is displayed only when the ipv6 netstream export host command has been executed in the system view.

ip netstream record record-name

The flexible flow statistics template is record-name. This field is displayed only when the ip netstream record command has been executed. If the flexible flow statistics template is not specified, this field is not displayed.

ip netstream aggregation destination-prefix

Destination-prefix aggregation method. This field is displayed only when the ip netstream aggregation command has been executed to set the aggregation method.

Currently, the following aggregation methods are supported:

  • as: AS aggregation
  • as-tos: AS-ToS aggregation
  • destination-prefix: destination-prefix aggregation
  • destination-prefix-tos: destination-prefix-ToS aggregation
  • prefix: prefix aggregation
  • prefix-tos: prefix-ToS aggregation
  • protocol-port: protocol-port aggregation
  • protocol-port-tos: protocol-port-ToS aggregation
  • source-prefix: source-prefix aggregation
  • source-prefix-tos: source-prefix-ToS aggregation

enable

The destination-prefix aggregation method is enabled. This field is displayed only when the enable command has been executed in the aggregation view.

export version version

The field version indicates the version format of the exported packets carrying aggregation flow statistics. If the version retains the default setting, this field is not displayed. This field is displayed only when the export version command has been executed.

slot x NetStream configurations on the card in slot x.

GigabitEthernet0/0/1

ip netstream inbound

The flow statistics function is enabled for incoming packets on GE0/0/1. This field is displayed only when the ip netstream command has been executed in the interface view.

display netstream cache ip aggregation

Function

The display netstream cache ip aggregation command displays details about IPv4 aggregation flow statistics on a device.

Format

display netstream cache ip aggregation { as | as-tos | destination-prefix | destination-prefix-tos | prefix | prefix-tos | protocol-port | protocol-port-tos | source-prefix | source-prefix-tos } slot slot-id

Parameters

Parameter Description Value
as Specifies the AS aggregation. It classifies flows based on source AS number, destination AS number, inbound interface index, and outbound interface index. -
as-tos Specifies the AS-ToS aggregation. It classifies flows based on source AS number, destination AS number, inbound interface index, outbound interface index, and ToS. -
destination-prefix Specifies the destination-prefix aggregation. It classifies flows based on destination AS number, destination mask length, destination prefix, and outbound interface index. -
destination-prefix-tos Specifies the destination-prefix-ToS aggregation. It classifies flows based on destination AS number, destination mask length, destination prefix, outbound interface index, and ToS. -
prefix Specifies the prefix aggregation. It classifies flows based on source AS number, destination AS number, source mask length, destination mask length, source prefix, destination prefix, inbound interface index, and outbound interface index. -
prefix-tos Specifies the prefix-ToS aggregation. It classifies flows based on source AS number, destination AS number, source mask length, destination mask length, source prefix, destination prefix, inbound interface index, outbound interface index, and ToS. -
protocol-port Specifies the protocol-port aggregation. It classifies flows based on protocol number, source port, and destination port. -
protocol-port-tos Specifies the protocol-port-ToS aggregation. It classifies flows based on protocol number, source port, destination port, ToS, inbound interface index, and outbound interface index. -
source-prefix Specifies the source-prefix aggregation. It classifies flows based on source AS number, source mask length, source prefix, and inbound interface index. -
source-prefix-tos Specifies the source-prefix-ToS aggregation. It classifies flows based on source AS number, source mask length, source prefix, ToS, and inbound interface index. -
slot slot-id

Specifies the slot ID.

The value depends on the device configuration.

Views

All views

Default Level

3: Management level

Usage Guidelines

Usage Scenario

This command displays real-time statistics on IPv4 aggregation flows on the device.

Precaution

This command must be executed before the flows age out; otherwise, no information will be displayed.

Example

# Display detailed statistics about flows aggregated based on protocol and port on the device.

<HUAWEI> display netstream cache ip aggregation protocol-port slot 0
NetStream cache information:
--------------------------------------------------------------------------------
 Protocol   SrcPort   DstPort   Direction  Streams     Packets     Octets
--------------------------------------------------------------------------------
 114        0         0         IN         200         50688       5271552
--------------------------------------------------------------------------------
.............
Table 16-72  Description of the display netstream cache ip aggregation command output

Item

Description

NetStream cache information

NetStream flow information.

Protocol

Protocol number of packets.

SrcPort

Source port number of packets.

DstPort

Destination port number of packets.

Direction

Packet sampling direction:
  • IN: inbound direction
  • OUT: outbound direction

Streams

Number of flows.

Packets

Number of packets.

Octets

Number of octets in packets.

display netstream cache ip record

Function

The display netstream cache ip record command displays details about IPv4 flexible flow statistics on a device.

Format

display netstream cache ip record record-name [ { inbound | outbound } | destination interface interface-type interface-number | destination ip ip-address | destination port port-number | source interface interface-type interface-number | source ip ip-address | source port port-number | protocol protocol-type | tos tos-number ] * slot slot-id [ verbose ]

Parameters

Parameter

Description

Value

record-name Specifies the name of a flexible flow statistics template.

It must be an existing template name on the device.

inbound

Specifies incoming packets.

-
outbound

Specifies outgoing packets.

-
destination interface interface-type interface-number

Specifies the destination interface of packets.

-
destination ip ip-address

Specifies the destination IP address of packets.

-
destination port port-number

Specifies the destination port number of packets.

The value is an integer that ranges from 0 to 65535.
source interface interface-type interface-number

Specifies the source interface of packets.

-
source ip ip-address

Indicates the source IP address of packets.

-
source port port-number

Specifies the source port number of packets.

The value is an integer that ranges from 0 to 65535.
protocol protocol-type

Specifies the protocol type of packets.

The value is an integer that ranges from 0 to 255.
tos tos-number

Specifies the ToS value of packets.

The value is an integer that ranges from 0 to 255.
slot slot-id

Specifies the slot ID.

The value depends on the device configuration.

verbose

Displays detailed information.

-

Views

All views

Default Level

3: Management level

Usage Guidelines

Usage Scenario

This command displays real-time statistics on IPv4 flexible flows on the device.

Precaution

This command must be executed before the flows age out; otherwise, no information will be displayed.

Example

# Display IPv4 flexible flow statistics on the device.

<HUAWEI> display netstream cache ip record record1 slot 0 verbose
NOTE:    L4 Info: Source Port:Destination Port:Protocol
         TCP Flags: Ack, Fin, Push, Reset, Syn, Urgent
NetStream cache information:
--------------------------------------------------------------------------------
 SrcIP                DstIP              L4 Info            DstAS     Direction
 SrcIf                DstIf              TCP Flags          SrcAS     ToS
 NextHop              BGPNextHop         Octets             Packets
--------------------------------------------------------------------------------
 10.1.1.2             10.1.1.1           0:0:114            --        IN
 GE0/0/5              --                 0:0:0:0:0:0        --        0
 --                   --                 4784               46
--------------------------------------------------------------------------------
..........................
Table 16-73  Description of the display netstream cache ip record command output

Item

Description

NOTE

Note.

L4 Info: Source Port:Destination Port:Protocol

Transport-layer information of packets: including source port, destination port, and protocol type.

TCP Flags: Ack, Fin, Push, Reset, Syn, Urgent

TCP flag of packets: including ACK, Fin, Push, Reset, Syn, and Urgent.

NetStream cache information

NetStream flow information.

SrcIP

Source IP address of packets.

DstIP

Destination IP address of packets.

DstAS

Destination AS number of packets.

Direction

Packet sampling direction:
  • IN: inbound direction
  • OUT: outbound direction

SrcIf

Source interface of packets.

DstIf

Destination interface of packets.

SrcAS

Source AS number of packets.

ToS

ToS field of packets.

NextHop

Next hop address.

BGPNextHop

Address of the BGP next hop.

Octets

Number of octets in packets.

Packets

Number of packets.

display netstream cache ip origin

Function

The display netstream cache ip origin command displays details about IPv4 original flow statistics on a device.

Format

display netstream cache ip origin [ { inbound | outbound } | destination interface interface-type interface-number | destination ip ip-address | destination port port-number | source interface interface-type interface-number | source ip ip-address | source port port-number | protocol protocol-type | tos tos-number ] * slot slot-id [ verbose ]

Parameters

Parameter

Description

Value

inbound

Specifies incoming packets.

-
outbound

Specifies outgoing packets.

-
destination interface interface-type interface-number

Specifies the destination interface of packets.

-
destination ip ip-address

Specifies the destination IP address of packets.

-
destination port port-number

Specifies the destination port number of packets.

The value is an integer that ranges from 0 to 65535.
source interface interface-type interface-number

Specifies the source interface of packets.

-
source ip ip-address

Indicates the source IP address of packets.

-
source port port-number

Specifies the source port number of packets.

The value is an integer that ranges from 0 to 65535.
protocol protocol-type

Specifies the protocol type of packets.

The value is an integer that ranges from 0 to 255.
tos tos-number

Specifies the ToS value of packets.

The value is an integer that ranges from 0 to 255.
slot slot-id

Specifies the slot ID.

The value depends on the device configuration.

verbose

Displays detailed information.

-

Views

All views

Default Level

3: Management level

Usage Guidelines

Usage Scenario

This command displays real-time statistics on IPv4 original flows on the device.

Precaution

This command must be executed before the flows age out; otherwise, no information will be displayed.

Example

# Display details about IPv4 original flow statistics on the device.

<HUAWEI> display netstream cache ip origin slot 0 verbose
NOTE:    L4 Info: Source Port:Destination Port:Protocol
         TCP Flags: Ack, Fin, Push, Reset, Syn, Urgent
NetStream cache information:
--------------------------------------------------------------------------------
 SrcIf               SrcIP/Mask            DstIP/Mask           L4 Info
 ToS                 Direction             SrcAS                DstAS
 DstIf               TCP Flags             Octets               Packets
 NextHop             BGPNextHop
--------------------------------------------------------------------------------
 GE0/0/5             10.1.1.2/--           10.1.1.1/--          0:0:114
 0                   IN                    --                   --
 --                  0:0:0:0:0:0           5200                 50
 --                  --
--------------------------------------------------------------------------------
..........................
Table 16-74  Description of the display netstream cache ip origin command output

Item

Description

NOTE

Note.

L4 Info: Source Port:Destination Port:Protocol

Transport-layer information of packets: including source port, destination port, and protocol type.

TCP Flags: Ack, Fin, Push, Reset, Syn, Urgent

TCP flag of packets: including ACK, Fin, Push, Reset, Syn, and Urgent.

NetStream cache information

NetStream flow information.

SrcIf

Source interface of packets.

SrcIP/Mask

Source IP address and mask of packets.

DstIP/Mask

Destination IP address and mask of packets.

ToS

ToS of packets.

Direction

Packet sampling direction:
  • IN: inbound direction
  • OUT: outbound direction

SrcAS

Source AS number of packets.

DstAS

Destination AS number of packets.

DstIf

Destination interface of packets.

Octets

Number of octets in packets.

Packets

Number of packets.

NextHop

Next hop address.

BGP NextHop

BGP next hop address.

display netstream cache ipv6 record

Function

The display netstream cache ipv6 record command displays details about IPv6 flexible flow statistics on a device.

Format

display netstream cache ipv6 record record-name [ { inbound | outbound } | destination interface interface-type interface-number | destination ipv6 ipv6-address | destination port port-number | source interface interface-type interface-number | source ipv6 ipv6-address | source port port-number | flowlabel flowlabel | protocol protocol-type | tos tos-number ] * slot slot-id [ verbose ]

Parameters

Parameter

Description

Value

record-name Specifies the name of a flexible flow statistics template.

It must be an existing template name on the device.

inbound

Specifies incoming packets.

-
outbound

Specifies outgoing packets.

-
destination interface interface-type interface-number

Specifies the destination interface of packets.

-
destination ipv6 ipv6-address

Specifies the destination IPv6 address of packets.

-
destination port port-number

Specifies the destination port number of packets.

The value is an integer that ranges from 0 to 65535.
source interface interface-type interface-number

Specifies the source interface of packets.

-
source ipv6 ipv6-address

Specifies the source IPv6 address of packets.

-
source port port-number

Specifies the source port number of packets.

The value is an integer that ranges from 0 to 65535.
flowlabel flowlabel

Specifies the flow label of packets.

The value is an integer that ranges from 0 to 1048575.
protocol protocol-type

Specifies the protocol type of packets.

The value is an integer that ranges from 0 to 255.
tos tos-number

Specifies the ToS value of packets.

The value is an integer that ranges from 0 to 255.
slot slot-id

Specifies the slot ID.

The value depends on the device configuration.

verbose

Displays detailed information.

-

Views

All views

Default Level

3: Management level

Usage Guidelines

Usage Scenario

This command displays real-time statistics on IPv6 flexible flows on the device.

Precaution

This command must be executed before the flows age out; otherwise, no information will be displayed.

Example

# Display IPv6 flexible flow statistics on the device.

<HUAWEI> display netstream cache ipv6 record test slot 0 verbose
NOTE:    L4 Info: Source Port:Destination Port:Protocol
         TCP Flags: Ack, Fin, Push, Reset, Syn, Urgent
NetStream cache information:
--------------------------------------------------------------------------------
 SrcIP                                      SrcIf                 L4 Info
 DstIP                                      DstIf                 ToS
 NextHop                                    SrcAS                 DstAS
 BGPNextHop                                 FlowLabel             Direction
 TCP Flags                                  Octets                Packets
--------------------------------------------------------------------------------
 FEC0::801:200:0:A01:102                    GE0/0/5               0:0:59
 FEC0::801:200:0:C108:101                   --                    0
 --                                         --                    --
 --                                         0                     IN
 0:0:0:0:0:0                                232648                2237
--------------------------------------------------------------------------------
..........................
Table 16-75  Description of the display netstream cache ipv6 record command output

Item

Description

NOTE

Note.

L4 Info: Source Port:Destination Port:Protocol

Transport-layer information of packets: including source port, destination port, and protocol type.

TCP Flags: Ack, Fin, Push, Reset, Syn, Urgent

TCP flag of packets: including ACK, Fin, Push, Reset, Syn, and Urgent.

NetStream cache information

NetStream flow information.

SrcIP

Source IPv6 address of packets.

SrcIf

Source interface of packets.

DstIP

Destination IPv6 address of packets.

DstIf

Destination interface of packets.

ToS

ToS of packets.

NextHop

Next hop address.

SrcAS

Source AS number of packets.

DstAS

Destination AS number of packets.

BGPNextHop

Address of the BGP next hop.

FlowLabel

IPv6 flow label.

Direction

Packet sampling direction:
  • IN: inbound direction
  • OUT: outbound direction

Octets

Number of octets in packets.

Packets

Number of packets.

display netstream cache ipv6 origin

Function

The display netstream cache ipv6 origin command displays details about IPv6 original flow statistics on a device.

Format

display netstream cache ipv6 origin [ { inbound | outbound } | destination interface interface-type interface-number | destination ipv6 ipv6-address | destination port port-number | source interface interface-type interface-number | source ipv6 ipv6-address | source port port-number | flowlabel flowlabel | protocol protocol-type | tos tos-number ] * slot slot-id [ verbose ]

Parameters

Parameter

Description

Value

inbound

Specifies incoming packets.

-
outbound

Specifies outgoing packets.

-
destination interface interface-type interface-number

Specifies the destination interface of packets.

-
destination ipv6 ipv6-address

Specifies the destination IPv6 address of packets.

-
destination port port-number

Specifies the destination port number of packets.

The value is an integer that ranges from 0 to 65535.
source interface interface-type interface-number

Specifies the source interface of packets.

-
source ipv6 ipv6-address

Specifies the source IPv6 address of packets.

-
source port port-number

Specifies the source port number of packets.

The value is an integer that ranges from 0 to 65535.
flowlabel flowlabel

Specifies the flow label of packets.

The value is an integer that ranges from 0 to 1048575.
protocol protocol-type

Specifies the protocol type of packets.

The value is an integer that ranges from 0 to 255.
tos tos-number

Specifies the ToS value of packets.

The value is an integer that ranges from 0 to 255.
slot slot-id

Specifies the slot ID.

The value depends on the device configuration.

verbose

Displays detailed information.

-

Views

All views

Default Level

3: Management level

Usage Guidelines

Usage Scenario

This command displays real-time statistics on IPv6 original flows on the device.

Precaution

This command must be executed before the flows age out; otherwise, no information will be displayed.

Example

# Display details about IPv6 original flow statistics on the device.

<HUAWEI> display netstream cache ipv6 origin slot 0 verbose
NOTE:    L4 Info: Source Port:Destination Port:Protocol
         TCP Flags: Ack, Fin, Push, Reset, Syn, Urgent
NetStream cache information:
--------------------------------------------------------------------------------
 SrcIf             TCP Flags        SrcIP/Mask
 DstIf             ToS              DstIP/Mask
 L4 Info           FlowLable        NextHop
 SrcAS             DstAS            BGP NextHop
 Direction         Octets           Packets
--------------------------------------------------------------------------------
 GE0/0/5           0:0:0:0:0:0      FEC0::801:200:0:A01:102/--
 --                0                FEC0::801:200:0:C108:101/--
 0:0:59            0                --
 --                --               --
 IN                3821896          36749
--------------------------------------------------------------------------------
..........................
Table 16-76  Description of the display netstream cache ipv6 origin command output

Item

Description

NOTE

Note.

L4 Info: Source Port:Destination Port:Protocol

Transport-layer information of packets: including source port, destination port, and protocol type.

TCP Flags: Ack, Fin, Push, Reset, Syn, Urgent

TCP flag of packets: including ACK, Fin, Push, Reset, Syn, and Urgent.

NetStream cache information

NetStream flow information.

SrcIf

Source interface of packets.

SrcIP/Mask

Source IPv6 address and mask of packets.

DstIf

Destination interface of packets.

ToS

Service type of packets.

DstIP/Mask

Destination IPv6 address and mask of packets.

FlowLable

IPv6 flow label.

NextHop

Next hop address.

SrcAS

Source AS number of packets.

DstAS

Destination AS number of packets.

BGP NextHop

BGP next hop address.

Direction

Packet sampling direction:
  • IN: inbound direction
  • OUT: outbound direction

Octets

Number of octets in packets.

Packets

Number of packets.

display snmp-agent trap feature-name sindex all

Function

The display snmp-agent trap feature-name sindex all command displays the status of all traps on the SINDEX module.

Format

display snmp-agent trap feature-name sindex all

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display snmp-agent trap feature-name sindex all command to check the status of all traps on the SINDEX module. This status can be configured using the snmp-agent trap enable feature-name sindex command.

Example

# Display the status of all traps on the SINDEX module.

<HUAWEI> display snmp-agent trap feature-name sindex all
------------------------------------------------------------------------------  
Feature name: SINDEX                                                            
Trap number : 1                                                                 
------------------------------------------------------------------------------  
Trap name                       Default switch status   Current switch status   
hwNetStreamIndexUsedUp          on                      on                     
Table 16-77  Description of the display snmp-agent trap feature-name sindex all command output

Item

Description

Feature name

Name of the module that a trap message belongs.

Trap number

Number of trap messages.

Trap name

Name of a trap.

Default switch status

Default status of a trap:

  • on: The trap is enabled.
  • off: The trap is disabled.

Current switch status

Status of a trap:

  • on: The trap is enabled.
  • off: The trap is disabled.

This status can be configured using the snmp-agent trap enable feature-name sindex command.

hwNetStreamIndexUsedUp

The NetStream interface indexes are all allocated.

enable

Function

The enable command enables the aggregation function in the aggregation view.

The undo enable command disables the aggregation function in the aggregation view.

By default, the aggregation function is disabled.

Format

enable

undo enable

Parameters

None

Views

NetStream aggregation view

Default Level

3: Management level

Usage Guidelines

The enable command takes effect only in the NetStream aggregation view. Flow statistics are exported according to the configured aggregation method only after you run the enable command in the aggregation view.

Example

# Enable destination address prefix aggregation.

<HUAWEI> system-view
[HUAWEI] ip netstream aggregation destination-prefix
[HUAWEI-aggregation-dstpre] enable

export version

Function

The export version command configures the version of exported packets carrying aggregation flow statistics.

The undo export version command restores the default setting.

By default, the aggregation flow statistics are exported in the version of V8.

Format

export version version

undo export version

Parameters

Parameter

Description

Value

version

Specifies the version number of exported packets carrying aggregation flow statistics.

The value of version is set to 8 or 9. The default is 8.

Views

NetStream aggregation view

Default Level

3: Management level

Usage Guidelines

The NDE exports NetStream flow statistics to the NSC. The version of exported packets must be the same as that configured on the NSC so that the NSC can parse the exported packets.

The format of exported packets in V8 is fixed and is not easy to expand. The format of exported packets in V9 is defined in templates and is easy to combine or expand. The statistics are exported more flexibly.

V9 is supported by most NSCs for its advantages. It is recommended that you set the version of exported packets carrying aggregation flow statistics to V9.

Example

# Set the version number of exported packets carrying aggregation flow statistics to V9.

<HUAWEI> system-view
[HUAWEI] ip netstream aggregation as
[HUAWEI-aggregation-as] export version 9

ip netstream

Function

The ip netstream command enables IPv4 flow statistics collection on the inbound and outbound interfaces.

The undo ip netstream command restores the default setting.

By default, statistics collection for IPv4 flows is disabled on the inbound and outbound interfaces.

Format

ip netstream { inbound | outbound }

undo ip netstream { inbound | outbound }

Parameters

Parameter

Description

Value

inbound

Enables flow statistics collection on the inbound interface.

-

outbound

Enables flow statistics collection on the outbound interface.

-

Views

GE interface view, XGE interface view, port group view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

To export IPv4 flow statistics, you must run the ip netstream command to enable the IPv4 flow statistics collection function on the interface.

Precautions

After the statistics collection function is enabled for IPv4 and IPv6 flows, the statistics are independent of each other.

Currently, the flow statistics collection function can be enabled only on the main interface.

If the NetStream function is enabled on the main interface but you do not set a sampling ratio using the ip netstream sampler command, the main interface uses the sampling ratio of 1:1000. If you set the sampling ratio, the interface uses this sampling ratio.

Example

# Enable the flow statistics collection function for the incoming IPv4 packets on GE0/0/1.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] ip netstream inbound
Related Topics

ip netstream aggregation

Function

The ip netstream aggregation command configures the aggregation method and displays the aggregation view.

Format

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

Parameters

Parameter

Description

Value

as

Specifies the AS aggregation. It classifies flows based on:
  • Source AS number
  • Destination AS number
  • Inbound interface index
  • Outbound interface index

-

as-tos

Specifies the AS-ToS aggregation. It classifies flows based on:

  • Source AS number
  • Destination AS number
  • Inbound interface index
  • Outbound interface index
  • ToS

-

destination-prefix

Specifies the destination-prefix aggregation. It classifies flows based on:

  • Destination AS number
  • Destination mask length
  • Outbound interface index
  • Destination prefix

-

destination-prefix-tos

Specifies the destination-prefix-ToS aggregation. It classifies flows based on:

  • Destination AS number
  • Destination mask length
  • Destination prefix
  • ToS
  • Outbound interface index

-

prefix

Specifies the prefix aggregation. It classifies flows based on:

  • Source and destination AS numbers
  • Source and destination mask lengths
  • Source and destination prefixes
  • Inbound interface index
  • Outbound interface index

-

prefix-tos

Specifies the prefix-ToS aggregation. It classifies flows based on:

  • Source and destination AS numbers
  • Source and destination mask lengths
  • Source and destination prefixes
  • ToS
  • Inbound interface index
  • Outbound interface index

-

protocol-port

Specifies the protocol-port aggregation. It classifies flows based on:

  • Protocol number
  • Source port number
  • Destination port number

-

protocol-port-tos

Specifies the protocol-port-ToS aggregation. It classifies flows based on:

  • Protocol number
  • Source port number
  • Destination port number
  • ToS
  • Inbound interface index
  • Outbound interface index

-

source-prefix

Specifies the source-prefix aggregation. It classifies flows based on:

  • Source AS number
  • Source mask length
  • Source prefix
  • Inbound interface index

-

source-prefix-tos

Specifies the source-prefix-ToS aggregation. It classifies flows based on:

  • Source AS number
  • Source mask length
  • Source prefix
  • ToS
  • Inbound interface index

-

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

NetStream aggregation groups the original flows with the same attributes together. The aggregation flow statistics collection and original flow statistics collection are different. The original flow statistics collection is on the basis of sampled packets, while the aggregation flow statistics collection is on the basis of original flows. Therefore, the aggregation flow statistics collection generates less data.

Follow-up Procedure

Run the enable command in the aggregation view to enable the device to export flow statistics according to the configured aggregation method.

Example

# Configure the NetStream AS aggregation method.

<HUAWEI> system-view
[HUAWEI] ip netstream aggregation as
[HUAWEI-aggregation-as]

# Configure the NetStream destination-prefix aggregation method.

<HUAWEI> system-view
[HUAWEI] ip netstream aggregation destination-prefix
[HUAWEI-aggregation-dstpre]
Related Topics

ip netstream export host

Function

The ip netstream export host command configures the destination IP address and destination UDP port number for the exported packets carrying IPv4 flow statistics.

The undo ip netstream export host command deletes the configured destination IP address and destination UDP port number for the exported packets carrying IPv4 flow statistics.

By default, no destination IP address and destination UDP port number are configured in the system view or aggregation view for the exported packets carrying IPv4 flow statistics.

Format

ip netstream export host ip-address port-number

undo ip netstream export host ip-address port-number

Parameters

Parameter

Description

Value

ip-address

Specifies the destination IPv4 address of the exported packets carrying IPv4 flow statistics.

-

port-number

Specifies the destination UDP port number of the exported packets carrying IPv4 flow statistics.

The value is an integer that ranges from 1 to 65535.

Views

System view, NetStream aggregation view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

After finishing data collection, the NDE sends the collected data to the NSC. This command specifies the destination address of the collected data, that is, the NSC IP address.

Precautions

When you run the ip netstream export host command in the system view, this command configures the destination address for the exported packets carrying IPv4 original flow statistics and IPv4 flexible flow statistics; when you run this command in the aggregation view, this command configures the destination address for the exported packets carrying IPv4 aggregation flows. The exported packets carrying aggregation flow statistics preferentially use the destination address configured in the aggregation view. If the destination address is not configured in the aggregation view, the exported packets carrying aggregation flow statistics use the destination address configured in the system view.

You can configure two destination addresses in the system view or aggregation view to implement NSC backup. To configure a third destination IP address, run the undo netstream export ip host command to delete an existing one first; otherwise, the system displays a message indicating that the maximum number of addresses is exceeded and the configuration fails.

Example

# Set the destination IP address for the exported packets carrying original flow statistics to 10.1.1.1, and UDP port number to 222.

<HUAWEI> system-view
[HUAWEI] ip netstream export host 10.1.1.1 222

# Set the destination IP address for the exported packets carrying aggregation flow statistics to 10.2.2.1, and UDP port number to 255.

<HUAWEI> system-view
[HUAWEI] ip netstream aggregation as
[HUAWEI-aggregation-as] ip netstream export host 10.2.2.1 255
Related Topics

ip netstream export index-switch

Function

The ip netstream export index-switch command sets the number of digits in the interface index contained in an exported packet carrying IPv4 flow statistics.

By default, the number of digits in interface indexes is 16..

Format

ip netstream export index-switch index-switch

undo ip netstream export index-switch

Parameters

Parameter

Description

Value

index-switch

Specifies the number of digits in the index of a specified interface.

The value is 16 or 32. The default value is 16.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

You can run the ip netstream export index-switch command to set the number of digits in the interface index to 16 or 32.

The number of digits in an interface index contained in exported packets must be the same as the number of digits in an interface index that can be parsed by the NMS. For example, if the NMS can parse the 32-digit interface index, set the number of digits in an interface index contained in exported packets to 32.

Precautions

The number of digits in the interface index can be changed to 32 only when the NMS supports 32-digit interface index. If the number of digits in an interface index contained in exported packets is different from the number of digits in an interface index supported by the NMS, the NMS cannot identify NetStream packets sent by the device.

This command is valid for V9. Before changing 16-digit interface indexes to 32-digit interface indexes, ensure that:

  • The version of exported packets of original flows is V9.
  • The version of exported packets carrying aggregation flow statistics is V9.

When the 32-digit interface index is used, the version of exported packets of original flows cannot be changed from V9 to V5, and the version of exported packets carrying aggregation flow statistics cannot be changed from V9 to V8.

Example

# Change the number of digits in the interface index contained in an exported packet carrying IPv4 flow statistics from 16 to 32.

<HUAWEI> system-view
[HUAWEI] ip netstream export version 9
[HUAWEI] ip netstream export index-switch 32

ip netstream export source

Function

The ip netstream export source command configures the source address for the exported packets carrying IPv4 flow statistics.

The undo ip netstream export source command deletes the configured source address for the exported packets carrying IPv4 flow statistics.

By default, no source address is configured in the system view or aggregation view for the exported packets carrying IPv4 flow statistics.

Format

ip netstream export source ip-address

undo ip netstream export source

Parameters

Parameter

Description

Value

ip-address

Specifies the source IPv4 address of the exported packets carrying IPv4 flow statistics.

The parameter must be set to an existing IP address on the device.

Views

System view, NetStream aggregation view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

If the NMS identifies the data source according to the source IP address in NetStream packets, you need to specify the source IP address for NetStream packets.

Precautions

NetStream prefers the source IP address configured in the aggregation view. If no source address is specified in an aggregation method, the source address configured in the system view is used.

This command must be performed; otherwise, the source address of output packets may be 0.0.0.0, and the output packets may be discarded during transmission or cannot be parsed by the NetStream server.

Example

# In the system view, set the source address for the exported packets carrying IPv4 flow statistics to 10.1.1.1.

<HUAWEI> system-view
[HUAWEI] ip netstream export source 10.1.1.1

# In the aggregation view, set the source address for the exported packets carrying IPv4 flow statistics to 10.2.2.2.

<HUAWEI> system-view
[HUAWEI] ip netstream aggregation as
[HUAWEI-aggregation-as] ip netstream export source 10.2.2.2
Related Topics

ip netstream export version

Function

The ip netstream export version command configures the version number and AS option of the exported packets carrying IPv4 flow statistics.

The undo ip netstream export version command restores the default setting.

By default, the version number of the exported packets carrying IPv4 original flow statistics is 5 and no AS option is used. The version number of the exported packets carrying IPv4 flexible flow statistics is 9. Packets of V9 have no AS option and do not carry BGP next hop information.

Format

ip netstream export version version [ origin-as | peer-as ] [ bgp-nexthop ]

undo ip netstream export version

Parameters

Parameter

Description

Value

version

Specifies the version number of exported packets carrying IPv4 flow statistics.

The value of version is set to 5 or 9.

origin-as

Specifies the AS number recorded in the statistics as the original AS number.

-

peer-as

Specifies the AS number recorded in the statistics as the peer AS number.

-

bgp-nexthop

Configures the statistics to carry BGP next hop information. Currently, only V9 supports the exported packets carrying BGP next hop information.

-

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

The NDE exports NetStream flow statistics to the NSC. The version of exported packets must be the same as that configured on the NSC so that the NSC can parse the exported packets.

The format of exported packets in V5 is fixed and is not easy to expand. The format of exported packets in V9 is defined in templates and is easy to combine or expand. The statistics are exported more flexibly.

V9 is supported by most NSCs for its advantages. It is recommended that you set the version of exported packets carrying aggregation flow statistics to V9.

Precautions

Only one version can be specified on a device. The versions configured on all the devices on the network must be the same as the version configured on the NMS.

The AS option is used according to the actual situation of the AS configured on each device. The AS option affects only the packet statistics result, but does not affect the flows. The AS option is encapsulated in the AS option field carried in the NetStream packets sent to the NMS. The exported packets of V5 do not support BGP next hop information.

Example

# Set the version of the exported packets carrying IPv4 flow statistics to V9 and AS option to peer-as.

<HUAWEI> system-view
[HUAWEI] ip netstream export version 9 peer-as
Related Topics

ip netstream record

Function

The ip netstream record command creates a new flexible flow statistics template or displays the view of an existing flexible statistics template.

The undo ip netstream record command deletes a specified flexible flow statistics template.

By default, no flexible flow statistics template exists.

Format

ip netstream record record-name

undo ip netstream record record-name

Parameters

Parameter

Description

Value

record-name

Specifies the name of the flexible flow statistics template.

The value is a string of 1 to 32 case-insensitive characters without spaces. The name of the flexible flow statistics template cannot contain special characters such as / \ : * ? " < > | @ ' %.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

You need to create the flexible flow statistics template before exporting flexible flow statistics.

Precautions

A maximum of 16 flexible flow statistics templates can be configured on one device. To configure a third flexible flow statistics template, run the undo ip netstream record command to delete an existing one first.

The flexible flow statistics template that has been applied to an interface cannot be modified or deleted. Run the undo port ip netstream record command on the interface to unbind a specified flexible flow statistics template from the interface, and then you can modify or delete the template.

Example

# Create the flexible flow statistics template named abc.

<HUAWEI> system-view
[HUAWEI] ip netstream record abc
 Info: Creating the new record succeeded.
[HUAWEI-record-abc]

ip netstream sampler

Function

The ip netstream sampler command configures the packet sampling function for IPv4 packets on an interface.

The undo ip netstream sampler command restores the default setting.

By default, an interface uses the packet-based regular sampling and the sampling ratio is 1000.

Format

ip netstream sampler fix-packets packet-interval { inbound | outbound }

undo ip netstream sampler [ fix-packets packet-interval ] { inbound | outbound }

Parameters

Parameter

Description

Value

fix-packets packet-interval

Indicates the sampling ratio for packet-based regular sampling.

Its value is an integer that ranges from 1 to 65535.

inbound

Samples incoming traffic on an interface.

-

outbound

Samples outgoing traffic on an interface.

-

Views

GE interface view, XGE interface view, port group view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

You can set an interval for sampling packets so that only statistics about sampled packets are collected. The statistics show the flow status on the entire network. The sampling function reduces NetStream impact on device performance.

Precautions

You must run the ip netstream sampler command together with the ip netstream command. If you run only the ip netstream sampler command, the command does not take effect.

If you run the ip netstream sampler command multiple times in the same view, only the latest configuration takes effect.

Example

# Set the packet-based regular sampling ratio for the incoming packets on GE0/0/1 to 1200.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] ip netstream sampler fix-packets 1200 inbound
[HUAWEI-GigabitEthernet0/0/1] ip netstream inbound
Related Topics

ip netstream tcp-flag enable

Function

The ip netstream tcp-flag enable command configures the aging of NetStream traffic according to the FIN flag or the RST flag in the TCP packet header.

The undo ip netstream tcp-flag enable command restores the default setting.

By default, NetStream flows are not aged according to the FIN or RST flag in the TCP packet header.

Format

ip netstream tcp-flag enable

undo ip netstream tcp-flag enable

Parameters

None

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

The FIN or RST flag in a TCP packet indicates that the TCP connection is terminated. When receiving a packet with the FIN or RST flag, the device immediately ages the corresponding NetStream flow. If the ip netstream tcp-flag enable command is not run, NetStream flows are aged by following other criteria, for example, inactive aging time or bytes overflow.

Precautions

If you set multiple aging modes on the device, a flow is aged when it matches any criterion.

Only original flows can be aged according to the FIN or RST flag in the TCP packet header.

Example

# Configure the aging of original flows according to the FIN or RST flag in the TCP packet header.

<HUAWEI> system-view
[HUAWEI] ip netstream tcp-flag enable

ip netstream timeout active

Function

The ip netstream timeout active command configures the active flow aging time.

The undo ip netstream timeout active command restores the default setting.

By default, the active flow aging time is 200 seconds.

Format

ip netstream timeout active active-interval

undo ip netstream timeout active

Parameters

Parameter Description Value
active-interval

Specifies the active aging time.

The value is an integer that ranges from 1 to 300, in seconds. The default is 200.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

Network traffic may burst intermittently, while the memory capacity of the NDE is limited. Earlier flows in the memory need to be exported to release space for the new flows. The process of exporting old flows is called aging. All flows in the NDE memory will be exported to the NSC for analysis.

When the active time (from flow creation time to the current time) of a flow exceeds the specified active aging time, the flow is exported to the destination.

To quickly detect the status of an active flow, set the active time to a small value; however, this setting increases the frequency at which NetStream packets are sent. To reduce the frequency at which NetStream packets are exported and improve statistics collecting efficiency, set the active time to a large value.

Precautions

If you set multiple aging modes on the device, a flow is aged when it matches any criterion.

Example

# Set the active aging time to 240 seconds.

<HUAWEI> system-view
[HUAWEI] ip netstream timeout active 240

ip netstream timeout inactive

Function

The ip netstream timeout inactive command configures the inactive aging time.

The undo ip netstream timeout inactive command restores the default setting.

By default, the inactive aging time is 30 seconds.

Format

ip netstream timeout inactive inactive-interval

undo ip netstream timeout inactive

Parameters

Parameter

Description

Value

inactive-interval

Specifies the inactive aging time.

The value is an integer that ranges from 1 to 300, in seconds. The default is 30.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

Network traffic may burst intermittently, while the memory capacity of the NDE is limited. Earlier flows in the memory need to be exported to release space for the new flows. The process of exporting old flows is called aging. All flows in the NDE memory will be exported to the NSC for analysis.

When the inactive time (from the last packet receiving time to the current time) of an original or flexible flow exceeds the specified inactive aging time, the flow is exported to the destination.

To quickly detect the status of an inactive flow, set the inactive time to a small value; however, this setting increases the frequency at which NetStream packets are sent. To reduce the frequency at which NetStream packets are exported and improve statistics collecting efficiency, set the inactive time to a large value.

Precautions

The inactive aging time that is configured using the ip netstream timeout inactive command applies to both IPv4 and IPv6 flows.

If you set multiple aging modes on the device, a flow is aged when it matches any criterion.

Example

# Set the inactive aging time to 20 seconds.

<HUAWEI> system-view
[HUAWEI] ip netstream timeout inactive 20

ipv6 netstream

Function

The ipv6 netstream command enables IPv6 flow statistics collection on the inbound and outbound interfaces.

The undo ipv6 netstream command restores the default setting.

By default, statistics collection for IPv6 flows is disabled on the inbound and outbound interfaces.

Format

ipv6 netstream { inbound | outbound }

undo ipv6 netstream { inbound | outbound }

Parameters

Parameter

Description

Value

inbound

Enables IPv6 flow statistics collection on the inbound interface.

-

outbound

Enables IPv6 flow statistics collection on the outbound interface.

-

Views

GE interface view, XGE interface view, port group view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

To export IPv6 flow statistics, you must run the ipv6 netstream command to enable IPv6 flow statistics collection on the inbound interface.

Precautions

When you enable IPv6 flow statistics collection on the inbound interface, enable statistics collection on unicast and multicast packets.

After statistics collection is enabled for IPv4 and IPv6 flows, the statistics are independent of each other.

Currently, flow statistics collection can be enabled only on main interfaces.

If statistics collection is enabled on an interface but you do not set a sampling ratio using the ipv6 netstream sampler command, the interface uses the sampling ratio of 1:1000. If you have set the sampling ratio, the interface uses this sampling ratio.

Example

# Enable statistics collection for the incoming IPv6 flows on GE0/0/1.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] ipv6 netstream inbound

ipv6 netstream export host

Function

The ipv6 netstream export host command configures the destination IP address and destination UDP port number for the exported packets carrying IPv6 flow statistics.

The undo ipv6 netstream export host command deletes the configured destination IP address and destination UDP port number for the exported packets carrying IPv6 flow statistics.

By default, no destination IP address or destination UDP port number is configured in the system view for the exported packets carrying IPv6 flow statistics.

Format

ipv6 netstream export host ip-address port-number

undo ipv6 netstream export host ip-address port-number

Parameters

Parameter

Description

Value

ip-address

Specifies the destination IPv4 address of the exported packets carrying IPv6 flow statistics.

-

port-number

Specifies the destination UDP port number of the exported packets.

The value is an integer that ranges from 1 to 65535.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

After finishing data collection, the NDE sends the collected data to the NSC. This command specifies the destination address of the collected data, that is, the NSC IP address.

Precautions

The netstream export ipv6 host command configures the destination address for the exported packets carrying IPv6 original flows and flexible flows.

You can configure two destination IP addresses to implement NSC backup. To configure a third destination IP address, run the undo ipv6 netstream export host command to delete an existing one first; otherwise, the system displays a message indicating that the maximum number of addresses is exceeded and the configuration fails.

Example

# Set the destination IP address for the exported packets carrying IPv6 original flows to 10.1.1.1, and UDP port number to 222.

<HUAWEI> system-view
[HUAWEI] ipv6 netstream export host 10.1.1.1 222

ipv6 netstream export index-switch

Function

The ipv6 netstream export index-switch command sets the number of digits in the interface index contained in an exported packet carrying IPv6 flow statistics.

The undo ipv6 netstream export index-switch command restores the default setting.

By default, an interface index contains 16 digits.

Format

ipv6 netstream export index-switch index-switch

undo ipv6 netstream export index-switch

Parameters

Parameter

Description

Value

index-switch

Specifies the digit of the interface index.

The value is an integer that can be 16 or 32. The default is 16.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

You can run the ipv6 netstream export index-switch command to set the number of digits in the interface index to 16 or 32.

Set the type of the interface index contained in exported packets the same as the type of the interface index that can be parsed by the NMS. For example, if the NMS can parse the 32-digit interface index, set the type of the interface index contained in exported packets to 32-digit interface index.

Prerequisites

The interface index length in exported packets can be set to 32 bits only when the NMS supports 32-bit interface index; otherwise, the NMS cannot identify the NetStream packets.

Example

# Change the interface index type of the exported packets carrying IPv6 flow statistics from 16-digit to 32-digit.

<HUAWEI> system-view
[HUAWEI] ipv6 netstream export index-switch 32

ipv6 netstream export source

Function

The ipv6 netstream export source command configures the source address for the exported packets carrying IPv6 flow statistics.

The undo ipv6 netstream export source command deletes the configured source address for the exported packets carrying IPv6 flow statistics.

By default, no source address is configured on the device for the exported packets carrying IPv6 flow statistics.

Format

ipv6 netstream export source ip-address

undo ipv6 netstream export source

Parameters

Parameter

Description

Value

ip-address

Specifies the source IPv4 address of the exported packets carrying IPv6 flow statistics.

-

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

If the NMS identifies the data source according to the source IP address in NetStream packets, you need to specify the source IP address for NetStream packets.

Precautions

This command must be performed; otherwise, the source address of output packets may be 0.0.0.0, and the output packets may be discarded during transmission or cannot be parsed by the NetStream server.

Example

# In the system view, set the source address for the exported packets carrying IPv6 flow statistics to 10.1.1.1.

<HUAWEI> system-view
[HUAWEI] ipv6 netstream export source 10.1.1.1

ipv6 netstream export version

Function

The ipv6 netstream export version command configures the version number and AS option of the exported packets carrying IPv6 flow statistics.

The undo ipv6 netstream export version command restores the default setting.

By default, the version number of the exported packets carrying IPv6 flow statistics is not specified.

Format

ipv6 netstream export version version [ origin-as | peer-as ]

undo ipv6 netstream export version

Parameters

Parameter

Description

Value

version

Specifies the version of exported packets.

Only V9 is supported.

origin-as

Specifies the AS number recorded in the statistics as the original AS number.

-

peer-as

Specifies the AS number recorded in the statistics as the peer AS number.

-

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

The NDE exports NetStream flow statistics to the NSC. The version of exported packets must be the same as that configured on the NSC so that the NSC can parse the exported packets.

Precautions

The AS option is used according to the actual situation of the AS configured on each device. The AS option affects only the packet statistics result, but does not affect the flows. The AS option is encapsulated in the AS option field carried in the NetStream packets sent to the NMS.

Example

# Set the version of exported packets carrying IPv6 flow statistics to V9 and AS to peer-as.

<HUAWEI> system-view
[HUAWEI] ipv6 netstream export version 9 peer-as

ipv6 netstream sampler

Function

The ipv6 netstream sampler command configures packet sampling for IPv6 packets on an interface.

The undo ipv6 netstream sampler command restores the default setting.

By default, an interface uses the packet-based regular sampling and the sampling ratio is 1000.

Format

ipv6 netstream sampler fix-packets packet-interval { inbound | outbound }

undo ipv6 netstream sampler [ fix-packets packet-interval ] { inbound | outbound }

Parameters

Parameter

Description

Value

fix-packets packet-interval

Indicates the sampling ratio for packet-based regular sampling.

The value is an integer that ranges from 1 to 65535.

inbound

Samples incoming traffic on an interface.

-

outbound

Samples outgoing traffic on an interface.

-

Views

GE interface view, XGE interface view, port group view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

You can set an interval for sampling packets so that only statistics about sampled packets are collected. The statistics show the flow status on the entire network. The sampling function reduces impact of NetStream on device performance.

Precautions

You must run the ipv6 netstream sampler command together with the ipv6 netstream command. If you run only the ipv6 netstream sampler command, the command does not take effect.

If you run the ipv6 netstream sampler command multiple times in the same view, only the latest configuration takes effect.

Example

# Set the packet-based regular sampling interval for the incoming packets on GE0/0/1 to 1200.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] ipv6 netstream inbound
[HUAWEI-GigabitEthernet0/0/1] ipv6 netstream sampler fix-packets 1200 inbound
Related Topics

mask

Function

The mask command sets the aggregation mask length.

The undo mask command restores the default setting.

By default, no aggregation mask is configured.

Format

mask { source | destination } minimum mask-length

undo mask { source | destination }

Parameters

Parameter Description Value
source Indicates the aggregation mask of the source address. It is used in the following aggregation methods: prefix, prefix-ToS, source-prefix, and source-prefix-ToS. -
destination Indicates the aggregation mask of the destination address. It is used in the following aggregation methods: prefix, prefix-ToS, destination-prefix, or destination-prefix-ToS. -
mask-length Specifies the aggregation mask length.

The value is an integer that ranges from 1 to 32.

Views

NetStream aggregation view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

The system uses the larger value between the set mask and the largest mask in the FIB table. If the aggregation mask is not configured, the system uses the mask in the FIB table for aggregation.

Precaution

Aggregation masks are applied to six aggregation methods: destination-prefix, destination-prefix-tos, prefix, prefix-tos, source-prefix, and source-prefix-tos.

Example

# Set the aggregation mask length in the source-prefix aggregation method to 24.

<HUAWEI> system-view
[HUAWEI] ip netstream aggregation source-prefix
[HUAWEI-aggregation-srcpre] mask source minimum 24

match ip

Function

The match ip command configures aggregation keywords in a flexible flow statistics template.

The undo match ip command deletes aggregation keywords from a flexible flow statistics template.

By default, no aggregation keyword is configured in a flexible flow statistics template.

Format

match ip { protocol | dscp | source-address | destination-address | source-port | destination-port | flow-label }

undo match ip { protocol | dscp | source-address | destination-address | source-port | destination-port | flow-label }

Parameters

Parameter

Description

Value

protocol

Indicates the IP protocol aggregation of IPv4 and IPv6 flows.

-

dscp

Indicates the DSCP priority aggregation of IPv4 and IPv6 flows.

-

source-address

Indicates the source IP address aggregation of IPv4 and IPv6 flows.

-

destination-address

Indicates the destination address aggregation of IPv4 and IPv6 flows.

-

source-port

Indicates the source port number aggregation of IPv4 and IPv6 flows.

-

destination-port

Indicates the destination port number aggregation of IPv4 and IPv6 flows.

-

flow-label

Indicates the IPv6 flow label aggregation. This aggregation method applies only to IPv6 flows.

-

Views

Flexible flow statistics template view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

During NetStream implementation, you can run the match ip command to configure aggregation keywords in a flexible flow statistics template.

Prerequisites

A flexible flow statistics template has been created using the ip netstream record command.

Precautions

When you run the match ip command to configure the aggregation keywords, only one keyword can be configured each time. If you run this command multiple times in the same view, a set of multiple aggregation keywords is configured. If a template has been applied to an interface, you cannot modify or delete aggregation keywords from the template.

Example

# Set the flexible flow statistics template abc123 to aggregate flows based on the source port number.

<HUAWEI> system-view
[HUAWEI] ip netstream record abc123
[HUAWEI-record-abc123] match ip source-port

port ip netstream record

Function

The port ip netstream record command applies the flexible flow statistics template to an interface.

The undo port ip netstream record command unbinds a specified flexible flow statistics template from an interface.

By default, no flexible flow statistics template is applied to an interface.

Format

port ip netstream record record-name

undo port ip netstream record

Parameters

Parameter

Description

Value

record-name

Specifies the name of a flexible flow statistics template.

The value is a string of 1 to 32 case-insensitive characters without spaces.

The value is the same as the IPv4 flexible flow statistics template name configured using the ip netstream record command.

Views

GE interface view, XGE interface view, port group view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

After a flexible flow statistics template is configured, run the port ip netstream record command to apply the template to an interface.

The interface then aggregates flows based on the configured aggregation keywords, collects flow statistics, and exports aged flows to the NSC.

Prerequisites

The flexible flow statistics template has been created and at least one aggregation keyword has been configured using the match ip command.

Precautions

Each interface can be configured with only one flexible flow statistics template. Before modifying the flexible flow statistics template in the same interface view, run the undo port ip netstream record command to delete the existing configuration.

If the flexible flow statistics template has been applied to an interface, the template configuration cannot be modified or deleted.

When flow statistics collection is enabled both on the inbound and outbound interfaces, the port ip netstream record command does not take effect.

Example

# Configure the flexible flow statistics template abc1 (aggregating flows based on the source and destination IP addresses, collecting statistics about the number of packets, and exporting the inbound interface index). Apply the template to GE0/0/1.

<HUAWEI> system-view
[HUAWEI] ip netstream record abc1
[HUAWEI-record-abc1] match ip source-address
[HUAWEI-record-abc1] match ip destination-address
[HUAWEI-record-abc1] collect counter packets
[HUAWEI-record-abc1] collect interface input
[HUAWEI-record-abc1] quit
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] port ip netstream record abc1

refresh netstream template

Function

The refresh netstream template command immediately refreshes the NetStream export template.

By default, the template is refreshed every 30 minutes.

Format

refresh netstream template

Parameters

None

Views

User view

Default Level

3: Management level

Usage Guidelines

After a NetStream server restarts, you need to run this command to enable the device to immediately resend the NetStream export template. Only the V9 template supports this command.

Example

# Refresh the NetStream export template.

<HUAWEI> refresh netstream template

reset ip netstream cache

Function

The reset ip netstream cache command forcibly ages all the flows in the cache.

Format

reset ip netstream cache slot slot-id

Parameters

Parameter

Description

Value

slot slot-id

Specifies the slot ID.

The value depends on the actual configuration.

Views

System view

Default Level

3: Management level

Usage Guidelines

Forced aging is used when you require the latest statistics, but you do not satisfy with the existing aging conditions or some flows fail to age out due to an anomaly. You can forcibly age out all the original flows in the cache and export the flow statistics.

NOTE:

If you run the reset ip netstream cache command on the device before the inactive aging time is reached, the NDE does not export the flow statistics to the NSC.

Example

# Age all the flows forcibly in slot 0.

<HUAWEI> system-view
[HUAWEI] reset ip netstream cache slot 0

reset ip netstream statistics

Function

The reset ip netstream statistics command deletes NetStream flow statistics.

Format

reset ip netstream statistics slot slot-id

Parameters

Parameter

Description

Value

slot slot-id

Specifies the slot ID.

The value depends on the actual configuration.

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

When diagnosing and locating network faults, collect flow statistics in a specified period. Before statistics collection starts, you can run this command to delete historical statistics.

Precautions

The reset ip netstream statistics command deletes all NetStream statistics. The statistics cannot be restored after being deleted. Therefore, confirm the action before running this command.

You can run this command multiple times at any interval.

Example

# Delete NetStream statistics in slot 0.

<HUAWEI> reset ip netstream statistics slot 0

snmp-agent trap enable feature-name sindex

Function

The snmp-agent trap enable feature-name sindex command enables the trap function for the SINDEX module.

The undo snmp-agent trap enable feature-name sindex command disables the trap function for the SINDEX module.

By default, the trap function is enabled for the SINDEX module.

Format

snmp-agent trap enable feature-name sindex [ trap-name hwnetstreamindexusedup ]

undo snmp-agent trap enable feature-name sindex [ trap-name hwnetstreamindexusedup ]

Parameters

Parameter

Description

Value

trap-name

Specifies the name of the trap for a specified event on the SINDEX module.

-

hwnetstreamindexusedup

Sends Huawei-proprietary trap messages when all interface indexes are allocated.

-

Views

System view

Default Level

2: Configuration level

Usage Guidelines

The snmp-agent trap enable feature-name sindex command is used to enable an SINDEX trap. After that, the trap generated during the device running will be sent to the NMS.

You can run the display snmp-agent trap feature-name sindex all command to check the configuration result.

Example

# Enable the trap function for the SINDEX module.

<HUAWEI> system-view
[HUAWEI] snmp-agent trap enable feature-name sindex
Translation
Download
Updated: 2019-10-09

Document ID: EDOC1000178165

Views: 48274

Downloads: 1163

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next