sflow-create
This command is used to create an sFlow Agent on the network. You can configure an sFlow Agent with a scope local only (on the local switch).
Syntax sflow-create
name name-string |
Specify a name for the sFlow. |
type ingress|egress |
Specify the type of packet for the sflow Agent. Specify ingress to capture incoming packets, and egress for outgoing packets. |
sample-type raw|cooked |
Specify the sample type for the sFlow Agent. Raw indicates that the packet retains the link level header, and cooked indicates that link level header is removed. |
ports port-list |
Specify the list of ports to capture packets. |
sample-rate 256-16000 |
Specify the sFlow sample rate. The value ranges from 256-16000, and the default value is 4096. Enter zero (0) if you want to disable sFlow sampling. |
counter-polling-interval 0..120 |
Specify the sFlow interface statistics for counter polling interval. This is the periodic sampling or polling counters associated with a data source. |
trunc-length trunc-length-number |
Specify the truncated length of the captured packet. |
agent-id ip-address |
Specify the IP address of the sFlow agent. |
Note: While creating the sFlow, do not configure both the sample-rate, and counter-polling-interval to zero (0). If you do so, an error message: sflow-create: Sample-rate/counter-polling-interval both can't be 0 is displayed. However, later, you can change both values to zero (0) using the sflow-modify command if desired.
When you configure the sample-rate, and counter-polling-interval to zero (0) using the sflow-modify command, then no packets are sent out for sFlow monitoring.
Defaults The sample-rate default value is 4096.
Access CLI
History
Version 1.2 |
Command introduced. |
Version 2.1 |
The parameter scope is deprecated. The parameter agent-id added. |
Version 2.4.1 |
The parameter vnet added. |
Version 6.1.0 |
The parameter counter-polling-interval added. The parameter vnet deprecated. |
Usage sFlow Agents capture packets on the network, and send them to the sFlow Collector for analysis. Use this command to configure an sFlow Agent.
Examples To configure an sFlow Agent, SF-agent1, with the sample type raw on ports 21-25, use the following command:
CLI (network-admin@switch) > sflow-create name SF-agent1 sample-type raw ports 21-25