NetEngine AR5700, AR6700, and AR8000 V600R022C00 Command Reference
NetStream Configuration Commands
- collect application
- collect counter
- collect interface
- collect sd-wan connection
- description
- display netstream
- display netstream cache ip origin
- display netstream cache ip record
- display netstream statistics
- match ip
- netstream export host
- netstream export index-switch
- netstream export ip template timeout-rate
- netstream export ip version
- netstream export source
- netstream ip
- netstream record ip (interface view)
- netstream record ip (system view)
- netstream sampler
- netstream timeout active
- netstream timeout inactive
- netstream timeout tcp-session
- netstream tm-after enable
- reset netstream cache
- reset netstream statistics
collect application
Function
The collect application command configures the flexible flow statistics to be sent to the NSC to include the application name.
The undo collect application name command restores the default configuration.
By default, the flexible flow statistics to be sent to the NSC do not contain the application name.
Parameters
Parameter | Description | Value |
---|---|---|
name |
Specifies the application name in flexible flow statistics. |
- |
Usage Guidelines
Usage Scenario
To obtain more flow statistics, you can configure the flexible flow statistics to be sent to the NSC to contain the application name.
Prerequisites
A flexible flow statistics template has been created before the collect application command is run.
Precautions
If a flexible flow statistics template has been applied to an interface, the template configuration cannot be modified or deleted.
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.
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. |
- |
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.
Precautions
If a flexible flow statistics template has been applied to an interface, the template configuration cannot be modified or deleted.
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 indexes of the inbound and outbound interfaces.
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. |
- |
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.
Precautions
If a flexible flow statistics template has been applied to an interface, the template configuration cannot be modified or deleted.
collect sd-wan connection
Function
The collect sd-wan connection command configures the flexible flow statistics to be sent to the NSC to contain the source TNP, destination TNP, source site ID, and destination site ID.
The undo collect sd-wan connection command restores the default setting.
By default, the flexible flow statistics to be sent to the NSC do not include the source TNP, destination TNP, source site ID, or destination site ID.
Usage Guidelines
Usage Scenario
To obtain more flow statistics in SD-WAN scenarios, you can run this command to configure the flexible flow statistics output to contain the source TNP, destination TNP, source site ID, and destination site ID.
Prerequisites
Before running the collect sd-wan connection command, you must create a flexible flow statistics template.
Precautions
If a flexible flow statistics template has been applied to an interface, the template configuration cannot be modified or deleted.
description
Function
The description command configures a description for a flexible flow.
The undo description command deletes a description for a flexible flow.
By default, no flexible flow description is configured.
Parameters
Parameter | Description | Value |
---|---|---|
description-information |
Specifies the description for a flexible flow. |
The value is a string of 1 to 80 characters, spaces supported. |
Usage Guidelines
Usage Scenario
Multiple flexible flows can be configured, each of which can be assigned matching and collected fields. To help rapidly understand a flexible flow, run the description command to configure a description for each flow. For example, a description defines some fields or meanings of fields in packets for a flexible flow.
Configuration Impact
If a description has been configured for a flexible flow, running the description command override the previous description.
display netstream
Format
display netstream { all | global | interface { interface-type interface-number | interface-name } }
Parameters
Parameter | Description | Value |
---|---|---|
all |
Displays all the NetStream configurations, including:
|
- |
global |
Displays the global NetStream configurations, including:
|
- |
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. |
- - |
interface interface-name |
Displays the NetStream configurations on a specified interface. The parameter <interface-name> specifies the name of an interface. |
- |
Example
The actual command output varies according to the device. The command output here is only an example.
<HUAWEI> display netstream all
system
netstream export ip source 192.168.1.1
netstream export ip host 192.168.10.1 3000
Item | Description |
---|---|
netstream export ip source <ip-address> | The field <ip-address> indicates the source address of the exported packets carrying IPv4 flow statistics. To configure the source address, run netstream export ip source. |
netstream export ip 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. To configure the destination address and UDP port, run netstream export ip host. |
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 [ [ top top-value [ sort-by { bytes | packets } ] ] | [ { inbound | outbound } | source interface { interface-name | interface-type interface-number } | source port port-number | source ip ip-address | destination interface { interface-name | interface-type interface-number } | destination port port-number | destination ip ip-address | tos tos-num | protocol protocol-num ] * ] slot slot-id [ verbose ]
Parameters
Parameter | Description | Value |
---|---|---|
inbound |
Specifies incoming packets. |
- |
outbound |
Specifies outgoing packets. |
- |
source |
Specifies the source information of packets. |
- |
interface interface-type interface-number |
Specifies the interface of packets. |
- |
interface-name |
Specifies the interface name of packets. |
The value is a string of 1 to 63 case-sensitive characters, spaces not supported. |
port port-number |
Specifies the port number of packets. |
The value is an integer that ranges from 0 to 65535. |
ip ip-address |
Specifies the IPv4 address of packets. |
The value is in dotted decimal notation. |
destination |
Specifies the destination information of packets. |
- |
tos tos-num |
Specifies the ToS value of packets. |
The value is an integer that ranges from 0 to 255. |
protocol protocol-num |
Specifies the protocol type of packets. |
The value is an integer that ranges from 0 to 255. |
slot slot-id |
Specifies the slot ID. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. |
verbose |
Displays detailed information. |
- |
top top-value |
Specifies the number of flows that need to be displayed in a certain order. |
The value is an integer in the range from 1 to 200. |
sort-by |
Specifies the order in which flows are displayed. By default, flows are displayed in the order of bytes. |
- |
bytes |
Indicates that the flows are displayed in the order of bytes. |
- |
packets |
Indicates that the flows are displayed in the order of the number of packets. |
- |
Usage Guidelines
Usage Scenario
This command displays real-time statistics on IPv4 original flows on the device.
Precautions
This command must be executed before the flows age out; otherwise, no information will be displayed.
Example
The actual command output varies according to the device. The command output here is only an example.
<HUAWEI> display netstream cache ip origin slot 0 verbose NOTE: L4 Info: SourcePort,DestinationPort,Protocol TCP Flags: URG,ACK,PSH,RST,SYN,FIN Last time when cache information were cleared: 2021-12-11 20:20:36 NetStream cache information: ------------------------------------------------------------------------------- SrcIf SrcVlan SrcIP Octets DstIf DstVlan DstIP Packets TCP Flags Direction L4 Info ToS MPLS Label1 MPLS Label2 MPLS Label3 MPLS Label4 ------------------------------------------------------------------------------- 10GE0/0/5 20 192.168.1.3 414512512 - 0 192.168.1.1 3238379 0,0,0,0,0,0 Inbound 0,0,253 0 0 0 0 0 10GE0/0/5 20 192.168.1.2 1007323776 - 0 192.168.1.1 7869717 0,0,0,0,0,0 Inbound 1024,4789,17 0 0 0 0 0 10GE0/0/5 20 192.168.1.2 415422336 - 0 192.168.1.1 3245487 0,0,0,0,0,0 Inbound 0,0,253 0 0 0 0 0 -------------------------------------------------------------------------------
<HUAWEI> display netstream cache ip origin slot 0 NOTE: L4 Info: SourcePort,DestinationPort,Protocol TCP Flags: URG,ACK,PSH,RST,SYN,FIN Last time when cache information were cleared: 2022-2-11 20:20:36 NetStream cache information: ------------------------------------------------------------------------------- SrcIf SrcVlan TCP Flags DstIf DstVlan L4 Info SrcIP ToS Direction DstIP Octets Packets ------------------------------------------------------------------------ 10GE0/0/5 77 -,-,-,-,-,- - - 0,0,253 192.168.1.2 0 Inbound 192.168.1.1 170502420 1550022 ------------------------------------------------------------------------
Item | Description |
---|---|
L4 Info | Transport-layer information of packets. The format is source port number, destination port number, protocol type. |
TCP Flags | TCP flag of packets. The format is URG,ACK,PSH,RST,SYN,FIN. |
Last time when cache information were cleared | Last time when flow table information was cleared. |
NetStream cache information | NetStream flow table information. |
SrcIf | Source interface of packets. If this field displays - when inbound packets are sampled, the source interface of packets does not exist. |
SrcVlan | Source VLAN of packets. |
SrcIP | Source IP address of packets. |
Octets | Number of octets in packets. |
DstIf | Destination interface of packets. If this field displays - when inbound packets are sampled, the source interface of packets does not exist. |
DstVlan | Destination VLAN of packets. |
DstIP | Destination IP address of packets. |
Packets | Number of packets. |
Direction | Packet sampling direction:
|
ToS | Service type of packets. |
MPLS Label1 to MPLS Label4 | MPLS label of packets. |
NOTE | Description. |
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 [ [ top top-value [ sort-by { bytes | packets } ] ] | [ { inbound | outbound } | source interface { interface-name | interface-type interface-number } | source port port-number | source ip ip-address | destination interface { interface-name | interface-type interface-number } | destination port port-number | destination ip ip-address | tos tos-num | protocol protocol-num ] * ] slot slot-id [ verbose ]
Parameters
Parameter | Description | Value |
---|---|---|
record-name |
Specifies the name of a flexible flow statistics template. |
The record-name must already exist. |
inbound |
Specify inbound information to match. |
- |
outbound |
Specify outbound information to match. |
- |
source |
Specify source information to match. |
- |
interface interface-type interface-number |
Specifies the interface of packets. |
- |
interface-name |
Specifies the interface name of packets. |
The value is a string of 1 to 63 case-sensitive characters, spaces not supported. |
port port-number |
Specifies the port number of packets. |
The value is an integer that ranges from 0 to 65535. |
ip ip-address |
Specifies the IPv4 address of packets. |
The value is in dotted decimal notation. |
destination |
Specify destination information to match. |
- |
tos tos-num |
Specifies the ToS value of packets. |
The value is an integer that ranges from 0 to 255. |
protocol protocol-num |
Specifies the protocol type of packets. |
The value is an integer that ranges from 0 to 255. |
slot slot-id |
Specifies the slot ID. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. |
verbose |
Verbose information. |
- |
top top-value |
Specifies the number of flows that need to be displayed in a certain order. |
The value is an integer in the range from 1 to 200. |
sort-by |
Specifies the order in which flows are displayed. By default, flows are displayed in the order of bytes. |
- |
bytes |
Indicates that the flows are displayed in the order of bytes. |
- |
packets |
Indicates that the flows are displayed in the order of the number of packets. |
- |
Usage Guidelines
Usage Scenario
This command displays real-time statistics on IPv4 flexible flows on the device.
Precautions
This command must be executed before the flows age out; otherwise, no information will be displayed.
Example
The actual command output varies according to the device. The command output here is only an example.
<HUAWEI> display netstream cache ip record bxb slot 0 verbose NOTE: L4 Info: SourcePort,DestinationPort,Protocol TCP Flags: URG,ACK,PSH,RST,SYN,FIN Last time when cache information were cleared: - NetStream cache information: ------------------------------------------------------------------------------- SrcIP SrcIf L4 Info Octets DstIP DstIf TCP Flags Packets Direction ToS STNP DTNP SSI DSI AppName ------------------------------------------------------------------------------- 192.168.1.1 10GE0/0/5 0,-,6 391704456 - - 0,0,0,0,0,0 3436004 Outbound 0 - - - - - -------------------------------------------------------------------------------
<HUAWEI> display netstream cache ip record bxb slot 0 NOTE: L4 Info: SourcePort,DestinationPort Last time when cache information were cleared: - NetStream cache information: ------------------------------------------------------------------------------- SrcIP SrcIf L4 Info DstIP DstIf Direction Protocol Tos STNP DTNP SSI DSI AppName ------------------------------------------------------------------------------- 192.168.1.1 10GE0/0/5 0,- - - Outbound 6 0 - - - - - -------------------------------------------------------------------------------
Item | Description |
---|---|
L4 Info | Transport-layer information of packets. The format is source port number, destination port number, protocol type. |
TCP Flags | TCP flag of packets. The format is URG,ACK,PSH,RST,SYN,FIN. |
Last time when cache information were cleared | Last time when flow table information was cleared. |
NetStream cache information | NetStream flow table information. |
SrcIP | Source IP address of packets. |
SrcIf | Inbound interface of packets. If this field displays - and inbound packets are sampled, the source interface of packets does not exist. If a physical interface has been added to an Eth-Trunk configured with the sampling function and then switched to another Eth-Trunk, the interface information in the flow table is still that of the original Eth-Trunk. If the sampling function is also configured on the Eth-Trunk after the switchover, the interface information in the flow table is updated to that of the new Eth-Trunk after the flow table is aged. |
DstIP | Destination IP address of packets. |
DstIf | Outbound interface of packets. If this field displays - and inbound packets are sampled, the source interface of packets does not exist. If a physical interface has been added to an Eth-Trunk configured with the sampling function and then switched to another Eth-Trunk, the interface information in the flow table is still that of the original Eth-Trunk. If the sampling function is also configured on the Eth-Trunk after the switchover, the interface information in the flow table is updated to that of the new Eth-Trunk after the flow table is aged. |
Octets | Number of octets in packets. |
Packets | Number of packets. |
Direction | Packet sampling direction:
|
ToS | ToS value of packets. |
STNP | Source network transmission port. |
DTNP | Destination network transmission port. |
SSI | Source site ID. |
DSI | Destination site ID. |
AppName | Application name. |
Protocol | Protocol number. |
NOTE | Description. |
display netstream statistics
Parameters
Parameter | Description | Value |
---|---|---|
ip |
Displays IPv4 flow statistics. |
- |
slot slot-id |
Specifies the slot ID. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. |
Usage Guidelines
Usage Scenario
You can run this command to query IPv4 flow statistics on a device, including the statistics clearance time, statistics on packets of different lengths, traffic statistics collection method, and statistics on different types of flows.
Example
The actual command output varies according to the device. The command output here is only an example.
<HUAWEI> display netstream statistics ip slot 0 Last time when statistics were cleared: - ------------------------------------------------------------------------------- Packet Length : Number ------------------------------------------------------------------------------- 1 ~ 64 : 0 65 ~ 128 : 67308526 129 ~ 256 : 0 257 ~ 512 : 0 513 ~ 1024 : 0 1025 ~ 1500 : 0 longer than 1500 : 0 ------------------------------------------------------------------------------- StreamType Current Aged Created Exported Exported (streams) (streams) (streams) (streams) (Packets) ------------------------------------------------------------------------------- origin 0 0 0 0 0 ------------------------------------------------------------------------------- flex 2 1 3 1 1 ------------------------------------------------------------------------------- flex1 0 0 0 0 0 -------------------------------------------------------------------------------
Item | Description |
---|---|
Last time when statistics were cleared | Last time when statistics were deleted. |
Packet Length | Packet length list. |
Number | Number of packets of different lengths. |
StreamType | Flow type. |
Current (streams) | Number of active flows. |
Aged (streams) | Number of flows aged out. |
Created (streams) | Number of created flows. |
Exported (streams) | Number of exported flows. |
Exported (Packets) | Number of sent packets. |
match ip
Function
The match ip command configures aggregation keywords in an IPv4 flexible flow statistics template.
The undo match ip command deletes aggregation keywords from an IPv4 flexible flow statistics template.
By default, no aggregation keyword is configured in an IPv4 flexible flow statistics template.
Format
match ip { destination-address | destination-port | tos | protocol | source-address | source-port }
undo match ip { destination-address | destination-port | tos | protocol | source-address | source-port }
Parameters
Parameter | Description | Value |
---|---|---|
destination-address |
Indicates that flows are aggregated based on destination addresses. |
- |
destination-port |
Indicates that flows are aggregated based on destination ports. |
- |
tos |
Indicates that flows are aggregated based on ToS fields. |
- |
protocol |
Indicates that flows are aggregated based on protocol types. |
- |
source-address |
Indicates that flows are aggregated based on source addresses. |
- |
source-port |
Indicates that flows are aggregated based on source ports. |
- |
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
The netstream record ip (system view) command has been executed to create an IPv4 flexible flow statistics template.
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.
netstream export host
Function
The netstream export host command configures the destination IP address and destination UDP port number for the exported packets carrying flow statistics.
The undo netstream export host command deletes the configured destination IP address and destination UDP port number for the exported packets carrying flow statistics.
By default, no destination IP address or destination UDP port number is configured for the exported packets carrying flow statistics.
Format
netstream export ip host { ip-address } port [ vpn-instance vpn-instance-name ] dscp dscp-value
undo netstream export ip host { ip-address } port [ vpn-instance vpn-instance-name ] dscp dscp-value
Parameters
Parameter | Description | Value |
---|---|---|
ip |
Specifies destination information for the exported packets carrying IPv4 flow statistics. |
- |
ip-address |
Specifies the destination IP address of the exported packets carrying flow statistics. |
The value is in dotted decimal notation. |
port |
Specifies the destination UDP port number of the exported packets carrying flow statistics. |
The value is an integer that ranges from 1 to 65535. |
vpn-instance vpn-instance-name |
Specifies the VPN instance of the exported packets carrying flow statistics. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. The VPN instance name cannot be <b>_public_</b>. When double quotation marks are used around the string, spaces are allowed in the string. |
dscp dscp-value |
Specifies the DSCP priority of the exported packets carrying flow statistics. |
The value is an integer that ranges from 0 to 63. |
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
Two groups of destination IP addresses and destination port numbers can be configured for IPv4 flow statistics collection to implement NSC backup. Before configuring the third group of destination IP addresses and destination port numbers, run the undo netstream export ip host command to delete the original group. Otherwise, the system will display a message indicating that the maximum numbers of IP addresses and port numbers have been reached and the configuration will fail.
netstream export index-switch
Function
The netstream export index-switch command sets the number of digits in the interface index contained in an exported packet carrying flow statistics.
The undo netstream export index-switch command restores the default setting.
By default, the number of digits in interface indexes is 32.
Format
netstream export ip index-switch { 16 | 32 }
undo netstream export ip index-switch [ 16 | 32 ]
Parameters
Parameter | Description | Value |
---|---|---|
ip |
Sets the number of digits in the interface index contained in an exported packet carrying IPv4 flow statistics. |
- |
index-switch |
Specifies the number of digits in the index of a specified interface. |
The value is 16 or 32. The default value is 32. |
16 |
Set the number of digits in an interface index to 16. |
- |
32 |
Set the number of digits in an interface index to 32. |
- |
Usage Guidelines
Usage Scenario
You can run this command to set the number of digits in an interface index to 16 or 32.
The number of digits in the interface index is set according to the type of the interface index that can be parsed by the NMS. For example, if the NMS can parse 32-bit interface indexes, set the format of the interface indexes contained in exported NetStream packets to 32-bit.Precautions
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.
This command takes effect for only V9 exported packets.netstream export ip template timeout-rate
Function
The netstream export ip template timeout-rate command sets the interval at which the template for exporting IPv4 original flow statistics and IPv4 flexible flow statistics in V9 format is refreshed.
The undo netstream export ip template timeout-rate command restores the default setting.
By default, the template is refreshed every 1 minute.
Format
netstream export ip template timeout-rate timeout-interval
undo netstream export ip template timeout-rate [ timeout-interval ]
Parameters
Parameter | Description | Value |
---|---|---|
timeout-interval |
Specifies the interval for refreshing the V9 template. |
The value is an integer that ranges from 1 to 3600, in minutes. The default value is 1. |
Usage Guidelines
When the export version for IPv4 original flow statistics and IPv4 flexible flow statistics is set to V9, the template must be exported to the NDA. This command sets the interval for refreshing the V9 template.
If network traffic is heavy, the template refresh interval should be set to a small value; however, this will generate more traffic on the network. You need to set a proper template refresh interval according to network situation. The default refresh interval is recommended if you do not have special requirement.netstream export ip version
Function
The netstream export ip version command configures the version number of the exported packets carrying IPv4 flow statistics.
The undo netstream export ip version command restores the default setting.
By default, the version number of the exported packets carrying IPv4 original flow statistics is 9 and no AS option is used.
Format
netstream export ip version 5
netstream export ip version 9
undo netstream export ip version [ 5 | 9 ]
Parameters
Parameter | Description | Value |
---|---|---|
9 |
Sets the version of exported packets carrying IPv4 flow statistics to V9. |
- |
5 |
Sets the version of exported packets carrying IPv4 flow statistics to V5. |
- |
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. You can set the export version according to the NMS configuration. V9 must be used for the following exported packets:- Exported packets carrying IPv4 flexible flow statistics.
- Exported packets carrying interface indexes extended from 16 bits to 32 bits.
Precautions
When the exported packets carry 32-bit interface indexes, the export version cannot be changed from V9 to V5.
netstream export source
Function
The netstream export source command configures the source IP address for the exported packets carrying flow statistics.
The undo netstream export source command deletes the configured source IP address for the exported packets carrying flow statistics.
By default, the source IP address of the exported packets carrying flow statistics is not configured.
Parameters
Parameter | Description | Value |
---|---|---|
ip |
Specifies source IP address for the exported packets carrying IPv4 flow statistics. |
- |
ip-address |
Specifies the source IPv4 address of the exported packets carrying flow statistics. |
The value is in dotted decimal notation. |
Usage Guidelines
Usage Scenario
If the NMS needs to identify the data source according to the source IP address in NetStream packets, specify the source IP address for NetStream packets.
Precautions
If the source IP address is not specified, packets are not exported. The source IP address of the exported packets carrying IPv4 flow statistics can be an IPv4 address. There must be a reachable route between the source IP address and destination IP address (NSC address). The same source IPv4 address can be configured for different types of exported packets carrying flow statistics.
netstream ip
Function
The netstream ip command enables IPv4 flow statistics collection on the inbound and outbound interfaces.
The undo netstream ip command restores the default setting.
By default, statistics collection for flows is disabled on the inbound and outbound interfaces
Parameters
Parameter | Description | Value |
---|---|---|
inbound |
Enables IPv4 flow statistics collection on the inbound interface. |
- |
outbound |
Enables IPv4 flow statistics collection on the outbound interface. |
- |
Views
10GE interface view,Eth-Trunk interface view,GE interface view,Tunnel interface view,VLANIF interface view,Sub-interface view,
Usage Guidelines
Usage Scenario
To export IPv4 flow statistics, you must run the netstream ip command to enable the IPv4 flow statistics collection function on the interface.
You can run the netstream ip and netstream ipv6 commands on an interface to collect statistics about IPv4 and IPv6 flows, respectively. There is no interference between the two commands.Prerequisites
Before running the netstream ip command on an interface, you need to run the netstream sampler command on the interface.
Precautions
- IPv4 sampling can be configured only in GRE and SD-WAN tunnel encapsulation modes in the tunnel interface view.
netstream record ip (interface view)
Function
The netstream record ip command applies the IPv4 flexible flow statistics template to an interface.
The undo netstream record ip command deletes a specified IPv4 flexible flow statistics template on an interface.
By default, no flexible flow statistics template is applied to an interface.
Parameters
Parameter | Description | Value |
---|---|---|
record-name |
Specifies the name of the flexible flow statistic template. |
The record-name must already exist. |
Views
10GE interface view,Eth-Trunk interface view,GE interface view,Tunnel interface view,VLANIF interface view,Sub-interface view,
Usage Guidelines
Usage Scenario
After a flexible flow statistics template is configured, run the 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
Before an IPv4 flexible flow statistics template is applied to an interface, the template must contain at least one aggregation keyword; otherwise, the template cannot be applied to an interface. The keyword is configured using the match ip command.
Precautions
- Each interface can be configured with only one IPv4 flexible flow statistics template. Before modifying the IPv4 flexible flow statistics template in the same interface view, run the undo netstream record ip command to delete the existing configuration.
- If the IPv4 flexible flow statistics template has been applied to an interface, the template configuration cannot be modified or deleted.
- An IPv4 flexible flow statistics template can be configured only in GRE and SD-WAN tunnel encapsulation modes in the tunnel interface view.
Example
<HUAWEI> system-view [HUAWEI] netstream record abc1 ip [HUAWEI-netstream-record-ipv4-abc1] match ip destination-address [HUAWEI-netstream-record-ipv4-abc1] collect counter bytes [HUAWEI-netstream-record-ipv4-abc1] quit [HUAWEI] interface 10GE 0/0/1 [HUAWEI-10GE0/0/1] netstream record abc1 ip
netstream record ip (system view)
Function
The netstream record ip command creates an IPv4 flexible flow statistics template or displays the view of an existing IPv4 flexible statistics template.
The undo netstream record ip command deletes a specified IPv4 flexible flow statistics template.
By default, no IPv4 flexible flow statistics template exists.
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-sensitive characters without spaces. When quotation marks are used around the string, spaces are allowed in the string. |
Usage Guidelines
Usage Scenario
You need to create the IPv4 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 new 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 netstream record ip command on the interface and then modify or delete the template.netstream sampler
Function
The netstream sampler command configures packet sampling on interfaces.
The undo netstream sampler command restores the default setting.
By default, packet sampling is not configured on interfaces.
Format
netstream sampler ip fix-packets packet-number { inbound | outbound }
undo netstream sampler ip [ fix-packets packet-number ] { inbound | outbound }
Parameters
Parameter | Description | Value |
---|---|---|
inbound |
Samples incoming traffic on an interface. |
- |
outbound |
Samples outgoing traffic on an interface. |
- |
ip |
IPv4 NetStream feature. |
- |
fix-packets packet-number |
Specifies the number of packets between two sampled packets in packet-based regular sampling mode. In this mode, one packet is regularly sampled out of packet-number packets. |
The value is an integer ranging from 1 to 32768. |
Views
10GE interface view,Eth-Trunk interface view,GE interface view,Tunnel interface view,VLANIF interface view,Sub-interface view,
Usage Guidelines
Usage Scenario
After the NetStream function is enabled on an interface, the system stores the NetStream information in the corresponded interface information table. If every packet passing an interface is captured and counted, forwarding performance on the interface will deteriorate, especially on the interface with a high forwarding rate. To understand interface traffic attributes without compromising forwarding performance, configure packet sampling on the interface. A low sampling rate can significantly reduce impact of NetStream on device performance.
Precautions
- After NetStream is configured in inbound or outbound direction and a sampling interval is configured, flow sampling will be performed based on the configuration.
- If you run the netstream sampler command multiple times in the same view, only the latest configuration takes effect.
- The sampling rate can be configured only in GRE and SD-WAN tunnel encapsulation modes in the tunnel interface view.
- It is recommended that the sampling rate for the AR8100 series be set to 1. If the sampling rate is set to another value, the statistics may be inaccurate.
Example
<HUAWEI> system-view [HUAWEI] interface 10GE 0/0/1 [HUAWEI-10GE0/0/1] netstream sampler ip fix-packets 1 inbound
<HUAWEI> system-view [HUAWEI] interface 10GE 0/0/1 [HUAWEI-10GE0/0/1] netstream sampler ip fix-packets 1 outbound
netstream timeout active
Function
The netstream timeout active command sets the active aging time of IPv4 flows.
The undo netstream timeout active command restores the default setting.
By default, the active aging time of IPv4 flows is 1800 seconds.
Format
netstream timeout ip active active-interval
undo netstream timeout ip active [ active-interval ]
Parameters
Parameter | Description | Value |
---|---|---|
ip |
IPv4 packets. |
- |
active-interval |
Specifies the active aging time. |
The value is an integer in the range from 60 to 3600. |
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 original or flexible 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.
netstream timeout inactive
Function
The netstream timeout inactive command sets the inactive aging time of a flow.
The undo netstream timeout inactive command restores the default setting.
By default, the inactive aging time of the original flows and flexible flows is 15 seconds.
Format
netstream timeout ip inactive inactive-interval
undo netstream timeout ip inactive [ inactive-interval ]
Parameters
Parameter | Description | Value |
---|---|---|
ip |
IPv4 packets. |
- |
inactive-interval |
Specifies the inactive aging time of original flows and flexible flows. |
The value is an integer in the range from 5 to 600. |
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.
netstream timeout tcp-session
Function
The netstream timeout tcp-session command configures the aging of NetStream flows according to the FIN flag or the RST flag in the TCP packet header.
The undo netstream timeout tcp-session command restores the default setting.
By default, NetStream flows are not aged according to the FIN or RST flag in the TCP packet header.
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 this 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.netstream tm-after enable
Function
The netstream tm-after enable command enables NetStream sampling after queue scheduling.
By default, NetStream sampling is performed before queue scheduling.
Usage Guidelines
Usage Scenario
By default, queue scheduling is performed after NetStream sampling. If the sampled packets include packets discarded by the local device, the bandwidth calculated based on the sampled data is greater than the bandwidth configured on the interface. To solve this problem, run the netstream tm-after enable command to enable NetStream sampling after queue scheduling.
Precautions
The netstream tm-after enable command takes effect only after the traffic tm-post-processing enable command is run on the corresponding interface.
reset netstream cache
reset netstream statistics
Parameters
Parameter | Description | Value |
---|---|---|
ip |
Deletes IPv4 flow statistics. |
- |
slot slot-id |
Specifies a slot ID. If no slot ID is specified, global statistics are cleared. |
The value must be set according to the device configuration. |
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 flow statistics.
Precautions
The reset netstream statistics ethernet command deletes all flow statistics. The statistics cannot be restored after being deleted. Before running this command, confirm the action.
You can run this command multiple times at any interval.- collect application
- collect counter
- collect interface
- collect sd-wan connection
- description
- display netstream
- display netstream cache ip origin
- display netstream cache ip record
- display netstream statistics
- match ip
- netstream export host
- netstream export index-switch
- netstream export ip template timeout-rate
- netstream export ip version
- netstream export source
- netstream ip
- netstream record ip (interface view)
- netstream record ip (system view)
- netstream sampler
- netstream timeout active
- netstream timeout inactive
- netstream timeout tcp-session
- netstream tm-after enable
- reset netstream cache
- reset netstream statistics