H3C S5500-SI Series Ethernet Switches Command Manual(V1.01)

HomeSupportSwitchesH3C S5500 Switch SeriesReference GuidesCommand ReferencesH3C S5500-SI Series Ethernet Switches Command Manual(V1.01)
20-QoS Commands
Title Size Download
20-QoS Commands 145 KB

Table of Contents

Chapter 1 LR Configuration Commands. 1-1

1.1 LR Configuration Commands. 1-1

1.1.1 display qos lr interface. 1-1

1.1.2 qos lr outbound. 1-2

Chapter 2 QoS Policy Configuration Commands. 2-1

2.1 Commands for Defining Classes. 2-1

2.1.1 display traffic classifier 2-1

2.1.2 if-match. 2-2

2.1.3 traffic classifier 2-5

2.2 Traffic Behavior Configuration Commands. 2-6

2.2.1 accounting. 2-6

2.2.2 car 2-7

2.2.3 display traffic behavior 2-8

2.2.4 filter 2-10

2.2.5 nest 2-10

2.2.6 redirect 2-11

2.2.7 remark customer-vlan-id. 2-12

2.2.8 remark dot1p. 2-12

2.2.9 remark drop-precedence. 2-13

2.2.10 remark dscp. 2-14

2.2.11 remark ip-precedence. 2-15

2.2.12 remark local-precedence. 2-16

2.2.13 remark service-vlan-id. 2-16

2.2.14 traffic behavior 2-17

2.3 QoS Policy Configuration Commands. 2-18

2.3.1 classifier behavior 2-18

2.3.2 display qos policy. 2-18

2.3.3 display qos policy interface. 2-19

2.3.4 qos apply policy. 2-21

2.3.5 qos policy. 2-22

Chapter 3 Congestion Management Configuration Commands. 3-1

3.1 Congestion Management Configuration Commands. 3-1

3.1.1 display qos sp interface. 3-1

3.1.2 display qos wrr interface. 3-1

3.1.3 qos sp. 3-3

3.1.4 qos wrr 3-3

Chapter 4 Priority Mapping Configuration Commands. 4-1

4.1 Priority Mapping Table Configuration Commands. 4-1

4.1.1 display qos map-table. 4-1

4.1.2 qos map-table. 4-2

4.1.3 import 4-3

4.2 Port Priority Configuration Commands. 4-3

4.2.1 qos priority. 4-3

4.3 Port Priority Trust Mode Configuration Commands. 4-4

4.3.1 display qos trust interface. 4-4

4.3.2 qos trust 4-5

Chapter 5 VLAN QoS Policy Configuration Commands. 5-1

5.1 VLAN QoS Policy Configuration Commands. 5-1

5.1.1 display qos vlan-policy. 5-1

5.1.2 qos vlan-policy. 5-2

5.1.3 reset qos vlan-policy. 5-3

Chapter 6 Traffic Mirroring Configuration Commands. 6-1

6.1 Traffic Mirroring Configuration Commands. 6-1

6.1.1 mirror-to. 6-1

 


Chapter 1  LR Configuration Commands

1.1  LR Configuration Commands

1.1.1  display qos lr interface

Syntax

display qos lr interface [ interface-type interface-number ]

View

Any view

Parameters

interface-type: Port type.

interface-number: Port number.

Description

Use the display qos lr interface command to display the LR configuration information of a certain interface or all interfaces.

If the interface argument is not specified, this command will display the LR configuration information of all the interfaces.

Examples

# Display the LR configuration and statistics information of all the interfaces.

<Sysname> display qos lr interface

Interface: GigabitEthernet1/0/1

Direction: Outbound

 CIR 6400 (kbps),  CBS 400000 (byte)

Table 1-1 Description on the fields of the display qos lr command

Field

Description

Interface

Port name, composed of port type and port number

Direction

Specify the direction of limited rate as outbound

CIR

Committed information rate, in kbps

CBS

Committed burst size, in byte

 

1.1.2  qos lr outbound

Syntax

qos lr outbound cir committed-information-rate [ cbs committed-burst-size ]

undo qos lr outbound

View

Ethernet interface view, port group view

Parameters

outbound: Limits the rate of the outbound traffic.

cir committed-information-rate: Specifies the committed information rate (CIR) in kbps. The range of CIR varies with port types as follows:

l           GigabitEthernet port: 64 to 1000000

l           Ten-GigabitEthernet port: 64 to 10000000

Note that the committed-information-rate argument must be a multiple of 64.

cbs committed-burst-size: Specifies the committed burst size in bytes.

l           The committed-burst-size argument ranges from 4000 to 16000000.

l           If the cbs keyword is not used, the system uses the default committed burst size, that is, 500 ms x committed-information-rate, or 16000000 if the multiplication is more than 16000000.

Description

Use the qos lr outbound command to limit the rate of outbound traffic via physical interfaces.

Use the undo qos lr outbound command to cancel the limit.

Examples

#  Limit the outbound traffic rate on GigabitEthernet 1/0/1 within 640 kbps.

<Sysname> system-view

[Sysname] interface GigabitEthernet 1/0/1

[Sysname-GigabitEthernet1/0/1] qos lr outbound cir 640

 


Chapter 2  QoS Policy Configuration Commands

2.1  Commands for Defining Classes

2.1.1  display traffic classifier

Syntax

display traffic classifier user-defined [ classifier-name ]

View

Any view

Parameters

classifier-name: Class name.

Description

Use the display traffic classifier command to display the information about a class.

If no class name is provided, this command displays the information about all the user-defined classes.

Examples

