Ingress Inline Sflow Overview
Ingress inline sFlow performs real-time, hardware-based packet sampling on ingress local ports. It provides timely visibility into live traffic without using control plane resources. Sampling is performed inline in the data plane after ingress processing and before queuing, ensuring minimal impact on forwarding performance.
The Packet Forwarding Engine manages sampling decisions, statistics collection, and sample-destination selection without involving the control plane. It copies selected packets and mirrors them to a configured analyzer for inspection. While the original traffic flows through the device without modification.
This inline approach delivers accurate, high-speed visibility into live network flows, maintaining consistent behavior across all egress ports. Monitoring overhead is controlled by a configurable sampling rate, enabling precise insights with minimal latency.
Benefits of Ingress Inline Sflow
- Provides precise, up-to-date network traffic data at wire speed.
- Reduces operational complexity and cost by integrating sampling within the data plane.
- Supports flexible export options for local or remote traffic analysis integration.
- Enables proactive network monitoring, troubleshooting, and capacity planning with minimal impact on forwarding performance.
Limitations
- The device uses a proprietary sFlow encapsulation and header format. This format does not comply with RFC 3176 and the collector must decode the proprietary header.
- The device does not support flow sample statistics.
- When ingress inline sampling is enabled:
- The device does not support egress sampling, except on the devices with egress sampling and rate limitations.
- Only ingress sampling configuration takes effect.
- When inline sampling is disabled, the device supports both ingress and egress sampling.
- The device cannot send sFlow packets to a collector through the management port.
- The device does not allow agent-based sampling and inline sampling to run simultaneously.
- The device does not support packet fragmentation for sFlow export. The maximum sFlow packet size is limited to the interface MTU minus the sFlow packet overhead.
- The device does not support sFlow on Aggregated Ethernet (AE) and Integrated routing and bridging (IRB) interfaces.
Configuration
Use the following steps to configure ingress inline sFlow on your device:
CLI Quick Configuration
To quickly configure this example on your switch, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.
[edit protocols sflow] set inline-sampling set collector 6.6.6.2 udp-port 6343 set sample-rate ingress 20 set interfaces et-0/0/1 sample-rate ingress 100
Step-by-Step Procedure
To configure ingress inline sFlow:
-
Enable ingress inline sampling:
[edit protocols sflow] user@switch# set inline-sampling
-
Configure the IP address and UDP port of the collector:
[edit protocols sflow] user@switch# set collector 6.6.6.2 udp-port 6343
-
Specify the rate at which ingress packets must be sampled globally:
[edit protocols sflow] user@switch# set sample-rate ingress 20
-
Enable sFlow on a specific interface:
[edit protocols sflow] user@switch# set interfaces et-0/0/1 sample rate ingress 100
-
Commit the configuration:
[edit protocols sflow] user@switch# commit
Results
Check the results of the configuration:
[edit]
user@switch# show protocols sflow
inline-sampling;
sample-rate ingress 100;
collector 6.6.6.2 {
udp-port 6343;
}
interfaces et-0/0/1;
Verification
To confirm that the configuration is correct, verify the sFlow collector configuration
using the show sflow collector command:
[edit]
user@switch# show sflow collector detail
Sflow Collector Information
Collector Address: 6.6.6.2, Collector UDP Port: 6343
DSCP Value: 0, Forwarding Class: best-effort
Number of Counter Samples: 0, Number of Flow Samples: 0
Number of Samples: 0, Number of Datagrams: 0
Routing Instance Name: default, Routing Instance Id: 0