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

AR500, AR510, and AR530 V200R007 Commands Reference

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:

The NetStream function conforms to IETF RFC3954. For security risks, see IETF RFC3954. This function involves analyzing the communications information of terminal customers. Before enabling the function, ensure that it is performed within the boundaries permitted by applicable laws and regulations. Effective measures must be taken to ensure that information is securely protected.

NOTE:

The AR500 series, only AR502G-L-D-H&AR502GR-L-D-H do not support NetStream.

The AR510 series do not support NetStream.

The AR550 series do not support NetStream.

NOTE:

NetStream supports sampling of IPv4 unicast and multicast packets, but does not support sampling of IPv4 packets encapsulated with MPLS labels.

collect application

Function

The collect application command configures the application name or description of traffic to be added to the flexible flow statistics exported to the NSC.

The undo collect application command restores the default configuration.

By default, the flexible flow statistics that are exported to the NSC do not contain the application name and description.

Format

collect application { name | description }

undo collect application { name | description }

Parameters

Parameter

Description

Value

name

Specifies the traffic application name to be added to the flexible flow statistics exported to the NSC.

-
description

Specifies the traffic description to be added to the flexible flow statistics exported to the NSC.

-

Views

Flexible flow template view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

To obtain more information from flexible flow statistics, you can specify that the statistics contain the application name or description of traffic and set the application names and description according to your needs.

Prerequisites

The engine enable command has been run to enable deep security defense, and the sa application-statistic enable command has been run to enable SA statistics collection on a NetStream interface.

After the deep security function is enabled, if SAC is used for the first time, run the update restore sdb-default command to manually load the SA signature file.

Example

# Specify the traffic application name to be added to the flexible flow statistics exported to the NSC.

<Huawei> system-view
[Huawei] ip netstream record huawei_record
[Huawei-record-huawei_record] collect application name

collect category name

Function

The collect category name command configures the application category and subcategory of traffic to be added to the flexible flow statistics exported to the NSC.

The undo collect category name command restores the default configuration.

By default, the flexible flow statistics that are exported to the NSC do not contain the application category and subcategory.

Format

collect category name

undo collect category name

Parameters

None

Views

Flexible flow template view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

To obtain more information from flexible flow statistics, you can specify that the statistics contain the application name or description of traffic and set the application names and description according to your needs.

Prerequisites

The engine enable command has been run to enable deep security defense, and the sa application-statistic enable command has been run to enable SA statistics collection on a NetStream interface.

After the deep security function is enabled, if SAC is used for the first time, run the update restore sdb-default command to manually load the SA signature file.

Example

# Specify that the flexible flow statistics that are exported to the NSC contain the application category and subcategory of traffic.

<Huawei> system-view
[Huawei] ip netstream record huawei_record
[Huawei-record-huawei_record] collect category name

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

Function

The display ip netstream command displays the NetStream configurations.

Format

display ip netstream { all | global }

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 NetStream configurations in a specified view, for example:
  • NetStream configurations in the system view
  • NetStream configurations in the aggregation view
  • NetStream configurations in the flexible flow statistics view

-

Views

All views

Default Level

3: Management level

Usage Guidelines

None

Example

# Display NetStream configurations in the system view and aggregation view.

<Huawei> display ip netstream global
ip netstream export host 10.0.0.2 255 vpn-instance vpna
ip netstream aggregation destination-prefix
 enable
 export version 9
 ip netstream export host 10.5.5.5 3 vpn-instance vpna
Table 16-63  Description of the display ip netstream global command output

Item

Description

ip netstream export host

ip-address port-number vpn-instance vpn-instance-name

The field ip-address indicates the destination address of the exported packets, and port-number is the UDP port. The field vpn-instance-name indicates the VPN instance to which the destination address belongs.This field is displayed only when the ip netstream export host command has been executed in the system view.

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 modes 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 mode 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.

ip netstream export host

ip-address port-number vpn-instance vpn-instance-name

The field ip-address indicates the destination address of the exported packets, and port-number is the UDP port. The field vpn-instance-name indicates the VPN instance to which the destination address belongs. This field is displayed only when the ip netstream export host command has been executed in the NetStream aggregation view.

display ip netstream cache

Function

The display ip netstream cache command displays flow information in the NetStream cache.

Format

display ip netstream cache [ top [ top-value ] [ sort-by { bytes | packets } ] | verbose ]

Parameters

Parameter Description Value
top

Displays the flows in the descending order of flow volume. By default, flows are displayed in the descending order of the number of packets.

