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

NE40E V800R010C10SPC500 Configuration Guide - QoS 01

This is NE40E V800R010C10SPC500 Configuration Guide - QoS
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 a Traffic Policy Based on Multi-Field Classification

Example for Configuring a Traffic Policy Based on Multi-Field Classification

This section provides an example for configuring a traffic policy based on multi-field (MF) classification.

Networking Requirements

As shown in Figure 5-4, MF classification is configured on Device C to implement access control between Device A and Device B. In addition, traffic statistics can be collected to verify packet sending and receiving.

NOTE:

Interfaces 1 and 2 in this example are GE 1/0/0 and GE 2/0/0, respectively.

Figure 5-4 Configuring a traffic policy based on MF classification

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure an ACL rule.

  2. Configure a traffic classifier.

  3. Configure a traffic behavior.

  4. Configure a traffic policy.

  5. Apply the traffic policy.

Data Preparation

To complete the configuration, you need the following data:

  • ACL number

  • Names of the traffic classifier, traffic behavior, and traffic policy, and number of the interface to which the traffic policy is applied

Procedure

  1. Configure an ACL rule.

    <HUAWEI> system-view
    [~HUAWEI] acl number 3333
    [*HUAWEI-acl-adv-3333]rule 5 permit ip source 1.1.1.1 0 destination 2.2.2.2 0
    [*HUAWEI-acl-adv-3333]rule 10 permit ip source 2.2.2.2 0 destination 1.1.1.1 0
    [*HUAWEI-acl-adv-3333] commit
    [~HUAWEI-acl-adv-3333] quit

  2. Configure a traffic classifier.

    [~HUAWEI] traffic classifier c1
    [*HUAWEI-classifier-c1] if-match acl 3333
    [*HUAWEI-classifier-c1] commit
    [~HUAWEI-classifier-c1] quit

  3. Configure a traffic behavior.

    [~HUAWEI] traffic behavior b1
    [*HUAWEI-behavior-b1] permit
    [*HUAWEI-behavior-b1] commit
    [~HUAWEI-behavior-b1] quit

  4. Configure a traffic policy.

    [~HUAWEI] traffic policy p1
    [*HUAWEI-trafficpolicy-p1] classifier c1 behavior b1
    [*HUAWEI-trafficpolicy-p1] share-mode
    [*HUAWEI-trafficpolicy-p1] statistic enable
    [*HUAWEI-trafficpolicy-p1] commit
    [~HUAWEI-trafficpolicy-p1] quit

  5. Apply the traffic policy.

    [~HUAWEI] interface gigabitethernet 1/0/0
    [~HUAWEI-GigabitEthernet1/0/0] traffic-policy p1 inbound
    [*HUAWEI-GigabitEthernet1/0/0] traffic-policy p1 outbound
    [*HUAWEI-GigabitEthernet1/0/0] commit
    [~HUAWEI-GigabitEthernet1/0/0] quit

    [~HUAWEI] interface gigabitethernet 2/0/0
    [~HUAWEI-GigabitEthernet2/0/0] traffic-policy p1 inbound
    [*HUAWEI-GigabitEthernet2/0/0] traffic-policy p1 outbound
    [*HUAWEI-GigabitEthernet2/0/0] commit
    [~HUAWEI-GigabitEthernet2/0/0] quit

  6. Verify the configuration.

    After completing the configurations, run the ping 2.2.2.2 command on Device A to ping Device B, and run the display traffic policy statistics command to view statistics about traffic exchanged between Device A and Device B.

    <HUAWEI> display traffic policy statistics interface gigabitethernet 1/0/0 inbound
    Info: The statistics is shared because the policy is shared.
    Interface: GigabitEthernet1/0/0 
    Traffic policy inbound: p1
    Traffic policy applied at 2017-08-30 18:30:20 
    Statistics enabled at 2017-08-30 18:30:20
    Statistics last cleared: Never
    Rule number: 1 IPv4, 0 IPv6 
    Current status: OK!
    Item                             Packets                      Bytes
    -------------------------------------------------------------------
    Matched                                5                       500
      +--Passed                            4                       400
      +--Dropped                           1                       100
    
    Last 30 seconds rate
    Item                                 pps                        bps
    -------------------------------------------------------------------
    Matched                                5                       500
      +--Passed                            4                       400
      +--Dropped                           1                       100
    

Configuration Files

#
acl number 3333
 rule 5 permit ip source 1.1.1.1 0 destination 2.2.2.2 0
 rule 10 permit ip source 2.2.2.2 0 destination 1.1.1.1 0
#
traffic classifier c1
 if-match acl 3333
#
traffic behavior b1
 permit
#        
traffic policy p1
 share-mode
 statistic enable
 classifier c1 behavior b1
#
interface GigabitEthernet1/0/0
 traffic-policy p1 inbound
 traffic-policy p1 outbound
#
interface GigabitEthernet2/0/0
 traffic-policy p1 inbound
 traffic-policy p1 outbound
Translation
Download
Updated: 2019-01-03

Document ID: EDOC1100055024

Views: 23107

Downloads: 115

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