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

Typical Configuration Examples

CloudEngine 12800, 12800E, 8800, 7800, 6800, and 5800 Series Switches

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).
Example for Configuring sFlow

Example for Configuring sFlow

Applicable Products and Versions

This example applies to all models and versions except the CE12800E (configured with ED-E, EG-E, or EGA-E series cards), CE6880EI, and CE5880EI.

Networking Requirements

As shown in Figure 2-43, traffic between department 1 and department 2 is exchanged through SwitchA. Maintenance personnel need to view traffic on 10GE2/0/1 and devices to detect abnormal traffic.

Figure 2-43 sFlow network diagram

Configuration Roadmap

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

The configuration roadmap is as follows:

  1. Configure an IP address for SwitchA.
  2. Configure sFlow agent and 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/0/1
    [*SwitchA-10GE1/0/1] port link-type trunk
    [*SwitchA-10GE1/0/1] port trunk pvid vlan 100
    [*SwitchA-10GE1/0/1] port trunk allow-pass vlan 100
    [*SwitchA-10GE1/0/1] quit
    

  2. Configure sFlow agent and 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 32768 to sample incoming and outgoing traffic.

    [*SwitchA] interface 10ge 2/0/1
    [*SwitchA-10GE2/0/1] sflow sampling collector 2 rate 32768 inbound outbound

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

    [*SwitchA-10GE2/0/1] sflow counter collector 2 interval 120
    [*SwitchA-10GE2/0/1] quit
    [*SwitchA] commit
    [~SwitchA] quit

Verifying the Configuration

After the configurations are complete, view the global sFlow information. The following uses CE12800 as an example.

<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
  Transmission  : -
-------------------------------------------------------------------------------
NOTE:
CID:collectorID    LEN:length    DIR:direction    RAT:rate
INT:interval       IN :inbound   OUT:outbound
HEAD-ONLY:IPv4/IPv6 head length
-------------------------------------------------------------------------------
Sampling                        Counter
-------------------------------------------------------------------------------
Interface               CID       LEN DIR             RAT       CID         INT
-------------------------------------------------------------------------------
10GE2/0/1                 2       128 IN&OUT        32768         2         120
-------------------------------------------------------------------------------

Configuration File

SwitchA configuration file

#
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/0/1
 port link-type trunk
 port trunk pvid vlan 100
 port trunk allow-pass vlan 100
#
interface 10GE2/0/1
 sflow sampling collector 2
 sflow sampling rate 32768
 sflow sampling inbound
 sflow sampling outbound
 sflow counter collector 2
 sflow counter interval 120
#
return
Download
Updated: 2019-04-03

Document ID: EDOC1000039339

Views: 118134

Downloads: 7532

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