Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Configuring sFlow Technology for Network Monitoring (CLI Procedure)

You can configure sFlow technology, designed for monitoring high-speed switched or routed networks, to continuously monitor traffic at wire speed on all interfaces simultaneously. Junos OS fully supports the sFlow standard described in RFC 3176, InMon Corporation's sFlow: A Method for Monitoring Traffic in Switched and Routed Networks (see http://faqs.org/rfcs/rfc3176.html).`

To configure sFlow features:

  1. Configure the IP address and the UDP port of the collector:
    [edit protocols]
    user@switch# set sflow collector ip-address udp-port port-number
  2. Enable sFlow technology on a specific interface:
    [edit protocols sflow]
    user@switch# set interfaces (sFlow Monitoring Technology) interface-name

    Note: You cannot enable sFlow technology on a Layer 3 VLAN-tagged interface.

    You cannot enable sFlow technology on a link aggregation group (LAG), but you can enable it on the member interfaces of a LAG.

  3. Specify how often the sFlow agent polls the interface:
    [edit protocols sflow]
    user@switch# set polling-interval seconds

    Note: Specify 0 if you do not want to poll the interface.

  4. Specify the rate at which packets must be sampled. You can specify either an egress or an ingress qualifier, or both.

    Note: The sample-rate number (the global sample rate) statement has been deprecated and might be removed from future product releases. We strongly recommend that you phase out its use.

    Note: We recommend that you configure the same sample rates for both ingress and egress. If the sample rates are different, the lower value is used.

    To specify an egress sample rate:

    [edit protocols sflow]
    user@switch# set sample-rate egress number

    To specify an ingress sample rate:

    [edit protocols sflow]
    user@switch# set sample-rate ingress number
  5. To configure the polling interval and the egress and ingress sample rates at the interface level:
    [edit protocols sflow interfaces (sFlow Monitoring Technology) interface-name]
    user@switch# set polling-interval seconds
    [edit protocols sflow interfaces (sFlow Monitoring Technology)]
    user@switch# set sample-rate egress number
    [edit protocols sflow interfaces (sFlow Monitoring Technology)]
    user@switch# set sample-rate ingress number

    Note: The interface-level configuration overrides the global configuration.

  6. To specify an IP address to be used as the agent ID for the sFlow agent:
    [edit protocols sflow]
    user@switch# set agent-id ip-address
  7. To specify the source IP address to be used for sFlow datagrams:
    [edit protocols sflow]
    user@switch# set source-ip ip-address

Published: 2012-12-07