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

AR500, AR510, and AR530 V200R007 Commands Reference

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
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).
MQC Configuration Commands

MQC Configuration Commands

classifier behavior

Function

The classifier behavior command binds a traffic behavior to a traffic classifier in a traffic policy.

The undo classifier command unbinds a traffic behavior from a traffic classifier in a traffic policy.

By default, no traffic classifier or traffic behavior is bound to a traffic policy.

Format

classifier classifier-name behavior behavior-name

undo classifier classifier-name

Parameters

Parameter

Description

Value

classifier-name

Specifies the name of a traffic classifier.

The value is a string of 1 to 31 case-sensitive characters without spaces.

behavior-name

Specifies the name of a traffic behavior.

The value is a string of 1 to 31 case-sensitive characters without spaces.

Views

Traffic policy view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To take an action for packets of a certain type, use a traffic classifier to group the packets into one class and use a traffic behavior to define an action. Then associate the traffic classifier with the traffic behavior and bind them to a traffic policy.

Prerequisites

Precautions

When a traffic policy that is bound to a traffic classifier and a traffic behavior is applied to an interface, you can directly change the binding between the traffic classifier and the traffic behavior.

The device supports a maximum of 1024 traffic classifiers, traffic behaviors, or traffic policies. In a traffic policy, one traffic classifier can be bound to only one traffic behavior; each traffic policy supports a maximum of 1024 pairs of traffic classifiers and traffic behaviors.

Example

# Bind the traffic classifier c1 to the traffic behavior b1 in the traffic policy p1, and apply the traffic policy to Eth0/0/1 in the inbound direction.

<Huawei> system-view
[Huawei] traffic classifier c1
[Huawei-classifier-c1] if-match any
[Huawei-classifier-c1] quit
[Huawei] traffic behavior b1
[Huawei-behavior-b1] remark 8021p 2
[Huawei-behavior-b1] quit
[Huawei] traffic policy p1
[Huawei-trafficpolicy-p1] classifier c1 behavior b1
[Huawei-trafficpolicy-p1] quit
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] traffic-policy p1 inbound
[Huawei-Ethernet0/0/1] quit

# Bind the traffic classifier c1 to the new traffic behavior newb1 in the traffic policy p1 that has been applied to Eth0/0/1 in the inbound direction.

<Huawei> system-view
[Huawei] traffic policy p1
[Huawei-trafficpolicy-p1] classifier c1 behavior newb1
[Huawei-trafficpolicy-p1] quit

display traffic behavior

Function

The display traffic behavior command displays the traffic behavior configuration on the device.

Format

display traffic behavior { system-defined | user-defined } [ behavior-name ]

Parameters

Parameter

Description

Value

system-defined Displays the configuration of the system-defined traffic behavior. -
user-defined Displays the configuration of a user-defined traffic behavior. -
behavior-name

Specifies the name of a traffic behavior. If this parameter is not specified, the configuration of all traffic behaviors is displayed.

The value is a string of 1 to 31 case-sensitive characters without spaces.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

The display traffic behavior command displays the configuration of a specified traffic behavior or all traffic behaviors. The command output helps you check the traffic behavior configuration and locate faults.

Precautions

If no traffic behavior is created, the system displays the following information after this command is executed:
Info: There is no behavior exists.
If the specified traffic behavior name is incorrect, the system displays an error message after this command is executed:
Error: The behavior does not exist.

Example

# Display configurations of all traffic behaviors on the device.

<Huawei> display traffic behavior user-defined
  User Defined Behavior Information:                                            
    Behavior: b1                                                                
      Committed Access Rate:                                                    
        CIR 256 (Kbps), PIR 0 (Kbps), CBS 48128 (byte), PBS 80128 (byte)        
        Color Mode: color Blind                                                 
        Conform Action: pass                                                    
        Yellow  Action: pass                                                    
        Exceed  Action: discard                                                 
      statistic: enable                                                         
      Marking:                                                                     
        Remark DSCP 15                                                          
                                                                                
Table 15-1  Description of the display traffic behavior user-defined command output

Item

Description

Behavior

Traffic behavior name. To create a traffic behavior, run the traffic behavior command.

Committed Access Rate

CAR. To configure an action taken for packets whose rate exceeds the CIR, run the car (traffic behavior view) command.

CIR

Committed information rate (CIR). To set the CIR, run the car (traffic behavior view) command.

PIR

Peak information rate (PIR). To set the PIR, run the car (traffic behavior view) command.

CBS

Committed burst size (CBS). To set the CBS, run the car (traffic behavior view) command.

PBS

Peak burst size (PBS). To set the PBS, run the car (traffic behavior view) command.

Color Mode

Color mode, which can be color-aware or color-blind. To set the color mode, run the car (traffic behavior view) command.

Conform Action

Action taken for packets whose rate is within the CIR. To configure an action taken for packets whose rate is within the CIR, run the car (traffic behavior view) command.

Yellow Action

Action taken for yellow packets. To configure an action taken for yellow packets, run the car (traffic behavior view) command.

Exceed Action

Action taken for packets whose rate exceeds the CIR. To configure an action taken for packets whose rate exceeds the CIR, run the car (traffic behavior view) command.

Marking

Re-marking action. To configure re-marking, run the remark command.

display traffic classifier

Function

The display traffic classifier command displays the traffic classifier configuration on the device.

Format

display traffic classifier { system-defined | user-defined } [ classifier-name ]

Parameters

Parameter

Description

Value

system-defined Displays the configuration of the system-defined traffic classifier. -
user-defined Displays the configuration of a user-defined traffic classifier. -

classifier-name

Displays the configuration of a specified traffic classifier. If the name of a traffic classifier is not specified, the configuration of the system-defined traffic classifier or all user-defined traffic classifiers is displayed.

The value is a string of 1 to 31 case-sensitive characters without spaces.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

The display traffic classifier command displays the configuration of a specified traffic classifier or all traffic classifiers. The command output helps you check the traffic classifier configuration and locate faults.

Precautions

If no traffic classifier is created, the system displays the following information after this command is executed:
Info: There is no classifier exists.
If the specified traffic classifier name is incorrect, the system displays an error message after this command is executed:
Error: The classifier does not exist.

Example

# Display the configuration of all traffic classifiers on the device.

<Huawei> display traffic classifier user-defined
  User Defined Classifier Information:
   Classifier: c2
    Operator: AND
    Rule (s) :
     if-match vlan-id 110
             
   Classifier: c3
    Operator: AND
    Rule (s) :
     if-match vlan-id 100
             
   Classifier: c1
    Operator: AND
    Rule (s) :
     if-match vlan-id 120
             
Table 15-2  Description of the display traffic classifier user-defined command output

Item

Description

Classifier

Traffic classifier name. To create a traffic classifier, run the traffic classifier command.

Operator

Relationship between rules in the traffic classifier. To configure the relationship between rules in a traffic classifier, run the traffic classifier command.

Rule(s)

Rule in a traffic classifier.

Related Topics

display traffic policy

Function

The display traffic policy command displays the traffic policy configuration on the device.

Format

display traffic policy user-defined [ policy-name [ classifier classifier-name ] ]

Parameters

Parameter

Description

Value

user-defined

Displays the user-defined traffic policy configuration.

-

policy-name

Specifies the name of a traffic policy. If this parameter is not specified, the configuration of all traffic policies is displayed.

The value is a string of 1 to 31 case-sensitive characters without spaces.

classifier classifier-name

Specifies the name of a traffic classifier. If the name of a traffic policy is specified but this parameter is not specified, only the traffic policy configuration is displayed.

The value is a string of 1 to 31 case-sensitive characters without spaces.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

The display traffic policy command displays the configuration of a specified traffic policy or all traffic policies. The command output helps you check the traffic policy configuration and locate faults.

Precautions

If no traffic policy is created, the system displays an error message after this command is executed:
Info: There is no policy exists.
If the specified traffic policy name is incorrect, the system displays an error message after this command is executed:
Error: The policy does not exist.

Example

# Display the configuration of the traffic behavior bound to the traffic classifier c1 in the traffic policy p1.
<Huawei> display traffic policy user-defined p1 classifier c1
  User Defined Traffic Policy Information:
      Classifier: c1
       Operator: OR
      Behavior: b1
        statistic: enable
        Committed Access Rate:
          CIR 1000 (Kbps), PIR 2000 (Kbps), CBS 125000 (byte), PBS 250000 (byte)
          Color Mode: color Blind
          Conform Action: pass
          Yellow  Action: pass
          Exceed  Action: discard
Table 15-3  Description of the display traffic policy user-defined command output

Item

Description

Classifier

Traffic classifier in a traffic policy. To create a traffic classifier, run the traffic classifier command.

Operator

Relationship between rules in the traffic classifier. To configure the relationship between rules in a traffic classifier, run the traffic classifier command.

Behavior

Traffic behavior bound to the traffic classifier. To create a traffic behavior, run the traffic behavior command.

statistic

Whether the traffic statistics function is enabled. To enable the traffic statistics function, run the statistic enable (traffic behavior view) command.

Committed Access Rate

CAR. To configure CAR, run the car (traffic behavior view) command.

CIR 1000 (Kbps), PIR 2000 (Kbps), CBS 125000 (byte), PBS 250000 (byte)

Parameters in the QoS CAR profile, including the CIR, PIR, CBS, and PBS. To configure CAR parameters, run the car (traffic behavior view) command.

