- Table of Contents
-
- 12-Network Management and Monitoring Command Reference
- 00-Preface
- 01-System maintenance and debugging commands
- 02-NQA commands
- 03-NTP commands
- 04-PoE commands
- 05-SNMP commands
- 06-RMON commands
- 07-NETCONF commands
- 08-EAA commands
- 09-Process monitoring and maintenance commands
- 10-Mirroring commands
- 11-NetStream commands
- 12-IPv6 NetStream commands
- 13-sFlow commands
- 14-Information center commands
- 15-GOLD commands
- 16-Packet capture commands
- Related Documents
-
Title | Size | Download |
---|---|---|
11-NetStream commands | 92.92 KB |
NetStream configuration commands
ip netstream { inbound | outbound } filter
ip netstream aggregation advanced
ip netstream export v9-template refresh-rate packet
ip netstream export v9-template refresh-rate time
NetStream configuration commands
display ip netstream cache
Use display ip netstream cache to display NetStream entry information.
Syntax
In standalone mode:
display ip netstream cache [ slot slot-number ] [ verbose ]
In IRF mode:
display ip netstream cache [ chassis chassis-number slot slot-number ] [ verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
mdc-admin
mdc-operator
Parameters
slot slot-number: Specifies a card by its slot number. If you do not specify a card, the command displays information about NetStream entries for all cards. (In standalone mode.)
chassis chassis-number slot slot-number: Specifies a card on an IRF member device. The chassis-number argument represents the member ID of the IRF member device. The slot-number argument represents the slot number of the card. If you do not specify a card, the command displays information about NetStream entries for all cards. (In IRF mode.)
verbose: Displays detailed information about the NetStream entries.
Examples
# (In standalone mode.) Display detailed information about NetStream entries for the card in slot 1.
<Sysname> display ip netstream cache slot 1 verbose
IP NetStream information:
Active flow timeout : 5 min
Inactive flow timeout : 300 sec
Max number of entries : 8192
IP active flow entries : 1
MPLS active flow entries : 0
L2 active flow entries : 1
IPL2 active flow entries : 1
IP flow entries counted : 10
MPLS flow entries counted : 0
L2 flow entries counted : 10
IPL2 flow entries counted : 20
Last statistics resetting time : 01/01/2012 at 00:01:02
IP packet size distribution (1103746 packets in total):
1-32 64 96 128 160 192 224 256 288 320 352 384 416 448 480
.249 .694 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000
512 544 576 1024 1536 2048 2560 3072 3584 4096 4608 >4608
.000 .000 .027 .000 .027 .000 .000 .000 .000 .000 .000 .000
Protocol Total Packets Flows Packets Active(sec) Idle(sec)
Flows /sec /sec /flow /flow /flow
--------------------------------------------------------------------------
TCP-Telnet 2656855 372 4 86 49 27
TCP-FTP 5900082 86 9 9 11 33
TCP-FTPD 3200453 1006 5 193 45 33
TCP-WWW 546778274 11170 887 12 8 32
TCP-other 49148540 3752 79 47 30 32
UDP-DNS 117240379 570 190 3 7 34
UDP-other 45502422 2272 73 30 8 37
ICMP 14837957 125 24 5 12 34
IP-other 77406 5 0 47 52 27
Type DstIP(Port) SrcIP(Port) Pro ToS If(Direct) Pkts
DstMAC(VLAN) SrcMAC(VLAN)
TopLblType(IP/MASK) Lbl-Exp-S-List
--------------------------------------------------------------------------
IP 11.1.1.1(1024) 11.1.1.2(21) 6 128 GE1/0/1(I) 42996
TCPFlag: 27
DstMask: 24 SrcMask: 24 NextHop: 0.0.0.0
DstAS: 0 SrcAS: 0 BGPNexthop: 0.0.0.0
InVRF: 10
SamplerMode: 2 SamplerInt: 256
Active: 120.600 Bytes/Pkt: 152
L2 0012-3f86-e94c(10) 0012-3f86-e86a(0) GE1/0/1(I) 1253
SamplerMode: 1 SamplerInt: 64
Active: 5.510 Bytes/Pkt: 210
IP& 192.168.123.1(2048) 192.168.1.1(0) 1 0 GE1/0/2(O) 10
L2 0012-3f86-e95d(0) 0012-3f86-e116(1008)
DstMask: 24 SrcMask: 24 NextHop: 192.168.1.2
DstAS: 0 SrcAS: 0 BGPNexthop: 0.0.0.0
OutVRF: 0 TCPFlag: 0
SamplerMode: 0 SamplerInt: 0
Active: 12.030 Bytes/Pkt: 86
Table 1 Command output
Field |
Description |
Aging timer for active flows, in minutes. |
|
Aging timer for inactive flows, in seconds. |
|
Max number of entries |
Maximum number of flows allowed in the cache. |
IP active flow entries |
Number of active IP flows in the cache. |
MPLS active flow entries |
This field is not supported in current release. |
L2 active flow entries |
Number of active Layer 2 flows in the cache. |
IPL2 active flow entries |
Number of active Layer 2 and Layer 3 flows in the cache. |
IP flow entries counted |
Number of IP flows that have been counted. |
MPLS flow entries counted |
This field is not supported in current release. |
L2 flow entries counted |
Number of Layer 2 flows that have been counted. |
IPL2 flow entries counted |
Number of Layer 2 and Layer 3 flows that have been counted. |
Last time the reset ip netstream statistics command was executed. This field displays Never if you have never executed this command. |
|
IP packet size distribution (1103746 packets in total) |
Distribution of IP packets by packet size, and the bracketed number is the total number of IP packets. The value is displayed in the proportion of the number of IP packets of the specified sizes to the total number of IP packets, and the value is displayed with 3 decimal places. |
1-32 64 96 128 160 192 224 256 288 320 352 384 416 448 480 512 544 576 1024 1536 2048 2560 3072 3584 4096 4608 |
Range of IP packet length (excluding data link layer header) in bytes. · For the values in the range of 1 to 576, the range increases in the step of 32. For example, 1-32 shows the number of packets with the size of 1 to 32 bytes. 64 shows the number of packets with the size of 33 to 64 bytes. · For the values greater than 1024, the range increases in the step of 512. For example, 1536 shows the number of packets with the size of 1025 to 1536 bytes. · Packets with the size of 577 to 1024 bytes are recorded in the 1024 entry. |
Protocol Total Flows Packets /sec Flows/sec Packets/flow Active(sec)/flow Idle(sec)/flow |
Statistics of packets by protocol type: · Protocol type. · Total number of flows. · Number of packets per second. · Number of flows per second. · Number of packets per flow. · Active time (in seconds) of each flow. · Inactive time (in seconds) of each flow. |
Type DstIP(Port) SrcIP(Port) Pro ToS If(Direct) Pkts |
Statistics of the active flows in the current cache: · Flow type. Flows are classified into the following types: ¡ IP flows. ¡ L2 flows. ¡ IP&L2 flows. · Destination IP address (destination port). · Source IP address (source port). · Protocol number. · ToS. · Interface type and name (direction). · Number of packets. ICMP packets do not contain port number fields, so the type and code fields are captured. The value for the destination port represents these two fields: · The highest 8 bits represent the type field. · The lowest 8 bits represent the code field. The value for the source port is set to 0 and does not indicate any statistics. |
DstMAC(VLAN) SrcMAC(VLAN) |
Layer 2 information of the active flows in the current cache: · Destination MAC address. · Destination VLAN ID. · Source MAC address. · Source VLAN ID. |
TopLblType(IP/Mask) Lbl-Exp-S-List |
These fields are not supported in current release. |
TCPFlag: DstMask: SrcMask: NextHop: DstAS: SrcAS: BGPNextHop: OutVRF: InVRF: SamplerMode: SamplerInt: Active: Bytes/Pkt: |
Other information about the active flows in the cache: · TCP tag. · Destination mask. · Source mask. · Routing next hop. · Destination AS. · Source AS. · BGP next hop. · VPN to which the outbound packets belong. · VPN to which the inbound packets belong. · Sampling mode. This field is not supported in current release. · Sampling interval. This field is not supported in current release. · Flow's active time. · Number of bytes per packet. |
display ip netstream export
Use display ip netstream export to display information about the NetStream data export.
Syntax
display ip netstream export
Views
Any view
Predefined user roles
network-admin
network-operator
mdc-admin
mdc-operator
Usage guidelines
IP NetStream export information varies by aggregation mode. This command displays IP NetStream export information for all the configured aggregation modes.
Examples
# Display information about the NetStream data export.
<Sysname> display ip netstream export
IP export information:
Flow source interface : Not specified
Flow destination VPN instance : Not specified
Flow destination IP address (UDP) : 192.168.0.5 (5000)
Version 5 exported flows number : 27
Version 5 exported UDP datagrams number (failed): 21 (0)
Version 9 exported flows number : 0
Version 9 exported UDP datagram number (failed) : 0 (0)
L2 export information:
Flow source interface : Not specified
Flow destination VPN instance : Not specified
Flow destination IP address (UDP) : 192.168.0.5 (5000)
Version 9 exported flows number : 0
Version 9 exported UDP datagrams number (failed): 0 (0)
protocol-port aggregation export information:
Flow source interface : Not specified
Flow destination VPN instance : Not specified
Flow destination IP address (UDP) : 192.168.0.5 (5000)
Version 8 exported flows number : 24
Version 8 exported UDP datagrams number (failed): 21 (0)
Version 9 exported flows number : 0
Version 9 exported UDP datagrams number (failed): 0 (0)
Table 2 Command output
Field |
Description |
IP export information |
NetStream data export information. |
Flow source interface |
Source interface from which the NetStream data are exported. |
Flow destination VPN instance |
VPN to which the destination address of the NetStream data export belongs. |
Flow destination IP address (UDP) |
Destination IP address and UDP port number of the NetStream data export. |
Version 5 exported flows number |
Number of flows that are exported in version 5 format. |
Version 5 exported UDP datagram number (failed) |
Number of UDP packets that are sent in version 5 format. The field in the parentheses indicates the number of UDP packets that failed to be sent. |
Version 9 exported flows number |
Number of flows that are exported in version 9 format. |
Version 9 exported UDP datagram number (failed) |
Number of UDP packets that are sent in version 9 format. The field in the parentheses indicates the number of UDP packets that failed to be sent. |
L2 export information |
Statistics of the Layer 2 data export. |
protocol-port aggregation export information |
Statistics of NetStream protocol-port aggregation in version 8 format. |
Version 8 exported flows number |
Number of flows that are exported in version 8 format. |
Version 8 exported UDP datagram number (failed) |
Number of UDP packets that are sent in version 8 format. The field in the parentheses indicates the number of UDP packets that failed to be sent. |
display ip netstream template
Use display ip netstream template to display NetStream template information.
Syntax
In standalone mode:
display ip netstream template [ slot slot-number ]
In IRF mode:
display ip netstream template [ chassis chassis-number slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
mdc-admin
mdc-operator
Parameters
slot slot-number: Specifies a card by its slot number. If you do not specify a card, the command displays NetStream template information for the active MPU. (In standalone mode.)
chassis chassis-number slot slot-number: Specifies a card on an IRF member device. The chassis-number argument represents the member ID of the IRF member device. The slot-number argument represents the slot number of the card. If you do not specify a card, the command displays NetStream template information for the global active MPU. (In IRF mode.)
Usage guidelines
IP NetStream templates vary by aggregation mode. This command displays IP NetStream template information for all the configured aggregation modes.
Examples
# Display NetStream template information.
<Sysname> display ip netstream template
Flow template refresh frequency : 20
Flow template refresh interval : 30 min
Active flow templates : 8
Created flow templates : 8
Protocol port outbound template:
Template ID : 3272
Field count : 16
Field type Field length (bytes)
---------------------------------------------------------------------------
Flows 4
Out packets 8
Out bytes 8
First forwarded 4
Last forwarded 4
Protocol 1
Direction 1
PAD 1
PAD 1
L4 source port 2
L4 destination port 2
Sampling algorithm 1
PAD 1
Sampling interval 4
Protocol-port inbound template:
Template ID : 3271
Field count : 16
Field type Field length (bytes)
---------------------------------------------------------------------------
Flows 4
In packets 8
In bytes 8
First forwarded 4
Last forwarded 4
Protocol 1
Direction 1
PAD 1
L4 source port 2
L4 destination port 2
Sampling algorithm 1
PAD 1
Sampling interval 4
Table 3 Command output
Field |
Description |
Refresh frequency at which the templates are sent, in packets. |
|
Refresh interval at which the templates are sent, in minutes. |
|
Active flow templates |
Number of active NetStream templates. |
Created flow templates |
Number of templates that have been created. |
Information of the AS template in the outbound direction. |
|
Information of the AS template in the inbound direction. |
|
Field count |
Total number of fields in a template. |
Field type |
Type of a field in the template. |
Field length (bytes) |
Length of the field, in bytes. |
Flows |
Number of aggregate flows. |
Out packets |
Number of sent packets. |
In packets |
Number of received packets. |
Out bytes |
Size of sent packets, in bytes. |
In bytes |
Size of received packets, in bytes. |
First forwarded |
System time when the first packet was forwarded, accurate to milliseconds. |
Last forwarded |
System time when the last packet was forwarded, accurate to milliseconds. |
L4 source port |
TCP/UDP source port number. |
L4 destination port |
TCP/UDP destination port number. |
Sampling algorithm |
This field is not supported in current release. |
PAD |
Padding string. |
Sampling interval |
This field is not supported in current release. |
enable
Use enable to enable a NetStream aggregation mode.
Use undo enable to disable a NetStream aggregation mode.
Syntax
enable
undo enable
Default
No NetStream aggregation mode is enabled.
Views
NetStream aggregation mode view
Predefined user roles
network-admin
mdc-admin
Examples
# Enable NetStream destination-prefix aggregation mode.
<Sysname> system-view
[Sysname] ip netstream aggregation destination-prefix
[Sysname-ns-aggregation-dstpre] enable
ip netstream aggregation
ip netstream
Use ip netstream to enable NetStream on an interface.
Use undo ip netstream to disable NetStream on an interface.
Syntax
ip netstream { inbound | outbound }
undo ip netstream { inbound | outbound }
Default
NetStream is disabled on an interface.
Views
Layer 2 Ethernet interface view, Layer 3 Ethernet interface view
Predefined user roles
network-admin
mdc-admin
Parameters
inbound: Enables NetStream for incoming traffic.
outbound: Enables NetStream for outgoing traffic.
Examples
# Enable NetStream for incoming traffic on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] ip netstream inbound
ip netstream { inbound | outbound } filter
Use ip netstream filter to enable NetStream filtering on an interface.
Use undo ip netstream filter to disable the function.
Syntax
ip netstream { inbound | outbound } filter acl acl-number
undo ip netstream { inbound | outbound } filter
Default
NetStream filtering is disabled. NetStream collects statistics about all IPv4 packets passing through an interface.
Views
Layer 2 Ethernet interface view, Layer 3 Ethernet interface view
Predefined user roles
network-admin
mdc-admin
Parameters
inbound: Filters incoming traffic.
outbound: Filters outgoing traffic.
acl acl-number: Specifies an ACL by its number. For a basic ACL, the value range is 2000 to 2999. For an advanced ACL, the value range is 3000 to 3999.
Usage guidelines
NetStream filtering uses an ACL to identify intended packets.
· If you want to collect data for specific flows, use the ACL permit statements to identify the flows. NetStream collects data only for these flows.
· If you do not want to collect data for specific flows, use the ACL deny statements to identify the flows. NetStream does not collect data for these flows.
Examples
# Use ACL 2003 for outbound NetStream filtering on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] ip netstream outbound
[Sysname-GigabitEthernet1/0/1] ip netstream outbound filter acl 2003
ip netstream aggregation
Use ip netstream aggregation to set a NetStream aggregation mode and to enter NetStream aggregation mode view.
Use undo ip netstream aggregation to cancel a NetStream aggregation mode and remove the configuration for the NetStream aggregation mode.
Syntax
ip netstream aggregation { destination-prefix | prefix | prefix-port | protocol-port | source-prefix | tos-destination-prefix | tos-prefix | tos-protocol-port | tos-source-prefix }
undo ip netstream aggregation { destination-prefix | prefix | prefix-port | protocol-port | source-prefix | tos-destination-prefix | tos-prefix | tos-protocol-port | tos-source-prefix }
Views
System view
Predefined user roles
network-admin
mdc-admin
Parameters
destination-prefix: Specifies the destination-prefix aggregation by destination AS number, destination address mask length, destination prefix, and outbound interface index.
prefix: Specifies the source and destination prefix aggregation by the following criteria:
· Source AS number.
· Destination AS number.
· Source address mask length.
· Destination address mask length.
· Source prefix.
· Destination prefix.
· Inbound interface index.
· Outbound interface index.
prefix-port: Specifies the prefix-port aggregation by the following criteria:
· Source prefix.
· Destination prefix.
· Source address mask length.
· Destination address mask length.
· ToS.
· Protocol number.
· Source port.
· Destination port.
· Inbound interface index.
· Outbound interface index.
protocol-port: Specifies the protocol-port aggregation by protocol number, source port, and destination port.
source-prefix: Specifies the source-prefix aggregation by source AS number, source address mask length, source prefix, and inbound interface index.
tos-destination-prefix: Specifies the ToS-destination-prefix aggregation by ToS, destination AS number, destination address mask length, destination prefix, and outbound interface index.
tos-prefix: Specifies the ToS-prefix aggregation by the following criteria:
· ToS.
· Source AS number.
· Source prefix.
· Source address mask length.
· Destination AS number.
· Destination address mask length.
· Destination prefix.
· Inbound interface index.
· Outbound interface index.
tos-protocol-port: Specifies the ToS-protocol-port aggregation by ToS, protocol number, source port, destination port, inbound interface index, and outbound interface index.
tos-source-prefix: Specifies the ToS-source-prefix aggregation by ToS, source AS number, source prefix, source address mask length, and inbound interface index.
Usage guidelines
In NetStream aggregation mode view, you can perform the following tasks:
· Enable or disable the specified NetStream aggregation mode.
· Configure source interface, destination IP address, and destination port for the NetStream data export.
A flow matching multiple aggregation modes is counted as multiple aggregate flows.
Examples
# Set the NetStream aggregation mode to destination-prefix, and enter the NetStream destination-prefix aggregation mode view.
<Sysname> system-view
[Sysname] ip netstream aggregation destination-prefix
[Sysname-ns-aggregation-dstpre]
Related commands
enable
ip netstream aggregation advanced
Use ip netstream aggregation advanced to enable NetStream hardware aggregation.
Use undo ip netstream aggregation advanced to restore the default.
Syntax
ip netstream aggregation advanced
undo ip netstream aggregation advanced
Default
NetStream hardware aggregation is disabled.
Views
System view
Predefined user roles
network-admin
mdc-admin
Usage guidelines
The hardware aggregation does not take effect in the following situations:
· The destination host is configured for the NetStream traditional data export in system view.
· The aggregation mode set by the ip netstream aggregation command is not supported by NetStream hardware aggregation.
The NetStream hardware aggregation entries are stored in the same cache as NetStream traditional data entries and are exportable.
Examples
# Enable NetStream hardware aggregation.
<Sysname> system-view
[Sysname] ip netstream aggregation advanced
· ip netstream aggregation
· ip netstream export host
ip netstream export host
Use ip netstream export host to specify a destination host for NetStream data export.
Use undo ip netstream export host to remove the specified destination host or all destination hosts that are configured in the current view.
Syntax
ip netstream export host ip-address udp-port [ vpn-instance vpn-instance-name ]
undo ip netstream export host [ ip-address [ vpn-instance vpn-instance-name ] ]
Default
No destination host is specified.
Views
System view, NetStream aggregation mode view
Predefined user roles
network-admin
mdc-admin
Parameters
ip-address: Specifies the destination IP address.
udp-port: Specifies the destination UDP port number, in the range of 0 to 65535.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance to which the destination host belongs. The vpn-instance-name argument is a case-sensitive string of 1 to 31 characters. If the destination is on the public network, do not specify this option.
Usage guidelines
You can specify the same destination host in different NetStream aggregation mode views.
If no destination host is specified in a NetStream aggregation mode view, the destination host in system view applies. If destination hosts are specified in a NetStream aggregation view and system view, the destination hosts in aggregation view take effect.
You can specify a maximum of four destination hosts in system view or a NetStream aggregation mode view. If you specify a destination host with the same IP addresses but different UDP ports, the most recent configuration takes effect. You can specify destination hosts with the same IP address and UDP port but different VPN instances.
NetStream traditional data are exported to all destination hosts in system view. NetStream aggregation data are exported to all destination hosts in the related NetStream aggregation mode view.
If you expect only the aggregation data, you can specify destination hosts only in the NetStream aggregation mode view. This setting reduces bandwidth usage.
Examples
# In system view, specify 172.16.105.48 as the IP address of the destination host and UDP port 5000 as the export destination port number.
<Sysname> system-view
[Sysname] ip netstream export host 172.16.105.48 5000
<Sysname> system-view
[Sysname] ip netstream aggregation destination-prefix
[Sysname-ns-aggregation-dstpre] ip netstream export host 172.16.105.50 6000
Related commands
· ip netstream aggregation
· ip netstream export source
ip netstream export rate
Use ip netstream export rate to limit the NetStream data export rate.
Use undo ip netstream export rate to restore the default.
Syntax
ip netstream export rate rate
undo ip netstream export rate
Default
The export rate of NetStream data is not limited.
Views
System view
Predefined user roles
network-admin
mdc-admin
Parameters
rate: Specifies the maximum rate of packets to be exported per second. The value range is 1 to 1000.
Examples
# Allow a maximum of 10 packets to be exported per second.
<Sysname> system-view
[Sysname] ip netstream export rate 10
ip netstream export source
Use ip netstream export source to specify the source interface for data packets sent to NetStream servers. The IP address of the interface is used as the source IP of the data packets.
Use undo ip netstream export source to remove the configuration.
Syntax
ip netstream export source interface interface-type interface-number
undo ip netstream export source
Default
No source interface is specified for NetStream data packets. The packets take the primary IP address of the output interface as the source IP address.
Views
System view, NetStream aggregation mode view
Predefined user roles
network-admin
mdc-admin
Parameters
interface-type interface-number: Specifies a source interface by its type and number.
Usage guidelines
You can configure different source interfaces in different NetStream aggregation mode views.
If no source interface is configured in NetStream aggregation mode view, the source interface in system view applies.
Examples
# In system view, specify GigabitEthernet 1/0/1 as the source interface for NetStream traditional data packets.
<Sysname> system-view
[Sysname] ip netstream export source interface gigabitethernet 1/0/1
# In destination-prefix aggregation mode view, specify GigabitEthernet 1/0/2 as the source interface for NetStream aggregation data packets.
[Sysname] ip netstream aggregation destination-prefix
[Sysname-ns-aggregation-dstpre] ip netstream export source interface gigabitethernet 1/0/2
Related commands
ip netstream aggregation
ip netstream export v9-template refresh-rate packet
Use ip netstream export v9-template refresh-rate packet to configure the refresh frequency (in packets) for NetStream version 9 templates. The templates are sent after the specified number of packets are sent.
Use undo ip netstream export v9-template refresh-rate packet to restore the default.
Syntax
ip netstream export v9-template refresh-rate packet packets
undo ip netstream export v9-template refresh-rate packet
Default
Version 9 templates are sent every 20 packets.
Views
System view
Predefined user roles
network-admin
mdc-admin
Parameters
packets: Specifies the number of packets that are sent before version 9 templates are sent to NetStream servers for an update. The value range is 1 to 600.
Usage guidelines
A NetStream server uses version 9 templates to parse the data from the NetStream device, but the server does not permanently save version 9 templates.
For a NetStream server to use correct version 9 templates, configure the refresh frequency or refresh interval for version 9 templates. If both settings are configured, templates are sent when either of the conditions is reached.
To configure the refresh interval for version 9 templates, use the ip netstream export v9-template refresh-rate time command.
Examples
# Configure the device to send version 9 templates to NetStream servers every 100 packets.
<Sysname> system-view
[Sysname] ip netstream export v9-template refresh-rate packet 100
Related commands
ip netstream export v9-template refresh-rate time
ip netstream export v9-template refresh-rate time
Use ip netstream export v9-template refresh-rate time to configure the refresh interval for version 9 templates.
Use undo ip netstream export version to restore the default.
Syntax
ip netstream export v9-template refresh-rate time minutes
undo ip netstream export v9-template refresh-rate time
Default
Version 9 templates are sent every 30 minutes.
Views
System view
Predefined user roles
network-admin
mdc-admin
Parameters
minutes: Specifies the refresh interval in the range of 1 to 3600 minutes.
Usage guidelines
A NetStream server uses version 9 templates to parse the data from the NetStream device, but the server does not permanently save version 9 templates.
For a NetStream server to use correct version 9 templates, configure the refresh frequency or refresh interval for version 9 templates. If both settings are configured, templates are sent when either of the conditions is reached.
To configure the refresh frequency for version 9 templates, use the ip netstream export v9-template refresh-rate packet command.
Examples
# Configure the device to send version 9 templates every 60 minutes.
<Sysname> system-view
[Sysname] ip netstream export v9-template refresh-rate time 60
Related commands
ip netstream export v9-template refresh-rate packet
ip netstream export version
Use ip netstream export version 5 to export NetStream data in the version 5 format and choose whether or not to record AS information.
Use ip netstream export version 9 to export NetStream data in the version 9 format and choose whether to record AS and BGP next hop information.
Use undo ip netstream export version to restore the default.
Syntax
ip netstream export version 5 [ origin-as | peer-as ]
ip netstream export version 9 [ origin-as | peer-as ] [ bgp-nexthop ]
undo ip netstream export version
Default
NetStream traditional data export uses the version 9 format. The peer AS numbers are exported. The BGP next hop is not exported.
Views
System view
Predefined user roles
network-admin
mdc-admin
Parameters
origin-as: Exports statistics of the source AS originating the route for the source address and the destination AS for the destination address.
peer-as: Exports statistics of the peer ASs for the source and destination address.
bgp-nexthop: Exports statistics of BGP next hops.
Usage guidelines
A NetStream entry for a flow records the source IP address and destination IP address, and two AS numbers for each IP address. You can choose to configure which AS numbers are to be exported as the source AS and destination AS.
If the version 5 format is configured to export NetStream data, the NetStream aggregation data export uses the version 8 format.
If the version 9 format is configured to export NetStream data, the NetStream aggregation data export uses the version 9 format.
Statistics of BGP next hop can be exported only in the version 9 format.
If you execute the command multiple times, the most recent configuration takes effect.
Examples
# Configure the device to export NetStream data in the version 5 format and to specify the NetStream data to include the source AS and destination AS.
<Sysname> system-view
[Sysname] ip netstream export version 5 origin-as
ip netstream timeout active
Use ip netstream timeout active to set the aging timer for active flows.
Use undo ip netstream timeout active to restore the default.
Syntax
ip netstream timeout active minutes
undo ip netstream timeout active
Default
The aging timer is five minutes for active flows.
Views
System view
Predefined user roles
network-admin
mdc-admin
Parameters
minutes: Sets the aging timer for active flows, in the range of 1 to 5 minutes.
Usage guidelines
A flow is considered active if packets for the NetStream entry arrive within the range of time set by the aging timer for active flows.
Examples
# Set the aging timer to 5 minutes for active flows.
<Sysname> system-view
[Sysname] ip netstream timeout active 5
ip netstream timeout inactive
ip netstream timeout inactive
Use ip netstream timeout inactive to set the aging timer for inactive flows.
Use undo ip netstream timeout inactive to restore the default.
Syntax
ip netstream timeout inactive seconds
undo ip netstream timeout inactive
Default
The aging timer is 300 seconds for inactive flows.
Views
System view
Predefined user roles
network-admin
mdc-admin
Parameters
seconds: Sets the aging timer for inactive flows, in the range of 10 to 320 seconds.
Usage guidelines
A flow is considered inactive if no packet for the NetStream entry arrives within the range of time set by the aging timer for inactive flows.
Examples
# Set the aging timer to 60 seconds for inactive flows.
<Sysname> system-view
[Sysname] ip netstream timeout inactive 60
ip netstream timeout active
reset ip netstream statistics
Use reset ip netstream statistics to age out all flows in the cache and export NetStream data.
Syntax
reset ip netstream statistics
Views
User view
Predefined user roles
network-admin
mdc-admin
Usage guidelines
It takes several minutes for the system to execute the command. During this period, the system does not collect NetStream data.
Examples
# Age out and export all NetStream data.
<Sysname> reset ip netstream statistics
This process may take a few minutes.
Netstream statistic function is disabled during this process.