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 Original Flow Statistics Exporting

Example for Configuring Original Flow Statistics Exporting

Applicable Products and Versions

This example applies to all models and versions.

Networking Requirements

In Figure 2-42, departments 1 and 2 connect to the Internet through SwitchA. Network administrators want to collect statistics about traffic between the two departments and the Internet for network planning.

Figure 2-42 NetStream networking diagram

Configuration Roadmap

You can configure IPv4 original flow statistics exporting on 10GE1/0/1 of SwitchA. Configure SwitchA to collect statistics about incoming and outgoing traffic on the interface, and to send the statistics to the NetStream server for further analysis. The analysis result helps you plan the network.

The configuration roadmap is as follows:

  1. Configure IP addresses for interfaces on SwitchA.
  2. Configure NetStream sampling.
  3. Configure NetStream flow aging.
  4. Configure original flow statistics exporting.
  5. Configure the version for exported packets.
  6. Enable original flow statistics collection on interfaces.

Procedure

  1. Configure IP addresses for interfaces on SwitchA as shown in Figure 2-42.

    # Assign IP addresses to the interfaces of SwitchA.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchA
    [*HUAWEI] commit
    [~SwitchA] vlan 110
    [*SwitchA-vlan110] quit
    [*SwitchA] interface vlanif 110
    [*SwitchA-Vlanif110] ip address 10.1.1.1 24
    [*SwitchA-Vlanif110] quit
    [*SwitchA] interface 10ge 1/0/1
    [*SwitchA-10GE1/0/1] port link-type trunk
    [*SwitchA-10GE1/0/1] port trunk pvid vlan 110
    [*SwitchA-10GE1/0/1] port trunk allow-pass vlan 110
    [*SwitchA-10GE1/0/1] quit
    [*SwitchA] vlan 120
    [*SwitchA-vlan120] quit
    [*SwitchA] interface vlanif 120
    [*SwitchA-Vlanif120] ip address 10.1.2.1 24
    [*SwitchA-Vlanif120] quit
    [*SwitchA] interface 10ge 2/0/1
    [*SwitchA-10GE2/0/1] port link-type trunk
    [*SwitchA-10GE2/0/1] port trunk pvid vlan 120
    [*SwitchA-10GE2/0/1] port trunk allow-pass vlan 120
    [*SwitchA-10GE2/0/1] quit
    [*SwitchA] vlan 130
    [*SwitchA-vlan130] quit
    [*SwitchA] interface vlanif 130
    [*SwitchA-Vlanif130] ip address 10.1.3.1 24
    [*SwitchA-Vlanif130] quit
    [*SwitchA] interface 10ge 3/0/1
    [*SwitchA-10GE3/0/1] port link-type trunk
    [*SwitchA-10GE3/0/1] port trunk pvid vlan 130
    [*SwitchA-10GE3/0/1] port trunk allow-pass vlan 130
    [*SwitchA-10GE3/0/1] quit
    [*SwitchA] vlan 140
    [*SwitchA-vlan140] quit
    [*SwitchA] interface vlanif 140
    [*SwitchA-Vlanif140] ip address 10.1.4.1 24
    [*SwitchA-Vlanif140] quit
    [*SwitchA] interface 10ge 4/0/1
    [*SwitchA-10GE4/0/1] port link-type trunk
    [*SwitchA-10GE4/0/1] port trunk pvid vlan 140
    [*SwitchA-10GE4/0/1] port trunk allow-pass vlan 140
    [*SwitchA-10GE4/0/1] quit
    

  2. Configure NetStream sampling.

    # Configure NetStream sampling for the incoming and outgoing packets on 10GE1/0/1 and set the sampling interval to 8192.

    [*SwitchA] interface 10ge 1/0/1
    [*SwitchA-10GE1/0/1] netstream sampler random-packets 8192 inbound
    [*SwitchA-10GE1/0/1] netstream sampler random-packets 8192 outbound
    [*SwitchA-10GE1/0/1] quit
    

  3. Configure NetStream flow aging.

    # Set the inactive aging time to 100 seconds and enable FIN- and RST-based aging.

    [*SwitchA] netstream timeout ip inactive 100
    [*SwitchA] netstream timeout ip tcp-session

  4. Configure NetStream original flow statistics exporting.

    # Set the source IP address of the exported packets carrying original flow statistics to 10.1.2.1, destination IP address to 10.1.2.2, and destination port number to 6000.

    [*SwitchA] netstream export ip source 10.1.2.1
    [*SwitchA] netstream export ip host 10.1.2.2 6000

  5. Configure the version for exported packets.

    # Set the version of exported packets to V9.

    [*SwitchA] netstream export ip version 9

  6. Enable original flow statistics collection on the interface.

    # Enable NetStream statistics collection on 10GE1/0/1 for incoming and outgoing packets.

    [*SwitchA] interface 10ge 1/0/1
    [*SwitchA-10GE1/0/1] netstream outbound ip
    [*SwitchA-10GE1/0/1] netstream inbound ip
    [*SwitchA-10GE1/0/1] quit
    [*SwitchA] commit