-
top-value

Specifies the number of flows that need to be displayed in a certain order.

The value is an integer that ranges from 1 to 200. The default value is 10.
sort-by

Specifies the order in which flows are displayed.

-
bytes

Indicates that the flows are displayed in the order of bytes.

-
packets

Indicates that the flows are displayed in the order of packets.

-
verbose

Displays detailed information about flows in the NetStream cache.

-

Views

All views

Default Level

3: Management level

Usage Guidelines

Usage Scenario

After the NetStream sampling function is enabled, run the display ip netstream cache command to view information about flows in NetStream cache.

To view the cached flows in the order of flow volume, run the display ip netstream cache command. The display ip netstream cache command can display the flows in the descending order of the number of bytes or packets.

Precaution

This command cannot display the aged flows, so you must run this command before the flows age in the cache.

Example

# Display information about flows in the NetStream cache.

<Huawei> display ip netstream cache
 IP netstream cache information :                                               
   Active stream timeout ( in minutes )   : 30                                  
   Inactive stream timeout ( in seconds ) : 30                                  
   IP active stream number                : 2                                   
   IP inactive stream number              : 0                                   
   Last statistics reset time             : Never                               
                                                                                
IP packet size distribution (41100 total packets) :                             
 1-32   64   96  128  160  192  224  256  288  320  352  384  416  448          
 .000 .000 .148 .000 .850 .000 .000 .000 .000 .000 .000 .000 .000 .000          
                                                                                
  480  512  544  576 1024 1536 2048 2506 3072 3584 4096 4608 >4608              
 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000               
                                                                                
 Protocol          Total   Packets    Stream    Packets  Active(sec)  Idle(sec) 
                 Streams      /sec      /sec    /stream    /stream     /stream  
--------------------------------------------------------------------------------
 IP-other              1       928         0       6500          7           0  
 UDP-other             1       300         0      35100        117           0  
                                                                                
Type  DstIP(Port)            SrcIP(Port)           Pro  ToS  Pkts      If(Direc)
--------------------------------------------------------------------------------
IP    192.168.1.2(80)          192.168.2.2(0)          17   0    353    GigabitEther
net0/0/0(I)                                                                     
IP    192.168.2.2(0)           192.168.1.2(0)          114  68   70     GigabitEther
net0/0/0(O)                           
Table 16-64  Description of the display ip NetStream cache command output

Item

Description

IP netstream cache information

Information about the NetStream cache.

Active stream timeout ( in minutes )

Active aging time, in minutes.

Inactive stream timeout ( in seconds )

Inactive aging time, in seconds.

IP active stream number

Number of active IP flows in the NetStream cache.

IP inactive stream number

Number of inactive IP flows in the NetStream cache.

Last statistics reset time

Last time the statistics are cleared. This time does not change with the system time.

This field is displayed only when the reset ip netstream statistic command is executed; otherwise, the message "Last statistics reset time : Never" is displayed.

IP packet size distribution (41100 total packets)

Distribution of IP packets based on the packet size. Bracketed information indicates the total number of IP packets.

The distribution value is displayed as a three-bit decimal based on the ratio to the total number of IP packets. For example, ".027" indicates that the IP packets in the NetStream cache are 0.027 of the total number of IP packets.

1-32 64 96 128 160 192 224 256 288 320 352 384 416 448 480 512 544 576 1024 1536 2048 2506 3072 3584 4096 4608 >4608

Interval between IP packet size. The packet length does not contain the link layer header. When the packet length does not exceed 576 bytes, the packet length increases by 32 bytes. For example, "1-32" maps the number of packets whose lengths range from 1 byte to 32 bytes, and "64" maps the number of packets whose lengths range from 33 bytes to 64 bytes. When the packet length exceeds 1024 bytes, the packet length increases by 512 bytes. For example, "1536" maps the number of packets whose lengths range from 1025 bytes to 1536 bytes. The number of packets whose lengths range from 577 bytes to 1024 bytes is recorded mapping "1024".

Protocol

Protocol number.

Total/Streams

Total number of flows.

Packets/sec

Number of packets per second.

Stream/sec

Number of flows per second.

Packets /stream

Average number of packets in each flow.

Active(sec) /stream

Average active time of each flow.

Idle(sec) /stream

Average inactive time of each flow.

Type

Flow type.

DstIP(Port)

Destination IP address (destination port number) of flows.

SrcIP(Port)

Source IP address (source port number) of flows.

Pro

Protocol type of flows.

ToS

Service type of flows.

Pkts

