- 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-SNMP configuration
- 05-RMON configuration
- 06-NETCONF configuration
- 07-Mirroring configuration
- 08-Sampler configuration
- 09-sFlow configuration
- 10-Information center configuration
- 11-EAA configuration
- 12-Process monitoring and maintenance configuration
- 13-Packet capture configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
08-Sampler configuration | 72.35 KB |
A sampler selects a packet from among 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 among sequential packets in each sampling.
· Random mode—Any packet might be selected from among sequential packets in each sampling. This mode is not supported in the current software version and is reserved for future use.
A sampler can sample packets for traffic monitoring features. Only the sampled packets are sent to and processed by traffic monitoring features.
Creating a sampler
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Create a sampler. |
sampler sampler-name mode fixed packet-interval rate |
By default, no sampler exists. |
Displaying and maintaining 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 ] |
Display configuration information about the sampler (in IRF mode). |
display sampler [ sampler-name ] [ chassis chassis-number slot slot-number ] |
Sampler configuration example
By default, Ethernet, VLAN, and aggregate interfaces are shut down. You must use the undo shutdown command to bring them up. This example assumes that all these interfaces are already up.
Network requirements
As shown in Figure 1, configure samplers and port mirroring as follows:
· Create local mirroring group 1 on Switch A, with GigabitEthernet 3/0/1 as the source port and GigabitEthernet 3/0/2 as the monitor port of the mirroring group.
· Configure fixed sampling in the inbound direction to select the first packet from among 256 packets.
Configuration procedure
# Create sampler test1 in fixed sampling mode, and set the rate to 8. The first packet of 256 (2 to the 8th power) packets is selected.
[SwitchA] sampler test1 mode fixed packet-interval 8
# Create local mirroring group 1, and reference sampler test1.
[SwitchA] mirroring-group 1 local sampler test1
# Configure the mirroring group 1 to monitor the inbound traffic of GigabitEthernet 3/0/1.
[SwitchA] mirroring-group 1 mirroring-port GigabitEthernet 3/0/1 inbound
# Configure GigabitEthernet 3/0/2 as the monitor port of mirroring group 1.
[SwitchA] mirroring-group 1 monitor-port GigabitEthernet 3/0/2
Verifying the configuration
# Display configuration information for sampler test1.
[SwitchA] display sampler test1
Sampler name: test1
Mode: fixed; Packet-interval: 8