# Display the information about the user-defined classes.

<Sysname> display traffic classifier user-defined

  User Defined Classifier Information:

   Classifier: p

    Operator: AND

    Rule(s) : If-match acl 2001

Table 2-1 Description on the fields of the display traffic classifier user-defined command

Field

Description

User Defined Classifier Information

The information about the user-defined classes is displayed.

Classifier

Class name and its contents, which could be of multiple types

Operator

Logical relationship among the classification rules

Rule

Classification rules

 

2.1.2  if-match

Syntax

if-match match-criteria

undo if-match match-criteria

View

Class view

Parameters

match-criteria: Matching rule to be defined. Table 2-2 describes the available forms of this argument.

Table 2-2 The forms of the match-criteria argument

Field

Description

acl access-list-number

Specifies an ACL to match packets. The access-list-number argument is in the range 2000 to 4999.

In a class configured with the operator and, the logical relationship between rules defined in the referenced IPv4 ACL is or.

acl ipv6 access-list-number

Specifies an IPv6 ACL to match IPv6 packets. The access-list-number argument is in the range 2000 to 3999.

In a class configured with the operator and, the logical relationship between rules defined in the referenced IPv6 ACL is or.

any

Specifies to match all packets.

customer-dot1p 8021p-list

Specifies to match packets by 802.1p precedence of the customer network. The 8021p-list argument is a list of CoS values. You can provide up to eight space-separated CoS values for this argument. CoS is in the range 0 to 7.

customer-vlan-id vlan-id-list

Specifies to match the packets of specified VLANs of user networks. The vlan-id-list argument specifies a list of VLAN IDs, in the form of vlan-id to vlan-id or multiple discontinuous VLAN IDs (separated by space). You can specify up to eight VLAN IDs for this argument at a time. VLAN ID is in the range 1 to 4094.

In a class configured with the operator and, the logical relationship between the customer VLAN IDs specified for the customer-vlan-id keyword is or.

dscp dscp-list

Specifies to match packets by DSCP precedence. The dscp-list argument is a list of DSCP values. You can provide up to eight space-separated DSCP values for this argument. DSCP is in the range 0 to 63.

destination-mac mac-address

Specifies to match the packets with a specified destination MAC address.

ip-precedence ip-precedence-list

Specifies to match packets by IP precedence. The ip-precedence-list argument is a list of IP precedence values. You can provide up to eight space-separated IP precedence values for this argument. IP precedence is in the range 0 to 7.

protocol protocol-name

Specifies to match the packets of a specified protocol. The protocol-name argument can be IP or IPv6.

service-dot1p 8021p-list

Specifies to match packets by 802.1p precedence of the service provider network. The 8021p-list argument is a list of CoS values. You can provide up to eight space-separated CoS values for this argument. CoS is in the range 0 to 7.

service-vlan-id vlan-id-list

Specifies to match the packets of specified VLANs of the operator’s network. The vlan-id-list argument is a list of VLAN IDs, in the form of vlan-id to vlan-id or multiple discontinuous VLAN IDs (separated by space). You can specify up to eight VLAN IDs for this argument at a time. VLAN ID is in the range 1 to 4094.

In a class configured with the operator and, the logical relationship between the service VLAN IDs specified for the service-vlan-id keyword is or.

source-mac mac-address

Specifies to match the packets with a specified source MAC address.

 

Description

Use the if-match command to define a rule to match a specific type of packets.

Use the undo if-match command to remove a matching rule.

 

&  Note:

Suppose the logical relationship between classification rules is and. Note the following when using the if-match command to define matching rules.

l      If multiple matching rules with the acl or acl ipv6 keyword specified are defined in a class, the actual logical relationship between these rules is or when the policy is applied.

l      If multiple matching rules with the customer-vlan-id or service-vlan-id keyword specified are defined in a class, the actual logical relationship between these rules is or when the policy is applied.

 

Examples

# Define a rule for class1 to match the packets with their destination MAC addresses being 0050-ba27-bed3.

<Sysname> system-view

[Sysname] traffic classifier class1

[Sysname-classifier-class1] if-match destination-mac 0050-ba27-bed3

# Define a rule for class2 to match the packets with their source MAC addresses being 0050-ba27-bed2.

<Sysname> system-view

[Sysname] traffic classifier class2

[Sysname-classifier-class2] if-match source-mac 0050-ba27-bed2

# Define a rule for class3 to match the advanced IPv4 ACL 3101.

<Sysname> system-view

[Sysname] traffic classifier class3

[Sysname-classifier-class3] if-match acl 3101

# Define a rule for class4 to match the advanced IPv6 ACL 3101.

<Sysname> system-view

[Sysname] traffic classifier class4

[Sysname-classifier-class4] if-match acl ipv6 3101

# Define a rule for class5 to match all the packets.

<Sysname> system-view

[Sysname] traffic classifier class5

[Sysname-classifier-class5] if-match any

# Define a rule for class6 to match the packets with their DSCP precedence values being 1.

<Sysname> system-view

[Sysname] traffic classifier class6

[Sysname-classifier-class6] if-match dscp 1

# Define a rule for class7 to match the packets with their IP precedence values being 1.

<Sysname> system-view

[Sysname] traffic classifier class7

[Sysname-classifier-class7] if-match ip-precedence 1

# Define a rule for class8 to match IP packets.

<Sysname> system-view

[Sysname] traffic classifier class8

[Sysname-classifier-class8] if-match protocol ip

# Define a rule for class9 to match the packets with the customer network 802.1p precedence 2.

<Sysname> system-view

