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 12

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

This section provides configuration examples of traffic statistics.

Example for Configuring Traffic Statistics

Networking Requirements

As shown in Figure 13-40, the tenant device is connected to the external network device through the Switch Module on the data center network. 802.1p priorities of storage service packets and data service packets are 6 and 2 respectively. The tenant requires that statistics on storage service packets be collected to determine bandwidth allocation.

Figure 13-40 Networking for configuring traffic statistics
Configuration Roadmap
The traffic statistics function is enabled so that the Switch Module can collect statistics on storage service packets. The configuration roadmap is as follows:
  1. Create VLANs and configure interfaces so that the Switch Module can connect to external network devices.
  2. Configure an ACL to match packets with 802.1p priorities of 6.
  3. Configure a traffic classifier and reference the ACL in the traffic classifier.
  4. Configure a traffic behavior so that the Switch Module collects statistics on packets matching rules.
  5. Configure a traffic policy, bind the traffic policy to the traffic classifier and traffic behavior, and apply the traffic policy to 10GE1/17/2 in the inbound direction so that the Switch Module collects statistics on packets with 802.1p priorities of 6.

Procedure

  1. Create a VLAN and configure interfaces.

    # Create VLAN 100.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch Module
    [*HUAWEI] commit
    [~Switch Module] vlan 100
    [*Switch Module-vlan100] quit
    [*Switch Module] commit
    

    # Configure 10GE1/17/1 on the Switch Module as a trunk interface and add 10GE1/17/1 and 10GE1/17/2 to VLAN 100.

    [~Switch Module] interface 10ge 1/17/1
    [~Switch Module-10GE1/17/1] port link-type trunk
    [*Switch Module-10GE1/17/1] port trunk allow-pass vlan 100
    [*Switch Module-10GE1/17/1] quit
    [*Switch Module] interface 10ge 1/17/2
    [*Switch Module-10GE1/17/2] port default vlan 100
    [*Switch Module-10GE1/17/2] quit
    [*Switch Module] commit
    

  2. Configure an ACL.

    # Create ACL 4000 (Layer 2 ACL) on the Switch Module to match packets with 802.1p priorities of 6.

    [~Switch Module] acl 4000
    [*Switch Module-acl-L2-4000] rule permit 8021p 6
    [*Switch Module-acl-L2-4000] quit
    [*Switch Module] commit

  3. Configure a traffic classifier.

    Create a traffic classifier c1 on the Switch Module and reference ACL 4000 in the traffic classifier.

    [~Switch Module] traffic classifier c1
    [*Switch Module-classifier-c1] if-match acl 4000
    [*Switch Module-classifier-c1] quit
    [*Switch Module] commit

  4. Configure a traffic behavior.

    # Create a traffic behavior b1 on the Switch Module and configure the traffic statistics action in the traffic behavior.

    [~Switch Module] traffic behavior b1
    [*Switch Module-behavior-b1] statistics enable
    [*Switch Module-behavior-b1] quit
    [*Switch Module] commit

  5. Configure a traffic policy and apply the traffic policy to an interface.

    # Create a traffic policy p1 on the Switch Module and bind the traffic policy to the traffic classifier and traffic behavior.

    [~Switch Module] traffic policy p1
    [*Switch Module-trafficpolicy-p1] classifier c1 behavior b1
    [*Switch Module-trafficpolicy-p1] quit
    [*Switch Module] commit

    # Apply the traffic policy p1 to the inbound direction of 10GE1/17/2.

    [~Switch Module] interface 10ge 1/17/2
    [~Switch Module-10GE1/17/2] traffic-policy p1 inbound
    [*Switch Module-10GE1/17/2] quit
    [*Switch Module] commit
    [*Switch Module] quit

  6. Verify the configuration.

    # View the ACL configuration.

    <Switch Module> display acl 4000
    L2 ACL 4000, 1 rule
    ACL's step is 5
     rule 5 permit 8021p 6 (0 times matched)

    # View the traffic classifier configuration.

    <Switch Module> display traffic classifier c1
      Traffic Classifier Information:
        Classifier: c1
          Type: OR
          Rule(s):
            if-match acl 4000
    

    # View the traffic policy configuration.

    <Switch Module> display traffic policy p1
      Traffic Policy Information:
        Policy: p1
          Classifier: c1
            Type: OR
          Behavior: b1
            Statistics: enable
    

    # View the traffic statistics.

    <Switch Module> display traffic-policy statistics interface 10ge 1/17/2 inbound
    Traffic policy: p1, inbound                                                                                                         
    -------------------------------------------------------------------------                                                           
      Slot: 1                                                                                                                           
        Item                              Packets                       Bytes                                                           
        ---------------------------------------------------------------------                                                           
        Matched                            212185                    22067448                                                           
          +--Passed                        212185                    22067448                                                           
          +--Dropped                            0                           0                                                           
            +--Filter                           0                           0                                                           
            +--CAR                              0                           0                                                           
        --------------------------------------------------------------------- 

Configuration Files
  • Configuration file of the Switch Module
    #
    sysname Switch Module
    #
    vlan batch 100
    #
    acl number 4000
     rule 5 permit 8021p 6 
    #
    traffic classifier c1 type or
     if-match acl 4000
    #
    traffic behavior b1
     statistics enable
    #
    traffic policy p1
     classifier c1 behavior b1 precedence 5 
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 100
    #
    interface 10GE1/17/2
     port default vlan 100
     traffic-policy p1 inbound
    #
    return
    
Translation
Download
Updated: 2019-08-09

Document ID: EDOC1000041694

Views: 59097

Downloads: 3623

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