Verifying the Configuration

View flow statistics.

[~SwitchA] display netstream statistics ip slot 1
 Time statistics were last cleared: -                                           
 -------------------------------------------------------------------------------
 Packet Length    : Number                                     
 -------------------------------------------------------------------------------
 1      ~    64   : 0                                                          
 65     ~    128  : 12                                                           
 129    ~    256  : 0                                                           
 257    ~    512  : 0                                                           
 513    ~    1024 : 0                                                           
 1025   ~    1500 : 0                                                           
 longer than 1500 : 0                                                           
 -------------------------------------------------------------------------------
 StreamType                                                                     
      Current           Aged        Created       Exported       Exported       
      (streams)         (streams)   (streams)     (streams)      (Packets)      
 -------------------------------------------------------------------------------
 origin                                                                         
            1              3              3              3              3       
 -------------------------------------------------------------------------------
 as                                                                             
            0              0              0              0              0       
 -------------------------------------------------------------------------------
 as-tos                                                                         
            0              0              0              0              0       
 -------------------------------------------------------------------------------
 protocol-port                                                                  
            0              0              0              0              0       
 -------------------------------------------------------------------------------
 protocol-port-tos                                                              
            0              0              0              0              0       
 -------------------------------------------------------------------------------
 source-prefix                                                                  
            0              0              0              0              0       
 -------------------------------------------------------------------------------
 source-prefix-tos                                                              
            0              0              0              0              0       
 -------------------------------------------------------------------------------
 destination-prefix                                                             
            0              0              0              0              0       
 -------------------------------------------------------------------------------
 destination-prefix-tos                                                         
            0              0              0              0              0       
 -------------------------------------------------------------------------------
 prefix                                                                         
            0              0              0              0              0       
 -------------------------------------------------------------------------------
 prefix-tos                                                                     
            0              0              0              0              0       
 -------------------------------------------------------------------------------
 mpls-label                                                                     
            0              0              0              0              0       
 -------------------------------------------------------------------------------
 vlan-id                                                                        
            0              0              0              0              0       
 -------------------------------------------------------------------------------
 bgp-nexthop-tos                                                                
            0              0              0              0              0       
 -------------------------------------------------------------------------------
 index-tos                                                                      
            0              0              0              0              0       
 -------------------------------------------------------------------------------
 source-index-tos                                                               
            0              0              0              0              0       
 -------------------------------------------------------------------------------

Configuration File

SwitchA configuration file

#                                                                               
sysname SwitchA 
#                                                                               
vlan batch 110 120 130 140 
# 
netstream timeout ip inactive 100                                               
netstream timeout ip tcp-session 
netstream export ip version 9
netstream export ip source 10.1.2.1
netstream export ip host 10.1.2.2 6000
#
interface Vlanif110                                                             
 ip address 10.1.1.1 255.255.255.0 
#                                                                               
interface Vlanif120                                                             
 ip address 10.1.2.1 255.255.255.0 
#                                                                               
interface Vlanif130                                                             
 ip address 10.1.3.1 255.255.255.0 
#                                                                               
interface Vlanif140                                                             
 ip address 10.1.4.1 255.255.255.0 
#                                                                               
interface 10GE1/0/1                                                  
 port link-type trunk                                                           
 port trunk pvid vlan 110                                                       
 port trunk allow-pass vlan 110 
 netstream inbound ip                                                           
 netstream outbound ip                                                          
 netstream sampler random-packets 8192 inbound                                  
 netstream sampler random-packets 8192 outbound  
#                                                                               
interface 10GE2/0/1                                                  
 port link-type trunk                                                           
 port trunk pvid vlan 120                                                       
 port trunk allow-pass vlan 120  
#                                                                               
interface 10GE3/0/1                                                  
 port link-type trunk                                                           
 port trunk pvid vlan 130                                                       
 port trunk allow-pass vlan 130 
#                                                                               
interface 10GE4/0/1                                                  
 port link-type trunk                                                           
 port trunk pvid vlan 140                                                       
 port trunk allow-pass vlan 140 
#
return
Download
Updated: 2019-04-03

Document ID: EDOC1000039339

Views: 106288

Downloads: 7475

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