[Sysname] traffic classifier class9

[Sysname-classifier-class9] if-match customer-dot1p 2

# Define a rule for class10 to match the packets with the service provider network 802.1p precedence 5.

<Sysname> system-view

[Sysname] traffic classifier class10

[Sysname-classifier-class10] if-match service-dot1p 5

# Define a rule for class11 to match the packets of VLAN 1024 of the customer network.

<Sysname> system-view

[Sysname] traffic classifier class11

[Sysname-classifier-class11] if-match customer-vlan-id 1024

# Define a rule for class12 to match the packets of VLAN 1000 of the service provider network.

<Sysname> system-view

[Sysname] traffic classifier class12

[Sysname-classifier-class12] if-match service-vlan-id 1000 

2.1.3  traffic classifier

Syntax

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

undo traffic classifier classifier-name

View

System view

Parameters

and: Specifies the relationship among the rules in the class as logic AND. That is, a packet is matched only when it matches all the rules defined for the class.

or: Specifies the relationship among the rules in the class as logic OR. That is, a packet is matched if it matches a rule defined for the class.

classifier-name: Name of the class to be created.

Description

Use the traffic classifier command to create a class. This command also leads you to class view.

Use the undo traffic classifier command to remove a class.

By default, a packet is matched only when it matches all the rules configured for the class.

Examples

# Create a class named class1.

<Sysname> system-view

[Sysname] traffic classifier class1

[Sysname-classifier-class1]

2.2  Traffic Behavior Configuration Commands

2.2.1  accounting

Syntax

accounting

undo accounting

View

Traffic behavior view

Parameters

None

Description

Use the accounting command to configure the traffic accounting action for a traffic behavior.

Use the undo accounting command to remove the traffic accounting action.

Related commands: qos policy, traffic behavior, classifier behavior.

Examples

# Configure the traffic accounting action for a traffic behavior.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] accounting

2.2.2  car

Syntax

car cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ] [ pir peak-information-rate ] [ green action ] [ red action ] [ yellow action ]

undo car

View

Traffic behavior view

Parameters

cir committed-information-rate: Specifies the committed information rate (CIR) in kbps. The committed-information-rate argument ranges from 64 to 32000000 and must be a multiple of 64.

cbs committed-burst-size: Specifies the committed burst size (CBS) in bytes. The committed-burst-size argument ranges from 4000 to 16000000, the default is 4000.

ebs excess-burst-size: Specifies excess burst size (EBS) in bytes. The excess-burst-size argument ranges from 0 to 16000000, the default is 4000.

pir peak-information-rate: Specifies the peak information rate (PIR) in kbps. The peak-information-rate argument ranges from 64 to 32000000 and must be a multiple of 64.

green action: Specifies the action to be conducted for the traffic conforming to CIR. The action argument can be:

l           discard: Drops the packets.

l           pass: Forwards the packets.

l           remark-dscp-pass new-dscp: Marks the packets with a new DSCP precedence and forwards them to their destinations. The new-dscp argument is in the range 0 to 63.

By default, packets conforming to CIR are forwarded.

red action: Specifies the action to be conducted for the traffic conforms to neither CIR nor PIR. The action argument can be:

l           discard: Drops the packets.

l           pass: Forwards the packets.

l           remark-dscp-pass new-dscp: Marks the packets with a new DSCP precedence and forwards them to their destinations. The new-dscp argument is in the range 0 to 63.

By default, packets conforming to neither CIR nor PIR are dropped.

yellow action: Specifies the action to be conducted for the traffic conforms to PIR but does not conform to CIR. The action argument can be:

l           discard: Drops the packets.

l           pass: Forwards the packets.

l           remark-dscp-pass new-dscp: Marks the packets with a new DSCP precedence and forwards them to their destinations. The new-dscp argument is in the range 0 to 63.

By default, packets conforming to PIR but not conforming to CIR are dropped.

Description

Use the car command to configure TP action for a traffic behavior.

Use the undo car command to remove the TP action.

Note that, if you configure the TP action for a traffic behavior for multiple times, only the last configuration takes effect.

Related commands: qos policy, traffic behavior, classifier behavior.

Examples

# Configure TP action for a traffic behavior. When the traffic rate is lower than 6400 kbps, packets are forwarded normally. When the traffic rate exceeds 6400 kbps, the packets beyond 6400 kbps are dropped.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] car cir 6400 red discard

2.2.3  display traffic behavior

Syntax

display traffic behavior user-defined [ behavior-name ]

View

Any view

Parameters

behavior-name: Name of a user defined traffic behavior.

Description

Use the display traffic behavior command to display the information about a user defined traffic behavior.

If no behavior name is provided, this command displays the information about all the user-defined behaviors.

Examples

# Display the information about all the user defined traffic behaviors.

<Sysname> display traffic behavior user-defined

  User Defined Behavior Information:

    Behavior: test

      Marking:

        Remark dot1p COS 4

      Committed Access Rate:

        CIR 64 (kbps), CBS 4000 (byte), EBS 4000 (byte), PIR 640 (kbps)

        Green Action: pass

        Red Action: discard

        Yellow Action: pass

Table 2-3 Description on the fields of the display traffic behavior user-defined command

Field

Description

User Defined Behavior Information

The information about user defined traffic behaviors is displayed

Behavior

Name of a traffic behavior, which can be of multiple types

Marking

Information about priority marking

Committed Access Rate

Information about traffic rate limit

CIR

Committed information rate in bytes

CBS

Committed burst size in bytes

EBS

Excessive burst size in bytes

PIR

Peak information rate in bytes

