- Table of Contents
- 11-Network Management and Monitoring Configuration Guide
- 01-System maintenance and debugging configuration
- 02-NQA configuration
- 03-NTP configuration
- 04-PTP configuration
- 05-SNMP configuration
- 06-RMON configuration
- 07-Event MIB configuration
- 08-NETCONF configuration
- 09-Puppet configuration
- 10-Chef configuration
- 11-CWMP configuration
- 12-EAA configuration
- 13-Process monitoring and maintenance configuration
- 14-Sampler configuration
- 15-Mirroring configuration
- 16-NetStream configuration
- 17-IPv6 NetStream configuration
- 18-sFlow configuration
- 19-Information center configuration
- 20-GOLD configuration
- 21-Packet capture configuration
- 22-VCF fabric configuration
- 23-Ansible configuration
- Related Documents
|14-Sampler configuration||55.66 KB|
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 device supports random sampling mode.
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."
1. Enter system view.
2. Create a sampler.
sampler sampler-name mode random packet-interval n-power rate
Execute display commands in any view.
Display configuration information about the sampler.
In standalone mode:
display sampler [ sampler-name ] [ slot slot-number ]
In IRF mode:
display sampler [ sampler-name ] [ chassis chassis-number slot slot-number ]
As shown in Figure 1, configure samplers and NetStream as follows:
· Configure IPv4 NetStream on the device to collect statistics on outgoing traffic.
· Send the NetStream data to port 5000 on the NetStream server.
· Configure random sampling in the outbound direction to select one packet randomly from 256 packets on FortyGigE 1/0/2.
By default, interfaces on the device are disabled (in ADM or Administratively Down state). To have an interface operate, you must use the undo shutdown command to enable that interface.
# Create sampler 256 in random sampling mode, and set the sampling rate to 8. One packet from 256 packets is selected.
[Device] sampler 256 mode random packet-interval n-power 8
# Enable IPv4 NetStream to use sampler 256 to collect statistics about outgoing traffic on FortyGigE 1/0/2.
[Device] interface fortygige 1/0/2
[Device-FortyGigE1/0/2] ip netstream outbound
[Device-FortyGigE1/0/2] ip netstream outbound sampler 256
# 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 126.96.36.199 5000
Verifying the configuration
# Display configuration information for sampler 256.
[Device] display sampler 256
Sampler name: 256
Mode: Random; Packet-interval: 8; IsNpower: Y