Number of packets in a flow.

If(Direc)

Interface name (flow direction).
  • (I): inbound direction
  • (O): outbound direction

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.

NOTE:

The parameter record-name is determined by the template name configured using the ip netstream record command.

Views

All views

Default Level

3: Management level

Usage Guidelines

None

Example

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

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

Item

Description

ip netstream record test0

The flexible flow statistics template is test0.

match ipv4 source-address

According to the template test0, flows are aggregated based on the source IP address. This field is configured using the match ipv4 command.

match ipv4 destination-address

According to the template test0, flows are aggregated based on the destination IP address. This field is configured using the match ipv4 command.

Related Topics

display ip netstream statistic

Function

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

Format

display ip netstream statistic

Parameters

None

Views

All views

Default Level

3: Management level

Usage Guidelines

None

Example

# Display the NetStream statistics.

<Huawei> display ip netstream statistic
 Origin ingress entries           : 30000
 Origin ingress packets           : 30000
 Origin ingress octets            : 1380000
 Origin egress entries            : 0
 Origin egress packets            : 0
 Origin egress octets             : 0
 Origin total entries             : 30000
 Agility ingress entries          : 30000
 Agility ingress packets          : 30000
 Agility ingress octets           : 3960000
 Agility egress entries           : 0
 Agility egress packets           : 0
 Agility egress octets            : 0
 Agility total entries            : 30000
 Handle origin entries            : 29035
 Handle agility entries           : 29050
 Handle As aggre entries          : 1
 Handle ProtPort aggre entries    : 1
 Handle SrcPrefix aggre entries   : 118
 Handle DstPrefix aggre entries   : 1
 Handle Prefix aggre entries      : 118
 Handle AsTos aggre entries       : 1
 Handle ProtPortTos aggre entries : 1
 Handle SrcPreTos aggre entries   : 118
 Handle DstPreTos aggre entries   : 1
 Handle PreTos aggre entries      : 118
Table 16-66  Description of the display ip netstream statistic command output

Item

Description

Origin ingress entries

Total number of incoming original flows.

Origin ingress packets

Total number of incoming original packets.

Origin ingress octets

Total number of incoming original bytes.

Origin egress entries

Total number of outgoing original flows.

Origin egress packets

Total number of outgoing original packets.

Origin egress octets

Total number of outgoing original bytes.

Origin total entries

Total number of original flows.

Agility ingress entries

Number of incoming flexible flows.

Agility ingress packets

Number of incoming flexible packets.

Agility ingress octets

Number of incoming flexible bytes.

Agility egress entries

Number of outgoing flexible flows.

Agility egress packets

Number of outgoing flexible packets.

Agility egress octets

Number of outgoing flexible bytes.

Agility total entries

Total number of flexible flows.

Handle origin entries

Number of processed incoming and outgoing original flows.

Handle agility entries

Number of processed incoming and outgoing flexible 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.

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

Usage Scenario

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.

Precautions

When this command is executed, the device will send a aggregation template to the server.

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 versions of exported packets carrying aggregation flow statistics and flexible flow statistics.

The undo export version command restores the default setting.

By default, the version of exported packets carrying aggregation flow statistics is V8 and the version of exported packets carrying flexible flow statistics is V9.

Format

export version version

undo export version

Parameters

Parameter

Description

Value

version

Specifies the version numbers of exported packets carrying aggregation flow statistics and flexible flow statistics.

The value of version is as follows:
  • The value is 8, 9, or 10 in the NetStream aggregation view. The default is 8.
  • The value is 9 or 10 in the flexible flow statistics template view. The default is 9.

Views

NetStream aggregation view, flexible flow statistics template 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 or V10 is defined in templates and is easy to combine or expand. The statistics are exported more flexibly.

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

# Set the version number of exported packets carrying flexible flow statistics to V10.

<Huawei> system-view
[Huawei] ip netstream record test
[Huawei-record-test] export version 10

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

Interface 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

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

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 (interface view) command, the main interface uses the sampling ratio of 1:100. If you set the sampling ratio, the interface uses this sampling ratio.

When this command is executed, the device will send a template to the server.

Example

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

<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] ip netstream inbound

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 aggregation timeout active

Function

The ip netstream aggregation timeout active command sets the active aging time of aggregation flows.

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

By default, the active aging time of aggregation flows is 30 minutes.

Format

ip netstream aggregation timeout active active-interval

undo ip netstream aggregation timeout active

Parameters

Parameter

Description

Value

active-interval

Specifies the active aging time of aggregation flows.