Green Action

Action conducted to packets conforming to CIR

Red Action

Action conducted for packets conforming to neither CIR nor PIR

Yellow Action

Action conducted to packets conforming to PIR but not conforming to CIR

 

2.2.4  filter

Syntax

filter { deny | permit }

undo filter

View

Traffic behavior view

Parameters

deny: Drops packets.

permit: Forwards packets.

Description

Use the filter command to configure traffic filtering action for a traffic behavior.

Use the undo filter command to remove the traffic filtering action.

Related commands: qos policy, traffic behavior, classifier behavior.

Examples

# Configure traffic filtering action for a traffic behavior.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] filter deny

2.2.5  nest

Syntax

nest top-most vlan-id vlan-id

undo nest

View

Traffic behavior view

Parameters

vlan-id vlan-id: ID of the VLAN. The vlan-id argument is in the range 1 to 4094.

Description

Use the nest command to configure an outer VLAN tag for a traffic behavior.

Use the undo nest command to remove the outer VLAN tag.

Note that, the action of creating an outer VLAN tag must be applied to basic QinQ-enabled ports or port groups.

Related commands: qos policy, traffic behavior, classifier behavior.

Examples

# Configure an outer VLAN tag for a traffic behavior.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] nest top-most vlan-id 100

2.2.6  redirect

Syntax

redirect { cpu | interface interface-type interface-number | link-aggregation group agg-id | next-hop { ipv4-add [ ipv4-add ] | ipv6-add [ interface-type interface-number ] [ ipv6-add [ interface-type interface-number ] ] } }

undo redirect

View

Traffic behavior view

Parameters

cpu: Redirects traffic to the CPU.

interface interface-type interface-number: Redirects traffic to an interface identified by its type and number.

link-aggregation group agg-id: Redirects traffic to a manual aggregation group. The agg-id argument is an aggregation group ID. Note that the specified aggregation group must be an existing manual aggregation group.

next-hop: Specifies the next hop to redirect the traffic to.

ipv4-add: IPv4 address of the next hop.

ipv6-add: IPv6 address of the next hop. The interface-type interface-number argument is a VLAN interface number. If the IPv6 address is a link-local address, you must specify a VLAN interface for the IPv6 address of the next hop; if the IPv6 address is not a link-local address, you need not specify a VLAN interface for the IPv6 address of the next hop.

Description

Use the redirect command to configure traffic redirecting action for a traffic behavior.

Use the undo redirect command to remove the traffic redirecting action.

Related commands: qos policy, traffic behavior, classifier behavior.

Examples

# Configure the redirecting action to redirect traffic to GigabitEthernet 1/0/1 port.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] redirect interface GigabitEthernet 1/0/1

2.2.7  remark customer-vlan-id

Syntax

remark customer-vlan-id vlan-id-value

undo remark customer-vlan-id

View

Traffic behavior view

Parameters

vlan-id-value: VLAN ID to be set for packets, in the range of 1 to 4094.

Description

Use the remark customer-vlan-id command to configure the action of setting the customer network VLAN ID for a traffic behavior.

Use the undo remark customer-vlan-id command to remove the action of setting the customer network VLAN ID.

Related commands: qos policy, traffic behavior, classifier behavior.

Examples

# Configure the action of setting the customer network VLAN ID to 2 for a traffic behavior.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] remark customer-vlan-id 2

2.2.8  remark dot1p

Syntax

remark dot1p 8021p

undo remark dot1p

View

Traffic behavior view

Parameters

8021p: 802.1p precedence to be set for packets, in the range 0 to 7.

Description

Use the remark dot1p command to configure the action of setting 802.1p precedence for a traffic behavior.

Use the undo remark dot1p command to remove the action of setting 802.1p precedence.

Note that, when the remark dot1p command is used together with the remark local-precedence command, the 802.1p precedence to be set for packets must be the same as the local precedence to be set for packets. Otherwise, the corresponding policy cannot be applied successfully.

Related commands: qos policy, traffic behavior, classifier behavior.

Examples

# Configure the action to set 802.1p precedence to 2 for a traffic behavior.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] remark dot1p 2

2.2.9  remark drop-precedence

Syntax

remark drop-precedence drop-precedence-value

undo remark drop-precedence

View

Traffic behavior view

Parameters

drop-precedence-value: Drop precedence to be set for packets, in the range 0 to 2.

Description

Use the remark drop-precedence command to configure the action of setting drop precedence for a traffic behavior.

Use the undo remark drop-precedence command to remove the action of setting drop precedence.

Related commands: qos policy, traffic behavior, classifier behavior.

Examples

# Configure the action to set drop precedence to 2 for a traffic behavior.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] remark drop-precedence 2

2.2.10  remark dscp

Syntax

remark dscp dscp-value

undo remark dscp

View

Traffic behavior view

Parameters

dscp-value: DSCP precedence to be set for packets, in the range of 0 to 63. This argument can also be the keywords listed in Table 2-4.

Table 2-4 DSCP keywords and values

Keyword

DSCP value (binary)

DSCP value (decimal)

default

000000

0

af11

001010

10

af12

001100

12

af13

001110

14

af21

010010

18

af22

010100

20

af23

010110

22

af31

011010

26

af32

011100

28

af33

011110

30

af41

100010

34

af42

100100

36

af43

100110

38

cs1

001000

8

cs2

010000

16

cs3

011000

24

cs4

100000

32

cs5

101000

40

cs6

110000

48

cs7

111000

56

ef

101110

46

 

Description

Use the remark dscp command to configure the action of setting DSCP precedence for a traffic behavior.

