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

Common Operation Guide

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).
Configuring and Applying a Traffic Policy

Configuring and Applying a Traffic Policy

The procedure for configuring and applying a traffic policy is as follows:
  1. Configure a traffic classifier to match specified data flows.
    1. Run the system-view command to enter the system view.
    2. Run the traffic classifier classifier-name [ type { and | or } ] command to create a traffic classifier and enter the traffic classifier view, or to enter the view of an existing traffic classifier.
    3. Define matching rules in the traffic classifier to match specified data flows. For details, see "Configuring a Traffic Classifier" in Configuration Guide - QoS - MQC Configuration.
    4. Run the commit command to commit the configuration.
    5. Run the quit command to exit from the traffic classifier view.
  2. Configure a traffic behavior and specify an action for data flows.
    1. Run the traffic behavior behavior-name command to create a traffic behavior and enter the traffic behavior view, or to enter the view of an existing traffic behavior.
    2. Define an action in the traffic behavior as needed. For details, see "Configuring a Traffic Behavior" in Configuration Guide - QoS - MQC Configuration.
    3. Run the commit command to commit the configuration.
    4. Run the quit command to exit from the traffic behavior view.
  3. Configure a traffic policy and bind the traffic classifier and traffic behavior to the traffic policy.
    1. Run the traffic policy policy-name command to create a traffic policy and enter the traffic policy view, or to enter the view of an existing traffic policy.
    2. Run the classifier classifier-name behavior behavior-name [ precedence precedence-value ] command to bind the traffic behavior to the traffic classifier in the traffic policy.
    3. Run the commit command to commit the configuration.
    4. Run the quit command to exit from the traffic policy view.
  4. Apply the traffic policy.
    1. Run the following commands in different views.
      NOTE:

      Each device supports different views in which a traffic policy is applied. For details, see "Applying the Traffic Policy" in Configuration Guide - QoS - MQC Configuration.

      • Run the traffic-policy policy-name global [ slot slot-id ] { inbound | outbound } command in the system view.
      • Run the traffic-policy policy-name { inbound | outbound } command in the interface view.
      • Run the traffic-policy policy-name { inbound | outbound } command in the VLAN view.
      • Run the traffic-policy policy-name { inbound | outbound } command in the VSI view.
      • Run the traffic-policy policy-name inbound [ exclude qos port-group group-id ] command in the VPN instance view.
      • Run the traffic-policy policy-name { inbound | outbound } command in the QoS group view.
      • Run the traffic-policy policy-name { inbound | outbound } command in the BD view.
    2. Run the commit command to commit the configuration.
Configure and apply a traffic policy so that packets with source IP address 192.168.1.10 from 10GE1/0/1 are redirected to 192.168.2.20.
<HUAWEI> system-view
[~HUAWEI] acl 2000  //Create an ACL.
[*HUAWEI-acl4-basic-2000] rule permit source 192.168.1.10 0.0.0.0 //Add a rule to match packets with the source IP address of 192.168.1.10.
[*HUAWEI-acl4-basic-2000] quit
[*HUAWEI] commit
[~HUAWEI] traffic classifier c1  //Configure a traffic classifier.
[*HUAWEI-classifier-c1] if-match acl 2000  //Reference ACL 2000.
[*HUAWEI-classifier-c1] quit
[*HUAWEI] commit
[~HUAWEI] traffic behavior b1  //Configure a traffic behavior.
[*HUAWEI-behavior-b1] redirect nexthop 192.168.2.20  //Configure the switch to redirect packets to 192.168.2.20.
[*HUAWEI-behavior-b1] quit
[*HUAWEI] commit
[~HUAWEI] traffic policy p1  //Configure a traffic policy.
[*HUAWEI-trafficpolicy-p1] classifier c1 behavior b1  //Bind the traffic classifier and traffic behavior to the traffic policy.
[*HUAWEI-trafficpolicy-p1] quit
[*HUAWEI] commit
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] traffic-policy p1 inbound  //Apply the traffic policy to 10GE1/0/1 in the inbound direction.
[*HUAWEI-10GE1/0/1] quit
[*HUAWEI] commit
[~HUAWEI] quit
Translation
Download
Updated: 2018-10-08

Document ID: EDOC1000102369

Views: 144581

Downloads: 3160

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