sFlow Configuration
This section provides the configurations required to assign multiple sFlow collectors to OcNOS.
Topology
The following topology illustrates the sFlow multiple collectors connected with one sFlow Packet Data Unit (PDU):
Figure 48. sFlow with Multiple Collectors
Perform the following configurations:
- Configure sFlow using the configuration provided in Configure sFlow for Single Collector section for single collector.
- In the interface mode, enable sFlow for a particular interface and specify the collector-id for multiple collectors:
(config-if)#interface xe12
(config-if)#sflow direction ingress
(config-if-sflow)#sampling-rate 1024
(config-if-sflow)#max-header-size 256
(config-if-sflow)#exit
(config-if)#sflow direction egress
(config-if-sflow)#sampling-rate 2000
(config-if-sflow)#max-header-size 16
(config-if-sflow)#exit
OcNOS(config-if)#sflow enable
OcNOS(config-if)#sflow poll-interval 10
OcNOS(config-if)#sflow collector-id 3
Show Running Configurations
The following show output display the sample sflow configuration details.
OcNOS#show running-config sflow feature sflow
!
sflow agent-ip 1.2.7.10
sflow collector-id 3 collector 1.2.3.24 port 6345 receiver-time-out 5 max-datagram-size 1560
sflow collector-id 4 collector 1.2.4.24 port 6346 receiver-time-out 4 max-datagram-size 1570 vrf default
!
interface xe12
sflow direction ingress
sampling-rate 1024
max-header-size 256
exit
sflow direction egress
sampling-rate 2000
max-header-size 16
exit
sflow poll-interval 10
sflow collector-id 3
!
interface xe13
sflow direction ingress
sampling-rate 2500
max-header-size 100
exit
sflow direction egress
sampling-rate 2000
max-header-size 16
exit
sflow poll-interval 5
sflow collector-id 4
!
Validation
The following show output displays the sFlow details:
OcNOS#show sflow detail
sFlow Feature: Enabled
sFlow Version: 5
Agent IP : 1.2.7.10
Collector 3:
IP: 1.2.3.24 Port: 6345
VRF :
Maximum Datagram Size(bytes): 1560
Receiver timeout(sec) : 0
Collector 4:
IP: 1.2.4.24 Port: 6346
VRF :
Maximum Datagram Size(bytes): 1570
Receiver timeout(sec) : 0
sFlow Port Detailed Information:
Interface Collector Packet-Sampling Packet-Sampling Counter-Polling Maximum Header
ID Rate Count Interval Count Size(bytes)
Ingress Egress Ingress Egress (sec) Ingress Egress
--------- --------- ----------------------- ----------------------- ----------------------- --------------------
Xe12 3 1024 2000 3 6 10 0 256 16
Xe13 4 2500 2000 4 7 5 3 100 16
sFlow Multiple Collector Commands
The sFlow feature introduces a new parameter collector-id.
For additional information about the revised sflow collector command, refer to the sFlow Commands section.
sFlow Multiple Collector Commands with user defined VRFs.
sFlow Multiple Collector Commands with User Defined VRFs
The sFlow feature introduces a new parameter collector-id.
-
Users can sample packets on an interface mapped to a user-defined VRF and send sFlow packets through the same VRF.
-
Users can send sampled packets to multiple destinations (collectors) through different VRFs simultaneously.
The following sample configuration demonstrates sFlow using multiple collector-ids with user-defined VRFs:
feature sflow
sflow collector-id 3 collector 172.20.1.1 port 6343 receiver-time-out 0 max-datagram-size 200 vrf sys_mgmt
sflow collector-id 4 collector 192.168.7.2 port 6343 receiver-time-out 1000 max-datagram-size 200 vrf xe11_vrf
sflow collector-id 5 collector 172.10.1.1 port 65535 receiver-time-out 0 max-datagram-size 200 vrf xe10_10_vrf
sflow collector 192.168.7.2 port 65530 receiver-time-out 1000 max-datagram-size 200
sflow collector-id 2 collector 10.1.1.1 port 1024 receiver-time-out 345 max-datagram-size 400 vrf xe10_vrf
!
interface xe12
sflow direction ingress
sampling-rate 1029
max-header-size 120
exit
sflow direction egress
sampling-rate 1029
max-header-size 120
exit
sflow enable
!
interface xe13
sflow direction ingress
sampling-rate 1048
max-header-size 140
exit
sflow enable
sflow collector-id 5
!
interface xe14
sflow direction ingress
sampling-rate 1048
max-header-size 128
exit
sflow direction egress
sampling-rate 1048
max-header-size 128
exit
sflow enable
sflow poll-interval 20
sflow collector-id 3
!
interface xe15
sflow direction ingress
sampling-rate 1029
max-header-size 120
exit
sflow enable
sflow collector-id 4
Validation
The following show output displays the sFlow details associated with multiple VRFs:
S9510-30XC-A#show sflow detail
sFlow Feature: Enabled
sFlow Version: 5
Agent IP : 172.16.1.2
Collector 3:
IP: 172.20.1.1 Port: 6343
VRF : sys_mgmt
Maximum Datagram Size(bytes): 200
Receiver timeout(sec) : 0
Collector 4:
IP: 192.168.7.2 Port: 6343
VRF : xe11_vrf
Maximum Datagram Size(bytes): 200
Receiver timeout(sec) : 0
Collector 5:
IP: 172.10.1.1 Port: 65535
VRF : xe10_10_vrf
Maximum Datagram Size(bytes): 200
Receiver timeout(sec) : 0
Collector 1:
IP: 192.168.7.2 Port: 65530
VRF :
Maximum Datagram Size(bytes): 200
Receiver timeout(sec) : 0
Collector 2:
IP: 10.1.1.1 Port: 1024
VRF : xe10_vrf
Maximum Datagram Size(bytes): 400
Receiver timeout(sec) : 0
sFlow Port Detailed Information:
Interface Collector Packet-Sampling Packet-Sampling Counter-Polling Maximum Header
ID Rate Count Interval Count Size(bytes)
Ingress Egress Ingress Egress (sec) Ingress Egress
--------- --------- ----------------------- ----------------------- ----------------------- --------------------
xe12 1 1029 1029 0 0 0 0 120 120
xe13 5 1048 0 0 0 0 0 140 0
xe14 3 1048 1048 0 0 20 1248 128 128
xe15 4 1029 0 0 0 0 0 120 0
xe16 2 2048 3020 0 0 0 0 140 128
Glossary
|
Key Terms/Acronym |
Description |
|---|---|
|
PDU |
A unit of data transmitted as a composite by a protocol. |
|
sFlow |
Sampled Flow data sFlow (sFlow) is the standard for monitoring high-speed switched and routed networks. The sFlow monitoring system consists of an sFlow Agent which is embedded in a switch or router and an sFlow Collector. |