sFlow Commands
Use these commands to configure sFlow monitoring.
sFlow is the standard for monitoring high-speed switched and routed networks. sFlow technology is built into network equipment and gives complete visibility into network activity, enabling effective management and control of network resources.
sflow receiver
M4250
M4350
Use this command to configure the sFlow collector parameters (owner string, receiver time-out, max datagram size, IP address, and port).
| Format | sflow receiver index [maxdatagram size | ip ip-address | port port-number] |
| Mode | Global Config |
| Parameter | Description |
|---|---|
| Receiver Max Datagram Size | The maximum number of data bytes that can be sent in a single sample datagram. The management entity must set this value to avoid fragmentation of the sFlow datagrams. The allowed range is 200 to 12188 for the M4250 series switch or 12184 for the M4350 series switch. The default is 1400. |
| Receiver IP | The sFlow receiver IP address. If set to 0.0.0.0, no sFlow datagrams are sent. The default is 0.0.0.0. |
| Receiver Port | The destination Layer4 UDP port for sFlow datagrams. The range is 1-65535. The default is 6343. |
no sflow receiver
Use this command to set the sFlow collector parameters back to the defaults.
| Format | no sflow receiver index [maxdatagram | ip | port] |
| Mode | Global Config |
sflow receiver owner
M4250
M4350
Use this command to configure an sFlow receiver as a timeout or non-timeout entry:
- timeout: Use this keyword to configure an sFlow receiver as a timeout entry. Information related to samplers and pollers is also shown in the
running-configfile and is retained after a reboot. - non-timeout: Use this command to configure an sFlow receiver as a non-timeout entry. Unlike entries configured with a specific timeout value, this command is shown in the output of the show running-config command and retained after a reboot. Information related to samplers and pollers is also shown in the
running-configfile and retained after a reboot.
If a receiver is configured with a specific value, these configurations are not shown in the running-config file. Samplers and pollers information related to this receiver are also not shown in the running-config file.
| Format | sflow receiver index owner owner-string {timeout | notimeout} |
| Mode | Global Config |
| Field | Description |
|---|---|
| index | Receiver index identifier. The range is 1 to 8. |
| Receiver Owner | The owner name corresponds to the receiver name. The identity string for the receiver, the entity making use of this sFlowRcvrTable entry. The range is 127 characters. The default is a null string. The empty string indicates that the entry is currently unclaimed and the receiver configuration is reset to the default values. An entity wishing to claim an sFlowRcvrTable entry must ensure that the entry is unclaimed before trying to claim it. The entry is claimed by setting the owner string to a non-null value. The entry must be claimed before assigning a receiver to a sampler or poller. |
no sflow receiver owner
Use this command to disable an sFlow receiver as a timeout or non-timeout entry.
| Format | no sflow receiver index owner |
| Mode | Global Config |
sflow sampler
M4250
M4350
A data source configured to collect flow samples is called a poller. Use this command to configure a new sFlow sampler instance on an interface or range of interfaces for this data source if the receiver index is valid.
| Format | sflow sampler {index | rate sampling-rate | maxheadersize size} |
| Mode | Interface Config |
| Field | Description |
|---|---|
| Receiver Index | The sFlow Receiver for this sFlow sampler to which flow samples are to be sent. A value of zero (0) means that no receiver is configured, no packets will be sampled. Only active receivers can be set. If a receiver expires, then all samplers associated with the receiver will also expire. Possible values are 1-8. The default is 0. |
| Maxheadersize | The maximum number of bytes that should be copied from the sampler packet. The range is 20-256. The default is 128. When set to zero (0), all the sampler parameters are set to their corresponding default value. |
| Sampling Rate |
The statistical sampling rate for packet sampling from this source. A value of zero (0) disables sampling. A value of N means that out of N incoming packets, 1 packet will be sampled. The range is 1024-65536 and 0. The default is 0. When you issue a show command for the sampling rate, the configured sampling rate on an interface changes. Each time that you configure a sampling rate, a threshold value is calculated. This threshold value is configured in the hardware register. When you issue a show command for the sampling rate, the threshold value is queried from the hardware and the sampling rate is calculated in the following way:
CODE
Because only an integer operation is supported, the sampling rate is not the same as the configured value. The following is an example:
PYTHON
|
no sflow sampler
Use this command to reset the sFlow sampler instance to the default settings.
| Format | no sflow sampler {index | rate sampling-rate | maxheadersize size} |
| Mode | Interface Config |
sflow poller
M4250
M4350
A data source configured to collect counter samples is called a poller. Use this command to enable a new sFlow poller instance on an interface or range of interfaces for this data source if the receiver index is valid.
| Format | sflow poller {index | interval poll-interval} |
| Mode | Interface Config |
| Field | Description |
|---|---|
| Receiver Index | Enter the sFlow Receiver associated with the sampler/poller. A value of zero (0) means that no receiver is configured. The range is 1-8. The default is 0. |
| Poll Interval | Enter the sFlow instance polling interval. A poll interval of zero (0) disables counter sampling. When set to zero (0), all the poller parameters are set to their corresponding default value. The range is 0-86400. The default is 0. A value of N means once in N seconds a counter sample is generated. |
The sFlow task is heavily loaded when the sFlow polling interval is configured at the minimum value (i.e., one second for all the sFlow supported interfaces). In this case, the sFlow task is always busy collecting the counters on all the configured interfaces. This can cause the device to hang for some time when the user tries to configure or issue show sFlow commands.
To overcome this situation, sFlow polling interval configuration on an interface or range of interfaces is controlled as mentioned below:
-
The maximum number of allowed interfaces for the polling intervals max (1, (interval – 10)) to min ((interval + 10), 86400) is:
interval * 5
- For every one second increment in the polling interval that is configured, the number of allowed interfaces that can be configured increases by 5.
no sflow poller
Use this command to reset the sFlow poller instance to the default settings.
| Format | no sflow poller [interval] |
| Mode | Interface Config |
sflow source-interface
M4250
M4350
Use this command to specify the physical or logical interface to use as the sFlow client source interface. If configured, the address of source Interface is used for all sFlow communications between the sFlow receiver and the sFlow client. Otherwise there is no change in behavior. If the configured interface is down, the sFlow client falls back to normal behavior.
To specify an actual interface or port, do the following:
- For an M4250 series switch, use the argument slot/port.
- For an M4350 series switch, use the argument unit/slot/port, as shown in the command format.
| Format | sflow source-interface {unit/slot/port | loopback loopback-id | serviceport | vlan vlan-id} |
| Mode | Global Config |
| Parameter | Description |
|---|---|
| slot/port or unit/slot/port | The port-based routing interface is used as the source. |
| loopback-id | The loopback interface that is used as the source IP address. The range of the loopback ID is 0 to 7. |
| serviceport | The IP address of the service port is used as the source IP address. |
| vlan-id | The VLAN interface that is used as the source IP address. The range of the VLAN ID is 1 to 4093. |
no sflow source-interface
Use this command to reset the sFlow source interface to the default settings.
| Format | no sflow source-interface |
| Mode | Global Config |
show sflow agent
M4250
M4350
The sFlow agent collects time-based sampling of network interface statistics and flow-based samples. These are sent to the configured sFlow receivers. Use this command to display the sFlow agent information.
| Format | show sflow agent |
| Mode | Privileged EXEC |
| Field | Description |
|---|---|
| sFlow Version |
Uniquely identifies the version and implementation of this MIB. The version string must have the following structure: MIB Version; Organization; Software Revision where: MIB Version: 1.3, the version of this MIB. Organization: NETGEAR Corp. Revision: 1.0 |
| IP Address | The IP address associated with this agent. |
Command example:
(NETGEAR Switch) #show sflow agent
sFlow Version.................................. 1.3;NETGEAR Corp;1.0
IP Address..................................... 10.131.12.66
show sflow pollers
M4250
M4350
Use this command to display the sFlow polling instances created on the switch. Use “-” for range.
| Format | show sflow pollers |
| Mode | Privileged EXEC |
| Field | Description |
|---|---|
| Poller Data Source | The sFlowDataSource (unit/port) for this sFlow sampler. This agent will support physical ports only. |
| Receiver Index | The sFlowReceiver associated with this sFlow counter poller. |
| Poller Interval | The number of seconds between successive samples of the counters associated with this data source. |
show sflow receivers
M4250
M4350
Use this command to display configuration information related to the sFlow receivers.
| Format | show sflow receivers [index] |
| Mode | Privileged EXEC |
| Parameter | Description |
|---|---|
| Receiver Index | The sFlow Receiver associated with the sampler/poller. |
| Owner String | The identity string for receiver, the entity making use of this sFlowRcvrTable entry. |
| Time Out | The time (in seconds) remaining before the receiver is released and stops sending samples to sFlow receiver. The no timeout value of this parameter means that the sFlow receiver is configured as a non-timeout entry. |
| Max Datagram Size | The maximum number of bytes that can be sent in a single sFlow datagram. |
| Port | The destination Layer4 UDP port for sFlow datagrams. |
| IP Address | The sFlow receiver IP address. |
| Address Type | The sFlow receiver IP address type. For an IPv4 address, the value is 1 and for an IPv6 address, the value is 2. |
| Datagram Version | The sFlow protocol version to be used while sending samples to sFlow receiver. |
Command example:
(NETGEAR Switch) #show sflow receivers 1
Receiver Index................................. 1
Owner String................................... tulasi
Time out....................................... 0
IP Address:.................................... 0.0.0.0
Address Type................................... 1
Port........................................... 6343
Datagram Version............................... 5
Maximum Datagram Size.......................... 1400
Command example:
The following example shows that a receiver is configured as a non-time-out entry:
(NETGEAR Switch) #show sflow receivers
Rcvr Owner Timeout Max Dgram Port IP Address
Indx String Size
---- -------------------------------- ---------- --------- ----- ---------------
1 tulasi No Timeout 1400 6343 0.0.0.0 <= No Timeout string
2 0 1400 6343 0.0.0.0
3 0 1400 6343 0.0.0.0
4 0 1400 6343 0.0.0.0
5 0 1400 6343 0.0.0.0
6 0 1400 6343 0.0.0.0
7 0 1400 6343 0.0.0.0
8 0 1400 6343 0.0.0.0
Command example:
The following example also shows that a receiver is configured as a non-time-out entry:
(NETGEAR Switch) #show sflow receivers 1
Receiver Index................................. 1
Owner String................................... tulasi
Time out....................................... No Timeout <= No Timeout string
is added
IP Address:.................................... 0.0.0.0
Address Type................................... 1
Port........................................... 6343
Datagram Version............................... 5
Maximum Datagram Size.......................... 1400
show sflow samplers
M4250
M4350
Use this command to display the sFlow sampling instances created on the switch.
| Format | show sflow samplers |
| Mode | Privileged EXEC |
| Field | Description |
|---|---|
| Sampler Data Source | The sFlowDataSource (unit/port) for this sFlow sampler. This agent will support physical ports only. |
| Receiver Index | The sFlowReceiver configured for this sFlow sampler. |
| Packet Sampling Rate | The statistical sampling rate for packet sampling from this source. |
| Max Header Size | The maximum number of bytes that should be copied from a sampled packet to form a flow sample. |
show sflow source-interface
M4250
M4350
Use this command to display the sFlow source interface configured on the switch.
| Format | show sflow source-interface |
| Mode | Privileged EXEC |
| Field | Description |
|---|---|
| sFlow Client Source Interface | The interface ID of the physical or logical interface configured as the sFlow client source interface. |
| sFlow Client Source IPv4 Address | The IP address of the interface configured as the sFlow client source interface. |
Command example:
(NETGEAR Switch) #show sflow source-interface
sFlow Client Source Interface.................. (not configured)