Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

sFlow Support on Routers

Use Feature Explorer to confirm platform and release support for specific features.

Review the Platform-Specific sFlow Behavior section for notes related to your platform.

sFlow, a high-speed network monitoring technology, samples packets and transmits them in UDP datagrams to a collector, ensuring continuous traffic monitoring on all interfaces. An sFlow monitoring system consists of an sFlow agent embedded in the device and up to four external collectors. The sFlow agent's two main activities are random sampling and statistics gathering. The sFlow agent performs packet sampling and gathers interface statistics, and then combines the information into UDP datagrams that are sent to the sFlow collectors.

Routers support the following sFlow features:

  • Packet-based sampling

  • Time-based sampling

  • Adaptive sampling

sFlow for GRE Encapsulation

sFlow supports the export of Extended Tunnel Egress Structure fields for traffic entering IPv4 or IPv6 GRE tunnels. This enables sFlow to provide information about GRE tunnel into which a packet entering the device might be encapsulated. The GRE tunnel could be IPv4 or IPv6. The feature is supported only when sFlow is enabled in the ingress direction wherein firewall based GRE encapsulation happens on IPv4 or IPv6 packets.

The feature is supported for the below traffic scenarios when ingress sFlow sampling is enabled:

  • Incoming IPv4 traffic that undergoes IPv4 GRE encapsulation

  • Incoming IPv6 traffic that undergoes IPv4 GRE encapsulation

  • Incoming IPv4 traffic that undergoes IPv6 GRE encapsulation

  • Incoming IPv6 traffic that undergoes IPv6 GRE encapsulation

To learn more about the sFlow and sFlow Tunnel Structures, see sFlow Tunnel Structures.

Table 1 describes extended tunnel egress structure fields for traffic entering IPv4 or IPv6 GRE tunnels.

Table 1: Extended Tunnel Egress Structure Fields and Values
Field Name Value
Protocol reported 0x2f (GRE)
Source IP IPv4 or IPv6 address of the tunnel source
Destination IP IPv4 or IPv6 address of the tunnel destination endpoint
length 0
source port 0
destination port 0
tcp flags 0
priority 0

The extended structure for IPv4 and IPv6 GRE tunnels is below:

Sampled IPv4 header structure is below:

Sampled IPv6 header structure is below:

sFlow Sample Size

You can configure the sFlow sample size of the raw packet header to be exported as part of the sFlow record to the collector. The configurable range of sample size is from 128 bytes through 512 bytes. Use the set protocols sflow sample-size Sample-Size command to configure the sample size. If the configured sample size is greater than the actual packet size, then the actual size of the packet is exported. If you do not configure the sample size, the default size of the raw packet header exported to the collector is 128 bytes.

The sample size configured in the global sFlow configuration is inherited by all the interfaces configured under sFlow protocols.

Platform-Specific sFlow Behavior

Use Feature Explorer to confirm platform and release support for specific features.

Use the following table to review platform-specific behaviors for your platform.

Platform Difference
ACX Series
  • ACX Series routers that support sFlow have the following limitations:

    • ACX5448 router do not support Packet-based sampling.

    • ACX5000 line of routers have the following limitations:

      • You can configure ingress and egress sampling on only one unit under a physical interface, and you must enable sFlow for that physical interface (port). You cannot enable sFlow unless you configure the unit under the physical interface.

      • The system does not support egress sampling for Broadcast, Unknown unicast and Multicast (BUM) traffic because it cannot populate the source-interface field in the sFlow datagrams.

      • In the case of Layer 3 forwarding, the system does not populate the Destination VLAN and Destination Priority fields.

      • The system does not support sFlow sampling on the output interface of an analyzer.

      • SNMP MIB support for sFlow is not available.

      • You can not enable sFlow on IRB interfaces, logical tunnel (lt-), and LSI interfaces.

MX Series

  • MX Series routers that support sFlow have the following limitations:

    • We recommend that you configure the same sample rate for all the ports in a line card. If you configure different sample rates, the lowest value is used for all ports on the line card.

    • MX Series routers support configuration of only one sampling rate (inclusive of ingress and egress rates) on an line card). To support compatibility with the sFlow configuration of other Juniper Networks products, the routers still accept multiple rate configuration on different interfaces of the same line card. However, the routers program the lowest rate as the sampling rate for all the interfaces of that line card.

      The (show sflow interfaces) command displays the configured rate and the actual (effective) rate. However, different rates on different line cards are still supported on MX Series routers.

    • We do not support sFlow configuration on the following line cards:

      • JNP10K-LC4800

      • MPC10E

      • MPC15E

      • MPC11E

      • MX10K-LC9600

PTX Series

  • PTX Series routers that support sFlow can export Extended Tunnel Egress Structure fields for traffic entering IPv4 or IPv6 GRE tunnels.

  • PTX Series routers that support sFlow have the following limitations:

    • On PTX10001-36MR, PTX10003, PTX10004, PTX10008, and PTX10016 routers, sFlow supports the export of Extended Tunnel Egress Structure fields for traffic entering IPv4 or IPv6 GRE tunnels.

    • You can configure sFlow only on Ethernet interfaces (et-*) for the PTX10001-36MR, PTX10003, PTX10004, PTX10008, and PTX10016 routers. We do not support sFlow on loopback interfaces (lo0).

    • On PTX1000 router, sFlow technology works at the physical interface level. Enabling sFlow on one logical interface automatically enables it for all logical interfaces associated with that physical interface.

    • On PTX1000 router and PTX10000 line of routers, you can configure sFlow only on an active logical interface. Use the show interfaces terse command to display the status information of interfaces. If both operational and admin state of an interface is up, then the interface is an active interface.

    • On PTX1000 router, PTX5000 router, and PTX10000 line of routers, sFlow fails to generate samples as expected when ingress or egress interfaces are part of the routing instance, especially in ECMP scenarios. However, egress Sflow generates expected samples for IPIP packets between different routing instances, even in ECMP scenarios.

    • PTX Series routers support configuration of only one sampling rate (inclusive of ingress and egress rates) on an line card). To support compatibility with the sFlow configuration of other Juniper Networks products, the routers still accept multiple rate configuration on different interfaces of the same line card. However, the routers program the lowest rate as the sampling rate for all the interfaces of that line card.

      The (show sflow interfaces) command displays the configured rate and the actual (effective) rate. However, different rates on different line cards are still supported on PTX Series routers.

Change History Table

Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.

Release
Description
14.2
Starting in Junos OS Evolved 23.1R1 release for PTX10003-80C, PTX10003-160C, PTX10001-36MR, PTX10004, PTX10008 and PTX10016 devices, you can configure the sFlow sample size of the raw packet header to be exported as part of the sFlow record to the collector.