Use the undo remark dscp command to remove the action of setting DSCP precedence.

Related commands: qos policy, traffic behavior, classifier behavior.

Examples

# Configure the action to set DSCP precedence to 6 for a traffic behavior.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] remark dscp 6

2.2.11  remark ip-precedence

Syntax

remark ip-precedence ip-precedence-value

undo remark ip-precedence

View

Traffic behavior view

Parameters

ip-precedence-value: IP precedence to be set for packets, in the range of 0 to 7.

Description

Use the remark ip-precedence command to configure the action of setting IP precedence for a traffic behavior.

Use the undo remark ip-precedence command to remove the action of setting IP precedence.

Related commands: qos policy, traffic behavior, classifier behavior.

Examples

# Configure the action to set IP precedence to 6 for a traffic behavior.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] remark ip-precedence 6

2.2.12  remark local-precedence

Syntax

remark local-precedence local-precedence

undo remark local-precedence

View

Traffic behavior view

Parameters

local-precedence: Local precedence to be set for packets, in the range of 0 to 7.

Description

Use the remark local-precedence command to configure the action of setting local precedence for a traffic behavior.

Use the undo remark local-precedence command to remove the action of remarking local precedence.

Note that, when the remark dot1p command is used together with the remark local-precedence command, the 802.1p precedence to be set for packets must be the same as the local precedence to be set for packets. Otherwise, the corresponding policy cannot be applied successfully.

Related commands: qos policy, traffic behavior, classifier behavior.

Examples

# Configure the action to set local precedence to 2 for a traffic behavior.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] remark local-precedence 2

2.2.13  remark service-vlan-id

Syntax

remark service-vlan-id vlan-id-value

undo remark service-vlan-id

View

Traffic behavior view

Parameters

vlan-id-value: VLAN ID to be set for packets, in the range of 1 to 4094.

Description

Use the remark service-vlan-id command to configure the action of setting the service provider network VLAN ID for a traffic behavior.

Use the undo remark service-vlan-id command to remove the action of setting the service provider network VLAN ID.

Related commands: qos policy, traffic behavior, classifier behavior.

Examples

# Configure the action of setting the service provider network VLAN ID to 2 for a traffic behavior.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] remark service-vlan-id 2

2.2.14  traffic behavior

Syntax

traffic behavior behavior-name

undo traffic behavior behavior-name

View

System view

Parameters

behavior-name: Name of the traffic behavior to be created.

Description

Use the traffic behavior command to create a traffic behavior. This command also leads you to traffic behavior view.

Use the undo traffic classifier command to remove a traffic behavior.

Related commands: qos policy, qos apply policy, classifier behavior.

Examples

# Define a traffic behavior named behavior1.

<Sysname> system-view

[Sysname] traffic behavior behavior1

[Sysname-behavior-behavior1]

2.3  QoS Policy Configuration Commands

2.3.1  classifier behavior

Syntax

classifier classifier-name behavior behavior-name

undo classifier classifier-name

View

Policy view

Parameters

classifier-name: Name of an existing class.

behavior–name: Name of an existing traffic behavior.

Description

Use the classifier behavior command to associate a traffic behavior with a class.

Use the undo classifier command to remove a class from a policy.

Note that each class can be associated with only one traffic behavior.

Related commands: qos policy.

Examples

# Associate the behavior named test with the class named database in the policy user1.

<Sysname> system-view

[Sysname] qos policy user1

[Sysname-qospolicy-user1] classifier database behavior test

2.3.2  display qos policy

Syntax

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

View

Any view

Parameters

policy-name: Policy name. If it is not provided, the configuration of all the user defined policies is displayed.

classifier-name: Name of a class in the policy. If it is not provided, all the classes in the policy are specified.

Description

Use the display qos policy command to display the configuration of a specified policy, including the configuration of the classes and the associated traffic behaviors in the policy.

Examples

# Display the configuration of all the user specified policies.

<Sysname> display qos policy user-defined

 

  User Defined QoS Policy Information:

 

  Policy: test

   Classifier: test

     Behavior: test

      Accounting Enable

      Committed Access Rate:

        CIR 64 (kbps), CBS 4000 (byte), EBS 4000 (byte), PIR 640 (kbps)

        Green Action: pass

        Red Action: discard

        Yellow Action: pass

Table 2-5 Description on the fields of the display qos policy command

Field

Description

Policy

Policy name

Classifier

Class name and the corresponding configuration information

Behavior

Traffic behavior name and the corresponding configuration information

 

2.3.3  display qos policy interface

Syntax

display qos policy interface [ interface-type interface-number ] [ inbound ]

View

Any view

Parameters

interface-type: Port type.

interface-number: Port number.

inbound: Specifies the inbound direction.

Description

Use the display qos policy interface command to display the configuration and statistics information about the policy applied on a port.

If no interface is provided, the configuration and statistics information about the policies applied on all the ports is displayed.

Examples

# Display the configuration and statistics information about the policy applied on GigabitEthernet 1/0/1 port.

<Sysname> display qos policy interface GigabitEthernet 1/0/1

 

  Interface: GigabitEthernet1/0/1

 

  Direction: Inbound

 

  Policy: test

   Classifier: test

     Operator: AND

     Rule(s) : If-match acl 2000

     Behavior: test

      Marking:

        Remark dot1p COS 4

      Committed Access Rate:

        CIR 64 (kbps), CBS 4000 (byte), EBS 4000 (byte), PIR 640 (kbps)

        Green Action: pass

        Red Action: discard

        Yellow Action: pass

        Green : 0(Packets)

