Example for Collecting IPv6 Original Flow Statistics

This section provides an example for collecting IPv6 original flow statistics. NetStream enabled on a network can collect network flow statistics.

Networking Requirements

As the Internet continues to develop rapidly, carrier networks support higher bandwidth and predictable QoS parameters. As such, carriers need to provide finer-grained management and accounting services. To implement classified monitoring over networks more effectively, you can configure NetStream monitoring services to output traffic statistics collected on specified interfaces to specified NSCs and NDAs for analysis. This enables collected statistics to be output to multiple addresses.

On the network shown in Figure 1, Device A and Device B reside on different IPv6 networks. GE 0/1/0 and GE 0/1/8 connect Device C to Device A and Device B, respectively. Traffic statistics are collected on Device C and sent to NSC1 and NSC2 after traffic is aggregated.

To collect flow-specific statistics, configure NetStream monitoring services in the inbound direction of GE 0/1/0 and GE 0/1/8 on Device C. Traffic statistics collected on GE 0/1/0 are sent to NMS1 with an IPv4 address and traffic statistics collected on GE 0/1/8 are sent to NMS2 with an IPv6 address.

Figure 1 Network diagram for NetStream traffic statistics
  • Interfaces 1 and 2 in this example represent GE 0/1/0 and GE 0/1/8, respectively.

Configuration Roadmap

The configuration roadmap is as follows:

  1. Assign an IP address to each interface on each router.

  2. Configure NetStream statistics on router C.

  3. Configure NetStream monitoring services on router C.

Data Preparation

To complete the configuration, you need the following data:

  • IP address of each interface on each router

  • Version of the NetStream packet format

  • Source and destination addresses, destination port number, and monitoring view for NetStream packets

  • ID of the slot where the NetStream service processing board resides (In this example, the NetStream service processing board is in slot 1.)

