- Table of Contents
-
- 15-Network Management and Monitoring Configuration Guide
- 00-Preface
- 01-System maintenance and debugging configuration
- 02-NQA configuration
- 03-iNQA configuration
- 04-iFIT configuration
- 05-SRPM configuration
- 06-NTP configuration
- 07-PTP configuration
- 08-Network synchronization configuration
- 09-SNMP configuration
- 10-RMON configuration
- 11-NETCONF configuration
- 12-CWMP configuration
- 13-EAA configuration
- 14-Process monitoring and maintenance configuration
- 15-Sampler configuration
- 16-Mirroring configuration
- 17-NetStream configuration
- 18-IPv6 NetStream configuration
- 19-TCP connection trace configuration
- 20-Performance management configuration
- 21-Fast log output configuration
- 22-Flow log configuration
- 23-Information center configuration
- 24-Packet capture configuration
- 25-Flow monitor configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
15-Sampler configuration | 62.88 KB |
Contents
Display and maintenance commands for a sampler
Samplers and IPv4 NetStream configuration examples
Example: Configuring samplers and IPv4 NetStream
Configuring samplers
About sampler
A sampler selects a packet from sequential packets and sends the packet to other service modules for processing. Sampling is useful when you want to limit the volume of traffic to be analyzed. The sampled data is statistically accurate and sampling decreases the impact on the forwarding capacity of the device.
The following sampling modes are available:
· Fixed mode—The first packet is selected from sequential packets in each sampling.
· Random mode—Any packet might be selected from sequential packets in each sampling.
A sampler can sample packets for NetStream. Then, only the sampled packets are sent to and processed by the NetStream module. For more information about NetStream, see "Configuring NetStream."
Creating a sampler
1. Enter system view.
system-view
2. Create a sampler.
sampler sampler-name mode { fixed | random } packet-interval [ n-power ] rate
By default, no samplers exist.
Support for the n-power keyword varies by device model.
Display and maintenance commands for a sampler
Execute display commands in any view.
Task |
Command |
Display configuration information about the sampler. |
In standalone mode: display sampler [ sampler-name ] [ slot slot-number [ cpu cpu-number ] ] In IRF mode: display sampler [ sampler-name ] [ chassis chassis-number slot slot-number [ cpu cpu-number ] ]
|
Samplers and IPv4 NetStream configuration examples
Example: Configuring samplers and IPv4 NetStream
Network configuration
As shown in Figure 1, configure samplers and NetStream as follows:
· Configure IPv4 NetStream on the device to collect statistics on incoming and outgoing traffic.
· Send the NetStream data to port 5000 on the NetStream server.
· Configure fixed sampling in the inbound direction to select the first packet from 16 packets on Ten-GigabitEthernet 3/1/1.
· Configure random sampling in the outbound direction to select one packet randomly from 16 packets on Ten-GigabitEthernet 3/1/2.
Procedure
# Create sampler samp1 in fixed sampling mode, and set the rate to 4. The first packet of 16 (2 to the 4th power) packets is selected.
<Device> system-view
[Device] sampler samp1 mode fixed packet-interval n-power 4
# Create sampler samp2 in random sampling mode, and set the sampling rate to 16. One packet from 16 packets is selected.
[Device] sampler samp2 mode random packet-interval 16
# Enable IPv4 NetStream to use sampler samp1 to collect statistics about the incoming traffic on Ten-GigabitEthernet 3/1/1.
[Device] interface ten-gigabitethernet 3/1/1
[Device-Ten-GigabitEthernet3/1/1] ip netstream inbound
[Device-Ten-GigabitEthernet3/1/1] ip netstream inbound sampler samp1
[Device-Ten-GigabitEthernet3/1/1] quit
# Enable IPv4 NetStream to use sampler samp2 to collect statistics about outgoing traffic on Ten-GigabitEthernet 3/1/2.
[Device] interface ten-gigabitethernet 3/1/2
[Device-Ten-GigabitEthernet3/1/2] ip netstream outbound
[Device-Ten-GigabitEthernet3/1/2] ip netstream outbound sampler samp2
[Device-Ten-GigabitEthernet3/1/2] quit
# Configure the address and port number of the NetStream server as the destination for the NetStream data export. Use the default source interface for the NetStream data export.
[Device] ip netstream export host 12.110.2.2 5000
Verifying the configuration
# Display configuration information for sampler samp1 and sampler samp2.
[Device] display sampler samp1
Sampler name: samp1
Mode: fixed; Packet-interval: 4; IsNpower: Y
[Device] display sampler samp2
Sampler name: samp2
Mode: random; Packet-interval: 16; IsNpower: N