- Table of Contents
-
- 12-Network Management and Monitoring Configuration Guide
- 00-Preface
- 01-System Maintenance and Debugging Configuration
- 02-NQA Configuration
- 03-NTP Configuration
- 04-Clock Monitoring Configuration
- 05-IPC Configuration
- 06-SNMP Configuration
- 07-RMON Configuration
- 08-Sampler Configuration
- 09-Mirroring Configuration
- 10-NetStream Configuration
- 11-IPv6 NetStream Configuration
- 12-Protocol Packet Statistics Configuration
- 13-Information Center Configuration
- 14-Flow Logging Configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
08-Sampler Configuration | 87.43 KB |
Contents
Displaying and maintaining sampler
Sampler configuration examples
Using the sampler for NetStream
|
NOTE: In this documentation, SPC cards refer to the cards prefixed with SPC, for example, SPC-GT48L. SPE cards refer to the cards prefixed with SPE, for example, SPE-1020-E-II. |
Sampler overview
A sampler provides the packet sampling function. A sampler selects a packet out of sequential packets, and sends it to the service module for processing.
The following sampling modes are available:
· Fixed mode—The first packet is selected out of a number of sequential packets in each sampling.
· Random mode—Any packet might be selected out of a number of sequential packets in each sampling.
A sampler can be used to sample packets for NetStream, local mirroring, or traffic mirroring. Only the sampled packets are sent and processed by the traffic monitoring module. Sampling is useful if you have too much traffic and want to limit the traffic of interest to be analyzed. The sampled data is statistically accurate and decreases the impact on forwarding capacity of the device.
|
NOTE: · SPC cards support only the fixed mode. · For more information about NetStream, see the chapter “Configuring NetStream.” · For more information about local mirroring and traffic mirroring, see the chapters “Configuring port mirroring” and “Configuring traffic mirroring”. |
Creating a sampler
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
1. Create a sampler. |
sampler sampler-name mode { fixed | random } packet-interval rate |
The rate argument specifies the sampling rate, which equals the 2 to the power of rate. For example, if the rate is 8, one packet out of 256 packets (2 to the power of 8) is sampled in each sampling; if the rate is 10, one packet out of 1024 packets (2 to the power of 10) is sampled. SPC cards support only the fixed mode. |
Displaying and maintaining sampler
Task |
Command |
Remarks |
Display configuration and running information about the sampler. |
display sampler [ sampler-name ] [ slot slot-number ] [ | { begin | exclude | include } regular-expression ] |
Available in any view |
Clear running information about the sampler. |
reset sampler statistics [ sampler-name ] |
Available in user view |
Sampler configuration examples
Using the sampler for NetStream
|
NOTE: This feature is supported by SPC cards only. |
Network requirements
As shown in Figure 1, configure IPv4 NetStream on Router A to collect statistics on incoming traffic on GigabitEthernet 3/1/0. The NetStream data is sent to port 5000 on the NSC at 12.110.2.2/16.
Configure fixed sampling in the inbound direction to select the first packet out of 256 packets.
Configuration procedure
# Create sampler 256 in fixed sampling mode and set the sampling rate to 8. The first packet of 256 (2 to the power of 8) packets is selected.
<RouterA> system-view
[RouterA] sampler 256 mode fixed packet-interval 8
# Configure GigabitEthernet 3/0/1, enable IPv4 NetStream to collect statistics on the incoming traffic, and configure the interface to use sampler 256.
[RouterA] interface GigabitEthernet3/0/1
[RouterA-GigabitEthernet3/0/1] ip address 11.110.2.1 255.255.0.0
[RouterA-GigabitEthernet3/0/1] ip netstream mirror-to interface Net-Stream2/0/1 inbound
[RouterA-GigabitEthernet3/0/1] ip netstream sampler 256 inbound
[RouterA-GigabitEthernet3/0/1] quit
# Configure the address and port number of NSC as the destination host for NetStream data export, leaving the default for source interface.
[RouterA] ip netstream export host 12.110.2.2 5000
Verifying the configuration
# Execute the display sampler command on Router A to view the configuration and running information about sampler 256. The output shows that Router A received and processed 256 packets, which reached the number of packets for one sampling, and Router A selected the first packet out of the 256 packets received on GigabitEthernet 3/0/1.
<RouterA> display sampler 256
Sampler name: 256
Index: 1, Mode: Fixed, Packet-interval: 8