Configuration Guide Vol. 2


21.2.2 Basic Settings for sFlow Statistics

<Structure of this section>

(1) Setting to monitor received packets

Points to note

Two separate configurations are required: one configuration is enabled for the entire switch, and the other configuration is used to specify a port that is actually used. This subsection describes the configuration for monitoring incoming packets on port 1/0/4.

Figure 21-7: Example of setting for monitoring received packets for port 1/0/4

[Figure Data]

Command examples

  1. (config)# sflow destination 192.1.1.12

    Sets the IP address 192.1.1.12 for the collector.

  2. (config)# sflow sample 512

    Monitors the traffic every 512 packets.

  3. (config)# interface gigabitethernet 1/0/4

    Switches to Ethernet interface configuration mode for ports 1, 0, and 4.

  4. (config-if)# sflow forward ingress

    Enables the sFlow statistics functionality for packets received on port 1/0/4.

Notes

The sampling interval that can be specified by the sflow sample command must be determined after taking into consideration the line speed of the interface. For more information, see the Configuration Command Reference Vol.1" "sflow sample.

(2) Setting to monitor outgoing packets

Points to note

Enabling the sFlow statistics functionality for received packets or sent packets is determined by the command specified when performing configuration in the interface configuration mode (sflow forward ingress or sflow forward egress command). This subsection describes the configuration for monitoring outgoing packets on port 1/0/2.

Figure 21-8: Example of setting for monitoring sent packets for port 1/0/2

[Figure Data]

Command examples

  1. (config)# sflow destination 192.1.1.12

    Sets the IP address 192.1.1.12 for the collector.

  2. (config)# sflow sample 512

    Monitors the traffic every 512 packets.

  3. (config)# interface gigabitethernet 1/0/2

    Switches to Ethernet interface configuration mode for ports 1, 0, and 2.

  4. (config-if)# sflow forward egress

    Enables the sFlow statistics functionality for packets received on port 1/0/2.