No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

CX11x, CX31x, CX710 (Earlier Than V6.03), and CX91x Series Switch Modules V100R001C10 Configuration Guide 13

The documents describe the configuration of various services supported by the CX11x&CX31x&CX91x series switch modules The description covers configuration examples and function configurations.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuration Examples

Configuration Examples

The section provides an sFlow configuration example. You can comprehend the configuration procedures through the configuration roadmap.

Example for Configuring sFlow

Networking Requirements

As shown in Figure 14-58, traffic between Department1 and Department2 is exchanged through SwitchA. Maintenance personnel need to view the traffic on 10GE1/17/2 and device running status, to detect abnormal traffic.

Figure 14-58 sFlow networking diagram

Configuration Roadmap

Configure sFlow on SwitchA and set the sampling mode on 10GE1/17/2 so that SwitchA can forward sampled traffic from 10GE1/17/1 to the sFlow collector. The sFlow collector then shows the network traffic status according to the received sFlow packets.

The configuration roadmap is as follows:

  1. Configure an IP address for SwitchA.
  2. Configure sFlow agent and sFlow collector information.
  3. Set the sFlow sampling mode.

Procedure

  1. Configure an IP address for SwitchA and specify a routing protocol.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchA
    [*HUAWEI] commit
    [~SwitchA] vlan 100
    [*SwitchA-vlan100] quit
    [*SwitchA] interface vlanif 100
    [*SwitchA-Vlanif100] ip address 10.1.1.1 24
    [*SwitchA-Vlanif100] quit
    [*SwitchA] interface 10ge 1/17/1
    [*SwitchA-10GE1/17/1] port link-type trunk
    [*SwitchA-10GE1/17/1] port trunk pvid vlan 100
    [*SwitchA-10GE1/17/1] port trunk allow-pass vlan 100
    [*SwitchA-10GE1/17/1] quit
    

  2. Configure sFlow agent and sFlow collector information.

    # Specify an IP address of the sFlow agent.

    [*SwitchA] sflow agent ip 10.1.1.1
    

    # Configure sFlow collector information: ID 2, IP address 10.1.1.2, and description netserver.

    [*SwitchA] sflow collector 2 ip 10.1.1.2 description netserver
    

  3. Set the sFlow sampling mode.

    # Configure flow sampling. Set the sFlow collector ID to 2 and sampling rate to 5000 to sample incoming and outgoing traffic.

    [*SwitchA] interface 10ge 1/17/2
    [*SwitchA-10GE1/17/2] sflow sampling collector 2 rate 5000 inbound outbound

    # Configure counter sampling. Set the sFlow collector ID to 2 and sampling interval to 120.

    [*SwitchA-10GE1/17/2] sflow counter collector 2 interval 120
    [*SwitchA-10GE1/17/2] quit
    [*SwitchA] commit
    [~SwitchA] quit

  4. Verify the configuration.

    # After the configurations are complete, view the global sFlow information.

    <SwitchA> display sflow configuration
    sFlow Version 5
    --------------------------------------------------------------------------------
    Agent IP Address  : 10.1.1.1
    --------------------------------------------------------------------------------
    Collector  ID: 2
      IP Address    : 10.1.1.2
      UDP Port      : 6343
      Length        : 1400
      Description   : netserver
    --------------------------------------------------------------------------------
    NOTE:
    CID:collectorID    LEN:length    DIR:direction    RAT:rate
    INT:interval       IN :inbound   OUT:outbound
    --------------------------------------------------------------------------------
                                Sampling                           Counter
    ---------------------------------------------------------------------------------
    Interface               CID       LEN DIR               RAT       CID         INT
    ---------------------------------------------------------------------------------
    10GE1/17/2                 2       128 IN&OUT           5000         2         120
    --------------------------------------------------------------------------------- 

Configuration Files

Configuration file of SwitchA

#
sysname SwitchA
#
vlan batch 100
#
sflow agent ip 10.1.1.1
#
sflow collector 2 ip 10.1.1.2 description netserver
#
interface Vlanif100
 ip address 10.1.1.1 255.255.255.0
#
interface 10GE1/17/1
 port link-type trunk
 port trunk pvid vlan 100
 port trunk allow-pass vlan 100
#
interface 10GE1/17/2
 sflow sampling collector 2
 sflow sampling rate 5000
 sflow sampling inbound
 sflow sampling outbound
 sflow counter collector 2
 sflow counter interval 120
#
return
Translation
Download
Updated: 2019-12-13

Document ID: EDOC1000041694

Views: 61174

Downloads: 3623

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next