Skip to main content
Version: 6.4

Junos OS (sFlow)

To configure sFlow on a Juniper EX or QFX series switch, follow these steps:

Access the switch CLI

Connect to your Juniper EX or QFX switch via SSH or a console cable. If connecting via SSH, use a tool like PuTTY or the built-in SSH client in your terminal, and enter the switch's IP address, username, and password to log in.

Enter configuration mode

Once logged in, enter configuration mode by typing the following command:


Configure sFlow settings

To configure sFlow settings, including the sampling rate, polling interval, and the IP address and port of the remote flow collector, use the following commands:

set protocols sflow agent-id AGENT_IP_ADDRESS
set protocols sflow collector x.x.x.x udp-port yyyy
set protocols sflow polling-interval POLLING_INTERVAL
set protocols sflow sample-rate SAMPLE_RATE
set protocols sflow interfaces INTERFACE_NAME

Replace AGENT_IP_ADDRESS with the IP address of the sFlow agent (typically the switch's management IP address), x.x.x.x with the IP address of your ElastiFlow Unified Flow Collector, yyyy with the desired port number for the sFlow collector (e.g., 6343), POLLING_INTERVAL with the desired polling interval in seconds (e.g., 30), SAMPLE_RATE with the desired sampling rate (e.g., 1024 for 1 in 1024 packets), and INTERFACE_NAME with the name of the interface you want to monitor (e.g., ge-0/0/0). You may configure multiple interfaces to be monitored.

Commit and save the changes

After configuring the sFlow settings, commit and save the changes by entering the following commands:


Exit configuration mode

Type exit to leave configuration mode and return to the Juniper EX or QFX switch CLI.

Verify the configuration

To verify that sFlow is configured correctly, use the following command:

show sflow

This command should display the sFlow settings you just configured.

Once you've completed these steps, your Juniper EX or QFX series switch will start exporting sFlow data to the specified ElastiFlow Unified Flow Collector. Make sure your flow collector is set up to receive and process the exported data for analysis and monitoring purposes.