R2511-HP MSR Router Series Network Management and Monitoring Configuration Guide(V5)

147
Configuring counter sampling
Ste
p
Command
Remarks
1. Enter system view.
system-view N/A
2. Enter interface view.
interface interface-type
interface-number
N/A
3. Set the interval for counter
sampling.
sflow counter interval seconds
Counter sampling is disabled by
default.
4. Specify the sFlow collector for
counter sampling.
sflow counter collector collector-id
No collector is specified for
counter sampling by default.
Displaying and maintaining sFlow
Task Command
Remarks
Display sFlow configuration
information.
display sflow [ | { begin | exclude |
include } regular-expression ]
Available in any view.
sFlow configuration example
Network requirements
As shown in Figure 52, enable flow sampling and counter sampling on Ethernet 1/1 of the device to
monitor traffic on the port and configure the device to send sampled information to the sFlow collector
through Ethernet 1/3.
Figure 52 Network diagram
Configuration procedure
1. Configure the sFlow agent and sFlow collector information:
# Configure the IP address of Ethernet 1/0 on the device as 3.3.3.1/16.
<Device> system-view
[Device] interface ethernet 1/3
[Device-Ethernet1/3] ip address 3.3.3.1 16
[Device-Ethernet1/3] quit
# Configure the IP address for the sFlow agent.
[Device] sflow agent ip 3.3.3.1
3.3.3.2/16
Host A
1.1.1.1/16
Eth1/3
3.3.3.1/16
Eth1/2
2.2.2.1/16
Eth1/1
1.1.1.2/16
Server
2.2.2.2/16
Device
sFlow Collector