- Preface
- Installing UCS NID Controller
- Configuration Management
- Administering the Cisco ME 1200 NID
- Configuring Notifications
- Zero Touch Provisioning
- Auto Discovery of Cisco ME 1200 NIDs
- Configuring Synchronous Ethernet
- Configuring Ethernet Virtual Connections
- Configuring Switch Ports
- Configuring Spanning-Tree Protocol
- Configuring Link Aggregation Control Protocol (LACP)
- Provisioning Link Layer Discovery Protocol
- Configuring SNMP
- Configuring PTP
- Configuring ACLs
- Configuring Quality of Service (QoS)
- Configuring Ethernet OAM, Link OAM, and CFM
- Configuring Performance Monitoring
- Configuring EPS
- Configuring ERPS
- Configuring L2CP
- Configuring MAC Security
- Configuring NTP
- Configuring Storm Control
- Configuring Syslog
- Configuring SPAN
- Configuring RSPAN
- Configuring RFC 2544
- Configuring sFlow
- Configuring UDLD
- Configuring LST
- Configuring Flex Links
- Configuring Y.1564
- Configuring Bulk Provisioning
- Template Management
Configuring sFlow
This document describes the sampled flow (sFlow) feature and configuration steps to implement sFlow.
- Prerequisites for Configuring sFlow
- Restrictions for Configuring sFlow
- Information About sFlow
- How to Provision sFlow
- Verifying sFlow
- Additional References
Prerequisites for Configuring sFlow
Restrictions for Configuring sFlow
Information About sFlow
-
sFlow Agent (embedded on ME 1200 NID)—The sFlow Agent uses sampling technology to capture traffic statistics from the monitored device and then forwards the sampled data to a central sFlow Collector for analysis. Packet sampling is done using one or more sFlow instances, each configured with a sampling rate.
-
sFlow Instances—There may be one or more sFlow Instances associated with a single data source. Each sFlow instance operates independently of other sFlow instances. For example, Packet Flow Sampling instances have their own sampling rates and Counter Sampling instances have their own sampling intervals.
-
-
sFlow Collector—The sFlow Collector is a software application that can receive sFlow datagrams and present a view of traffic and other network parameters which are output as type, length, and value (TLV) in the datagrams. The sFlow collectors can also read and configure sFlow-managed objects. Both counter and packet flow statistics are collected and sent as sFlow Datagrams (defined by maximum datagram size of 200-1468) to a sFlow Collector.
-
sFlow Datagram—The sFlow Datagram format specifies a standard format for the sFlow Agent to send sampled data to a remote sFlow Collector. The sFlow Datagram version 5 is supported.
The format of the sFlow Datagram is specified using the External Data Representation (XDR) standard. This makes it simpler for the sFlow Agent to encode and the sFlow Collector to decode.
Samples are sent as User Datagram Protocol (UDP) packets to the host and port specified in the SFLOW MIB or CLI. The assigned port for sFlow (and the default specified in the SFLOW MIB) is port 6343. All sFlow Agents and applications by default must use UDP port 6343.
-
By default, sFlow is disabled on ME 1200 NID. You can enable sFlow on a specific interface or port.
How to Provision sFlow
Enabling sFlow Globally
Configuration Example
-
The example shows how to enable sFlow globally:
UCS# sflow UCS(SFlow)# setsFlowGlobalConfig sFlow_global agent-ip ipv4 7.25.16.63 UCS(SFlow)# setsFlowGlobalConfig sFlow_global collector-ip ipv4 7.25.16.253 UCS(SFlow)# setsFlowGlobalConfig sFlow_global collector-port 2033 UCS(SFlow)# setsFlowGlobalConfig sFlow_global datagram-maxsize 512 UCS(SFlow)# setsFlowGlobalConfig sFlow_global rx-timeout 50000 UCS(SFlow)# setsFlowGlobalConfig review
Commands in queue: setsFlowGlobalConfig sFlow_global agent-ip ipv4 7.25.16.63 setsFlowGlobalConfig sFlow_global collector-ip ipv4 7.25.16.253 setsFlowGlobalConfig sFlow_global collector-port 6343 setsFlowGlobalConfig sFlow_global datagram-maxsize 512 setsFlowGlobalConfig sFlow_global rx-timeout 50000UCS(SFlow)# setsFlowGlobalConfig commit
SetsFlowGlobalConfig Commit Success!!!
UCS(SFlow)# exit
Enabling sFlow on a Port
Configuration Example
![]() Note | sFlow configuration does not persist on the NID. Running show running-config.xml command does not display the sFlow configuration globally or per-port. This is working as designed. |
-
The example shows how to enable sFlow on a port with default values enabled:
UCS# sflow UCS(SFlow)# setsFlowPortConfig sFlow_port interface-id 3 UCS(SFlow)# setsFlowPortConfig sFlow_port enable enable UCS(SFlow)# setsFlowPortConfig sFlow_port flow-sampler enable-defaults enable UCS(SFlow)# setsFlowPortConfig review
Commands in queue: setsFlowPortConfig sFlow_port interface-id 3 setsFlowPortConfig sFlow_port enable enable setsFlowPortConfig sFlow_port flow-sampler enable-defaults enableUCS(SFlow)# setsFlowPortConfig commit
SetsFlowPortConfig Commit Success!!!
UCS(SFlow)# exit
-
The example shows how to enable sFlow on a port without any default values set:
UCS# sflow UCS(Flow)# setsFlowPortConfig sFlow_port interface-id 1 UCS(SFlow)# setsFlowPortConfig sFlow_port enable enable UCS(SFlow)# setsFlowPortConfig sFlow_port flow-sampler enable-defaults disable UCS(SFlow)# setsFlowPortConfig review
Commands in queue: setsFlowPortConfig sFlow_port interface-id 1 setsFlowPortConfig sFlow_port enable enable setsFlowPortConfig sFlow_port flow-sampler enable-defaults disableUCS(SFlow)# setsFlowPortConfig commit
SetsFlowPortConfig Commit Success!!!
UCS(SFlow)# exit
-
The example shows how enable sFlow on a port with user-configured parameters:
UCS# sflow UCS(SFlow)# setsFlowPortConfig sFlow_port interface-id 1 UCS(SFlow)# setsFlowPortConfig sFlow_port enable enable UCS(SFlow)# setsFlowPortConfig sFlow_port flow-sampler enable-defaults disable UCS(SFlow)# setsFlowPortConfig sFlow_port flow-sampler sampling-maxsize 512 UCS(SFlow)# setsFlowPortConfig sFlow_port flow-sampler sampling-rate 200 UCS(SFlow)# setsFlowPortConfig sFlow_port counter-poller enable enable UCS(SFlow)# setsFlowPortConfig sFlow_port counter-poller interval 30 UCS(SFlow)# setsFlowPortConfig review
Commands in queue: setsFlowPortConfig sFlow_port interface-id 1 setsFlowPortConfig sFlow_port enable enable setsFlowPortConfig sFlow_port flow-sampler enable-defaults disable setsFlowPortConfig sFlow_port flow-sampler sampling-maxsize 512 setsFlowPortConfig sFlow_port flow-sampler sampling-rate 200 setsFlowPortConfig sFlow_port counter-poller enable enable setsFlowPortConfig sFlow_port counter-poller interval 30UCS(SFlow)# setsFlowPortConfig commit
SetsFlowPortConfig Commit Success!!!
UCS(SFlow)# exit
Getting Current Global sFlow Values
| Command or Action | Purpose | |
|---|---|---|
| Step 1 | ConfigureNID
Example: UCS# Configure NID 1 |
Opens a new session for NID 1. |
| Step 2 | sflow
Example: UCS# sflow | Enters the sFlow mode. |
| Step 3 | sFlow_global_req
Example: UCS(SFlow)# getsFlowGlobalConfig sFlow_global_req |
Enters the sFlow global configuration mode. |
| Step 4 | getsFlowGlobalConfig
review
Example: UCS(SFlow)# getsFlowGlobalConfig review | (Optional) Displays the configuration. |
| Step 5 | getsFlowGlobalConfig
commit
Example: UCS(SFlow)# getsFlowGlobalConfig commit | Sends the configuration to NID. |
| Step 6 | exit
Example: UCS(SFlow)# exit | Exits the SFlow mode. |
Configuration Example
-
The example shows how to get current global sFlow values:
UCS# sflow UCS(SFlow)# getsFlowGlobalConfig sFlow_global_req UCS(SFlow)# getsFlowGlobalConfig review
Commands in queue: getsFlowGlobalConfig sFlow_global_reqUCS(SFlow)# getsFlowGlobalConfig commit
GetsFlowGlobalConfig_Output.sFlow_global.agent_ip.t = 1 GetsFlowGlobalConfig_Output.sFlow_global.agent_ip.u.ipv4 = '0.0.0.0' GetsFlowGlobalConfig_Output.sFlow_global.collector_ip.t = 1 GetsFlowGlobalConfig_Output.sFlow_global.collector_ip.u.ipv4 = '0.0.0.0' GetsFlowGlobalConfig_Output.sFlow_global.collector_port = 65535 GetsFlowGlobalConfig_Output.sFlow_global.datagram-maxsize = 1468 GetsFlowGlobalConfig_Output.sFlow_global.rx-timeout = 50000 GetsFlowGlobalConfig Commit Success!!!
UCS(SFlow)# exit
The following is a sample output on the NID.
Decoding of Request message was successful urn:#getsFlowConfig Decoded record: GetsFlowGlobalConfig_Input.sFlow_global_req = '0' Encoding of Response message was successful Encoded record: GetsFlowGlobalConfig_Output.sFlow_global.agent_ip.t = 1 GetsFlowGlobalConfig_Output.sFlow_global.agent_ip.u.ipv4 = '0.0.0.0' GetsFlowGlobalConfig_Output.sFlow_global.collector_ip.t = 1 GetsFlowGlobalConfig_Output.sFlow_global.collector_ip.u.ipv4 = '0.0.0.0' GetsFlowGlobalConfig_Output.sFlow_global.collector_port = 65535 GetsFlowGlobalConfig_Output.sFlow_global.datagram-maxsize = 1468 GetsFlowGlobalConfig_Output.sFlow_global.rx-timeout = 50000 GetsFlowGlobalConfig_Output.xmlns:ns0 = "http://new.webservice.namespace" GetsFlowGlobalConfig_Output.xmlns:http = "http://schemas.xmlsoap.org/wsdl/http/" GetsFlowGlobalConfig_Output.xmlns:mime = "http://schemas.xmlsoap.org/wsdl/mime/" GetsFlowGlobalConfig_Output.xmlns:soap = "http://schemas.xmlsoap.org/wsdl/soap/" GetsFlowGlobalConfig_Output.xmlns:soapenc = "http://schemas.xmlsoap.org/soap/encoding/" GetsFlowGlobalConfig_Output.xmlns:wsdl = "http://schemas.xmlsoap.org/wsdl/"
Getting Current Port Specific sFlow Values
| Command or Action | Purpose | |
|---|---|---|
| Step 1 | ConfigureNID
Example: UCS# Configure NID 1 |
Opens a new session for NID 1. |
| Step 2 | sflow
Example: UCS# sflow | Enters the sFlow mode. |
| Step 3 | sflowPortConfigReq
port
id
Example: UCS(SFlow)# getsFlowPortConfig sflowPortConfigReq 2 |
Enters the sFlow port-specific configuration mode. |
| Step 4 | getsFlowGlobalConfig
review
Example: UCS(SFlow)# getsFlowGlobalConfig review | (Optional) Displays the configuration. |
| Step 5 | getsFlowGlobalConfig
commit
Example: UCS(SFlow)# getsFlowGlobalConfig commit | Sends the configuration to NID. |
| Step 6 | exit
Example: UCS(SFlow)# exit | Exits the SFlow mode. |
Configuration Example
-
The example shows how to get current port-specific sFlow values:
UCS# sflow UCS(SFlow)# getsFlowPortConfig sflowPortConfigReq 2 UCS(SFlow)# getsFlowGlobalConfig review
Commands in queue: getsFlowPortConfig sFlowPortConfigReq 2UCS(SFlow)# getsFlowGlobalConfig commit
GetsFlowPortConfig_Output.sFlow_port.interface_id = 2 GetsFlowPortConfig_Output.sFlow_port.enable = false GetsFlowPortConfig_Output.sFlow_port.flow_sampler.enable_defaults = true GetsFlowPortConfig_Output.sFlow_port.flow_sampler.sampling_rate = 4096 GetsFlowPortConfig_Output.sFlow_port.flow_sampler.sampling-maxsize = 128 GetsFlowPortConfig_Output.sFlow_port.counter_poller.enable = false GetsFlowPortConfig_Output.sFlow_port.counter_poller.interval = 60 GetsFlowPortConfig Commit Success!!!
UCS(SFlow)# exit
The following is a sample output on the NID.
GetsFlowPortConfig_Input.sFlowPortConfigReq = 2 Encoding of Response message was successful Encoded record: GetsFlowPortConfig_Output.sFlow_port.interface_id = 2 GetsFlowPortConfig_Output.sFlow_port.enable = false GetsFlowPortConfig_Output.sFlow_port.flow_sampler.enable_defaults = true GetsFlowPortConfig_Output.sFlow_port.flow_sampler.sampling_rate = 4096 GetsFlowPortConfig_Output.sFlow_port.flow_sampler.sampling-maxsize = 128 GetsFlowPortConfig_Output.sFlow_port.counter_poller.enable = false GetsFlowPortConfig_Output.sFlow_port.counter_poller.interval = 60 GetsFlowPortConfig_Output.xmlns:ns0 = "http://new.webservice.namespace" GetsFlowPortConfig_Output.xmlns:http = "http://schemas.xmlsoap.org/wsdl/http/" GetsFlowPortConfig_Output.xmlns:mime = "http://schemas.xmlsoap.org/wsdl/mime/" GetsFlowPortConfig_Output.xmlns:soap = "http://schemas.xmlsoap.org/wsdl/soap/" GetsFlowPortConfig_Output.xmlns:soapenc = "http://schemas.xmlsoap.org/soap/encoding/" GetsFlowPortConfig_Output.xmlns:wsdl = "http://schemas.xmlsoap.org/wsdl/"
Clearing sFlow Statistics
| Command or Action | Purpose | |
|---|---|---|
| Step 1 | ConfigureNID
Example: UCS# Configure NID 1 |
Opens a new session for NID 1. |
| Step 2 | sflow
Example: UCS# sflow | Enters the sFlow mode. |
| Step 3 | clear_sflow_stats
Example: UCS(SFlow)# clearsFlowStatistics clear_sflow_stats |
Clears sFlow statistics. |
| Step 4 | clearsFlowStatistics
review
Example: UCS(SFlow)# clearsFlowStatistics review | (Optional) Displays the configuration. |
| Step 5 | clearsFlowStatistics
commit
Example: UCS(SFlow)# clearsFlowStatistics commit | Sends the configuration to NID. |
| Step 6 | exit
Example: UCS(SFlow)# exit | Exits the SFlow mode. |
Configuration Example
-
The example shows how to clear sFlow statistics:
UCS# sflow UCS((SFlow)# clearsFlowStatistics clear_sflow_stats UCS((SFlow)# clearsFlowStatistics review
Commands in queue: clearsFlowStatistics clear_sflow_statsUCS(SFlow)# clearsFlowStatistics commit
ClearsFlowStatistics Commit Success!!!
UCS(SFlow)# exit
Verifying sFlow
Use the following commands to verify the sFlow status on the UCS controller.
-
showsFlowStatistics sFlow_stats_req
This command displays the sFlow statistics on the NID. The following is a sample output from the command:
UCS(SFlow)# showsFlowStatistics sFlow_stats_req
UCS(SFlow)# showsFlowStatistics review
Commands in queue: showsFlowStatistics sFlow_stats_reqUCS(SFlow)# showsFlowStatistics commit
ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[0].interface_id = 1 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[0].tx_flow_samples = 0 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[0].counter_samples = 42 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[1].interface_id = 2 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[1].tx_flow_samples = 0 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[1].counter_samples = 0 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[2].interface_id = 3 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[2].tx_flow_samples = 1 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[2].counter_samples = 0 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[3].interface_id = 4 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[3].tx_flow_samples = 0 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[3].counter_samples = 0 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[4].interface_id = 5 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[4].tx_flow_samples = 0 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[4].counter_samples = 0 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[5].interface_id = 6 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[5].tx_flow_samples = 0 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[5].counter_samples = 0 ShowsFlowStatistics_Output.sFlow_stats.receiver.statistics[0].tx_successes = 0 ShowsFlowStatistics_Output.sFlow_stats.receiver.statistics[0].tx_errors = 43 ShowsFlowStatistics_Output.sFlow_stats.receiver.statistics[0].flow_samples = 1 ShowsFlowStatistics_Output.sFlow_stats.receiver.statistics[0].counter_samples = 42 ShowsFlowStatistics Commit Success!!!
The following is a sample output on the NID.
Decoding of Request message was successful urn:#showsFlowStatistics Decoded record: ShowsFlowStatistics_Input.sFlow_stats_req = '0' Encoding of Response message was successful Encoded record: ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[0].interface_id = 1 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[0].tx_flow_samples = 0 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[0].counter_samples = 42 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[1].interface_id = 2 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[1].tx_flow_samples = 0 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[1].counter_samples = 0 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[2].interface_id = 3 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[2].tx_flow_samples = 1 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[2].counter_samples = 0 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[3].interface_id = 4 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[3].tx_flow_samples = 0 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[3].counter_samples = 0 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[4].interface_id = 5 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[4].tx_flow_samples = 0 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[4].counter_samples = 0 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[5].interface_id = 6 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[5].tx_flow_samples = 0 ShowsFlowStatistics_Output.sFlow_stats.samplers.interface_[5].counter_samples = 0 ShowsFlowStatistics_Output.sFlow_stats.receiver.statistics[0].tx_successes = 0 ShowsFlowStatistics_Output.sFlow_stats.receiver.statistics[0].tx_errors = 43 ShowsFlowStatistics_Output.sFlow_stats.receiver.statistics[0].flow_samples = 1 ShowsFlowStatistics_Output.sFlow_stats.receiver.statistics[0].counter_samples = 42 ShowsFlowStatistics_Output.xmlns:ns0 = "http://new.webservice.namespace" ShowsFlowStatistics_Output.xmlns:http = "http://schemas.xmlsoap.org/wsdl/http/" ShowsFlowStatistics_Output.xmlns:mime = "http://schemas.xmlsoap.org/wsdl/mime/" ShowsFlowStatistics_Output.xmlns:soap = "http://schemas.xmlsoap.org/wsdl/soap/" ShowsFlowStatistics_Output.xmlns:soapenc = "http://schemas.xmlsoap.org/soap/encoding/" ShowsFlowStatistics_Output.xmlns:wsdl = "http://schemas.xmlsoap.org/wsdl/"
Additional References
Related Documents
| Related Topic | Document Title |
|---|---|
Cisco ME 3800x and ME 3600x Switches Software Configuration Guide, Cisco IOS Release 15.4(1)S |
MIBs
| MIB | MIBs Link |
|---|---|
MIBs Supporting Cisco IOS |
To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL: |
Technical Assistance
| Description | Link |
|---|---|
|
The Cisco Support website provides extensive online resources, including documentation and tools for troubleshooting and resolving technical issues with Cisco products and technologies. To receive security and technical information about your products, you can subscribe to various services, such as the Product Alert Tool (accessed from Field Notices), the Cisco Technical Services Newsletter, and Really Simple Syndication (RSS) Feeds. Access to most tools on the Cisco Support website requires a Cisco.com user ID and password. |

Feedback