Color Mode

Color mode, which can be color-aware or color-blind. To configure a color mode, run the car (traffic behavior view) command.

Conform Action

Action taken for packets whose rate is within the CIR. To configure an action taken for packets whose rate is within the CIR, run the car (traffic behavior view) command.

Yellow Action

Action taken for yellow packets. To configure an action taken for yellow packets, run the car (traffic behavior view) command.

Exceed Action

Action taken for packets whose rate exceeds the CIR. To configure an action taken for packets whose rate exceeds the CIR, run the car (traffic behavior view) command.

display traffic policy statistics

Function

The display traffic policy statistics command displays statistics on packets matching a traffic policy that is applied to an interface.

Format

display traffic policy statistics interface interface-type interface-number [ pvc vpi-number/vci-number | dlci dlic-number ] { inbound | outbound } [ verbose { classifier-base | rule-base } [ class classifier-name [ son-class son-class-name ] ] ]

display traffic policy statistics interface virtual-template vt-number virtual-access va-number { inbound | outbound } [ verbose { classifier-base | rule-base } [ class classifier-name [ son-class son-class-name ] ] ]

Parameters

Parameter

Description

Value

interface interface-type interface-number

Displays packet statistics on a specified interface to which a traffic policy has been applied.
  • interface-type specifies the interface type.
  • interface-number specifies the interface number.

-

pvc vpi-number/vci-number

Specifies the Virtual Path Identifier (VPI)/Virtual Channel Identifier (VCI) pair.

The VPI/VCI pair can be specified on only ATM interfaces.

  • vpi-number is an integer that ranges from 0 to 255.

  • vci-number is an integer that can be 0-2, or 5-255.

dlci dlic-number

Specifies the DLCI number.

The DLCI number can be specified on only serial interfaces.

The value is an integer that ranges from 16 to 1022.

virtual-template vt-number virtual-access va-number
Displays packet statistics on a specified virtual interface to which a traffic policy has been applied.
  • virtual-template vt-number specifies the number of a virtual template interface.
  • virtual-access va-number specifies the number of a virtual access interface.

vt-number is an integer that ranges from 0 to 1023.

va-number is an integer that ranges from 0 to 1023.

inbound

Displays packet statistics in the inbound direction to which a traffic policy has been applied.

-

outbound

Displays packet statistics in the outbound direction to which a traffic policy has been applied.

-

verbose

Displays detailed packet statistics.

-

classifier-base

Displays statistics on packets matching a specified traffic classifier. If this parameter is specified, statistics on packets matching all traffic classifiers in the traffic policy are displayed.

-

rule-base

Displays statistics on packets matching a rule. If this parameter is specified, statistics on packets matching all rules are displayed.

NOTE:
Matching rules cannot be used to query packet statistics about the nested traffic policy.

-

class classifier-name

Specifies the name of a traffic classifier. If this parameter is specified, statistics on packets matching the specified traffic classifier or rules in the specified traffic classifier are displayed. If this parameter is not specified, statistics on packets matching all traffic classifiers are displayed.

Displays statistics on packets matching a specified traffic classifier in HQoS.

The value is a string of 1 to 31 case-sensitive characters without spaces.

son-class son-class-name

Displays statistics on packets matching a traffic classifier of a sub traffic policy bound to the traffic classifier specified by classifier-name.

The value is a string of 1 to 31 case-sensitive characters without spaces.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

The display traffic policy statistics command displays statistics on forwarded packets and discarded packets on an interface to which a traffic policy has been applied. The command output helps you locate faults.

Precautions

If no traffic policy is applied, the system displays the following error message after this command is executed:
Info: The Policy is not applied in this view.
If you do not run the statistic enable (traffic behavior view) command in the view of the traffic behavior in a traffic policy, the system displays the following information after this command is executed:
Info: Statistic has not been enabled.

Example

# Display packet statistics on Eth0/0/1 in the inbound direction to which a traffic policy has been applied.

<Huawei> display traffic policy statistics interface ethernet 0/0/1 inbound
                                                                                
 Interface: Ethernet0/0/1
 Traffic policy inbound: p1                                                     
 Rule number: 1                                                                 
 Current status: OK!                                                            
Item                     Sum(Packets/Bytes)               Rate(pps/bps)         
------------------------------------------------------------------------------- 
Matched                      585,859/72,646,516                999/991,976      
  Passed                     296,554/36,772,696                504/499,976      
  Dropped                    289,305/35,873,820                495/491,992      
    Filter                         0/0                           0/0            
    CAR                      289,305/35,873,820                495/491,992      
  Queue Matched                    0/0                           0/0            
    Enqueued                       0/0                           0/0            
    Discarded                      0/0                           0/0            
  CAR                        585,859/72,646,516              1,000/992,000      
    Green packets            296,050/36,710,200                504/500,000      
    Yellow packets               504/62,496                      0/0            
    Red packets              289,305/35,873,820                495/491,992  
# Display statistics on incoming packets matching a traffic classifier in the traffic policy that has been applied to Eth0/0/1.
<Huawei> display traffic policy statistics interface ethernet 0/0/1 inbound verbose classifier-base class c1 
 Interface: Ethernet0/0/1
 Traffic policy inbound: p1                                                   
 Rule number: 1                                                                
 Current status: OK!                                                           
 Classifier: c1 operator or                                                    
 Behavior: b1                                                                  
Item                     Sum(Packets/Bytes)               Rate(pps/bps)         
------------------------------------------------------------------------------- 
Matched                      640,466/79,417,784              1,000/992,168      
  Passed                     324,078/40,185,672                504/500,096      
  Dropped                    316,388/39,232,112                496/492,072      
    Filter                         0/0                           0/0            
    CAR                      316,388/39,232,112                496/492,072      
  Queue Matched                    0/0                           0/0            
    Enqueued                       0/0                           0/0            
    Discarded                      0/0                           0/0            
  CAR                        640,466/79,417,784              1,000/992,168      
    Green packets            323,574/40,123,176                504/500,096      
    Yellow packets               504/62,496                      0/0            
    Red packets              316,388/39,232,112                496/492,072      
Behavior:Be                                                                     
Item                     Sum(Packets/Bytes)               Rate(pps/bps)         
------------------------------------------------------------------------------- 
  Queue Matched                    0/0                           0/0            
    Enqueued                       0/0                           0/0            
    Discarded                      0/0                           0/0            

# Display statistics on incoming packets matching the traffic classifier c0 in a sub traffic policy bound to the traffic classifier c1 in the traffic policy that has been applied to Eth0/0/1.1.

<Huawei> display traffic policy statistics interface ethernet 0/0/1.1 inbound verbose classifier-base class son-class c0
                                                                                
 Interface: Ethernet0/0/1.1                                              
 Traffic policy inbound: p1                                                      
 Rule number: 1                                                                 
 Current status: OK!                                                            
------------------------------------------------------------------------------- 
 Classifier: c1                                                                  
   Behavior: b1                                                                  
     Nest Policy: p0                                                             
------------------------------------------------------------------------------- 
 Classifier: c0 operator or                                                      
 Behavior: b0                                                                    
Item                           Sum(Packets/Bytes)            Rate(pps/bps)      
------------------------------------------------------------------------------- 
Matched                               2,575,767/                     2,000/    
                                    319,395,108                  1,984,880     
  +--Passed                             130,327/                       100/    
                                     16,160,548                    100,040     
  +--Dropped                          2,445,440/                     1,900/    
                                    303,234,560                  1,884,840     
    +--Filter                                 0/                         0/    
                                              0                          0     
    +--CAR                            2,445,440/                     1,900/    
                                    303,234,560                  1,884,840     
  +--Queue Matched                            0/                         0/    
                                              0                          0     
    +--Enqueued                               0/                         0/    
                                              0                          0     
    +--Discarded                              0/                         0/    
                                              0                          0     
  +--Car                              2,575,767/                     2,000/    
                                    319,395,108                  1,984,880     
    +--Green packets                    130,127/                       100/    
                                     16,135,748                    100,040     
    +--Yellow packets                       200/                         0/    
                                         24,800                          0     
    +--Red packets                    2,445,440/                     1,900/    
                                    303,234,560                  1,884,840     
Table 15-4  Description of the display traffic policy statistics command output

Item

Description

Interface

Interface to which the traffic policy is applied.

Traffic policy inbound

Applied traffic policy.

Rule number

Number of valid rules in the traffic classifier.

Current status

Traffic policy status.

Classifier

Relationship between rules in the traffic classifier. To configure the relationship between rules in a traffic classifier, run the traffic classifier command.

Behavior

Traffic behavior name. To create a traffic behavior, run the traffic behavior command.

Item

Statistical item.

Sum(Packets/Bytes) Number of packets or bytes. If the information is displayed as -, the statistics on this item cannot be collected.
Rate(pps/bps) Rate, in pps or bit/s. If the information is displayed as -, the statistics on this item cannot be collected.

Matched

Numbers of packets and bytes that match traffic classification rules. The data is originated from the packet statistics that have been collected since the original statistics were cleared last time.

Passed

Numbers of forwarded packets and bytes that match traffic classification rules. The data is originated from the packet statistics that have been collected since the original statistics were cleared last time.

Dropped

Numbers of discarded packets and bytes that match traffic classification rules. The data is originated from the packet statistics that have been collected since the original statistics were cleared last time. The discarded packets include the filtered packets and packets dropped by CAR.

Filter

Numbers of filtered packets and bytes that match traffic classification rules. The data is originated from the packet statistics that have been collected since the original statistics were cleared last time.

CAR

Numbers of packets and bytes that match traffic classification rules and are discarded by CAR. The data is originated from the packet statistics that have been collected since the original statistics were cleared last time. To configure CAR, run the car (traffic behavior view) command.

Queue Matched

Numbers of packets and bytes that match rules in AF, LLQ, EF, and BE queues. The data is originated from the packet statistics that have been collected since the original statistics were cleared last time.

Enqueued

Numbers of forwarded packets and bytes that match rules in AF, LLQ, EF, and BE queues. The data is originated from the packet statistics that have been collected since the original statistics were cleared last time.

Discarded

Numbers of discarded packets and bytes that match rules in AF, LLQ, EF, and BE queues. The data is originated from the packet statistics that have been collected since the original statistics were cleared last time.

Car

Numbers of packets and bytes that match the traffic classifier. The traffic classifier is bound to the traffic behavior that containing the CAR action. The data is originated from the packet statistics that have been collected since the original statistics were cleared last time.

Green packets

Number of green packets, including the number of bytes in green packets. The data is originated from the packet statistics that have been collected since the original statistics were cleared last time.

Yellow packets

Number of yellow packets, including the number of bytes in yellow packets. The data is originated from the packet statistics that have been collected since the original statistics were cleared last time.

Red packets

Number of red packets, including the number of bytes in red packets. The data is originated from the packet statistics that have been collected since the original statistics were cleared last time.

display traffic-policy applied-record

Function

The display traffic-policy applied-record command displays traffic policy records.

Format

display traffic-policy applied-record [ policy-name ]

Parameters

Parameter

Description

Value

policy-name

Displays the record of a specified traffic policy. If this parameter is not specified, records of all the applied traffic policies are displayed.

The value is a string of 1 to 31 case-sensitive characters without spaces.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

The display traffic-policy applied-record command displays a record of an applied traffic policy or records of all applied traffic policies, including the view, interface number, and direction that the traffic policy/policies is/are applied to, and number of times the traffic policy/policies is/are applied. The command output helps you check traffic policy records and locate faults.

Precautions

If no traffic policy is created or the specified traffic policy name is incorrect, the system displays an error message after this command is executed:
Error: Traffic policy does not exist. 

Example

# Display the record of the traffic policy p1.

<Huawei> display traffic-policy applied-record p1
------------------------------------------------- 
  Policy Name:   p1                                                             
  Policy Index:  2                                                              
     Classifier:c1     Behavior:b1                                              
-------------------------------------------------                               
 *interface GigabitEthernet2/0/0                                                
    traffic-policy p1 inbound                                                   
      slot 0    :  success                                                      
      slot 2    :  success                                                      
   Classifier: c1                                                               
    Operator: OR                                                                
    Rule(s) :                                                                   
     if-match 8021p 4                                                           
     Behavior: b1                                                               
      Marking:                                                                  
        Remark DSCP cs2                                                         
   Behavior: Be                                                                 
      Assured Forwarding:                                                       
        Bandwidth 0 (Kbps)                                                     
-------------------------------------------------                               
  Policy total applied times: 1.                                                
Table 15-5  Description of the display traffic-policy applied-record command output

Item

Description

Policy Name

Traffic policy name.

Policy Index

Traffic policy index.

Classifier

Traffic classifier name.

Behavior

Traffic behavior name.

interface GigabitEthernet2/0/0

Interface to which the traffic policy is applied.

traffic-policy p1 inbound

Inbound direction to which the traffic policy p1 is applied.

slot

Status of the traffic policy applied to the specified card.
  • success: The traffic policy is applied successfully.
  • fail: The traffic policy fails to be applied.

Operator

Relationship between rules in the traffic classifier.

Rule(s)

Rules in the traffic classifier.

Marking

Re-marking action.

Policy total applied times

Number of times the traffic policy is applied.

if-match 8021p

Function

The if-match 8021p command configures a matching rule based on the 802.1p priority of VLAN packets in a traffic classifier.

The undo if-match 8021p command deletes a matching rule based on the 802.1p priority of VLAN packets in a traffic classifier.

By default, a matching rule based on the 802.1p priority of VLAN packets is not configured in a traffic classifier.

Format

if-match 8021p 8021p-value &<1-8>

undo if-match 8021p

Parameters

Parameter

Description

Value

8021p-value

Specifies the 802.1p priority in VLAN packets.

The value is an integer that ranges from 0 to 7. A larger value indicates a higher priority in VLAN packets.

Views

Traffic classifier view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the if-match 8021p command to classify traffic based on the 802.1p priority in VLAN packets so that the device processes packets matching the same traffic classifier in the same manner.

Prerequisites

A traffic classifier has been created using the traffic classifier command in the system view.

Precautions

Regardless of whether the relationship between traffic classification rules is AND or OR, if you enter multiple values of 802.1p priorities, the packet that matches one 802.1p priority matches a rule.

If you run the if-match 8021p command in the same traffic classifier view multiple times, only the latest configuration takes effect.

Example

# Configures a matching rule based on the 802.1p priority of 1 in the traffic classifier c1.

<Huawei> system-view
[Huawei] traffic classifier c1 operator and
[Huawei-classifier-c1] if-match 8021p 1
Related Topics

if-match acl

Function

The if-match acl command configures a matching rule based on an Access Control List (ACL) in a traffic classifier.

The undo if-match acl command deletes a matching rule based on an ACL.

By default, a matching rule based on an ACL is not configured in a traffic classifier.

Format

if-match [ ipv6 ] acl { acl-number | acl-name }

undo if-match [ ipv6 ] acl { acl-number | acl-name }

NOTE:

The AR510 series do not support IPv6.

Parameters

Parameter

Description

Value

ipv6

Indicates that IPv6 ACLs are matched. If this parameter is not specified, IPv4 ACLs are matched.

-

acl-number

Specifies the number of an ACL.

The value is an integer that ranges from 2000 to 4999. The number of an ACL6 ranges from 2000 to 3999.
  • ACLs numbered 2000 to 2999 are basic ACLs, which are used to classify all packets.
  • ACLs numbered 3000 to 3999 are advanced ACLs, which are used to classify packets based on Layer 3 information.
  • ACLs numbered 4000 to 4999 are Layer 2 ACLs, which are used to classify packets based on the source MAC address, destination MAC address, and packet type.
acl-name

Specifies the name of an ACL.

The value is a string of 1 to 32 case-sensitive characters without spaces. The value must start with a letter (a to z or A to Z, case sensitive).

Views

Traffic classifier view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To classify packets based on the interface that receives packets, source IP address, destination IP address, protocol over IP, source and destination TCP port numbers, ICMP type and code, and source and destination MAC addresses, ARP packets, reference an ACL in a traffic classifier. You must first define an ACL and configure rules in the ACL, and then run the if-match acl command to configure a matching rule based on the ACL so that the device processes packets matching the same rule in the same manner.

Prerequisites

The following operations must have been performed:
  • Create an ACL and configure rules in the ACL.

  • Create a traffic classifier using the traffic classifier command.

Precautions

Regardless of whether the relationship between rules in a traffic classifier is AND or OR, if an ACL contains multiple rules, the packet that matches one ACL rule matches the ACL.

You can configure multiple ACL rules in a traffic classifier to match different types of packets. A traffic classifier allows a maximum of 1024 if-match rules.

If a traffic policy containing if-match acl is applied to a Layer 2 interface on the device, it does not take effect for traffic forwarded at Layer 2.

NOTE:

A traffic policy containing if-match ipv6 acl can be applied to only WAN-side interfaces.

Example

# Configure a matching rule based on ACL 2046 in the traffic classifier c1.

<Huawei> system-view
[Huawei] acl 2046
[Huawei-acl-basic-2046] rule permit source any
[Huawei-acl-basic-2046] quit
[Huawei] traffic classifier c1 operator and
[Huawei-classifier-c1] if-match acl 2046

if-match any

Function

The if-match any command configures a matching rule based on all data packets in a traffic classifier.

The undo if-match any command deletes a matching rule based on all data packets in a traffic classifier.

By default, a matching rule based on all data packets is not configured in a traffic classifier.

Format

if-match any

undo if-match any

Parameters

None

Views

Traffic classifier view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To process all the data packets in the same manner, run the if-match any command.

Prerequisites

A traffic classifier has been created using the traffic classifier command in the system view.

Precautions

The if-match any command is valid for all data packets but is invalid for the control packets sent to the CPU, such as Bridge Protocol Data Units (BPDUs) of the Spanning Tree Protocol (STP).

NOTE:

A traffic policy containing if-match any that is applied to a LAN-side interface takes effect for only IPv4 packets.

If if-match any and other Layer 3 rules exist in a traffic classifier, if-match any matches only Layer 3 packets.

Example

# Configure a matching rule based on all data packets in the traffic classifier c1.

<Huawei> system-view
[Huawei] traffic classifier c1 operator and
[Huawei-classifier-c1] if-match any
Related Topics

if-match cvlan-8021p

Function

The if-match cvlan-8021p command configures a matching rule based on the 802.1p priority in the inner tag of QinQ packets in a traffic classifier.

The undo if-match cvlan-8021p command deletes a matching rule based on the 802.1p priority in the inner tag of QinQ packets in a traffic classifier.

By default, a matching rule based on the 802.1p priority in the inner tag of QinQ packets is not configured in a traffic classifier.

Format

if-match cvlan-8021p 8021p-value &<1-8>

undo if-match cvlan-8021p

Parameters

Parameter

Description

Value

8021p-value

Specifies the 802.1p priority in the inner tag of QinQ packets.

The value is an integer that ranges from 0 to 7. A larger value indicates a higher priority of QinQ packets.

Views

Traffic classifier view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the if-match cvlan-8021p command to classify packets based on the 802.1p priority in the inner tag of QinQ packets so that the device processes packets matching the same traffic classifier in the same manner.

Prerequisites

A traffic classifier has been created using the traffic classifier command in the system view.

Precautions

The if-match cvlan-8021p command is valid for only the double-tagged packets.

If you enter multiple 802.1p priorities in the inner tags of packets in the command, a packet matches a rule as long as it matches one of the 802.1p priorities in the inner tags of packets, regardless of whether the relationship between traffic classification rules is AND or OR.

If you run the if-match cvlan-8021p command multiple times in the same traffic classifier view, only the latest configuration takes effect.

Example

# Configure a matching rule based on the inner 802.1p priority of 1 in QinQ packets in the traffic classifier c1.

<Huawei> system-view
[Huawei] traffic classifier c1 operator and
[Huawei-classifier-c1] if-match cvlan-8021p 1
Related Topics

if-match cvlan-id

Function

The if-match cvlan-id command configures a matching rule based on the VLAN ID in the inner tag of QinQ packets in a traffic classifier. You can specify the VLAN ID range in the inner tag.

The undo if-match cvlan-id command deletes a matching rule based on the VLAN ID in the inner tag of QinQ packets in a traffic classifier.

By default, a matching rule based on the VLAN ID in the inner tag of QinQ packets is not configured in a traffic classifier.

Format

if-match cvlan-id start-cvlan-id [ to end-cvlan-id ]

undo if-match cvlan-id start-cvlan-id [ to end-cvlan-id ]

Parameters

Parameter

Description

Value

start-cvlan-id [ to end-cvlan-id ]

Specifies the VLAN ID in the inner tag of a QinQ packet.

  • start-cvlan-id specifies the start VLAN ID in the inner tag. The value is an integer that ranges from 1 to 4094.

  • end-cvlan-id specifies the end VLAN ID in the inner tag. The value is an integer that ranges from 1 to 4094.

The value of end-cvlan-id must be larger than the value of start-cvlan-id.

If to end-cvlan-id is not specified, only the VLAN ID specified by start-cvlan-id is matched.

Views

Traffic classifier view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the if-match cvlan-id command to classify packets based on the VLAN ID in the inner tag of QinQ packets so that the device processes packets matching the same traffic classifier in the same manner.

Prerequisites

A traffic classifier has been created using the traffic classifier command in the system view.

Precautions

The if-match cvlan-id command is valid for only the double-tagged packets.

Example

# Configure a matching rule based on the VLAN ID of 100 in the inner tag of QinQ packets in the traffic classifier c1.

<Huawei> system-view
[Huawei] traffic classifier c1 operator and
[Huawei-classifier-c1] if-match cvlan-id 100
Related Topics

if-match destination-mac

Function

The if-match destination-mac command configures a matching rule based on the destination MAC address in a traffic classifier.

The undo if-match destination-mac command deletes a matching rule based on the destination MAC address in a traffic classifier.

By default, a matching rule based on the destination MAC address is not configured in a traffic classifier.

Format

if-match destination-mac mac-address [ mac-address-mask mac-address-mask ]

undo if-match destination-mac

Parameters

Parameter

Description

Value

mac-address

Specifies the destination MAC address.

The value is in H-H-H format. An H is a hexadecimal number of 4 digits.

mac-address-mask mac-address-mask

Specifies the mask of the destination MAC address.

Similar to the mask of the IP address, the value F indicates that the destination MAC address is matched and the value 0 indicates that the destination MAC address is not matched. The mask of the MAC address determines a group of MAC addresses. The device can accurately match certain bits in the destination MAC address using the mask of the MAC address. In practice, you can set these bits to F in the mask of the destination MAC address.

The value is in H-H-H format. An H is a hexadecimal number of 4 digits. The value cannot be 0-0-0.

Views

Traffic classifier view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the if-match destination-mac command to configure a matching rule based on the destination MAC address in a traffic classifier so that the device processes packets matching the same traffic classifier in the same manner.

Prerequisites

A traffic classifier has been created using the traffic classifier command in the system view.

Precautions

If you run the if-match destination-mac command in the same traffic classifier view multiple times, only the latest configuration takes effect.

Example

# Configure a matching rule based on the destination MAC address of 0050-ba27-bed3 in the traffic classifier c1.

<Huawei> system-view
[Huawei] traffic classifier c1 operator and
[Huawei-classifier-c1] if-match destination-mac 0050-ba27-bed3

# Configure a matching rule based on the destination MAC address of XX50-bXX7-bed3 in the traffic classifier c1.

<Huawei> system-view
[Huawei] traffic classifier c1 operator and
[Huawei-classifier-c1] if-match destination-mac 0050-b007-bed3 mac-address-mask 00ff-f00f-ffff

if-match dscp

Function

The if-match dscp command configures a matching rule based on the Differentiated Services Code Point (DSCP) priority of packets in a traffic classifier.

The undo if-match dscp command deletes a matching rule based on the DSCP priority of packets in a traffic classifier.

By default, a matching rule based on the DSCP priority of packets is not configured in a traffic classifier.

Format

if-match [ ipv6 ] dscp dscp-value &<1-8>

undo if-match [ ipv6 ] dscp

NOTE:

The AR510 series do not support IPv6.

Parameters

Parameter

Description

Value

ipv6

Indicates that IPv6 packets are matched. If this parameter is not specified, IPv4 packets are matched.

-

dscp dscp-value

Specifies the DSCP priority.

The value can be a DiffServ code, an integer ranging from 0 to 63, or the name of the DSCP service type such as af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1-cs7, default, and ef.

The values corresponding to service types are as follows:

  • af11: 10
  • af12: 12
  • af13: 14
  • af21: 18
  • af22: 20
  • af23: 22
  • af31: 26
  • af32: 28
  • af33: 30
  • af41: 34
  • af42: 36
  • af43: 38
  • cs1: 8
  • cs2: 16
  • cs3: 24
  • cs4: 32
  • cs5: 40
  • cs6: 48
  • cs7: 56
  • default: 0
  • ef: 46

Views

Traffic classifier view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the if-match dscp command to classify packets based on the DSCP priority of packets so that the device processes packets matching the same traffic classifier in the same manner.

Prerequisites

A traffic classifier has been created using the traffic classifier command in the system view.

Precautions

If you enter multiple DSCP priorities in the command, a packet matches a rule as longs as it matches one of the DSCP priorities, regardless of whether the relationship between traffic classification rules is AND or OR.

In a traffic classifier where the relationship between rules is AND, the if-match dscp and if-match ip-precedence commands cannot be used simultaneously.

NOTE:

A traffic policy containing if-match ipv6 dscp can be applied to only WAN-side interfaces.

If you run the if-match dscp command in the same traffic classifier view multiple times, only the latest configuration takes effect.

Example

# Configure a matching rule based on the DSCP priority of 1 in the traffic classifier class1.

<Huawei> system-view
[Huawei] traffic classifier class1
[Huawei-classifier-class1] if-match dscp 1

if-match inbound-interface

Function

The if-match inbound-interface command configures a matching rule based on an inbound interface in a traffic classifier.

The undo if-match inbound-interface command deletes a matching rule based on an inbound interface in a traffic classifier.

By default, a matching rule based on an inbound interface is not configured in a traffic classifier.

Format

if-match inbound-interface interface-type interface-number

undo if-match inbound-interface

Parameters

Parameter

Description

Value

interface-type interface-number

Specifies the type and number of an inbound interface.
  • interface-type specifies the interface type.
  • interface-number specifies the interface number.

-

Views

Traffic classifier view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the if-match inbound-interface command to classify traffic based on an inbound interface so that the device processes packets matching the same traffic classifier in the same manner.

Prerequisites

A traffic classifier has been created using the traffic classifier command in the system view.

Precautions

  • A traffic policy containing if-match inbound-interface can only be configured on WAN-side interfaces of the device.
  • If you run the if-match inbound-interface command in the same traffic classifier view multiple times, only the latest configuration takes effect.

Example

# Configure a matching rule based on the inbound interface of Eth0/0/1 in the traffic classifier class1.

<Huawei> system-view
[Huawei] traffic classifier class1
[Huawei-classifier-class1] if-match inbound-interface ethernet 0/0/1
Related Topics

if-match ip-precedence

Function

The if-match ip-precedence command configures a matching rule based on the IP precedence of packets in a traffic classifier.

The undo if-match ip-precedence command deletes a matching rule based on the IP precedence of packets in a traffic classifier.

By default, a matching rule based on the IP precedence of packets is not configured in a traffic classifier.

Format

if-match ip-precedence ip-precedence-value &<1-8>

undo if-match ip-precedence

Parameters

Parameter

Description

Value

ip-precedence-value

Specifies the IP precedence.

The value is an integer that ranges from 0 to 7. A larger value indicates a higher priority of packets.

Views

Traffic classifier view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the if-match ip-precedence command to classify packets based on the IP precedence so that the device processes packets matching the same traffic classifier in the same manner.

Prerequisites

A traffic classifier has been created using the traffic classifier command in the system view.

Precautions

After the if-match ip-precedence command is run, IP precedences are listed in ascending order.

If you enter multiple IP precedences in the if-match ip-precedence command, a packet matches a rule as long as it matches one of the IP precedence, regardless of whether the relationship between traffic classification rules is AND or OR.

In a traffic classifier where the relationship between rules is AND, the if-match dscp and if-match ip-precedence commands cannot be used simultaneously.

If you run the if-match ip-precedence command in the same traffic classifier view multiple times, only the latest configuration takes effect.

Example

# Configure a matching rule based on the IP precedence of 1 in the traffic classifier class1.

<Huawei> system-view
[Huawei] traffic classifier class1
[Huawei-classifier-class1] if-match ip-precedence 1

if-match l2-protocol

Function

The if-match l2-protocol command configures a matching rule based on the Layer 2 protocol type in a traffic classifier.

The undo if-match l2-protocol command deletes a matching rule based on the Layer 2 protocol type in a traffic classifier.

By default, a matching rule based on the Layer 2 protocol type is not configured in a traffic classifier.

Format

if-match l2-protocol { arp | ip | rarp | protocol-value }

undo if-match l2-protocol

Parameters

Parameter

Description

Value

arp

Indicates that ARP packets are classified.

The value of arp corresponds to 0x0806.

ip

Indicates that IP packets are classified.

The value of ip corresponds to 0x0800.

rarp

Indicates that RARP packets are classified.

The value of rarp corresponds to 0x8035.

protocol-value

Specifies the value of a protocol type.

The value ranges from 0x0600 to 0xFFFF in hexadecimal notation and must start with 0x.

The value of protocol-value must be larger than 0x600.

Views

Traffic classifier view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the if-match l2-protocol command to classify packets based on the Layer 2 protocol type so that the device processes packets matching the same traffic classifier in the same manner.

Prerequisites

A traffic classifier has been created using the traffic classifier command in the system view.

Precautions

The device supports Layer 2 protocols including ARP, IP, and RARP.

NOTE:

A traffic policy containing if-match l2-protocol that is applied to a LAN-side interface takes effect for only IPv4 packets.

If you run the if-match l2-protocol command in the same traffic classifier view multiple times, only the latest configuration takes effect.

Example

# Define a matching rule based on the protocol type of ARP in the traffic classifier c1.

<Huawei> system-view
[Huawei] traffic classifier c1 operator and
[Huawei-classifier-c1] if-match l2-protocol arp
Related Topics

if-match outbound-interface

Function

The if-match outbound-interface command configures a matching rule based on an outbound cellular interface in a traffic classifier.

The undo if-match outbound-interface command deletes a matching rule based on an outbound cellular interface in a traffic classifier.

By default, no matching rule based on an outbound cellular interface is configured in a traffic classifier.

Format

if-match outbound-interface Cellular interface-number:channel

undo if-match outbound-interface

Parameters

Parameter

Description

Value

Cellular interface-number

Specifies the number of a cellular interface.

-

Views

Traffic classifier view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the if-match outbound-interface command to classify packets based on an outbound cellular interface so that the device processes packets matching the same traffic classifier in the same manner.

Prerequisites

A traffic classifier has been created using the traffic classifier command in the system view.

Precautions

  • The traffic policy that is bound to the traffic classifier based on the outbound interface can be only applied to the cellular interface in the outbound direction.
  • If you run the if-match outbound-interface command in the same traffic classifier view multiple times, only the latest configuration takes effect.

Example

# Configure a matching rule based on the outbound interface of Cellular3/0/0:1 in the traffic classifier class1.

<Huawei> system-view
[Huawei] traffic classifier class1
[Huawei-classifier-class1] if-match outbound-interface Cellular 3/0/0:1
Related Topics

if-match packet-length

Function

The if-match packet-length command configures a matching rule based on the IPv4 packet length in a traffic classifier.

The undo if-match packet-length command deletes a matching rule based on the IPv4 packet length in a traffic classifier.

By default, no matching rule based on the IPv4 packet length is configured in a traffic classifier.

Format

if-match packet-length min-length [ to max-length ]

undo if-match packet-length

Parameters

Parameter

Description

Value

min-length

Specifies the minimum value in the IPv4 packet length range if max-length is specified, or the IPv4 packet length if max-length is not specified.

The value is an integer that ranges from 1 to 16000, in bytes.

to max-length

Specifies the maximum value in the IPv4 packet length range. If this parameter is not specified, the IPv4 packet length is matched.

The value is an integer that ranges from 1 to 16000, in bytes. The value of max-length must be larger than or equal to the value of min-length.

Views

Traffic classifier view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the if-match packet-length command to classify packets based on the IPv4 packet length so that the device processes packets matching the same traffic classifier in the same manner.

Prerequisites

A traffic classifier has been created using the traffic classifier command in the system view.

Precautions

In the if-match packet-length command, the matched packet length is the IP packet header plus the data length, excluding the Ethernet packet header.

The if-match packet-length command cannot be used to match the IPv6 packet length.

If you run the if-match packet-length command in the same traffic classifier view multiple times, only the latest configuration takes effect.

Example

# Configure a matching rule based on the IPv4 packet length of 1000 bytes in the traffic classifier class1.

<Huawei> system-view
[Huawei] traffic classifier class1
[Huawei-classifier-class1] if-match packet-length 1000
Related Topics

if-match protocol

Function

The if-match protocol command configures a matching rule based on a protocol in a traffic classifier.

The undo if-match protocol command deletes a matching rule based on a protocol in a traffic classifier.

By default, a matching rule based on a protocol is not configured in a traffic classifier.

Format

if-match protocol { ip | ipv6 }

undo if-match protocol

NOTE:

The AR510 series do not support IPv6.

Parameters

Parameter

Description

Value

ip

Indicates an IP protocol.

-

ipv6

Indicates an IPv6 protocol.

-

Views

Traffic classifier view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the if-match protocol command to classify packets based on a protocol so that the device processes packets of the same protocol in the same manner.

Prerequisites

A traffic classifier has been created using the traffic classifier command in the system view.

Precautions

Currently, the device supports IPv4 and IPv6.

If you run the if-match protocol command in the same traffic classifier view multiple times, only the latest configuration takes effect.

Example

# Configure a matching rule based on the IP protocol in the traffic classifier c1.

<Huawei> system-view
[Huawei] traffic classifier c1 operator and
[Huawei-classifier-c1] if-match protocol ip
Related Topics

if-match qos-group

Function

The if-match qos-group command configures a matching rule based on the QoS group index of IPSec packets in a traffic classifier.

The undo if-match qos-group command deletes a matching rule based on the QoS group index of IPSec packets in a traffic classifier.

By default, no matching rule based on the QoS group index of IPSec packets is configured in a traffic classifier.

Format

if-match qos-group qos-group-value

undo if-match qos-group

Parameters

Parameter

Description

Value

qos-group-value

Specifies a QoS group index of IPSec packets.

The value is an integer that ranges from 1 to 99.

Views

Traffic classifier view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After a QoS group is specified in an IPSec policy, run the if-match qos-group command to configure a matching rule based on the QoS group index of IPSec packets in a traffic classifier so that the device can provide differentiated services.

Prerequisites

  • A QoS group that IPSec packets belong to has been configured using the qos group command in the view of the IPSec policy in manual mode, view of the IPSec policy in ISAKMP mode, IPSec policy template view, IPSec profile view, or Efficient VPN policy view.

  • A traffic classifier has been created using the traffic classifier command in the system view.

Precautions

If a QoS group is modified in an IPSec policy and the traffic policy matches the modified QoS group, run the reset ipsec sa or reset ike sa command to clear SAs and establish new SAs through re-negotiation.

The if-match qos-group and if-match packet-length commands cannot be configured in the same traffic classifier.

If you run the if-match qos-group command in the same traffic classifier view multiple times, only the latest configuration takes effect.

Example

# Configure the device to match packets with QoS group 30 in the traffic classifier class1.

<Huawei> system-view
Huawei] traffic classifier class1
[Huawei-classifier-class1] 
Related Topics

if-match source-mac

Function

The if-match source-mac command configures a matching rule based on the source MAC address in a traffic classifier.

The undo if-match source-mac command deletes a matching rule based on the source MAC address in a traffic classifier.

By default, a matching rule based on the source MAC address is not configured in a traffic classifier.

Format

if-match source-mac mac-address [ mac-address-mask mac-address-mask ]

undo if-match source-mac

Parameters

Parameter

Description

Value

mac-address

Specifies the source MAC address.

The value is in H-H-H format. An H is a hexadecimal number of 4 digits.

mac-address-mask mac-address-mask

Specifies the mask of the source MAC address.

Similar to the mask of the IP address, the mask of the MAC address determines a group of MAC addresses. The device can accurately match certain bits in the source MAC address using the mask of the MAC address. In practice, you can set these bits to F in the mask of the source MAC address.

The value is in H-H-H format. An H is a hexadecimal number of 4 digits. The value cannot be 0-0-0.

Views

Traffic classifier view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the if-match source-mac command to classify packets based on the source MAC address so that the device processes packets matching the same traffic classifier in the same manner.

Prerequisites

A traffic classifier has been created using the traffic classifier command in the system view.

Precautions

If you run the if-match source-mac command in the same traffic classifier view multiple times, only the latest configuration takes effect.

Example

# Configure a matching rule based on the source MAC address of 0050-ba27-bed2 in the traffic classifier c1.

<Huawei> system-view
[Huawei] traffic classifier c1 operator and
[Huawei-classifier-c1] if-match source-mac 0050-ba27-bed2

# Configure a matching rule based on the source MAC address of XX50-bXX7-bed3 in the traffic classifier c1.

<Huawei> system-view
[Huawei] traffic classifier c1 operator and
[Huawei-classifier-c1] if-match source-mac 0050-ba27-bed3 mac-address-mask 00ff-f00f-ffff

if-match tcp

Function

The if-match tcp command configures a matching rule based on the SYN Flag in the TCP packet header in a traffic classifier.

The undo if-match tcp command deletes a matching rule based on the SYN Flag in the TCP packet header in a traffic classifier.

By default, a matching rule based on the SYN Flag in the TCP packet header is not configured in a traffic classifier.

Format

if-match tcp syn-flag { ack | fin | psh | rst | syn | urg }*

undo if-match tcp syn-flag

Parameters

Parameter

Description

Value

syn-flag

Specifies the SYN Flag in the TCP packet header.

-
ack

Indicates that the SYN Flag type in the TCP packet header is ACK.

-

fin

Indicates that the SYN Flag type in the TCP packet header is FIN.

-

psh

Indicates that the SYN Flag type in the TCP packet header is PSH.

-

rst

Indicates that the SYN Flag type in the TCP packet header is RST.

-

syn

Indicates that the SYN Flag type in the TCP packet header is SYN.

-

urg

Indicates that the SYN Flag type in the TCP packet header is URG.

-

Views

Traffic classifier view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the if-match tcp command to classify packets based on the SYN Flag in the TCP packet header so that the device processes packets matching the same traffic classifier in the same manner.

Prerequisites

A traffic classifier has been created using the traffic classifier command in the system view.

Precautions

A traffic policy containing if-match tcp that is applied to a LAN-side interface takes effect for only IPv4 packets.

If you run the if-match tcp command in the same traffic classifier view multiple times, only the latest configuration takes effect.

Example

# Configure a matching rule based on the SYN Flag of psh in the traffic classifier c1.

<Huawei> system-view
[Huawei] traffic classifier c1 operator and
[Huawei-classifier-c1] if-match tcp syn-flag psh
Related Topics

if-match vlan-id

Function

The if-match vlan-id command configures a matching rule based on the VLAN ID of packets in a traffic classifier.

The undo if-match vlan-id command deletes a matching rule based on the VLAN ID of packets in a traffic classifier.

By default, a matching rule based on the VLAN ID of packets is not configured in a traffic classifier.

Format

if-match vlan-id start-vlan-id [ to end-vlan-id ]

undo if-match vlan-id start-vlan-id [ to end-vlan-id ]

Parameters

Parameter

Description

Value

start-vlan-id [ to end-vlan-id ]

Specifies the outer VLAN ID.

  • start-vlan-id specifies the start outer VLAN ID. The value of start-vlan-id is an integer that ranges from 1 to 4094.

  • end-vlan-id specifies the end outer VLAN ID. The value of end-vlan-id is an integer that ranges from 1 to 4094.

end-vlan-id must be larger than start-vlan-id. If to end-vlan-id is not specified, only the VLAN ID specified by start-vlan-id is matched.

Views

Traffic classifier view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the if-match vlan-id command to classify packets based on the VLAN ID so that the device processes packets matching the same traffic classifier in the same manner.

Prerequisites

A traffic classifier has been created using the traffic classifier command in the system view.

Example

# Configure a matching rule based on VLAN 2 in the traffic classifier c1.

<Huawei> system-view
[Huawei] traffic classifier c1 operator and
[Huawei-classifier-c1] if-match vlan-id 2
Related Topics

if-match pvc

Function

The if-match pvc command configures a matching rule based on the Permanent Virtual Circuit (PVC) of ATM packets in a traffic classifier.

The undo if-match pvc command deletes a matching rule based on the PVC of ATM packets in a traffic classifier.

By default, a matching rule based on the PVC of ATM packets is not configured in a traffic classifier.

Format

if-match pvc vpi-number/vci-number

undo if-match pvc vpi-number/vci-number

Parameters

Parameter

Description

Value

vpi-number/vci-number

Specifies the Virtual Path Identifier (VPI) or Virtual Channel Identifier (VCI) number.

  • The VPI number is an integer that ranges from 0 to 255.

  • The VCI number is an integer that can be 0-2, or 5-65534.

Views

Traffic classifier view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the if-match pvc command to classify ATM packets based on the PVC so that the device processes packets matching the same traffic classifier in the same manner.

Prerequisites

A traffic classifier has been created using the traffic classifier command in the system view.

Precautions

If you run the if-match pvc command in the same traffic classifier view multiple times, only the latest configuration takes effect.

Example

# Configure a matching rule based on the VPI/VCI pair of 1/101 in the traffic classifier database.

<Huawei> system-view
[Huawei] traffic classifier database
[Huawei-classifier-database] if-match pvc 1/101

if-match rtp

Function

The if-match rtp command configures a matching rule based on the Real-time Transport Protocol (RTP) port number in a traffic classifier.

The undo if-match rtp command deletes a matching rule based on the RTP port number in a traffic classifier.

By default, a matching rule based on the RTP port number is not configured in a traffic classifier.

Format

if-match rtp start-port start-port-number end-port end-port-number

undo if-match rtp

Parameters

Parameter

Description

Value

start-port start-port-number

Specifies the start RTP port number.

The value is an integer that ranges from 2000 to 65535.

end-port end-port-number

Specifies the end RTP port number.

The value is an integer that ranges from 2000 to 65535. end-port-number must be larger than start-port-number.

Views

Traffic classifier view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the if-match rtp command to classify packets based on the RTP port number so that the device processes packets with even port numbers in the range of start-port-number and end-port-number matching the same traffic classifier in the same manner.

Prerequisites

A traffic classifier has been created using the traffic classifier command in the system view.

Precautions

A traffic policy containing if-match rtp can only be configured on WAN-side interfaces of the device.

If you run the if-match rtp command in the same traffic classifier view multiple times, only the latest configuration takes effect.

Example

# Configure a matching rule based on even port numbers in the range of 2222 to 2666 in the traffic classifier database.

<Huawei> system-view
[Huawei] traffic classifier database
[Huawei-classifier-database] if-match rtp start-port 2222 end-port 2666

ip netstream sampler (traffic behavior view)

Function

The ip netstream sampler command configures an action of sampling IPv4 packets in a traffic behavior.

The undo ip netstream command deletes an action of sampling IPv4 packets in a traffic behavior.

By default, an action of sampling IPv4 packets is not configured in a traffic behavior.

Format

ip netstream sampler { fix-packets packet-interval | fix-time time-interval | random-packets packet-interval | random-time time-interval } { multicast | rpf-failure | unicast }*

undo ip netstream

Parameters

Parameter

Description

Value

fix-packets packet-interval

Specifies the number of packets between two sampled packets in the packet-based regular sampling.

The value is an integer that ranges from 1 to 65535.

fix-time time-interval

Specifies the sampling interval in time-based regular sampling.

The value is an integer that ranges from 5 to 30000, in milliseconds.

random-packets packet-interval

Specifies the number of packets between two sampled packets in the packet-based random sampling.

The value is an integer that ranges from 1 to 65535.

random-time time-interval

Specifies the sampling interval in time-based random sampling.

The value is as follows:

  • 3.0
  • 6.0
  • 12.0
  • 24.0
  • 48.0
  • 96.0
  • 192.0
  • 383.5
  • 767.0
  • 1534.0
  • 3068.0
  • 6136.0

The unit is millisecond.

multicast

Enables sampling of multicast packets.

-

rpf-failure

Enables sampling of packets that fail the RPF check in a traffic behavior.

-

unicast

Enables sampling of unicast packets.

-

Views

Traffic behavior view

Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can configure NetStream for packets matching a traffic classifier, and set a sampling mode and the sampling interval so that the device only analyzes statistics on packets matching the traffic classifier.

If you run the ip netstream sampler command multiple times in the same view, only the latest configuration takes effect.

Example

# Configure sampling of multicast packets at intervals of 100 packets in the traffic behavior b1.

<Huawei> system-view
[Huawei] traffic behavior b1
[Huawei-behavior-b1] ip netstream sampler fix-packets 100 multicast
Related Topics

qos pre-nat

Function

The qos pre-nat command enables NAT pre-classification.

The undo qos pre-nat command disables NAT pre-classification.

By default, NAT pre-classification is disabled.

Format

qos pre-nat

undo qos pre-nat

Parameters

None

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After the NAT-enabled device translates the private IP address of IP packets into the public IP address, the NAT-enabled device cannot identify the private IP address before translation on the outbound interface and cannot classify IP packets based on private IP addresses. NAT pre-classification enables the NAT-enabled device to carry the private IP address before translation on the outbound interface so that the NAT-enabled device can classify IP packets based on private IP addresses and provide differentiated services.

Follow-up Procedure

Configure a traffic classifier, configure a matching rule based on private IP addresses, configure a traffic behavior for packets matching the traffic classifier, associate the traffic classifier with the traffic behavior in a traffic policy, and apply the traffic policy to the outbound interface of the NAT-enabled device.