The value is an integer that ranges from 1 to 60, in minutes. The default value 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 active time (from flow creation time to the current time) of an aggregation 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.

Precaution

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

Example

# Set the active aging time of aggregation flows to 20 minutes.

<Huawei> system-view
[Huawei] ip netstream aggregation timeout active 20

ip netstream aggregation timeout inactive

Function

The ip netstream aggregation timeout inactive command sets the inactive aging time of aggregation flows.

he undo ip netstream aggregation timeout inactive command restores the default setting.

By default, the inactive aging time of aggregation flows is 30 seconds.

Format

ip netstream aggregation timeout inactive inactive-interval

undo ip netstream aggregation timeout inactive

Parameters

Parameter

Description

Value

inactive-interval

Specifies the inactive aging time of aggregation flows.

The value is an integer that ranges from 10 to 600, in seconds. The default value 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 aggregation 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.

Precaution

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

Example

# Set the inactive aging time of aggregation flows to 40 seconds.

<Huawei> system-view
[Huawei] ip netstream aggregation timeout inactive 40

ip netstream as extend enable

Function

The ip netstream as extend enable command sets the BGP AS number range.

The undo ip netstream as extend enable command restores the default setting.

By default, the BGP AS numbers range from 1 to 65535.

Format

ip netstream as extend enable

undo ip netstream as extend enable

Parameters

None

Views

System view

Default Level

2: Management level

Usage Guidelines

Usage Scenario

By default, the BGP AS numbers range from 1 to 65535. A BGP AS number supports 32 bits; therefore, the BGP AS numbers ranging from 65536 to 4294967295 are not supported. After the ip netstream as extend enable command is executed, the BGP AS numbers ranging from 1 to 4294967295 can be supported.

Precautions

Only the output packets of V9 or V10 support the 32-bit BGP AS numbers.

Example

# Set the supported BGP AS number range.

<Huawei> system-view
[Huawei] ip netstream as extend enable

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 [ vpn-instance vpn-instance-name ]

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

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 0 to 65535.

vpn-instance vpn-instance-name

Specifies the VPN instance of the exported packets carrying IPv4 flow statistics.

The VPN instance has been created on the device.

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

ip netstream export index-switch

Function

The ip netstream export index-switch command sets the number of digits in the interface indexes contained in an exported NetStream packet.

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

Format

ip netstream export index-switch 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.

Example

# Change the number of digits in the interface index contained in an exported NetStream packet from 16 to 32.

<Huawei> system-view
[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 restores the default source address and source UDP port number of the exported packets carrying IPv4 flow statistics.

By default, the source IP address of the exported packets carrying IPv4 flow statistics is not configured.

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.

-

Views

System view, NetStream aggregation view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

The NMS working with the NetStream system may need to identify the data source based on the source address in NetStream packets. You can run the ip netstream export source command to configure the source address of exported packets carrying IPv4 flow statistics.

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.

Example

# In the system view, set the source address for the exported packets carrying IPv4 flow statistics to 10.1.1.1 and source UDP port number to 6666.

<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

ip netstream export version

Function

The ip netstream export version command configures the version number of the exported packets carrying original 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. Packets of V5 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, 9 or 10. The default is 5.

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, V9 and V10 support 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 or V10 is defined in templates and is easy to combine or expand. The statistics are exported more flexibly.

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

ip netstream multicast

Function

The ip netstream multicast command enables the flow statistics collection function for incoming and outgoing IPv4 multicast flows.

The undo ip netstream multicast command disables the flow statistics collection function for incoming and outgoing IPv4 multicast flows.

By default, the flow statistics collection function is disabled for incoming and outgoing IPv4 multicast flows.

Format

ip netstream multicast { inbound | outbound }

undo ip netstream multicast { inbound | outbound }

Parameters

Parameter Description Value
inbound Indicates the incoming packets. -
outbound Indicates the outgoing packets. -

Views

Interface view

Default Level

3: Management level

Usage Guidelines

The ip netstream multicast command allows the device to collect statistics about incoming and outgoing IPv4 multicast packets and export the statistics to the NMS.

Example

# Enable the flow statistics collection function for incoming IPv4 multicast packets on Eth0/0/1.
<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] ip netstream multicast inbound

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 20 case-sensitive characters without spaces. The name of the flexible flow statistics template cannot contain special characters such as @, %, or *.

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. To delete this flexible flow statistics template, run the undo port ip netstream record command on the interface and then modify or delete the template.

Example

# Create the flexible flow statistics template named abc.