Table 2-6 Description on the fields of the display qos policy interface command

Field

Description

Interface

Port name, comprising of port type and port number

Direction

Direction of the port where the policy is applied

Policy

Name of the policy applied to the port

Classifier

Name of the class in the policy and its configuration

Operator

Logical relationship among the classification rules in a class

Rule(s)

Classification rules in the class

Behavior

Name of the behavior in the policy and its configuration

 

2.3.4  qos apply policy

Syntax

qos apply policy policy-name inbound

undo qos apply policy inbound

View

Ethernet port view, port group view

Parameters

inbound: Specifies the inbound direction.

policy-name: Specifies the policy name.

Description

Use the qos apply policy command to apply a policy on a port or a port group.

Use the undo qos apply policy command to remove the policy applied on a port or a port group.

Examples

# Apply the policy named test in the inbound direction of GigabitEthernet1/0/1 port.

<Sysname> system-view

[Sysname] interface GigabitEthernet 1/0/1

[Sysname-GigabitEthernet1/0/1] qos apply policy test inbound

2.3.5  qos policy

Syntax

qos policy policy-name

undo qos policy policy-name

View

System view

Parameters

policy-name: Name of the policy to be created.

Description

Use the qos policy command to create a policy. This command also leads you to policy view.

Use the undo qos policy command to remove a policy.

To remove a policy that is currently applied on a port, you need to disable it on the port first.

Related commands: classifier behavior, qos apply policy.

Examples

# Create a policy named user1.

<Sysname> system-view

[Sysname] qos policy user1

[Sysname-qospolicy-user1]

 


Chapter 3  Congestion Management Configuration Commands

3.1  Congestion Management Configuration Commands

3.1.1  display qos sp interface

Syntax

display qos sp interface [ interface-type interface-number ]

View

Any view

Parameters

interface-type: Port type.

interface-number: Port number.

Description

Use the display qos sp interface command to display the strict priority (SP) queuing configuration on a specified port.

If no port is specified, this command displays the SP queuing configuration on all ports.

Related commands: qos sp.

Examples

# Display the SP queuing configuration on GigabitEthernet 1/0/1.

<Sysname> display qos sp interface GigabitEthernet 1/0/1

Interface: GigabitEthernet1/0/1

Output queue: Strict-priority queue

3.1.2  display qos wrr interface

Syntax

display qos wrr interface [ interface-type interface-number ]

View

Any view

Parameters

interface-type: Port type.

interface-number: Port number.

Description

Use the display qos wrr interface command to display the configuration of weighted round robin (WRR) queues of a port.

If no port number is specified, the command displays the configurations of WRR queues of all ports.

Related commands: qos wrr.

Examples

# Display the configuration of WRR queues of GigabitEthernet 1/0/1.

<Sysname> display qos wrr interface GigabitEthernet 1/0/1

Interface: GigabitEthernet1/0/1

Output queue:   Weighted round robin queue

Queue ID    Group    Weight

-------------------------------------

   0         sp       N/A

   1         sp       N/A

   2         1        3

   3         1        4

   4         1        5

   5         1        6

   6         1        7

   7         1        8

Table 3-1 Description on the fields of the display qos wrr interface command

Field

Description

Interface

Port name, composed of port type and port number

Output queue

The type of the current output queue

Queue ID

ID of the queue

Group

Group ID, indicating which group a queue belongs to.

Weight

The weight of each queue during scheduling. N/A indicates that SP queue scheduling algorithm is adopted.

 

3.1.3  qos sp

Syntax

qos sp

undo qos sp

View

Ethernet interface view, port group view

Parameters

None

Description

Use the qos sp command to configure SP queuing on the current port.

Use the undo qos sp command to restore the default queuing algorithm on the port.

By default, all the ports adopt the WRR queue scheduling algorithm, with the weight values assigned to queue 0 through queue 7 being 1, 2, 3, 4, 5, 9, 13, and 15.

Related commands: display qos sp interface.

Examples

# Configure SP queuing on GigabitEthernet1/0/1.

<Sysname> system-view

[Sysname] interface GigabitEthernet 1/0/1

[Sysname-GigabitEthernet1/0/1] qos sp

3.1.4  qos wrr

Syntax

qos wrr queue-id group { sp | group-id weight queue-weight }

undo qos wrr

View

Ethernet interface view, port group view

Parameters

queue-id: ID of the queue, in the range of 0 to 7.

group-id: It can only be 1.

weight queue-weight: Specifies the scheduling weight of a queue, rang from 1 to 15.

sp: Configures SP queuing.

Description

Use the qos wrr command to configure Weighted Round Robin (WRR) queue scheduling algorithm or the SP + WRR queue scheduling algorithm on a port or port group.

Use the undo qos wrr command to restore the default queue-scheduling algorithm on the port.

By default, all the ports adopt the WRR queue scheduling algorithm, with the weight values assigned to queue 0 through queue 7 being 1, 2, 3, 4, 5, 9, 13, and 15.

As required, you can configure part of the queues on the port to adopt the SP queue-scheduling algorithm and parts of queues to adopt the WRR queue-scheduling algorithm. Through adding the queues on a port to the SP scheduling group and WRR scheduling group (namely, group 1), the SP + WRR queue scheduling is implemented. During the queue scheduling process, the queues in the SP scheduling group is scheduled preferentially. When no packet is to be sent in the queues in the SP scheduling group, the queues in the WRR scheduling group are scheduled. The queues in the SP scheduling group are scheduled according to the strict priority of each queue, while the queues in the WRR queue scheduling group are scheduled according the weight value of each queue.

