Configuring HP Switch (J9850A)

    The following sFlow commands allow you to configure sFlow instances via the CLI.

    Syntax

    [no] sflow receiver-instance destination ip-address [ udp-port-num ]
    Enables an sFlow receiver/destination. The receiver-instance number must be a 1, 2, or 3. By default, the udp destination port number is 6343.
    To disable an sFlow receiver/destination, enter no sflow receiver-instance.

    Syntax

    sflow receiver-instance sampling sampling rate
    Once an sFlow receiver/destination has been enabled, this command enables flow sampling for that instance. The receiver-instance number is 1, 2, or 3, and the sampling rate is the allowable non-zero skipcount for the specified port or ports.
    To disable flow-sampling for the specified repeat the above command with a sampling rate of 0.

    Syntax

    sflow polling polling interval
    Once an sFlow receiver/destination has been enabled, this command enables counter polling for that instance. The receiver-instance number is 1, 2, or 3, and the polling interval may be set to an allowable non-zero value to enable polling on the specified port or ports.
    To disable counter-polling for the specified , repeat the above command 

    NOTE: Under the multiple instance implementation, sFlow can be configured via the CLI or via SNMP. However, CLI-owned sFlow configurations cannot be modified via SNMP, whereas SNMP-owned instances can be disabled via the CLI using the no sflow command.

    Syntax

    [no] sflow receiver-instance destination udp-port-numoobm
    This command provides a configurable option for sending sFlow packets to a destination through the OOBM port on the switch. The sFlow collector collects sample packets through the OOBM port, allowing the monitoring of network traffic. Both IPv4 and IPv6 addresses are supported.
    The command enables an sFlow receiver/destination. The receiver-instance number must be a 1, 2, or 3. By default, the udp destination port number is 6343.
    To disable an sFlow receiver/destination, enter no sflow
    oobm: Use the OOBM port to reach the specified sFlow receiver.

    sFlow Destination is OOBM port

    HP_Switch (Config#) sflow 1 destination 192.168.2.3 6000 oobm

    Output showing OOBM Support Enabled

    sflowhpswitchi

    Output of the running-config File showing the sFlow Destination is the OOBM Port

    sflowhpswitchii

    sFlow Configuring multiple instances

    In earlier software releases, sFlow was configured on the switch via SNMP using a single sFlow instance. Beginning with software release K.11.34, sFlow can also be configured via the CLI for up to three distinct sFlow instances: once enabled, an sFlow receiver/destination can be independently configured for full flow-sampling and counter-polling. CLI-configured sFlow instances may be saved to the startup configuration to persist across a switch reboot.

    Viewing sFlow Configuration and Status

    The following sFlow commands allow you to display sFlow configuration and status via the CLI.

    Syntax

    show sflow agent
    Displays sFlow agent information. The agent address is normally the IP address of the first VLAN configured.
    The show sflow agent command displays read-only switch agent information. The version information shows the sFlow version, MIB support, and software versions; the agent address is typically the IP address of the first VLAN configured on the switch.

    Example of viewing sflow agent information

    sflowhpswitchiii

    Syntax

    show sflow receiver instance destination
    Displays information about the management station to which the sFlow sampling-polling data is sent.
    The show sflow instance destination command includes information about the management-station's destination address, receiver port, and owner, as shown below.

    Example of viewing sFlow destination information

    sflowhpswitchiv

    Note the following details:

    • Destination Address remains blank unless it has been configured.
    • Datagrams Sent shows the number of datagrams sent by the switch agent to the management station since the switch agent was last enabled.
    • Timeout displays the number of seconds remaining before the switch agent will automatically disable sFlow (this is set by the management station and decrements with time.)
    • Max Datagram Size shows the currently set value (typically a default value, but this can also be set by the management station.) 

    Syntax

    show sflow sampling-polling
    Displays status information about sFlow sampling and polling.
    The show sflow instance sampling-polling command displays information about sFlow sampling and polling on the switch, as shown in the example below. You can specify a list or range of ports for which to view sampling information.
    Example of viewing sFlow sampling and polling information

    sflowhpswitchv

    NOTE: The sampling and polling instances (noted in parentheses) coupled to a specific receiver instance are assigned dynamically, and so the instance numbers may not always match. The key thing to note is whether sampling or polling is enabled on a port, and the sampling rates or polling intervals for the receiver instance configured on each port.

    Viewing management stations for SNMPv3

    Syntax

    show snmpv3 user

    Example

    Displays information about the management stations configured on VLAN 1 to access the switch
    HP Switch# configure terminal
    (HP_Switch_name#) vlan 1
    HP Switch(vlan-1)# show snmpv3 user
    Status and Counters - SNMPv3 Global Configuration Information
    User Name       Auth. Protocol      Privacy Protocol
    --------------- ------------------- ----------------------
    initial         MD5                 CFB AES-128
    NetworkAdmin    MD5                 CBC-DES