Procedure

  1. Configure IP addresses for each router. The configuration details are not mentioned here.
  2. Configure NetStream statistics on Device C.

    # Specify the distributed NetStream service processing mode on a board.

    [*DeviceC] slot 1 
    [*DeviceC-slot-1] ipv6 netstream sampler to slot self
    [*DeviceC-slot-1] quit

    # Collect statistics about original flows based on TCP flags.

    [*DeviceC] ipv6 netstream tcp-flag enable

    # Configure the NetStream sampling function and set the mode to fixed packet sampling.

    [*DeviceC] ipv6 netstream sampler fix-packets 10000 inbound

    # Set the version number and source address of the exported packets carrying original flow statistics.

    [*DeviceC] ipv6 netstream export version 9
    [*DeviceC] ipv6 netstream export source ipv6 2001:db8:100::1

    # Configure NetStream to collect statistics about incoming flows on GE 0/1/0 and GE 0/1/8.

    [*DeviceC] interface GigabitEthernet0/1/0
    [*DeviceC-GigabitEthernet0/1/0] undo shutdown 
    [*DeviceC-GigabitEthernet0/1/0] ipv6 netstream inbound
    [*DeviceC-GigabitEthernet0/1/0] quit
    [*DeviceC] interface GigabitEthernet0/1/8
    [*DeviceC-GigabitEthernet0/1/8] undo shutdown 
    [*DeviceC-GigabitEthernet0/1/8] ipv6 netstream inbound
    [*DeviceC-GigabitEthernet0/1/8] quit

    NetStream enabled on a main interface cannot collect traffic statistics about its sub-interface.

  3. Configure NetStream monitoring services.

    [*DeviceC] ipv6 netstream monitor monitor1
    [*DeviceC-monitor-monitor1] ipv6 netstream export host 192.168.0.2 6000
    [*DeviceC-monitor-monitor1] quit
    [*DeviceC] ipv6 netstream monitor monitor2
    [*DeviceC-monitor-monitor2] ipv6 netstream export host ipv6 2001:db8:100::1 6000
    [*DeviceC-monitor-monitor2] quit
    [*DeviceC] interface gigabitethernet 0/1/0
    [*DeviceC-GigabitEthernet0/1/0] ipv6 netstream monitor monitor1 inbound
    [*DeviceC-GigabitEthernet0/1/0] quit
    [*DeviceC] interface gigabitethernet 0/1/8
    [*DeviceC-GigabitEthernet0/1/8] ipv6 netstream monitor monitor2 inbound
    [*DeviceC-GigabitEthernet0/1/8] quit
    [*DeviceC] commit 

  4. Verify the configuration.

    Run the display ipv6 netstream monitor all command to view information about all NetStream monitoring services.

    [~DeviceC] display ipv6 netstream monitor all
    Monitor monitor1
     ID        : 1
     AppCount  : 1
    
     Address                                   Port            
     192.168.0.2                               6000            
    ------------------------------------------------------------
    Monitor monitor2
     ID        : 2
     AppCount  : 1
    
     Address                                   Port            
     2001:DB8:100::1                           6000            
    ------------------------------------------------------------

    # Run the display ipv6 netstream cache origin slot 1 command to check information about various original flows in the NetStream flow buffer.

    [~DeviceC] display ipv6 netstream cache origin slot 1
     DstIf                         
     SrcIf                           
     DstP                          Msk          Pro            Tos 
     SrcP                          Msk          Flags          Ttl
     Packets                                                   Bytes
     NextHop                                                   Direction
     DstIP                                                     DstAs
     SrcIP                                                     SrcAs
     BGP: BGP NextHop                                          TopLabelType
     Label1                        Exp1         Bottom1
     Label2                        Exp2         Bottom2
     Label3                        Exp3         Bottom3
     TopLabelIpAddress                          VlanId         VniId
     CreateFlowTime                LastRefreshTime             VPN
     FlowLabel                     Rdvalue
     --------------------------------------------------------------------------
    
     GigabitEthernet0/1/8                                                        
     GigabitEthernet0/1/0                                          
     0                             0            59             0  
     0                             0            0              100
     443426                                                    56758528  
     ::                                                        in
     2001:DB8:20::1                                            0         
     2001:DB8:80::1                                            0         
     ::                                                        UNKNOWN             
     0                             0            0         
     0                             0            0         
     0                             0            0         
     0.0.0.0                                    0              0
     2018-05-09 11:38:07           2018-05-09 11:40:30         --
     112706                        -:-

Configuration Files

  • Device A configuration file

    # 
    sysname DeviceA
    # 
    interface GigabitEthernet0/1/0
     undo shutdown
     ipv6 enable
     ipv6 address 2001:DB8:200::2/96
    #
    return
  • Device B configuration file

    # 
    sysname DeviceB
    # 
    interface GigabitEthernet0/1/0
     undo shutdown
     ipv6 enable
     ipv6 address 2001:DB8:300::2/96
    #
    return
  • Device C configuration file

    # 
     sysname DeviceC
     # 
    ipv6 netstream tcp-flag enable
    ipv6 netstream sampler fix-packets 10000 inbound 
    ipv6 netstream export version 9
    ipv6 netstream export source ipv6 2001:DB8:100::1
     # 
    ipv6 netstream monitor monitor1
     ipv6 netstream export host 192.168.0.1 6000
    #
    ipv6 netstream monitor monitor2
     ipv6 netstream export host ipv6 2001:DB8:100::1 6000
    #
    interface GigabitEthernet0/1/0
     undo shutdown
     ipv6 enable
     ipv6 address 2001:DB8:200::1/96
    #
    interface GigabitEthernet0/1/8
     undo shutdown
     ipv6 enable
     ipv6 address 2001:DB8:300::1/96
    #
    interface GigabitEthernet0/1/0
      ipv6 netstream inbound
      ipv6 netstream monitor monitor1 inbound 
    #
    interface GigabitEthernet0/1/8
      ipv6 netstream inbound
      ipv6 netstream monitor monitor2 inbound 
    #
    slot 1
     ipv6 netstream sampler to slot self
    #      
    return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >