215
Figure 59 Network diagram
Configuration procedure
# Create sampler
256
in fixed sampling mode, and set the rate to 8. The first packet of 256 (2 to the
8th power) packets is selected.
<Device> system-view
[Device] sampler 256 mode fixed packet-interval n-power 8
# Create sampler
1024
in fixed sampling mode, and set the rate to 10. The first packet of 1024 (2 to
the 10th power) packets is selected.
[Device] sampler 1024 mode fixed packet-interval n-power 10
# Enable IPv4 NetStream to use sampler
256
to collect statistics about the incoming traffic on
GigabitEthernet 1/0/2.
[Device] interface gigabitethernet 1/0/2
[Device-GigabitEthernet1/0/2] ip address 11.110.2.1 255.255.0.0
[Device-GigabitEthernet1/0/2] ip netstream inbound
[Device-GigabitEthernet1/0/2] ip netstream inbound sampler 256
# Enable IPv4 NetStream to use sampler
1024
to collect statistics about the outgoing traffic on
GigabitEthernet 1/0/2.
[Device-GigabitEthernet1/0/2] ip netstream outbound
[Device-GigabitEthernet1/0/2] ip netstream outbound sampler 1024
[Device-GigabitEthernet1/0/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
256
and sampler
1024
.
[Device] display sampler 256
Sampler name: 256
Mode: Fixed; Packet-interval: 8; IsNpower : Y
[Device] display sampler 1024
Sampler name: 1024
Mode: Fixed; Packet-interval: 10; IsNpower : Y
Network
NetStream server
Device
GE1/0/1
11.110.2.1/16
GE1/0/2
12.110.2.1/16
12.110.2.2/16