Sampler configuration example, Network requirements, Configuration procedure – H3C Technologies H3C MSR 50 User Manual

Page 169: Verification

Advertising
background image

Sampler configuration example

Network requirements

As shown in

Figure 53

, configure IPv4 NetStream on Device to collect statistics on incoming and

outgoing traffic on Ethernet 1/2. The NetStream data is sent to port 5000 on the NSC at 12.110.2.2/16.

Do the following:

Configure fixed sampling in the inbound direction to select the first packet from among 256
packets.

Configure random sampling in the outbound direction to select one packet randomly from among
1024 packets.

Figure 53 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 8

# Create sampler 1024 in random sampling mode, and set the sampling rate to 10. One packet from
among 1024 (2 to the 10th power) packets is selected.

[Device] sampler 1024 mode random packet-interval 10

# Configure Ethernet 1/2, enable IPv4 NetStream to collect statistics about the incoming traffic, and then
configure the interface to use sampler 256.

[Device] interface ethernet 1/2

[Device-Ethernet1/2] ip address 11.110.2.1 255.255.0.0

[Device-Ethernet1/2] ip netstream inbound

[Device-Ethernet1/2] ip netstream sampler 256 inbound

[Device-Ethernet1/2] quit

# Configure interface Ethernet 1/2, enable IPv4 NetStream to collect statistics about outgoing traffic,
and then configure the interface to use sampler 1024.

[Device] interface ethernet 1/2

[Device-Ethernet1/2] ip address 12.110.2.1 255.255.0.0

[Device-Ethernet1/2] ip netstream outbound

[Device-Ethernet1/2] ip netstream sampler 1024 outbound

[Device-Ethernet1/2] quit

# Configure the address and port number of NSC as the destination host for the NetStream data export,
leaving the default for the source interface.

[Device] ip netstream export host 12.110.2.2 5000

Verification

# Execute the display sampler command on Device to view the configuration and running information

about sampler 256. The output shows that Device received and processed 256 packets, which reached

156

Advertising