CX320 Switch Module V100R001 Configuration Guide 15
Configuring NetStream Top Talkers
NetStream Top Talkers filters traffic based on user-defined keywords, collects statistics on filtered traffic, sorts the traffic in a certain order, and displays only the top N traffic lines on screen. (N is the number of traffic lines recorded in the NetStream Top Talkers template). These N traffic lines are called Top Talkers.
Pre-configuration Tasks
Configuring link layer attributes of interfaces to ensure that the interfaces work properly
Configuration Process
Among all the NetStream Top Talkers configuration tasks, the task Configuring a NetStream Top Talkers Template should be performed before Applying a NetStream Top Talkers Template to Interfaces, and the task Applying a NetStream Top Talkers Template to Interfaces should be performed before Starting the NetStream Top Talkers Function. Other tasks can be performed in any sequence.
Configuring a NetStream Top Talkers Template
Context
When configuring the NetStream Top Talkers function, you need to configure a NetStream Top Talkers template first, and then apply the template to an interface. You can define the keywords used to filter traffic and traffic sorting order in the template.
Procedure
- Run the system-view command to enter the system view.
- Run the netstream top-talkers talker-name ip command to create a NetStream Top Talkers template and enter the template view.
By default, no NetStream Top Talkers template exists.
- (Optional) Run the match ip { source-address ip-address [ mask ] | destination-address ip-address [ mask ] | nexthop-address ip-address [ mask ] | source-port { min port-number | max port-number } | destination-port { min port-number | max port-number } | source-as as-number [ origin | peer ] | destination-as as-number [ origin | peer ] | tos tos-value | dscp dscp-value | precedence precedence-value | protocol { protocol-number | tcp | udp } | packet-range { min minimum-range | max maximum-range } | byte-range { min minimum-range | max maximum-range } } command to specify the keywords used to filter traffic.
By default, no keyword is specified in a NetStream Top Talkers template. If you run the command multiple times, multiple keywords are configured to filter traffic. The keywords tos, dscp, and precedence cannot be configured together in a NetStream Top Talkers template; otherwise, the filtering result may be unexpected. For example, if you specify tos, and then specify dscp, the device filers traffic based on the DSCP field of packets.
- Run the cache-timeout millisecond command to set the traffic statistics collection period in the NetStream Top Talkers template.
By default, the traffic statistics collection period in a NetStream Top Talkers template is not set. You are advised to set the period longer than 600000 ms (10 minutes). If the period is too short, the collected traffic statistics may be incomplete.
- Run the top number number command to set the number of Top Talkers that can be recorded in the NetStream Top Talkers template.
By default, the number of Top Talkers that can be recorded in a NetStream Top Talkers template is not set. A NetStream Top Talkers template can record a maximum of 200 Top Talkers.
- Run the sort-by { bytes | packets } command to specify the Top Talkers sorting order in the NetStream Top Talkers template.By default, the Top Talkers sorting order is not specified in a NetStream Top Talkers template. Top Talkers can be sorted in either of the following orders in a NetStream Top Talkers template:
- Descending order of bytes: The Top Talker with the most bytes is listed on the top line.
- Descending order of packets: The Top Talker with the most packets is listed on the top line.
- Run the commit command to commit the configuration.
Configuring NetStream Sampling
Context
You can set the intervals for sampling packets so that only statistics of sampled packets are collected. The statistics show the flow status on the entire network. The sampling function reduces the impact of NetStream on device performance.
Procedure
- Run the system-view command to enter the system view.
- NetStream sampling can be configured in two ways:
Configure NetStream sampling in the system view. The sampling configuration will take effect on all interfaces.
Run the netstream sampler random-packets packet-interval { inbound | outbound } command to configure packet sampling on all interfaces.
By default, packet sampling is not configured on any interface.
Configure NetStream sampling in the interface view. The sampling configuration will take effect on this interface.
When NetStream sampling uses snoop resources, inbound NetStream sampling cannot be configured in an interface view.
Run the interface interface-type interface-number command to enter the interface view.
Run the netstream sampler random-packets packet-interval { inbound | outbound } command to configure packet sampling on the interface.
By default, packet sampling is not configured on any interface.
If NetStream sampling is configured in both system view and interface view, the configuration in the interface view takes effect.
- Run the commit command to commit the configuration.
Applying a NetStream Top Talkers Template to Interfaces
Context
NetStream Top Talkers can collect incoming and outgoing traffic statistics on an interface separately. It can collect traffic statistics, sort traffic, and display statistics results only after the NetStream sampling function is enabled on an interface and a NetStream Top Talkers template is applied to the interface.
Procedure
- Run the system-view command to enter the system view.
- Run the interface interface-type interface-number command to enter the interface view.
- Run the netstream top-talkers talker-name ip { inbound | outbound } command to apply a NetStream Top Talkers template to the interface.
By default, a NetStream Top Talkers template is not applied to any interface. A maximum of two NetStream Top Talkers templates can be applied to one interface, which are used to collect and sort incoming and outgoing traffic separately.
- Run the commit command to commit the configuration.
Starting the NetStream Top Talkers Function
Context
- Scheduled start: The NetStream Top Talkers function is started at the specified time point.
- Immediate start.
Procedure
- Start the NetStream Top Talkers function on schedule.
- Start the NetStream Top Talkers function immediately.
Run the netstream top-talkers talker-name ip starting command to start the NetStream Top Talkers function.
By default, the NetStream Top Talkers function is not started.
The NetStream Top Talkers function can be immediately started only when the NetStream Top Talkers template is applied to an interface.
When the NetStream Top Talkers function has been started on an interface, the NetStream Top Talkers template applied to this interface can also be applied to another interface. In this situation, traffic statistics on the later interface can only be collected in remaining time.
If you modify the NetStream Top Talkers template while the NetStream Top Talkers function is running, the NetStream Top Talkers function becomes invalid, collected traffic statistics are deleted, and traffic is not sorted in order.
If you restart the NetStream Top Talkers function while the NetStream Top Talkers function is running, collected traffic statistics are deleted, traffic is not sorted in order, and the NetStream Top Talkers function restarts.
Checking the Configuration
Context
After all the configurations of NetStream Top Talkers are complete, you can check the configurations.
Procedure
- Run the display netstream { all | global | interface interface-type interface-number } command to check the NetStream configuration.
- Run the display netstream top-talkers talker-name ip [ interface interface-type interface-number ] slot slot-id command to check the traffic statistics and sorting results.