# Configuring sFlow

sFlow is a multi-vendor, packet sampling technology used to monitor network devices including routers, switches, host devices and wireless access points. Flow Monitor traffic monitoring software uses the sFlow data to analyze and manage network traffic and to ensure Quality of Service.&#x20;

sFlow sampling process is performed by the switching/routing ASICs, thereby ensuring wire-speed performances. The sFlow agent then combines the interface counters, flow samples and the forwarding/routing table state associated with each packet into a UDP sFlow datagram. This is then sent to the sFlow collector for collection and analysis.

### Enable sFlow Feature

#### Reference

<table data-header-hidden><thead><tr><th></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>Command</td><td>feature sflow<br>no feature sflow</td><td></td></tr><tr><td>Description</td><td>Enable/disable sFlow feature</td><td></td></tr><tr><td>Mode</td><td>CONFIG</td><td></td></tr></tbody></table>

#### Example

```
pbnoscli(config)# feature sflow 
pbnoscli(config)# no feature sflow coll
```

### sFlow Collector

#### Reference

<table data-header-hidden><thead><tr><th></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>Command</td><td>sflow collector &#x3C;name> &#x3C;ipaddr><br>no sflow collector &#x3C;name> &#x3C;ipaddr></td><td></td></tr><tr><td>Description</td><td>Enable/disable sFlow collector configuration</td><td></td></tr><tr><td>Mode</td><td>CONFIG</td><td></td></tr></tbody></table>

#### Example

```
pbnoscli(config)# sflow collector Collector1 10.2.2.7
pbnoscli(config)# no sflow collector Collector1 10.2.2.7
```

### sFlow Polling-Interval

#### Reference

<table data-header-hidden><thead><tr><th></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>Command</td><td>sflow polling-interval &#x3C;interval (0..300)><br>no sflow collector &#x3C;interval (0..300)></td><td></td></tr><tr><td>Description</td><td>Enable/disable sFlow polling-interval</td><td></td></tr><tr><td>Mode</td><td>CONFIG</td><td></td></tr></tbody></table>

#### Example

```
pbnoscli(config)# sflow polling-interval 20
pbnoscli(config)# no sflow polling-interval 20
```

### Enable sFLow

#### Reference

<table data-header-hidden><thead><tr><th></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>Command</td><td>sflow enable</td><td></td></tr><tr><td>Description</td><td>Enable/disable sFlow per interface</td><td></td></tr><tr><td>Mode</td><td>INTERFACE</td><td></td></tr></tbody></table>

#### Example

```
pbnoscli(config-if)# sflow enable
pbnoscli(config-if)# no sflow enable
```

### sFlow Sampling Rate

#### Reference

<table data-header-hidden><thead><tr><th></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>Command</td><td>sflow sampling-rate &#x3C;rate(256..8388608)></td><td></td></tr><tr><td>Description</td><td>Enable/disable sFlow sampling rate</td><td></td></tr><tr><td>Mode</td><td>INTERFACE</td><td></td></tr></tbody></table>

#### Example

```
pbnoscli(config-if)# sflow sampling-rate 256
pbnoscli(config-if)# no sflow sampling-rate 256
```

### Show sFlow Command

#### Reference

<table data-header-hidden><thead><tr><th></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>Command</td><td>sflow ("Sflow related information") [interface ("Specific to an interface") &#x3C;ifname:string interface_list()> ("Interface name")], showsflow();</td><td></td></tr><tr><td>Description</td><td>sFlow related information</td><td></td></tr></tbody></table>

#### Example

```
pbnoscli# show sflow
sFlow Admin State: up
sFlow polling-interval: 20
Collector name: Collector1
sFlow collector-ip: 10.2.2.7
sFlow collector-port: 6343

Interface     State     Sampling Rate
=====================================
Ethernet116       up      256
Ethernet128       up      256
pbnoscli#
```