Example

# Enable NAT pre-classification on GE0/0/1 and configure traffic policing for packets matching private IP addresses.

<Huawei> system-view
[Huawei] acl 2001
[Huawei-acl-basic-2001] rule permit source 10.110.10.0 0.0.0.255
[Huawei-acl-basic-2001] quit
[Huawei] nat address-group 1 10.2.2.2 10.2.2.3
[Huawei] interface gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/0/1] qos pre-nat
[Huawei-GigabitEthernet0/0/1] quit
[Huawei] traffic classifier c1
[Huawei-classifier-c1] if-match acl 2001
[Huawei-classifier-c1] quit
[Huawei] traffic behavior b1
[Huawei-behavior-b1] car cir 10000
[Huawei-behavior-b1] quit
[Huawei] traffic policy p1
[Huawei-trafficpolicy-p1] classifier c1 behavior b1
[Huawei-trafficpolicy-p1] quit
[Huawei] interface gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/0/1] traffic-policy p1 outbound
Related Topics

remark 8021p

Function

The remark 8021p command configures an action of re-marking the 802.1p priority in VLAN packets in a traffic behavior.

The undo remark 8021p command deletes the configuration.

By default, an action of re-marking the 802.1p priority in VLAN packets is not configured in a traffic behavior.

Format

remark 8021p 8021p-value

undo remark 8021p

Parameters

Parameter

Description

Value

8021p-value

Specifies the 802.1p priority in VLAN packets.

The value is an integer that ranges from 0 to 7. A larger value indicates a higher priority in VLAN packets.

Views

Traffic behavior view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To provide differentiated services based on the inner 802.1p priority in VLAN packets, run the remark 8021p command to configure the device to re-mark the inner 802.1p priority in VLAN packets in a traffic behavior.

Follow-up Procedure

Run the traffic policy command to create a traffic policy and run the classifier behavior command in the traffic policy view to bind the traffic classifier to the traffic behavior containing 802.1p priority re-marking.

Precautions

  • If you run the remark 8021p command in the same traffic behavior view multiple times, only the latest configuration takes effect.
  • If a traffic policy containing remark 8021p is applied to the outbound direction on an interface, the device still processes outgoing packets based on the original priority but the downstream Layer 2 device processes the packets based on the re-marked priority.

  • If the trust command and a traffic policy containing remark 8021p are used on the same interface, remark 8021p in the traffic policy takes precedence over the trust command. Packet priorities are not affected by the trust command.

Example

# Re-mark 802.1p priorities of VLAN packets with 4 in the traffic behavior b1.

<Huawei> system-view
[Huawei] traffic behavior b1
[Huawei-behavior-b1] remark 8021p 4

remark dscp

Function

The remark dscp command configures an action of re-marking the DSCP priority in IP packets in a traffic behavior.

The undo remark dscp command deletes the configuration.

By default, an action of re-marking the DSCP priority in IP packets is not configured in a traffic behavior.

Format

remark dscp { dscp-name | dscp-value }

undo remark dscp

Parameters

Parameter

Description

Value

dscp-name

Specifies the DSCP priority name in IP packets.

The value can be ef, af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1, cs2, cs3, cs4, cs5, cs6, cs7, or default.

dscp-value

Specifies the DSCP priority in IP packets.

The value is an integer that ranges from 0 to 63. A larger value indicates a higher priority.

Views

Traffic behavior view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To provide differentiated services based on the DSCP priority, run the remark dscp command to configure the device to re-mark the DSCP priority in IP packets in a traffic behavior.

Follow-up Procedure

Run the traffic policy command to create a traffic policy and run the classifier behavior command in the traffic policy view to bind the traffic classifier to the traffic behavior containing DSCP priority re-marking.

Precautions

  • If a traffic policy containing remark dscp is applied to the outbound direction on an interface, the device still processes outgoing packets based on the original priority but the downstream Layer 3 device or above processes the packets based on the re-marked priority.

  • If the trust command and a traffic policy containing remark dscp are used on the same interface, remark dscp in the traffic policy takes precedence over the trust command. Packet priorities are not affected by the trust command.

  • If you run the remark dscp command in the same traffic behavior view multiple times, only the latest configuration takes effect.

Example

# Re-mark the DSCP priority in IP packets with 56 in the traffic behavior b1.

<Huawei> system-view
[Huawei] traffic behavior b1
[Huawei-behavior-b1] remark dscp 56
Related Topics

remark local-precedence

Function

The remark local-precedence command configures an action of re-marking the internal priority in packets in a traffic behavior.

The undo remark local-precedence command deletes the configuration.

By default, an action of re-marking the internal priority in packets is not configured in a traffic behavior.

Format

remark local-precedence local-precedence-value

undo remark local-precedence

Parameters

Parameter

Description

Value

local-precedence-value

Specifies the internal priority value.

The value is an integer that ranges from 0 to 7. A larger value indicates a higher priority. The value can be af1, af2, af3, af4, be, cs6, cs7, or ef.

The values corresponding to internal priority names are as follows:
  • af1: 1
  • af2: 2
  • af3: 3
  • af4: 4
  • be: 0
  • cs6: 6
  • cs7: 7
  • ef: 5

Views

Traffic behavior view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To provide differentiated services based on the internal priority of packets, run the remark local-precedence command to configure the device to re-mark the internal priority of packets so that the device can provide QoS based on the re-marked priority.

Follow-up Procedure

Run the traffic policy command to create a traffic policy and run the classifier behavior command in the traffic policy view to bind the traffic classifier to the traffic behavior containing internal priority re-marking.

Precautions

Re-marking the internal priority only affects QoS processing of packets on the device.

When remark local-precedence is defined in the traffic behavior, you are advised to apply the traffic policy containing the traffic behavior to the inbound direction of the interface.

If you run the remark local-precedence command in the same traffic behavior view multiple times, only the latest configuration takes effect.

Example

# Re-mark the internal priority of packets with 2 in the traffic behavior b1.

<Huawei> system-view
[Huawei] traffic behavior b1
[Huawei-behavior-b1] remark local-precedence 2
Related Topics

remark cvlan-8021p

Function

The remark cvlan-8021p command configures an action of re-marking the inner 802.1p priority in QinQ packets in a traffic behavior.

The undo remark cvlan-8021p command deletes the configuration.

By default, an action of re-marking the inner 802.1p priority in QinQ packets is not configured in a traffic behavior.

Format

remark cvlan-8021p 8021p-value

undo remark cvlan-8021p

Parameters

Parameter

Description

Value

8021p-value

Re-marks the inner 802.1p priority in QinQ packets.

The value is an integer that ranges from 0 to 7. A larger value indicates a higher priority.

Views

Traffic behavior view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To provide differentiated services based on the inner 802.1p priority in QinQ packets, run the remark cvlan-8021p command to configure the upstream device to re-mark the inner 802.1p priority in QinQ packets in a traffic behavior.

Precautions

The remark cvlan-8021p command is valid only for QinQ packets that carry two or more layers of tags.

If you run the remark cvlan-8021p command in the same traffic behavior view multiple times, only the latest configuration takes effect.

Example

# Re-mark the inner 802.1p priority in QinQ packets with 5 in the traffic behavior b1.

<Huawei> system-view
[Huawei] traffic behavior b1
[Huawei-behavior-b1] remark cvlan-8021p 5
Related Topics

reset traffic policy statistics

Function

The reset traffic policy statistics command clears traffic statistics on an interface to which a traffic policy has been applied.

Format

reset traffic policy statistics interface interface-type interface-number { inbound | outbound }

reset traffic policy statistics interface virtual-template vt-number virtual-access va-number { inbound | outbound }

Parameters

Parameter

Description

Value

interface interface-type interface-number

Clears traffic statistics on a specified interface.
  • interface-type specifies the interface type.
  • interface-number specifies the interface number.

-

virtual-template vt-number virtual-access va-number
Clears traffic statistics on a specified virtual interface.
  • virtual-template vt-number specifies the number of a virtual template interface.
  • virtual-access va-number specifies the number of a virtual access interface.

The value of vt-number is an integer that ranges from 0 to 1023.

The value of va-number is an integer that ranges from 0 to 1023.

inbound

Clears traffic statistics in the inbound direction.

-

outbound

Clears traffic statistics in the outbound direction.

-

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Before recollecting statistics on packets matching a traffic policy on an interface, run the reset traffic policy statistics command to clear existing packet statistics. Then run the display traffic policy statistics command to view packet statistics.

Precautions

The cleared traffic statistics cannot be restored. Exercise caution when you use the command.

If no traffic policy is applied, the system displays an error message after the reset traffic policy statistics command is executed:
Error: The Policy is not applied in this view.
If you do not run the statistic enable (traffic behavior view) command in the view of the traffic behavior in a traffic policy, the system displays an error message after the reset traffic policy statistics command is executed:
Info: Statistic has not been enabled.

Example

# Clear traffic statistics on Eth0/0/1 in the inbound direction to which a traffic policy has been applied.

<Huawei> reset traffic policy statistics interface ethernet 0/0/1 inbound

traffic behavior

Function

The traffic behavior command creates a traffic behavior and displays the traffic behavior view, or directly displays the view of an existing traffic behavior.

The undo traffic behavior command deletes a traffic behavior.

By default, the traffic behavior be exists in the system.

Format

