Connectivity Guide

sflow enable
!
Collector conguration
Congure the IPv4 or IPv6 address for the sFlow collector. When you congure the collector, enter a valid and reachable IPv4 or IPv6
address. You can congure a maximum of two sFlow collectors. If you specify two collectors, samples are sent to both. The agent IP
address must be the same for both the collectors.
Collector conguration for default VRF
Enter an IPv4 or IPv6 address for the sFlow collector, IPv4 or IPv6 address for the agent, UDP collector port number, and maximum
datagram size in CONFIGURATION mode.
sflow collector {ip-address | ipv6-address} agent-addr {ip-address | ipv6-address} [collector-
port-number
]
The no form of the command disables sFlow collectors in CONFIGURATION mode.
Collector conguration for nondefault VRF
If you congure a collector for a nondefault VRF, create the VRF rst. If you do not specify the VRF instance, the system congures the
collector for the default VRF instance.
The following are the steps to congure sFlow collector with a nondefault VRF:
1 Create a nondefault VRF instance.
OS10(config)# ip vrf RED
2 Enable the sFlow feature.
OS10(config)# sflow enable
3 Assign an IP address to an interface which you can use as the sFlow agent and add it to the VRF instance.
OS10(conf-if-eth1/1/1)# sflow enable
OS10(conf-if-eth1/1/1)# ip vrf forwarding RED
OS10(conf-if-eth1/1/1)# ip address 1.1.1.1/24
OS10(conf-if-eth1/1/1)# no shutdown
4 Assign an IP address to an interface through which the sFlow collector is reachable and add it to the VRF instance.
OS10(conf-if-eth1/1/1)# interface ethernet 1/1/2
OS10(conf-if-eth1/1/2)# sflow enable
OS10(conf-if-eth1/1/2)# ip vrf forwarding RED
OS10(conf-if-eth1/1/2)# ip address 4.4.4.4/24
OS10(conf-if-eth1/1/2)# no shutdown
5 Enter the IP addresses of the sFlow collector and the agent and assign them to the VRF instance.
OS10(config)# sflow collector 4.4.4.1 agent-addr 1.1.1.1 vrf RED
View sFlow information
OS10# show sflow
sFlow services are enabled
Management Interface sFlow services are disabled
Global default sampling rate: 32768
Global default counter polling interval: 10
Global default extended maximum header size: 128 bytes
Global extended information enabled: none
1 collector(s) configured
Collector IP addr:4.4.4.1 Agent IP addr:1.1.1.1 UDP port:6343 VRF:RED
0 UDP packets exported
sFlow
1121