Related commands: display qos wrr interface.

Examples

# Configure SP+WRR queue scheduling algorithm on GigabitEthernet 1/0/1 as follows: assign queue 0, queue 1, queue 2, and queue 3 to the SP scheduling group; and assign queue 4, queue 5, queue 5, and queue 7 to WRR scheduling group, with the weight 2, 4, 6, and 8.

<Sysname> system-view

[Sysname] interface GigabitEthernet 1/0/1

[Sysname-GigabitEthernet1/0/1] qos wrr 0 group sp

[Sysname-GigabitEthernet1/0/1] qos wrr 1 group sp

[Sysname-GigabitEthernet1/0/1] qos wrr 2 group sp

[Sysname-GigabitEthernet1/0/1] qos wrr 3 group sp

[Sysname-GigabitEthernet1/0/1] qos wrr 4 group 1 weight 2

[Sysname-GigabitEthernet1/0/1] qos wrr 5 group 1 weight 4

[Sysname-GigabitEthernet1/0/1] qos wrr 6 group 1 weight 6

[Sysname-GigabitEthernet1/0/1] qos wrr 7 group 1 weight 8

 


Chapter 4  Priority Mapping Configuration Commands

4.1  Priority Mapping Table Configuration Commands

4.1.1  display qos map-table

Syntax

display qos map-table [ dot1p-dp | dot1p-lp | dscp-dot1p | dscp-dp | dscp-dscp ]

View

Any view

Parameters

dot1p-lp: Specifies the 802.1p precedence-to-local precedence mapping table.

dot1p-dp: Specifies the 802.1p precedence-to-drop precedence mapping table.

dscp-dp: Specifies the DSCP-to-drop precedence mapping table.

dscp-dot1p: Specifies the DSCP-to-802.1p precedence mapping table.

dscp-dscp: Specifies the DSCP-to-DSCP mapping table.

Description

Use the display qos map-table command to display the configuration of a priority mapping table.

If the type of the priority mapping table is not specified, the configuration of all the priority mapping tables is displayed.

Related commands: qos map-table.

Examples

# Display the configuration of the 802.1p precedence-to-drop precedence mapping table.

<Sysname> display qos map-table dot1p-dp

MAP-TABLE NAME: dot1p-dp   TYPE: pre-define

IMPORT  :  EXPORT

   0    :    2

   1    :    2

   2    :    2

   3    :    1

   4    :    1

   5    :    1

   6    :    0

   7    :    0

Table 4-1 Description on the fields of the display qos map-table command

Field

Description

MAP-TABLE NAME

Name of the mapping table

TYPE

Type of the mapping table

IMPORT

Input entries of the mapping table

EXPORT

Output entries of the mapping table

 

4.1.2  qos map-table

Syntax

qos map-table { dot1p-dp | dot1p-lp | dscp-dot1p | dscp-dp | dscp-dscp }

View

System view

Parameters

dot1p-lp: Specifies the 802.1p precedence-to-local precedence mapping table.

dot1p-dp: Specifies the 802.1p precedence-to-drop precedence mapping table.

dscp-dp: Specifies the DSCP-to-drop precedence mapping table.

dscp-dot1p: Specifies the DSCP-to-802.1p precedence mapping table.

dscp-dscp: Specifies the DSCP-to-DSCP mapping table.

Description

Use the qos map-table command to enter specific priority mapping table view.

Related commands: display qos map-table.

Examples

# Enter 802.1p precedence-to-drop precedence mapping table view.

<Sysname> system-view

[Sysname] qos map-table dot1p-dp

[Sysname-maptbl-dot1p-dp]

4.1.3  import

Syntax

import import-value-list export export-value

undo import { import-value-list | all }

View

Priority mapping table view

Parameters

import-value-list: List of input parameters.

export-value: Output parameter in the mapping table.

all: Removes all the parameters in the priority mapping table.

Description

Use the import command to configure entries for a priority mapping table, that is, to define one or more mapping rules.

Use the undo import command to restore specific entries of a priority mapping table to the default.

Note that, you cannot configure to map any DSCP value to drop precedence 1.

Related commands: display qos map-table.

Examples

# Configure the 802.1p precedence-to-drop precedence mapping table to map 802.1p precedence 4 and 5 to drop precedence 1.

<Sysname> system-view

[Sysname] qos map-table dot1p-dp

[Sysname-maptbl-dot1p-dp] import 4 5 export 1

4.2  Port Priority Configuration Commands

4.2.1  qos priority

Syntax

qos priority priority-value

undo qos priority

View

Ethernet port view, port group view

Parameters

priority-value: Port priority to be configured. This argument is in the range 0 to 7.

Description

Use the qos priority command to set the port priority for a port.

Use the undo qos priority command to restore the default port priority.

By default, the port priority is 0.

Note that, if a port receives packets without an 802.1q tag, the switch takes the priority of the receiving port as the 802.1p precedence of the packets and then searches the dot1p-dp/lp mapping table for the local/drop precedence for the packets according to the priority of the receiving port.

Examples

# Set the port priority of GigabitEthernet1/0/1 port to 2.

<Sysname> system-view

[Sysname] interface GigabitEthernet 1/0/1

[Sysname-GigabitEthernet1/0/1] qos priority 2

4.3  Port Priority Trust Mode Configuration Commands

4.3.1  display qos trust interface

Syntax

display qos trust interface [ interface-type interface-number ]

View

Any view

Parameters

interface-type: Port type.

interface-number: Port number.

Description