traffic behavior behavior-name

undo traffic behavior behavior-name

Parameters

Parameter

Description

Value

behavior-name

Specifies the name of a traffic behavior.

The value is a string of 1 to 31 case-sensitive characters without spaces.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A traffic classifier is used to differentiate services and must be associated with a flow control or resource allocation action such as packet filtering, traffic policing, and re-marking. The actions constitute a traffic behavior. The traffic behavior command creates a traffic behavior.

Follow-up Procedure

Configure an action in the traffic behavior view. For example, run the car (traffic behavior view) command to configure the traffic policing action.

Precautions

The default traffic behavior be exists in the system. This traffic behavior cannot be deleted or modified.

To delete a traffic behavior, unbind the traffic policy containing the traffic behavior from an interface and unbind the traffic behavior from a traffic classifier in the traffic policy. To modify only actions in a traffic behavior, you do not need to unbind the traffic policy containing the traffic behavior from an interface.

On the device, a maximum of 1024 traffic behaviors can be created and multiple traffic actions can be configured in a traffic behavior.

Example

# Create the traffic behavior b1 and enter the traffic behavior view.

<Huawei> system-view
[Huawei] traffic behavior b1
[Huawei-behavior-b1]

traffic classifier

Function

The traffic classifier command creates a traffic classifier and displays the traffic classifier view, or directly displays the view of an existing traffic classifier.

The undo traffic classifier command deletes a traffic classifier.

By default, the traffic classifier default-class exists in the system.

Format

traffic classifier classifier-name [ operator { and | or } ]

undo traffic classifier classifier-name

Parameters

Parameter

Description

Value

classifier-name

Specifies the name of a user-defined traffic classifier.

The value is a string of 1 to 31 case-sensitive characters without spaces.

operator

Specifies the relationship between rules in a traffic classifier. If this parameter is not specified, the relationship between rules is OR by default.

-

and

Indicates that the relationship between rules is AND.

After this parameter is specified, the following situations occur:
  • If a traffic classifier contains ACL rules, packets match the traffic classifier only when the packets match one ACL rule and all the non-ACL rules.
  • If a traffic classifier does not contain ACL rules, packets match the traffic classifier only when the packets match all the non-ACL rules.

-

or

Indicates that the relationship between rules is OR.

After this parameter is specified, packets match a traffic classifier if the packets match one or more rules.

-

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A traffic classifier classifies traffic of a certain type using matching rules. To provide differentiated services for service flows, bind a traffic classifier and a traffic behavior (see traffic behavior) to a traffic policy and apply the traffic policy.

A traffic classifier can be created based on Layer 2 information such as the 802.1p priority in the VLAN ID, 802.1p priority in the C-VLAN ID, VLAN ID, or Layer 2 protocol type, and Layer 3 information such as the DSCP priority or IP priority, or ACLs.

Follow-up Procedure

Define rules in the traffic classifier. For example, run the if-match 8021p command to define rules based on the 802.1p priority in the VLAN tag.

Precautions

The default traffic classifier default-class exists in the system. This traffic classifier cannot be deleted or modified.

To delete a traffic classifier, unbind the traffic policy containing the traffic classifier from an interface and unbind the traffic classifier from a traffic behavior in the traffic policy. To modify a traffic classifier, you do not need to unbind the traffic policy containing the traffic classifier from an interface.

A maximum of 1024 traffic classifiers can be created on the device.

NOTE:

After the relationship between rules in a traffic classifier is changed, the system checks whether rules conflict. When the relationship between rules is changed from OR to AND and multiple rules are configured, for example, matching rules based on the 802.1p priority in the inner tag, DSCP priority, IP precedence, and VLAN ID, the rules may conflict and the system displays a message indicating that the relationship cannot be changed. The relationship between rules can be changed from AND to OR but services may be affected because more packets are matched. Exercise caution when you change the relationship between rules.

Example

# Create a traffic classifier c1 and enter the traffic classifier view.

<Huawei> system-view
[Huawei] traffic classifier c1 operator and
[Huawei-classifier-c1]

traffic policy

Function

The traffic policy command creates a traffic policy and displays the traffic policy view, or displays the view of an existing traffic policy.

The undo traffic policy command deletes a traffic policy.

By default, no traffic policy is created in the system.

Format

traffic policy policy-name

undo traffic policy policy-name

Parameters

Parameter Description Value
policy-name

Specifies the name of a user-defined traffic policy.

The value is a string of 1 to 31 case-sensitive characters without spaces

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Packets are obtained based on Layer 2 information, Layer 3 information, or ACLs. To implement differentiated services for service flows of packets, bind a traffic classifier and a traffic behavior to the created traffic policy and apply the traffic policy. You can use the traffic policy command to create a traffic policy. A maximum of 1024 traffic policies can be created on the device.

Pre-configuration Tasks

A traffic classifier and a traffic behavior have been created.

Follow-up Procedure

  • Run the classifier behavior command in the traffic policy view to associate the traffic policy with a traffic classifier and a traffic behavior.
  • Run the traffic-policy (interface view) command to apply the traffic policy to an interface to make the created traffic policy take effect.

Precautions

If the traffic policy that you want to delete has been applied to an interface, run the undo traffic-policy command to unbind the traffic policy from the interface. Then run the undo traffic policy command in the system view to delete the traffic policy. If the traffic policy is not applied, delete it directly.

Example

# Create a traffic policy p1, and associate the traffic classifier c1 with the traffic behavior b1 in the traffic policy.

<Huawei> system-view
[Huawei] traffic classifier c1
[Huawei-classifier-c1] if-match any
[Huawei-classifier-c1] quit
[Huawei] traffic behavior b1
[Huawei-behavior-b1] remark 8021p 2
[Huawei-behavior-b1] quit
[Huawei] traffic policy p1
[Huawei-trafficpolicy-p1] classifier c1 behavior b1 

# Delete the traffic policy p1 that has been applied to the inbound indirection on Eth0/0/1.

<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] undo traffic-policy inbound
[Huawei-Ethernet0/0/1] quit
[Huawei] undo traffic policy p1

traffic-policy (interface view)

Function

The traffic-policy command applies a traffic policy to an interface.

The undo traffic-policy command deletes a traffic policy from an interface.

By default, no traffic policy is applied to an interface.

Format

traffic-policy policy-name { inbound | outbound }

undo traffic-policy { inbound | outbound }

Parameters

Parameter

Description

Value

policy-name

Specifies the name of a user-defined traffic policy.

The value is a string of 1 to 31 case-sensitive characters without spaces.

inbound

Applies a traffic policy to the inbound direction.

-

outbound

Applies a traffic policy to the outbound direction.

-

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Packets are classified based on Layer 2 information, Layer 3 information, or ACLs. To provide differentiated services for service flows, bind a traffic classifier and a traffic behavior to a traffic policy and apply the traffic policy. You can use the traffic-policy command to apply a created traffic policy to an interface.

Prerequisites

A traffic policy has been created using the traffic policy command, and traffic classifiers and traffic behaviors have been bound to the traffic policy.

Precautions

Only one traffic policy can be applied to each direction on an interface, but a traffic policy can be applied to different directions on different interfaces.

When traffic policy nesting is applied to a sub-interface, the traffic policy that is bound to sub traffic policies can be bound to only one pair of the traffic classifier and traffic behavior and only the default traffic classifier default-class can be used.

NOTE:
  • If the traffic policy that you want to delete has been applied to an interface, run the undo traffic-policy command to unbind the traffic policy from the interface. Then run the undo traffic policy command in the system view to delete the traffic policy.

  • The configuration is invalid during LAN-side data switching.
  • When an interface is added to a network bridge, the traffic policy can be only applied to the interface in the inbound direction.

Example

# Create a traffic policy p1, bind the created traffic classifier c1 and traffic behavior b1 to the traffic policy, and apply the traffic policy to the inbound direction on Eth0/0/1.

<Huawei> system-view
[Huawei] traffic policy p1
[Huawei-trafficpolicy-p1] classifier c1 behavior b1
[Huawei-trafficpolicy-p1] quit
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] traffic-policy p1 inbound

traffic-policy (traffic behavior view)

Function

The traffic-policy command configures an action of binding a sub traffic policy in a traffic behavior.

The undo traffic-policy command deletes the action of binding a sub traffic policy from a traffic behavior.

By default, an action of binding a sub traffic policy is not configured in a traffic behavior.

Format

traffic-policy policy-name

undo traffic-policy

Parameters

Parameter

Description

Value

policy-name

Specifies the name of a user-defined traffic policy.

The value is a string of 1 to 31 case-sensitive characters without spaces.

Views

Traffic behavior view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On the WAN-side interface, a traffic behavior in a traffic policy can be bound to a sub traffic policy. The sub traffic policy is used to configure queue scheduling and traffic shaping. The traffic-policy command binds a sub traffic policy to a traffic behavior so that the device can provide differentiated services.

Prerequisites

A sub traffic policy has been configured.

Precautions

The traffic policy whose sub traffic policy is bound to a traffic behavior can be applied to only the outbound direction of an interface.

Example

# Bind the sub traffic policy tp-son to the traffic behavior tb1.

<Huawei> system-view
[Huawei] traffic behavior tb1
[Huawei-behavior-tb1] traffic-policy tp-son
Translation
Download
Updated: 2019-05-29

Document ID: EDOC1000097293

Views: 90856

Downloads: 124

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