<Huawei> system-view
[Huawei] ip netstream record abc
[Huawei-record-abc]

ip netstream rpf-failure

Function

The ip netstream rpf-failure command enables NetStream functions for collecting statistics about flows that fail the RPF check.

The undo ip netstream rpf-failure command disables NetStream functions from collecting statistics about flows that fail the RPF check.

By default, NetStream functions are disabled from collecting statistics about flows that fail the RPF check.

Format

ip netstream rpf-failure inbound

undo ip netstream rpf-failure inbound

Parameters

None

Views

Interface view

Default Level

3: Management level

Usage Guidelines

You need to enable the RPF check before configuring NetStream functions for collecting statistics about flows that fail the RPF check.

Example

# Enable RPF statistics function on Eth0/0/1.

<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] ip netstream rpf-failure inbound

ip netstream sampler (interface view)

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, the packet-based regular sampling is used. The default packet sampling ratio is 100.

Format

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

undo ip netstream sampler { inbound | outbound }

Parameters

Parameter

Description

Value

fix-packets packet-interval

Indicates the number of packets between two sampled packets in the packet-based regular sampling.

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

fix-time time-interval

Indicates the interval of time-based regular sampling.

The value is an integer that ranges from 5 to 30000, in milliseconds.

random-packets packet-interval

Indicates the number of packets between two sampled packets in the packet-based random sampling.

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

random-time time-interval

Indicates the interval of time-based random sampling.

The value can be the following:

  • 3.0
  • 6.0
  • 12.0
  • 24.0
  • 48.0
  • 96.0
  • 192.0
  • 383.5
  • 767.0
  • 1534.0
  • 3068.0
  • 6136.0

The unit is millisecond.

inbound

Samples incoming traffic on an interface.

-

outbound

Samples outgoing traffic on an interface.

-

Views

Interface 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 Eth0/0/1 to 1200.

<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] ip netstream sampler fix-packets 1200 inbound
[Huawei-Ethernet0/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 30 minutes.

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 60, in minutes. 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 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 20 minutes.

<Huawei> system-view
[Huawei] ip netstream timeout active 20

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 10 to 600, 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

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

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 ipv4

Function

The match ipv4 command configures aggregation keywords in an IPv4 flexible flow statistics template.

The undo match ipv4 command deletes aggregation keywords from an IPv4 flexible flow statistics template.

Format

match ipv4 { protocol | tos | source-address | destination-address | source-port | destination-port }

undo match ipv4 { protocol | tos | source-address | destination-address | source-port | destination-port }

Parameters

Parameter

Description

Value

protocol

Indicates the IP protocol aggregation.

-

tos

Indicates the ToS priority aggregation.

-

source-address

Indicates the source IP address aggregation.

-

destination-address

Indicates the destination IP address aggregation.

-

source-port

Indicates the source port number aggregation.

-

destination-port

Indicates the destination port aggregation.

-

Views

Flexible flow statistics template view

Default Level

3: Management level

Usage Guidelines

You need to create a flexible flow statistics template using the ip netstream record command before running the match ipv4 command.

When you run the match ipv4 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 abc1 to aggregate flows based on the source port number..

<Huawei> system-view
[Huawei] ip netstream record abc1
[Huawei-record-abc1] match ipv4 source-port
Related Topics

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 deletes a specified flexible flow statistics template on 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 20 case-sensitive characters without spaces. The name of the flexible flow statistics template cannot contain special characters such as \, /, :, <, >, |, @, ', % or *.

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

Views

Interface 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 ip4 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 such configurations to Eth0/0/1.

<Huawei> system-view
[Huawei] ip netstream record abc1
[Huawei-record-abc1] match ipv4 source-address
[Huawei-record-abc1] match ipv4 destination-address
[Huawei-record-abc1] collect counter packets
[Huawei-record-abc1] collect interface input
[Huawei-record-abc1] quit
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] port ip netstream record abc1
 Info: Interface got a record config succeed.

reset ip netstream cache

Function

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

Format

reset ip netstream cache

Parameters

None

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.

Example

# Age all the flows in the cache forcibly.

<Huawei> system-view
[Huawei] reset ip netstream cache

reset ip netstream statistic

Function

The reset ip netstream statistic command deletes NetStream flow statistics.

Format

reset ip netstream statistic

Parameters

None

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 statistic 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.

<Huawei> reset ip netstream statistic
Translation
Download
Updated: 2019-05-29

Document ID: EDOC1000097293

Views: 49298

Downloads: 102

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