Use the display qos trust interface command to display the port priority trust mode of a port.

If no port is specified, this command displays the port priority trust modes of all the ports.

Examples

# Display the port priority trust mode of GigabitEthernet1/0/1 port.

<Sysname> display qos trust interface GigabitEthernet 1/0/1

Interface: GigabitEthernet1/0/1

Port priority information

Port priority :0

Port priority trust type : dscp

Table 4-2 Description on the fields of the display qos trust interface command

Field

Description

Interface

Port name, comprising of port type and port number

Port priority

Port priority

Port priority trust type

Port priority trust mode

l      dscp indicates that the DSCP precedence of the received packets is trusted

l      untrust indicates that the 802.1p precedence of the received packets is trusted

 

4.3.2  qos trust

Syntax

qos trust dscp

undo qos trust

View

Ethernet port view, port group view

Parameters

dscp: Specifies to trust DSCP precedence carried in the packet and adopt this priority for priority mapping.

Description

Use the qos trust command to configure the port priority trust mode.

Use the undo qos trust command to restore the default port priority trust mode.

By default, the 802.1p precedence of the received packets is trusted.

Examples

# Specify to trust the DSCP precedence carried in packets on GigabitEthernet1/0/1 port.

<Sysname> system-view

[Sysname] interface GigabitEthernet 1/0/1

[Sysname-GigabitEthernet1/0/1] qos trust dscp

 


Chapter 5  VLAN QoS Policy Configuration Commands

5.1  VLAN QoS Policy Configuration Commands

5.1.1  display qos vlan-policy

Syntax

display qos vlan-policy { name policy-name | vlan [ vlan-id ] }

View

Any view

Parameters

name policy-name: Specifies to display the information about the QoS policy with the specified name.

vlan vlan-id: Specifies to display the information about the QoS policy applied to the specified VLAN.

Description

Use the display qos vlan-policy command to display the information about QoS policies.

If the vlan-id argument is not specified, the information about all the QoS policies will be displayed.

Examples

# Display the information about the QoS policy test.

<Sysname> display qos vlan-policy name test

  Policy test

    Vlan 300: inbound

Table 5-1 Description on the fields of the display qos vlan-policy command

Field

Description

Policy

Name of the QoS policy

Vlan 300

ID of the VLAN where the QoS policy is applied

inbound

The QoS policy is applied in the inbound direction of the VLAN.

 

# Display the information about the QoS policy applied to VLAN 300.

<Sysname> display qos vlan-policy vlan 300

 

  Vlan 300

 

  Direction: Inbound

 

  Policy: test

   Classifier: test

     Operator: AND

     Rule(s) : If-match customer-vlan-id 3

     Behavior: test

      Accounting Enable:

        0 (Packets)

      Committed Access Rate:

        CIR 6400 (kbps), CBS 4000 (byte), EBS 4000 (byte)

        Green Action: pass

        Red Action: discard

        Yellow Action: pass

        Green : 0(Packets)

Table 5-2 Description on the fields of the display qos vlan-policy command

Field

Description

Vlan 300

ID of the VLAN where the QoS policy is applied

Inbound

The QoS policy is applied in the inbound direction of the VLAN.

Classifier

Name of the class in the QoS policy and its configuration

Behavior

Name of the behavior in the QoS policy and its configuration

 

5.1.2  qos vlan-policy

Syntax

qos vlan-policy policy-name vlan vlan-id-list inbound

undo qos vlan-policy vlan vlan-id-list inbound

View

System view

Parameters

policy-name: Policy name.

vlan-id-list: List of VLAN IDs, presented in the form of vlan-id to vlan-id or discontinuous VLAN IDs. Up to eight VLAN IDs can be specified at a time.

inbound: Specifies to apply the QoS policy in the inbound direction of the VLAN.

Description

Use the qos vlan-policy command to apply the QoS policy to the specific VLAN(s).

Use the undo qos vlan-policy command to remove the QoS policy from the specific VLAN(s).

Examples

# Apply the QoS policy test in the inbound direction of VLAN 200, VLAN 300, VLAN 400, VLAN 500, VLAN 600, VLAN 700, VLAN 800, and VLAN 900.

<Sysname> system-view

[Sysname] qos vlan-policy test vlan 200 300 400 500 600 700 800 900 inbound

5.1.3  reset qos vlan-policy

Syntax

reset qos vlan-policy [ vlan vlan-id ]

View

User view

Parameters

vlan-id: VLAN ID, in the range 1 to 4,094.

Description

Use the reset qos vlan-policy command to clear the statistics information about QoS policies.

Examples

# Clear the statistics information about the QoS policies applied to VLAN 2.

<Sysname> reset qos vlan-policy vlan 2

 


Chapter 6  Traffic Mirroring Configuration Commands

6.1  Traffic Mirroring Configuration Commands

6.1.1  mirror-to

Syntax

mirror-to { cpu | interface interface-type interface-number }

undo mirror-to { cpu | interface interface-type interface-number }

View

Traffic behavior view

Parameters

cpu: Redirects packets to the CPU.

interface interface-type interface-number: Port type and port number of the destination port for the traffic mirroring action.

Description

Use the mirror-to command to configure traffic mirroring action for a traffic behavior.

Use the undo mirror-to command to remove the traffic mirroring action.

Examples

# Configure traffic behavior 1 and define the action of mirroring traffic to GigabitEthernet1/0/2 in the traffic behavior.

<Sysname> system-view

[Sysname] traffic behavior 1

[Sysname-behavior-1] mirror-to interface GigabitEthernet 1/0/2

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网