HP 5700 Switch Config Acl
HP 5700 Switch Config Acl
i
Applying the QoS policy to a control plane ······································································································ 23
Applying the QoS policy to a user profile ·········································································································· 24
Displaying and maintaining QoS policies ·················································································································· 24
ii
Configuring congestion avoidance··························································································································· 58
Overview········································································································································································· 58
Tail drop ································································································································································· 58
RED and WRED ····················································································································································· 58
ECN ········································································································································································ 59
Configuring and applying a WRED table ··················································································································· 59
Configuration procedure ······································································································································ 60
Configuration example ········································································································································· 60
Displaying and maintaining WRED ····························································································································· 61
Appendixes································································································································································· 85
Appendix A Default priority maps ······························································································································· 85
Appendix B Introduction to packet precedences ········································································································ 86
IP precedence and DSCP values·························································································································· 86
802.1p priority ······················································································································································ 87
iii
Configuring time ranges ············································································································································ 89
Configuration procedure ··············································································································································· 89
Displaying and maintaining time ranges····················································································································· 89
Time range configuration example ······························································································································ 89
iv
Configuring ACLs
Overview
An access control list (ACL) is a set of rules (or permit or deny statements) for identifying traffic based on
criteria such as source IP address, destination IP address, and port number.
ACLs are primarily used for packet filtering. "Configuring packet filtering with ACLs" provides an
example. You can use ACLs in QoS, security, routing, and other feature modules for identifying traffic.
The packet drop or forwarding decisions depend on the modules that use ACLs.
ACL categories
Category ACL number IP version Match criteria
IPv4 Source IPv4 address.
Basic ACLs 2000 to 2999
IPv6 Source IPv6 address.
1
Numbering and naming ACLs
Each ACL category has a unique range of ACL numbers. When creating an ACL, you must assign it a
number. In addition, you can assign the ACL a name for ease of identification. After creating an ACL with
a name, you cannot rename it or delete its name.
For an IPv4 basic or advanced ACLs, its ACL number and name must be unique in IPv4. For an IPv6 basic
or advanced ACL, its ACL number and name must be unique in IPv6.
Match order
The rules in an ACL are sorted in a specific order. When a packet matches a rule, the device stops the
match process and performs the action defined in the rule. If an ACL contains overlapping or conflicting
rules, the matching result and action to take depend on the rule order.
The following ACL match orders are available:
• config—Sorts ACL rules in ascending order of rule ID. A rule with a lower ID is matched before a
rule with a higher ID. If you use this method, check the rules and their order carefully.
NOTE:
The match order of user-defined ACLs can only be config.
• auto—Sorts ACL rules in depth-first order. Depth-first ordering makes sure any subset of a rule is
always matched before the rule. Table 1 lists the sequence of tie breakers that depth-first ordering
uses to sort rules for each type of ACL.
Table 1 Sort ACL rules in depth-first order
2
A wildcard mask, also called an inverse mask, is a 32-bit binary number represented in dotted
decimal notation. In contrast to a network mask, the 0 bits in a wildcard mask represent "do care"
bits, and the 1 bits represent "don't care" bits. If the "do care" bits in an IP address are identical
to the "do care" bits in an IP address criterion, the IP address matches the criterion. All "don't care"
bits are ignored. The 0s and 1s in a wildcard mask can be noncontiguous. For example,
0.255.0.255 is a valid wildcard mask.
Rule numbering
ACL rules can be manually numbered or automatically numbered. This section describes how automatic
ACL rule numbering works.
3
Configuration task list
Tasks at a glance
(Required.) Perform at least one of the following tasks:
• Configuring a basic ACL
{ Configuring an IPv4 basic ACL
{ Configuring an IPv6 basic ACL
• Configuring an advanced ACL
{ Configuring an IPv4 advanced ACL
{ Configuring an IPv6 advanced ACL
• Configuring an Ethernet frame header ACL
• Configuring a user-defined ACL
(Optional.) Copying an ACL
4
Step Command Remarks
6. (Optional.) Add or edit a rule By default, no rule comments are
rule rule-id comment text
comment. configured.
5
Configuring an IPv4 advanced ACL
IPv4 advanced ACLs match packets based on the following criteria:
• Source IP addresses.
• Destination IP addresses.
• Packet priorities.
• Protocol numbers.
• Other protocol header information, such as TCP/UDP source and destination port numbers, TCP
flags, ICMP message types, and ICMP message codes.
Compared to IPv4 basic ACLs, IPv4 advanced ACLs allow more flexible and accurate filtering.
To configure an IPv4 advanced ACL:
6
Configuring an IPv6 advanced ACL
IPv6 advanced ACLs match packets based on the following criteria:
• Source IPv6 addresses.
• Destination IPv6 addresses.
• Packet priorities.
• Protocol numbers.
• Other protocol header fields such as the TCP/UDP source port number, TCP/UDP destination port
number, ICMPv6 message type, and ICMPv6 message code.
Compared to IPv6 basic ACLs, IPv6 advanced ACLs allow more flexible and accurate filtering.
To configure an IPv6 advanced ACL:
7
Step Command Remarks
rule [ rule-id ] { deny | permit }
protocol [ { { ack ack-value |
fin fin-value | psh psh-value |
rst rst-value | syn syn-value | By default, IPv6 advanced ACL does not contain any
urg urg-value } * | rule.
established } | counting | The logging keyword takes effect only when the
destination { dest-address module (for example, packet filtering) that uses the
dest-prefix | ACL supports logging.
dest-address/dest-prefix |
If an ACL is for QoS traffic classification or packet
any } | destination-port
filtering:
operator port1 [ port2 ] | dscp
5. Create or edit a dscp | flow-label • Do not specify the fragment keyword.
rule. flow-label-value | fragment | • Do not specify neq for the operator argument.
icmp6-type { icmp6-type • Do not specify the routing, hop-by-hop, or
icmp6-code | flow-label keyword if the ACL is for outbound
icmp6-message } | logging | QoS traffic classification or outbound packet
routing [ type routing-type ] | filtering.
hop-by-hop [ type hop-type ] | • Do not specify ipv6-ah for the protocol argument,
source { source-address nor set its value to 0, 43, 44, 51, or 60, if the ACL
source-prefix | is for outbound QoS traffic classification or
source-address/source-prefix outbound packet filtering.
| any } | source-port operator
port1 [ port2 ] | time-range
time-range-name ] *
6. (Optional.) Add
or edit a rule rule rule-id comment text By default, no rule comments are configured.
comment.
NOTE:
If an ACL is to match information in the IPv6 packet payload, it can only match packets with one extension
header. It cannot match packets with two or more extension headers or with the Encapsulating Security
Payload Header.
8
Step Command Remarks
By default, no ACL exists.
Ethernet frame header ACLs are
2. Create an Ethernet frame acl number acl-number [ name numbered in the range of 4000 to
header ACL and enter its acl-name ] [ match-order { auto | 4999.
view. config } ] You can use the acl name acl-name
command to enter the view of a
named ACL.
3. (Optional.) Configure a By default, an Ethernet frame
description for the Ethernet description text header ACL has no ACL
frame header ACL. description.
4. (Optional.) Set the rule
step step-value The default setting is 5.
numbering step.
9
Step Command Remarks
By default, a user-defined ACL
rule [ rule-id ] { deny | permit } does not contain any rule.
[ { l2 rule-string rule-mask A user-defined ACL cannot be used
4. Create or edit a rule.
offset }&<1-8> ] [ counting | for outbound QoS traffic
time-range time-range-name ] * classification or outbound packet
filtering.
5. (Optional.) Add or edit a rule By default, no rule comments are
rule rule-id comment text
comment. configured.
NOTE:
If a user-defined ACL is to match packets with VLAN tags, the offset must include the length of the VLAN
tags. Each VLAN tag is 4 bytes long.
Copying an ACL
You can create an ACL by copying an existing ACL (source ACL). The new ACL (destination ACL) has the
same properties and content as the source ACL, but not the same ACL number and name.
To successfully copy an ACL, make sure:
• The destination ACL number is from the same category as the source ACL number.
• The source ACL already exists, but the destination ACL does not.
To copy an ACL:
Step Command
1. Enter system view. system-view
NOTE:
The ACL-based packet filter function is available on Ethernet interfaces, VLAN interfaces, S-channel
interfaces, S-channel aggregate interfaces, VSI interfaces, and VSI aggregate interfaces. For more
information about S-channel interfaces, S-channel aggregate interfaces, VSI interfaces, and VSI
aggregate interfaces, see EVB Configuration Guide.
10
Applying an ACL to an interface for packet filtering
Step Command Remarks
1. Enter system view. system-view N/A
interface interface-type
2. Enter interface view. N/A
interface-number
11
Setting the packet filtering default action
Step Command Remarks
1. Enter system view. system-view N/A
Task Command
display acl [ ipv6 ] { acl-number | all | name
Display ACL configuration and match statistics.
acl-name }
Display QoS and ACL resource usage. display qos-acl resource [ slot slot-number ]
12
• Permit access from the Financial department to the database server only during working hours (from
8:00 to 18:00) on working days.
• Deny access from any other department to the database server.
Figure 1 Network diagram
Configuration procedure
# Create a periodic time range from 8:00 to 18:00 on working days.
<DeviceA> system-view
[DeviceA] time-range work 08:0 to 18:00 working-day
# Create an IPv4 advanced ACL numbered 3000 and configure three rules in the ACL. One rule permits
access from the President's office to the financial database server, one rule permits access from the
Financial department to the database server during working hours, and one rule denies access from any
other department to the database server.
[DeviceA] acl number 3000
[DeviceA-acl-adv-3000] rule permit ip source 192.168.1.0 0.0.0.255 destination
192.168.0.100 0
[DeviceA-acl-adv-3000] rule permit ip source 192.168.2.0 0.0.0.255 destination
192.168.0.100 0 time-range work
[DeviceA-acl-adv-3000] rule deny ip source any destination 192.168.0.100 0
[DeviceA-acl-adv-3000] quit
# Apply IPv4 advanced ACL 3000 to filter outgoing packets on interface Ten-GigabitEthernet 1/0/1.
[DeviceA] interface ten-gigabitethernet 1/0/1
[DeviceA-Ten-GigabitEthernet1/0/1] packet-filter 3000 outbound
[DeviceA-Ten-GigabitEthernet1/0/1] quit
13
Pinging 192.168.0.100 with 32 bytes of data:
14
QoS overview
In data communications, Quality of Service (QoS) provides differentiated service guarantees for
diversified traffic in terms of bandwidth, delay, jitter, and drop rate, all of which can affect QoS.
Network resources are limited. When configuring a QoS scheme, you must consider the characteristics
of different applications. For example, when bandwidth is fixed, more bandwidth used by one user
leaves less bandwidth for others. QoS prioritizes traffic to balance the interests of users and manages
network resources.
The following section describes typical QoS service models and widely used QoS techniques.
IntServ model
The integrated service (IntServ) model is a multiple-service model that can accommodate diverse QoS
requirements. This service model provides the most granularly differentiated QoS by identifying and
guaranteeing definite QoS for each data flow.
In the IntServ model, an application must request service from the network before it sends data. IntServ
signals the service request with the RSVP. All nodes receiving the request reserve resources as requested
and maintain state information for the application flow.
The IntServ model demands high storage and processing capabilities because it requires all nodes along
the transmission path to maintain resource state information for each flow. This model is suitable for
small-sized or edge networks, but not large-sized networks, for example, the core layer of the Internet,
where billions of flows are present.
DiffServ model
The differentiated service (DiffServ) model is a multiple-service model that can meet diverse QoS
requirements. It is easy to implement and extend. DiffServ does not signal the network to reserve
resources before sending data, as IntServ does.
15
QoS techniques overview
The QoS techniques include the following features:
• Traffic classification.
• Traffic policing.
• Traffic shaping.
• Rate limit.
• Congestion management.
• Congestion avoidance.
The following section briefly introduces these QoS techniques.
All QoS techniques in this document are based on the DiffServ model.
As shown in Figure 2, traffic classification, traffic shaping, traffic policing, congestion management, and
congestion avoidance mainly implement the following features:
• Traffic classification—Uses match criteria to assign packets with the same characteristics to a traffic
class. Based on traffic classes, you can provide differentiated services.
• Traffic policing—Polices flows and imposes penalties to prevent aggressive use of network resources.
You can apply traffic policing to both incoming and outgoing traffic of a port.
• Traffic shaping—Adapts the output rate of traffic to the network resources available on the
downstream device to eliminate packet drops. Traffic shaping usually applies to the outgoing traffic
of a port.
• Congestion management—Provides a resource scheduling policy to determine the packet
forwarding sequence when congestion occurs. Congestion management usually applies to the
outgoing traffic of a port.
16
• Congestion avoidance—Monitors the network resource usage. It is usually applied to the outgoing
traffic of a port. When congestion worsens, congestion avoidance reduces the queue length by
dropping packets.
17
Configuring a QoS policy
You can configure QoS by using the MQC approach or non-MQC approach. Some features support
both approaches, but some support only one.
Non-MQC approach
In the non-MQC approach, you configure QoS service parameters without using a QoS policy. For
example, you can use the rate limit feature to set a rate limit on an interface without using a QoS policy.
MQC approach
In the modular QoS configuration (MQC) approach, you configure QoS service parameters by using
QoS policies. A QoS policy defines the shaping, policing, or other QoS actions to take on different
classes of traffic. It is a set of class-behavior associations.
A traffic class is a set of match criteria for identifying traffic, and it uses the AND or OR operator.
• If the operator is AND, a packet must match all the criteria to match the traffic class.
• If the operator is OR, a packet matches the traffic class if it matches any of the criteria in the traffic
class.
A traffic behavior defines a set of QoS actions to take on packets, such as priority marking and redirect.
By associating a traffic behavior with a traffic class in a QoS policy, you apply QoS actions in the traffic
behavior to the traffic class.
18
Defining a traffic class
Configuration guidelines
When you configure a traffic class, follow these restrictions and guidelines:
• If the traffic class includes the customer-vlan-id match criterion, a QoS policy that contains the
traffic class can be applied only to interfaces.
• If the traffic class includes both the control-plane protocol or control-plane protocol-group criterion
and other criteria, the QoS policy that contains the traffic class cannot be applied correctly.
• If the traffic class includes the control-plane protocol or control-plane protocol-group match
criterion, the QoS policy that contains the traffic class can be applied only to a control plane.
• To configure multiple values for a match criterion, perform the following tasks:
{ Set the logical operator to OR.
{ Configure multiple if-match commands for the match criterion.
For the customer-vlan-id and service-vlan-id match criteria, you can configure multiple values in
one if-match command when the logical operator is OR or AND.
• If the configured logical operator is AND for the traffic class, the actual logical operator for the rules
in an ACL match criterion is OR.
Configuration procedure
Step Command Remarks
1. Enter system view. system-view N/A
2. Create a traffic class and traffic classifier classifier-name By default, no traffic class is
enter traffic class view. [ operator { and | or } ] configured.
Option Description
Matches an ACL.
The acl-number argument has the following value ranges:
• 2000 to 3999 for IPv4 ACLs.
• 2000 to 3999 for IPv6 ACLs.
acl [ ipv6 ] { acl-number | name
acl-name } • 4000 to 4999 for Ethernet frame header ACLs.
• 5000 to 5999 for user-defined ACLs.
The acl-name argument is a case-insensitive string of 1 to 63 characters,
which must start with an English letter. To avoid confusion, make sure the
argument is not all.
19
Option Description
Matches control plane protocols.
control-plane protocol
protocol-name&<1-8> The protocol-name&<1-8> argument specifies a space-separated list of up to
eight system-defined control plane protocols.
Matches a protocol.
protocol protocol-name
The protocol-name argument can be ARP, IP, or IPv6.
Matches a local QoS ID in the range of 1 to 4095. The switch supports local
qos-local-id local-id-value
QoS IDs in the range of 1 to 3999.
20
To define a traffic behavior:
21
You can modify traffic classes, traffic behaviors, and class-behavior associations in a QoS policy even
after it is applied. If a traffic class uses an ACL for traffic classification, you can delete or modify the ACL
(such as add rules to, delete rules from, and modify rules of the ACL).
QoS policies applied to an interface, a VLAN, and globally are in descending order of priority. The
switch first matches the criteria in the QoS policy applied to an interface. If there is a match, the switch
executes the QoS policy applied to the interface and ignores the QoS policies applied to the VLAN and
globally.
NOTE:
If both packet filtering with the permit statement and QoS policies are configured on an interface, the car
and filter actions in the QoS policies do not take effect. For information about packet filtering, see
"Configuring ACLs."
22
Step Command Remarks
1. Enter system view. system-view N/A
2. Apply the QoS policy to qos vlan-policy policy-name vlan By default, no QoS policy is applied
VLANs. vlan-id-list { inbound | outbound } to a VLAN.
Configuration guidelines
If a QoS policy applied to the control plane uses if-match control-plane protocol-group or if-match
control-plane protocol for traffic classification in a class, the action in the associated traffic behavior can
only be car or the combination of car and accounting packet, and only the cir keyword in the car action
can be applied normally.
23
Configuration procedure
To apply the QoS policy to a control plane:
qos apply policy Use the inbound keyword to apply the QoS
3. Apply the QoS policy. policy-name { inbound | policy to the incoming traffic of the device
outbound } (traffic sent by the online users). Use the
outbound keyword to apply the QoS policy to
the outgoing traffic of the device (traffic
received by the online users).
Task Command
display traffic classifier user-defined [ classifier-name ] [ slot
Display traffic class configuration.
slot-number ]
24
display traffic behavior user-defined [ behavior-name ] [ slot
Display traffic behavior configuration.
slot-number ]
Display QoS and ACL resource usage. display qos-acl resource [ slot slot-number ]
Display QoS policy configuration on the display qos policy interface [ interface-type interface-number ]
specified or all interfaces. [ inbound | outbound ]
Display information about QoS policies display qos vlan-policy { name policy-name | vlan vlan-id } [ slot
applied to VLANs. slot-number ] [ inbound | outbound ]
Display information about QoS policies display qos policy global [ slot slot-number ] [ inbound |
applied globally. outbound ]
25
Configuring priority mapping
Overview
When a packet arrives, a device assigns a set of QoS priority parameters to the packet based on either
a priority field carried in the packet or the port priority of the incoming port. This process is called priority
mapping. During this process, the device can modify the priority of the packet according to the priority
mapping rules. The set of QoS priority parameters decides the scheduling priority and forwarding
priority of the packet.
Priority mapping is implemented with priority maps and involves the following priorities:
• 802.1p priority.
• DSCP.
• IP precedence.
• Local precedence.
• Drop priority.
Introduction to priorities
Priorities include the following types: priorities carried in packets, and priorities locally assigned for
scheduling only.
Packet-carried priorities include 802.1p priority, DSCP precedence, and IP precedence. These priorities
have global significance and affect the forwarding priority of packets across the network. For more
information about these priorities, see "Appendixes."
Locally assigned priorities only have local significance. They are assigned by the switch only for
scheduling. These priorities include the local precedence and drop priority, as follows:
• Local precedence—Used for queuing. A local precedence value corresponds to an output queue. A
packet with higher local precedence is assigned to a higher priority output queue to be
preferentially scheduled.
• Drop priority—Used for making packet drop decisions. Packets with the highest drop priority are
dropped preferentially.
Priority maps
The switch provides various types of priority maps. By looking through a priority map, the switch decides
which priority value to assign to a packet for subsequent packet processing. The switch provides the
following priority mapping tables:
• dot1p-dp—802.1p-to-drop priority mapping table.
• dot1p-lp—802.1p-to-local priority mapping table.
• dscp-dot1p—DSCP-to-802.1p priority mapping table, which is applicable only to IP packets.
• dscp-dp—DSCP-to-drop priority mapping table, which is applicable only to IP packets.
• dscp-dscp—DSCP-to-DSCP priority mapping table, which is applicable only to IP packets.
26
The default priority maps (as shown in "Appendix A Default priority maps") are available for priority
mapping. They are adequate in most cases. If a default priority map cannot meet your requirements, you
can modify the priority map as required.
1 0 0
2 1 1
3 3 3
4 4 4
5 5 5
6 6 6
7 7 7
NOTE:
When the 802.1p priority carried in packets is trusted, the port priority is used for priority mapping
for packets which do not carry VLAN tags (namely, do not carry 802.1p priorities.) The priority
mapping results are the same as not trusting packet priority, as shown in Table 5.
8 to 15 0 0
16 to 23 1 1
24 to 31 3 3
32 to 39 4 4
40 to 47 5 5
48 to 55 6 6
56 to 63 7 7
27
• Using the port priority as the 802.1p priority for priority mapping. The port priority is user
configurable.
Table 5 Priority mapping results of not trusting packet priority (when the default dot1p-lp priority
mapping table is used)
1 0 0
2 1 1
3 3 3
4 4 4
5 5 5
6 6 6
7 7 7
The priority mapping process varies with priority trust mode. For more information, see the subsequent
section.
28
Figure 4 Priority mapping process for an Ethernet packet
Receive a packet
on a port
Should the
packet be marked with Yes
local precedence or drop
priority?
Mark it with local
No
precedence or drop
priority
Which priority is
802.1p in packets Port priority
trusted on the port?
Yes
Look up dscp-dp,
dscp-dot1p, and Look up dot1p-dp
dscp-dscp mapping and dot1p-lp
Look up dot1p-dp Look up dot1p-dp tables mapping tables
and dot1p-lp and dot1p-lp
mapping tables mapping tables
Mark the packet
with 802.1p priority, Mark the packet
drop precedence, with local
and new DSCP precedence or drop
Mark the packet Mark the packet priority
with local with local precedence
precedence or drop precedence or drop
priority priority
Look up dot1p-lp
mapping table
Tasks at a glance
(Optional.) Configuring a priority map
29
Tasks at a glance
(Required.) Perform one of the following tasks:
• Configuring an interface to trust packet priority for priority mapping
• Changing the port priority of an interface
30
• Configure the interface to trust
the DSCP precedence.
qos trust dscp
• Configure the interface to trust Use one of these commands.
3. Configure the trusted the 802.1p priority of received
packet priority type. packets. By default, an interface does not trust any
qos trust dot1p packet priority.
• Configure the interface not to
trust any packet priority.
undo qos trust
Task Command
Display priority map display qos map-table { dot1p-dp | dot1p-lp | dscp-dot1p | dscp-dp |
configuration. dscp-dscp }
31
Figure 5 Network diagram
Switch A
Internet
XG Server
E1
/0/
1
XGE1/0/3
2
/0/
G E1
X
Switch C
Switch B
Configuration procedure
# Assign port priority to Ten-GigabitEthernet 1/0/1 and Ten-GigabitEthernet 1/0/2. Make sure the
following requirements are met:
• The port priority of Ten-GigabitEthernet 1/0/1 is higher than that of Ten-GigabitEthernet 1/0/2.
• No trusted packet priority type is configured on Ten-GigabitEthernet 1/0/1 and
Ten-GigabitEthernet 1/0/2.
<SwitchC> system-view
[SwitchC] interface ten-gigabitethernet 1/0/1
[SwitchC-Ten-GigabitEthernet1/0/1] qos priority 3
[SwitchC-Ten-GigabitEthernet1/0/1] quit
[SwitchC] interface ten-gigabitethernet 1/0/2
[SwitchC-Ten-GigabitEthernet1/0/2] qos priority 1
[SwitchC-Ten-GigabitEthernet1/0/2] quit
32
Table 6 Configuration plan
Internet
Host Host
Server Server
/2
XG
/0
E1
E1
/0
XG
XG
/
/0
E1
E1
/1
Configuration procedure
1. Enable trusting port priority:
# Set the port priority of Ten-GigabitEthernet 1/0/1 to 3.
<Switch> system-view
[Switch] interface ten-gigabitethernet 1/0/1
[Switch-Ten-GigabitEthernet1/0/1] qos priority 3
[Switch-Ten-GigabitEthernet1/0/1] quit
# Set the port priority of Ten-GigabitEthernet 1/0/2 to 4.
33
[Switch] interface ten-gigabitethernet 1/0/2
[Switch-Ten-GigabitEthernet1/0/2] qos priority 4
[Switch-Ten-GigabitEthernet1/0/2] quit
# Set the port priority of Ten-GigabitEthernet 1/0/3 to 5.
[Switch] interface ten-gigabitethernet 1/0/3
[Switch-Ten-GigabitEthernet1/0/3] qos priority 5
[Switch-Ten-GigabitEthernet1/0/3] quit
2. Configure the 802.1p-to-local mapping table to map 802.1p priority values 3, 4, and 5 to local
precedence values 2, 6, and 4. This guarantees the R&D department, management department,
and marketing department decreased priorities to access the public server.
[Switch] qos map-table dot1p-lp
[Switch-maptbl-dot1p-lp] import 3 export 2
[Switch-maptbl-dot1p-lp] import 4 export 6
[Switch-maptbl-dot1p-lp] import 5 export 4
[Switch-maptbl-dot1p-lp] quit
3. Configure priority marking:
# Mark the HTTP traffic of the management department, marketing department, and R&D
department to the Internet with 802.1p priorities 4, 5, and 3, respectively. Use the priority
mapping table you have configured to map the 802.1p priorities to local precedence values 6, 4,
and 2, respectively, for differentiated traffic treatment.
# Create ACL 3000 to match HTTP traffic.
[Switch] acl number 3000
[Switch-acl-adv-3000] rule permit tcp destination-port eq 80
[Switch-acl-adv-3000] quit
# Create class http and use ACL 3000 in the class.
[Switch] traffic classifier http
[Switch-classifier-http] if-match acl 3000
[Switch-classifier-http] quit
# Configure a priority marking policy for the management department, and apply the policy to the
incoming traffic of Ten-GigabitEthernet 1/0/3.
[Switch] traffic behavior admin
[Switch-behavior-admin] remark dot1p 4
[Switch-behavior-admin] quit
[Switch] qos policy admin
[Switch-qospolicy-admin] classifier http behavior admin
[Switch-qospolicy-admin] quit
[Switch] interface ten-gigabitethernet 1/0/3
[Switch-Ten-GigabitEthernet1/0/3] qos apply policy admin inbound
# Configure a priority marking policy for the marketing department, and apply the policy to the
incoming traffic of Ten-GigabitEthernet 1/0/1.
[Switch] traffic behavior market
[Switch-behavior-market] remark dot1p 5
[Switch-behavior-market] quit
[Switch] qos policy market
[Switch-qospolicy-market] classifier http behavior market
[Switch-qospolicy-market] quit
[Switch] interface ten-gigabitethernet 1/0/1
34
[Switch-Ten-GigabitEthernet1/0/1] qos apply policy market inbound
# Configure a priority marking policy for the R&D department, and apply the policy to the
incoming traffic of Ten-GigabitEthernet 1/0/2.
[Switch] traffic behavior rd
[Switch-behavior-rd] remark dot1p 3
[Switch-behavior-rd] quit
[Switch] qos policy rd
[Switch-qospolicy-rd] classifier http behavior rd
[Switch-qospolicy-rd] quit
[Switch] interface ten-gigabitethernet 1/0/2
[Switch-Ten-GigabitEthernet1/0/2] qos apply policy rd inbound
35
Configuring traffic policing, GTS, and rate limit
Overview
Traffic policing helps assign network resources (including bandwidth) and increase network performance.
For example, you can configure a flow to use only the resources committed to it in a certain time range.
This avoids network congestion caused by burst traffic.
Traffic policing, Generic Traffic Shaping (GTS), and rate limit control the traffic rate and resource usage
according to traffic specifications. You can use token buckets for evaluating traffic specifications.
Complicated evaluation
You can set two token buckets, bucket C and bucket E, to evaluate traffic in a more complicated
environment and achieve more policing flexibility. For example, traffic policing can use the following
mechanisms:
• Single rate two color—Uses one token bucket and the following parameters:
{ CIR—Rate at which tokens are put into bucket C. It sets the average packet transmission or
forwarding rate allowed by bucket C.
{ CBS—Size of bucket C, which specifies the transient burst of traffic that bucket C can forward.
When a packet arrives, the following rules apply:
{ If bucket C has enough tokens to forward the packet, the packet is colored green.
36
{ Otherwise, the packet is colored red.
• Single rate three color—Uses two token buckets and the following parameters:
{ CIR—Rate at which tokens are put into bucket C. It sets the average packet transmission or
forwarding rate allowed by bucket C.
{ CBS—Size of bucket C, which specifies the transient burst of traffic that bucket C can forward.
{ EBS—Size of bucket E minus size of bucket C. The EBS specifies the transient burst of traffic that
bucket E can forward. The EBS cannot be 0. The size of E bucket is the sum of the CBS and EBS.
When a packet arrives, the following rules apply:
{ If bucket C has enough tokens, the packet is colored green.
{ If bucket C does not have enough tokens but bucket E has enough tokens, the packet is colored
yellow.
{ If neither bucket C nor bucket E has enough tokens, the packet is colored red.
• Two rate three color—Uses two token buckets and the following parameters:
{ CIR—Rate at which tokens are put into bucket C. It sets the average packet transmission or
forwarding rate allowed by bucket C.
{ CBS—Size of bucket C, which specifies the transient burst of traffic that bucket C can forward.
{ PIR—Rate at which tokens are put into bucket E, which specifies the average packet transmission
or forwarding rate allowed by bucket E.
{ EBS—Size of bucket E, which specifies the transient burst of traffic that bucket E can forward.
When a packet arrives, the following rules apply:
{ If bucket C has enough tokens, the packet is colored green.
{ If bucket C does not have enough tokens but bucket E has enough tokens, the packet is colored
yellow.
{ If neither bucket C nor bucket E has enough tokens, the packet is colored red.
Traffic policing
Traffic policing supports policing the inbound traffic and the outbound traffic.
A typical application of traffic policing is to supervise the specification of traffic entering a network and
limit it within a reasonable range. Another application is to "discipline" the extra traffic to prevent
aggressive use of network resources by an application. For example, you can limit bandwidth for HTTP
packets to less than 50% of the total. If the traffic of a session exceeds the limit, traffic policing can drop
the packets or reset the IP precedence of the packets. Figure 7 shows an example of policing outbound
traffic on an interface.
37
Figure 7 Traffic policing
Traffic policing is widely used in policing traffic entering the ISP networks. It can classify the policed traffic
and take predefined policing actions on each packet depending on the evaluation result as follows:
• Forwarding the packet if the evaluation result is "conforming."
• Dropping the packet if the evaluation result is "excess."
• Forwarding the packet with its precedence re-marked if the evaluation result is "conforming."
Priorities that can be re-marked include 802.1p priority, DSCP precedence, and local precedence.
GTS
GTS supports shaping the outbound traffic. GTS limits the outbound traffic rate by buffering exceeding
traffic. You can use GTS to adapt the traffic output rate on a device to the input traffic rate of its connected
device to avoid packet loss.
The differences between traffic policing and GTS are as follows:
• Packets to be dropped with traffic policing are retained in a buffer or queue with GTS, as shown
in Figure 8. When enough tokens are in the token bucket, the buffered packets are sent at an even
rate.
• GTS can result in additional delay and traffic policing does not.
38
Figure 8 GTS
For example, in Figure 9, Switch B performs traffic policing on packets from Switch A and drops packets
exceeding the limit. To avoid packet loss, you can perform GTS on the outgoing interface of Switch A so
that packets exceeding the limit are cached in Switch A. Once resources are released, GTS takes out the
cached packets and sends them out.
Figure 9 GTS application
Device A Device B
Physical link
Rate limit
Rate limit controls the rate of inbound and outbound traffic. The outbound traffic is taken for example.
The rate limit of a physical interface specifies the maximum rate for sending or receiving packets
(including critical packets).
Rate limit also uses token buckets for traffic control. When rate limit is configured on an interface, a token
bucket handles all packets to be sent through the interface for rate limiting. If enough tokens are in the
token bucket, packets can be forwarded. Otherwise, packets are put into QoS queues for congestion
management. In this way, the traffic passing the physical interface is controlled.
39
Figure 10 Rate limit implementation
The token bucket mechanism limits traffic rate when accommodating bursts. It allows bursty traffic to be
transmitted if enough tokens are available. If tokens are scarce, packets cannot be transmitted until
efficient tokens are generated in the token bucket. It restricts the traffic rate to the rate for generating
tokens.
Rate limit controls the total rate of all packets on a physical interface. It is easier to use than traffic policing
in controlling the total traffic rate on a physical interface.
40
Step Command Remarks
car cir committed-information-rate [ cbs
committed-burst-size [ ebs
excess-burst-size ] ] [ green action | red
action | yellow action ] * Use either of the commands.
6. Configure a traffic
policing action. car cir committed-information-rate [ cbs By default, no traffic policing action is
committed-burst-size ] pir configured.
peak-information-rate [ ebs
excess-burst-size ] [ green action | red
action | yellow action ] *
7. Return to system view. quit N/A
8. Create a QoS policy
By default, no QoS policy is
and enter QoS policy qos policy policy-name
configured.
view.
9. Associate the traffic
classifier classifier-name behavior
class with the traffic By default, a traffic class is not
behavior-name [ insert-before
behavior in the QoS associated with a traffic behavior.
before-classifier-name ]
policy.
10. Return to system view. quit N/A
• Applying the QoS policy to an
interface
• Applying the QoS policy to a VLAN
Choose one of the application
• Applying the QoS policy globally destinations as needed.
11. Apply the QoS policy.
• Applying the QoS policy to a
By default, no QoS policy is applied.
control plane
• Applying the QoS policy to a user
profile
12. (Optional.) Display
display traffic behavior user-defined
traffic policing Available in any view.
[ behavior-name ]
configuration.
Configuring GTS
The switch supports configuring queue-based GTS by using the non-MQC approach. In queue-based
GTS, you set GTS parameters for packets of a queue.
To configure GTS:
41
Configuring the rate limit
The rate limit of a physical interface specifies the maximum rate of incoming packets or outgoing packets.
To configure the rate limit:
Task Command
Display QoS and ACL resource usage. display qos-acl resource [ slot slot-number ]
Display GTS configuration on an interface. display qos gts interface [ interface-type interface-number ]
42
• Limit the outgoing HTTP traffic (traffic accessing the Internet) rate of Ten-GigabitEthernet 1/0/2 to
102400 kbps and drop the excess traffic.
Figure 11 Network diagram
Server
Host A Internet
Switch B
XGE1/0/2
1.1.1.1/8 Ethernet 1.1.1.2/8 XGE1/0/1
XGE1/0/1 Host B
XGE1/0/3
Switch A
XGE1/0/2
Configuration procedures
1. Configure Switch A:
# Configure ACL 2001 and ACL 2002 to match traffic from the server and Host A, respectively.
<SwitchA> system-view
[SwitchA] acl number 2001
[SwitchA-acl-basic-2001] rule permit source 1.1.1.1 0
[SwitchA-acl-basic-2001] quit
[SwitchA] acl number 2002
[SwitchA-acl-basic-2002] rule permit source 1.1.1.2 0
[SwitchA-acl-basic-2002] quit
# Create a class named server and use ACL 2001 as the match criterion. Create a class named
host and use ACL 2002 as the match criterion.
[SwitchA] traffic classifier server
[SwitchA-classifier-server] if-match acl 2001
[SwitchA-classifier-server] quit
[SwitchA] traffic classifier host
[SwitchA-classifier-host] if-match acl 2002
[SwitchA-classifier-host] quit
# Create a behavior named server and configure the CAR action for the behavior as follows: Set
the CIR to 102400 kbps, and mark the excess packets (red packets) with DSCP value 0 and
transmit them.
[SwitchA] traffic behavior server
[SwitchA-behavior-server] car cir 102400 red remark-dscp-pass 0
[SwitchA-behavior-server] quit
# Create a behavior named host and configure the CAR action for the behavior as follows: Set the
CIR to 25600 kbps.
[SwitchA] traffic behavior host
[SwitchA-behavior-host] car cir 25600
[SwitchA-behavior-host] quit
# Create a QoS policy named car and associate class server with behavior server and class host
with behavior host.
43
[SwitchA] qos policy car
[SwitchA-qospolicy-car] classifier server behavior server
[SwitchA-qospolicy-car] classifier host behavior host
[SwitchA-qospolicy-car] quit
# Apply QoS policy car to the incoming traffic of port Ten-GigabitEthernet 1/0/1.
[SwitchA] interface Ten-GigabitEthernet 1/0/1
[SwitchA-Ten-GigabitEthernet1/0/1] qos apply policy car inbound
2. Configure Switch B:
# Configure advanced ACL 3001 to match HTTP traffic.
<SwitchB> system-view
[SwitchB] acl number 3001
[SwitchB-acl-adv-3001] rule permit tcp destination-port eq 80
[SwitchB-acl-adv-3001] quit
# Create a class named http and use ACL 3001 as the match criterion.
[SwitchB] traffic classifier http
[SwitchB-classifier-http] if-match acl 3001
[SwitchB-classifier-http] quit
# Create a class named class and configure the class to match all packets.
[SwitchB] traffic classifier class
[SwitchB-classifier-class] if-match any
[SwitchB-classifier-class] quit
# Create a behavior named car_inbound and configure the CAR action for the behavior as follows:
Set the CIR to 204800 kbps.
[SwitchB] traffic behavior car_inbound
[SwitchB-behavior-car_inbound] car cir 204800
[SwitchB-behavior-car_inbound] quit
# Create a behavior named car_outbound and configure a CAR action for the behavior as follows:
Set the CIR to 102400 kbps.
[SwitchB] traffic behavior car_outbound
[SwitchB-behavior-car_outbound] car cir 102400
[SwitchB-behavior-car_outbound] quit
# Create a QoS policy named car_inbound and associate class class with traffic behavior
car_inbound in the QoS policy.
[SwitchB] qos policy car_inbound
[SwitchB-qospolicy-car_inbound] classifier class behavior car_inbound
[SwitchB-qospolicy-car_inbound] quit
# Create a QoS policy named car_outbound and associate class http with traffic behavior
car_outbound in the QoS policy.
[SwitchB] qos policy car_outbound
[SwitchB-qospolicy-car_outbound] classifier http behavior car_outbound
[SwitchB-qospolicy-car_outbound] quit
# Apply QoS policy car_inbound to the incoming traffic of port Ten-GigabitEthernet 1/0/1.
[SwitchB] interface Ten-GigabitEthernet 1/0/1
[SwitchB-Ten-GigabitEthernet1/0/1] qos apply policy car_inbound inbound
# Apply QoS policy car_outbound to the outgoing traffic of port Ten-GigabitEthernet 1/0/2.
[SwitchB] interface Ten-GigabitEthernet 1/0/2
44
[SwitchB-Ten-GigabitEthernet1/0/2] qos apply policy car_outbound outbound
45
Configuring congestion management
Overview
Congestion occurs on a link or node when traffic size exceeds the processing capability of the link or
node. It is typical of a statistical multiplexing network and can be caused by link failures, insufficient
resources, and various other causes.
Figure 12 shows two typical congestion scenarios.
Figure 12 Traffic congestion scenarios
SP queuing
SP queuing is designed for mission-critical applications that require preferential service to reduce the
response delay when congestion occurs.
46
Figure 13 SP queuing
In Figure 13, SP queuing classifies eight queues on a port into eight classes, numbered 7 to 0 in
descending priority order.
SP queuing schedules the eight queues in descending order of priority. SP queuing sends packets in the
queue with the highest priority first. When the queue with the highest priority is empty, it sends packets
in the queue with the second highest priority, and so on. You can assign mission-critical packets to a high
priority queue to make sure they are always served first. Common service packets can be assigned to low
priority queues to be transmitted when high priority queues are empty.
The disadvantage of SP queuing is that packets in the lower priority queues cannot be transmitted if
packets exist in the higher priority queues for a long time. In the worst case, lower priority traffic might
never get serviced.
WRR queuing
WRR queuing schedules all the queues in turn to ensure that every queue is served for a certain time, as
shown in Figure 14.
47
Figure 14 WRR queuing
Queue 0 Weight 1
Interface
……
Queue N-2 Weight N-1
Assume a port provides eight output queues. WRR assigns each queue a weight value (represented by
w7, w6, w5, w4, w3, w2, w1, or w0) to decide the proportion of resources assigned to the queue.
The switch implements the weight of a queue by scheduling a certain number of bytes (byte-count WRR)
or packets (packet-based WRR) for that queue. Take byte-count WRR as an example: On a 10 Gbps port,
you can configure the weight values of WRR queuing to 5, 5, 3, 3, 1, 1, 1, and 1 (corresponding to w7,
w6, w5, w4, w3, w2, w1, and w0, respectively). In this way, the queue with the lowest priority can get
a minimum of 500 Mbps of bandwidth. WRR solves the problem that SP queuing might fail to serve
packets in low-priority queues for a long time.
The switch supports WRR priority queue groups. You can assign the output queues to WRR priority queue
group 1 and WRR priority queue group 2. You can set the weight for each queue and WRR schedules
queues in each group based on the weights in a round robin manner. WRR schedules the traffic of group
1 and the traffic of group 2 in the ratio of 1:1.
48
WFQ queuing
Figure 15 WFQ queuing
Queue 0 Weight 1
Interface
……
Queue N-2 Weight N-1
WFQ is similar to WRR. The difference is that WFQ enables you to set guaranteed bandwidth that a
WFQ queue can get during congestion.
The switch supports WFQ priority queue groups. You can assign the output queues to WFQ priority
queue group 1 and WFQ priority queue group 2. You can configure the weight for each queue and
WFQ schedules queues in each group based on the weights in a round robin manner. WFQ schedules
the traffic of group 1 and the traffic of group 2 in the ratio of 1:1.
SP+WRR queuing
You can configure some queues on an interface to use SP queuing and others to use WRR queuing by
assigning the queues to the SP group and WRR groups (group 1 and group 2). With this SP+WRR
queuing method, the system first schedules the queues in the SP group and then schedules queues in the
WRR groups when all queues in the SP group are empty. The queues in the SP group are scheduled
based on their priorities. The queues in a WRR group are scheduled based on their weights, and the two
WRR groups are scheduled in the ratio of 1:1.
SP+WFQ queuing
You can configure some queues on an interface to use SP queuing and others to use WFQ queuing by
assigning the queues to the SP group and WFQ groups (group 1 and group 2). With this SP+WFQ
queuing method, the system schedules traffic as follows:
1. The system schedules the traffic conforming to the minimum guaranteed bandwidth in each WFQ
group and schedules the traffic of the two WFQ groups in the ratio of 1:1 in a round robin manner.
2. The system uses SP to schedule queues in the SP group.
3. If there is remaining bandwidth, the system schedules the traffic of queues in each WFQ group
based on their weights and schedules the traffic of the two WFQ groups in the ratio of 1:1 ratio in
a round robin manner.
49
Congestion management configuration task list
Tasks at a glance Remarks
(Required.) Configuring queuing
• Configuring SP queuing
• Configuring WRR queuing
Perform one of the tasks.
• Configuring WFQ queuing
• Configuring SP+WRR queuing
• Configuring SP+WFQ queuing
Configuring queuing
Configuring SP queuing
Configuration procedure
To configure SP queuing:
Configuration example
Configure Ten-GigabitEthernet 1/0/1 to use SP queuing:
# Enter system view
<Sysname> system-view
50
Step Command Remarks
1. Enter system view. system-view N/A
2. Enter Ethernet interface interface interface-type
N/A
view. interface-number
3. Enable byte-count or
packet-based WRR qos wrr { byte-count | weight } By default, byte-count WRR queuing is used.
queuing.
Configuration example
1. Network requirements
Enable packet-based WRR on port Ten-GigabitEthernet 1/0/1, assign queues 0 through 3 to WRR
group 1, with their weights being 1, 2, 4, 6, respectively, and assign queues 4 through 7 to WRR
group 2, with their weights being 1, 2, 4, 6, respectively.
2. Configuration procedure
# Enter system view.
<Sysname> system-view
# Configure WRR queuing on Ten-GigabitEthernet 1/0/1.
[Sysname] interface Ten-GigabitEthernet 1/0/1
[Sysname-Ten-GigabitEthernet1/0/1] qos wrr weight
[Sysname-Ten-GigabitEthernet1/0/1] qos wrr 0 group 1 weight 1
[Sysname-Ten-GigabitEthernet1/0/1] qos wrr 1 group 1 weight 2
[Sysname-Ten-GigabitEthernet1/0/1] qos wrr 2 group 1 weight 4
[Sysname-Ten-GigabitEthernet1/0/1] qos wrr 3 group 1 weight 6
[Sysname-Ten-GigabitEthernet1/0/1] qos wrr 4 group 2 weight 1
[Sysname-Ten-GigabitEthernet1/0/1] qos wrr 5 group 2 weight 2
[Sysname-Ten-GigabitEthernet1/0/1] qos wrr 6 group 2 weight 4
[Sysname-Ten-GigabitEthernet1/0/1] qos wrr 7 group 2 weight 6
interface interface-type
2. Enter Ethernet interface view. N/A
interface-number
3. Enable byte-count or qos wfq { byte-count | The default queuing algorithm on an
packet-based WFQ queuing. weight } interface is WRR queuing.
51
Select weight or byte-count
according to the type (byte-count or
4. Assign a queue to a WFQ group, qos wfq queue-id group { 1 | packet-based) of WFQ you have
and configure scheduling 2 } { byte-count | weight } enabled.
parameters for the queue. schedule-value
By default, all queues are in WFQ
group 1 and have a weight of 1.
5. (Optional.) Set the minimum qos bandwidth queue
The default setting is 64 kbps for
guaranteed bandwidth for a queue-id min
each queue.
WFQ queue. bandwidth-value
Configuration example
1. Network requirements
{ Configure byte-count WFQ queuing on interface Ten-GigabitEthernet 1/0/1.
{ Assign queues 1, 3, 4, 5, and 6 to WFQ group 1, with their weights being 2, 5, 10, 10, and
10, respectively, and assign queues 0, 2, and 7 to WFQ group 2, with their weights being 1,
2, and 4, respectively.
{ Configure the minimum guaranteed bandwidth as 100 Mbps for each queue.
2. Configuration procedure
# Enter system view.
<Sysname> system-view
# Configure byte-count WFQ queuing on interface Ten-GigabitEthernet 1/0/1.
[Sysname] interface ten-gigabitethernet 1/0/1
[Sysname-Ten-GigabitEthernet1/0/1] qos wfq byte-count
[Sysname-Ten-GigabitEthernet1/0/1] qos wfq 1 group 1 byte-count 2
[Sysname-Ten-GigabitEthernet1/0/1] qos wfq 3 group 1 byte-count 5
[Sysname-Ten-GigabitEthernet1/0/1] qos wfq 4 group 1 byte-count 10
[Sysname-Ten-GigabitEthernet1/0/1] qos wfq 5 group 1 byte-count 10
[Sysname-Ten-GigabitEthernet1/0/1] qos wfq 6 group 1 byte-count 10
[Sysname-Ten-GigabitEthernet1/0/1] qos wfq 0 group 2 byte-count 1
[Sysname-Ten-GigabitEthernet1/0/1] qos wfq 2 group 2 byte-count 2
[Sysname-Ten-GigabitEthernet1/0/1] qos wfq 7 group 2 byte-count 4
[Sysname-Ten-GigabitEthernet1/0/1] qos bandwidth queue 0 min 100000
[Sysname-Ten-GigabitEthernet1/0/1] qos bandwidth queue 1 min 100000
[Sysname-Ten-GigabitEthernet1/0/1] qos bandwidth queue 2 min 100000
[Sysname-Ten-GigabitEthernet1/0/1] qos bandwidth queue 3 min 100000
[Sysname-Ten-GigabitEthernet1/0/1] qos bandwidth queue 4 min 100000
[Sysname-Ten-GigabitEthernet1/0/1] qos bandwidth queue 5 min 100000
[Sysname-Ten-GigabitEthernet1/0/1] qos bandwidth queue 6 min 100000
[Sysname-Ten-GigabitEthernet1/0/1] qos bandwidth queue 7 min 100000
52
Step Command Remarks
1. Enter system view. system-view N/A
interface interface-type
2. Enter Ethernet interface view. N/A
interface-number
3. Enable byte-count or qos wrr { byte-count |
By default, all ports use WRR queuing.
packet-based WRR queuing. weight }
4. Assign a queue to the SP qos wrr queue-id group By default, all the queues of a WRR-enabled
group. sp port are in WRR group 1.
Configuration example
1. Network requirements
{ Configure SP+WRR queuing on Ten-GigabitEthernet 1/0/1, and use byte-count WRR.
{ Assign queues 4 through 7 on Ten-GigabitEthernet 1/0/1 to the SP group.
{ Assign queues 0 and 1 on Ten-GigabitEthernet 1/0/1 to WRR group 1, with the weights being
1 and 2, respectively. Assign queues 2 and 3 to WRR group 2, with the weights being 1 and
3, respectively.
2. Configuration procedure
# Enter system view.
<Sysname> system-view
# Configure SP+WRR queuing on Ten-GigabitEthernet1/0/1.
[Sysname] interface Ten-GigabitEthernet 1/0/1
[Sysname-Ten-GigabitEthernet1/0/1] qos wrr byte-count
[Sysname-Ten-GigabitEthernet1/0/1] qos wrr 4 group sp
[Sysname-Ten-GigabitEthernet1/0/1] qos wrr 5 group sp
[Sysname-Ten-GigabitEthernet1/0/1] qos wrr 6 group sp
[Sysname-Ten-GigabitEthernet1/0/1] qos wrr 7 group sp
[Sysname-Ten-GigabitEthernet1/0/1] qos wrr 0 group 1 byte-count 1
[Sysname-Ten-GigabitEthernet1/0/1] qos wrr 1 group 1 byte-count 2
[Sysname-Ten-GigabitEthernet1/0/1] qos wrr 2 group 2 byte-count 1
[Sysname-Ten-GigabitEthernet1/0/1] qos wrr 3 group 2 byte-count 3
53
Step Command Remarks
interface interface-type
2. Enter Ethernet interface view. N/A
interface-number
3. Enable byte-count or
The default queuing algorithm on an
packet-based WFQ qos wfq [ byte-count | weight ]
interface is WRR.
queuing.
Configuration example
1. Network requirements
{ Configure SP+WFQ queuing on interface Ten-GigabitEthernet 1/0/1, and use packet-based
WFQ.
{ Assign queues 4 through 7 to the SP group.
{ Assign queues 0 and 1 to WFQ group 1, with the weights being 1 and 2, respectively. Assign
queues 2 and 3 to WFQ group 2, with the weights being 1 and 3, respectively.
{ Configure the minimum guaranteed bandwidth for each of the four queues as 128 Mbps.
2. Configuration procedure
# Enter system view.
<Sysname> system-view
# Configure SP+WFQ queuing on Ten-GigabitEthernet 1/0/1.
[Sysname] interface ten-gigabitEthernet 1/0/1
[Sysname-Ten-GigabitEthernet1/0/1] qos wfq weight
[Sysname-Ten-GigabitEthernet1/0/1] qos wfq 4 group sp
[Sysname-Ten-GigabitEthernet1/0/1] qos wfq 5 group sp
[Sysname-Ten-GigabitEthernet1/0/1] qos wfq 6 group sp
[Sysname-Ten-GigabitEthernet1/0/1] qos wfq 7 group sp
[Sysname-Ten-GigabitEthernet1/0/1] qos wfq 0 group 1 weight 1
[Sysname-Ten-GigabitEthernet1/0/1] qos bandwidth queue 4 min 128000
[Sysname-Ten-GigabitEthernet1/0/1] qos wfq 1 group 1 weight 2
[Sysname-Ten-GigabitEthernet1/0/1] qos bandwidth queue 5 min 128000
[Sysname-Ten-GigabitEthernet1/0/1] qos wfq 2 group 2 weight 1
[Sysname-Ten-GigabitEthernet1/0/1] qos bandwidth queue 6 min 128000
[Sysname-Ten-GigabitEthernet1/0/1] qos wfq 3 group 2 weight 3
[Sysname-Ten-GigabitEthernet1/0/1] qos bandwidth queue 7 min 128000
54
Displaying and maintaining queuing
Execute display commands in any view.
Task Command
display qos queue sp interface [ interface-type
Display SP queuing configuration.
interface-number ]
• Queue 7 has the highest priority. Its packets are sent preferentially.
• Queue 6 has the second highest priority. Packets in queue 6 are sent when queue 7 is empty.
• Queue 0 has the third highest priority, and it is scheduled when queue 7 and queue 6 are empty.
• Queues 3 through 5 in WRR group 1 are scheduled according to their weights when queue 7,
queue 6, and queue 0 are empty.
55
• Queues 1 and 2 in WRR group 2 are scheduled according to their weights when all other queues
are empty.
interface interface-type
5. Enter Ethernet interface view. N/A
interface-number
Task Command
Display the configuration of queue scheduling display qos qmprofile configuration [ profile-name ] [ slot
profiles. slot-number ]
Display the queue scheduling profiles applied display qos qmprofile interface [ interface-type
to interfaces. interface-number ]
56
Queue scheduling profile configuration example
Network requirements
Configure a queue scheduling profile on interface Ten-GigabitEthernet 1/0/1 to meet the following
requirements:
• Queue 7 has the highest priority, and its packets are sent preferentially.
• Queue 4, queue 5, and queue 6 in WRR group 1 are scheduled according to their weights, which
are 1, 5, and 10, respectively. When queue 7 is empty, WRR group 1 is scheduled.
• Queues 0 through 3 in WRR group 2 are scheduled according to their weights, which are 1, 1, 10,
and 15, respectively. When queues 4 through 7 are all empty, WRR group 2 is scheduled.
Configuration procedure
# Enter system view.
<Sysname> system-view
# Assign queue 4, queue 5, and queue 6 to WRR group 1, with the weights of 1, 5, and 10, respectively.
[Sysname-qmprofile-qm1] queue 4 wrr group 1 weight 1
[Sysname-qmprofile-qm1] queue 5 wrr group 1 weight 5
[Sysname-qmprofile-qm1] queue 6 wrr group 1 weight 10
# Assign queues 0 through 3 to WRR group 2, with their weights as 1, 1, 10, and 15, respectively.
[Sysname-qmprofile-qm1] queue 0 wrr group 2 weight 1
[Sysname-qmprofile-qm1] queue 1 wrr group 2 weight 1
[Sysname-qmprofile-qm1] queue 2 wrr group 2 weight 10
[Sysname-qmprofile-qm1] queue 3 wrr group 2 weight 15
[Sysname-qmprofile-qm1] quit
57
Configuring congestion avoidance
Overview
Avoiding congestion before it occurs is a proactive approach to improving network performance. As a
flow control mechanism, congestion avoidance:
• Actively monitors network resources (such as queues and memory buffers).
• Drops packets when congestion is expected to occur or deteriorate.
When dropping packets from a source end, congestion avoidance cooperates with the flow control
mechanism at the source end to regulate the network traffic size. The combination of the local packet
drop policy and the source-end flow control mechanism helps maximize throughput and network use
efficiency and minimize packet loss and delay.
Tail drop
Congestion management techniques drop all packets that are arriving at a full queue. This tail drop
mechanism results in global TCP synchronization. If packets from multiple TCP connections are dropped,
these TCP connections go into the state of congestion avoidance and slow start to reduce traffic, but
traffic peak occurs later. Consequently, the network traffic jitters all the time.
58
ECN
By dropping packets, WRED alleviates the influence of congestion on the network. However, the network
resources for transmitting packets from the sender to the device which drops the packets are wasted.
When congestion occurs, it is a better idea to inform the sender of the congestion status and have the
sender proactively slow down the packet sending rate or decrease the window size of packets. This better
utilizes the network resources.
RFC 2482 defined an end-to-end congestion notification mechanism named Explicit Congestion
Notification (ECN). ECN uses the DS field in the IP header to mark the congestion status along the packet
transmission path. A ECN-capable terminal can determine whether congestion occurs on the
transmission path according to the packet contents, and then adjusts the packet sending speed to avoid
deteriorating congestion. ECN defines the last two bits (ECN field) in the DS field of the IP header as
follows:
• Bit 6 indicates whether the sending terminal device supports ECN, and is called the "ECN-Capable
Transport (ECT)" bit.
• Bit 7 indicates whether the packet has experienced congestion along the transmission path, and is
called the "Congestion Experienced (CE)" bit.
For more information about the DS field, see "Appendixes."
In actual applications, the packets with ECT set to 1 and CE set to 0 and the packets with ECT set to 0
and CE set to 1 are considered as packets that an ECN-capable endpoint transmits.
After you enable ECN on a device, congestion management processes packets as follows:
• When the average queue size is below the lower limit, no packet is dropped, and the ECN fields
of packets are not identified or marked.
• When the average queue size exceeds the lower limit and is below the upper limit, before the
device drops a packet which should be dropped according to the drop probability, the device
examines the ECN field of the packet.
{ If the ECN field shows that the packet is sent out of ECN-capable terminal, the device sets both
the ECT bit and the CE bit to 1 and forwards the packet.
{ If the ECN field shows that the packet has experienced congestion along the transmission path
(both the ECT bit and the CE bit are 1), the device forwards the packet without modifying the
ECN field.
{ If both the ECT bit and the CE bit are 0s, the device drops the packet.
• When the average queue size exceeds the upper limit, the device drops the packet, regardless of
whether the packet is sent out from an ECN-capable terminal.
ECN is enabled on a per-queue basis. You can configure the switch to identify and mark the ECN fields
of packets for a specific queue.
59
• Upper limit and lower limit—When the average queue size is smaller than the lower limit, packets
are not dropped. When the average queue size is between the lower limit and the upper limit, the
packets are dropped based on the user-configured drop probability. When the average queue size
exceeds the upper limit, subsequent packets are dropped.
• Drop precedence—A parameter used for packet drop. The value 0 corresponds to green packets,
the value 1 corresponds to yellow packets, and the value 2 corresponds to red packets. Red packets
are dropped preferentially.
• Exponent for average queue size calculation—The greater the exponent, the less sensitive the
average queue size is to real-time queue size changes. The formula for calculating the average
queue size is average queue size = (previous average queue size x (1 – 2–n)) + (current queue size
x 2–n), where n is the exponent.
• Drop probability in percentage—The larger the value is, the greater the drop probability is.
Configuration procedure
A WRED table can be applied to multiple interfaces. For a WRED table already applied to an interface,
you can modify the values of the WRED table, but you cannot remove the WRED table.
To configure and apply a WRED table:
interface interface-type
6. Enter Ethernet interface view. N/A
interface-number
Configuration example
Network requirements
Apply a WRED table to interface Ten-GigabitEthernet 1/0/2, so that the packets are dropped as follows
when congestion occurs:
• For the interface to preferentially forward higher-priority traffic, set a lower drop probability for a
queue with a greater queue ID. Set different drop parameters for queue 0, queue 3, and queue 7.
• Drop packets according to their colors.
60
{ In queue 0, set the drop probability to 25%, 50%, and 75% for green, yellow, and red packets,
respectively.
{ In queue 3, set the drop probability to 5%, 10%, and 25% for green, yellow, and red packets,
respectively.
{ In queue 7, set the drop probability to 1%, 5%, and 10% for green, yellow, and red packets,
respectively.
• Enable ECN for queue 7.
Configuration procedure
# Configure a queue-based WRED table, and set different drop parameters for packets with different
drop levels in different queues.
<Sysname> system-view
[Sysname] qos wred queue table queue-table1
[Sysname-wred-table-queue-table1] queue 0 drop-level 0 low-limit 128 high-limit 512
discard-probability 25
[Sysname-wred-table-queue-table1] queue 0 drop-level 1 low-limit 128 high-limit 512
discard-probability 50
[Sysname-wred-table-queue-table1] queue 0 drop-level 2 low-limit 128 high-limit 512
discard-probability 75
[Sysname-wred-table-queue-table1] queue 3 drop-level 0 low-limit 256 high-limit 640
discard-probability 5
[Sysname-wred-table-queue-table1] queue 3 drop-level 1 low-limit 256 high-limit 640
discard-probability 10
[Sysname-wred-table-queue-table1] queue 3 drop-level 2 low-limit 256 high-limit 640
discard-probability 25
[Sysname-wred-table-queue-table1] queue 7 drop-level 0 low-limit 512 high-limit 1024
discard-probability 1
[Sysname-wred-table-queue-table1] queue 7 drop-level 1 low-limit 512 high-limit 1024
discard-probability 5
[Sysname-wred-table-queue-table1] queue 7 drop-level 2 low-limit 512 high-limit 1024
discard-probability 10
[Sysname-wred-table-queue-table1] queue 7 ecn
[Sysname-wred-table-queue-table1] quit
Task Command
Display WRED configuration and statistics for display qos wred interface [ interface-type
interfaces. interface-number ]
61
Configuring traffic filtering
You can filter in or filter out traffic of a class by associating the class with a traffic filtering action. For
example, you can filter packets sourced from an IP address according to network status.
Configuration procedure
To configure traffic filtering:
62
Step Command Remarks
12. (Optional.) Display the
display traffic behavior user-defined
traffic filtering Available in any view.
[ behavior-name ]
configuration.
Configuration example
Network requirements
As shown in Figure 17, configure traffic filtering on Ten-GigabitEthernet 1/0/1 to deny the incoming
packets with port 21 as the source port.
Figure 17 Network diagram
Configuration procedure
# Create advanced ACL 3000, and configure a rule to match packets whose source port number is 21.
<Switch> system-view
[Switch] acl number 3000
[Switch-acl-adv-3000] rule 0 permit tcp source-port eq 21
[Switch-acl-adv-3000] quit
# Create a traffic class named classifier_1, and use ACL 3000 as the match criterion in the traffic class.
[Switch] traffic classifier classifier_1
[Switch-classifier-classifier_1] if-match acl 3000
[Switch-classifier-classifier_1] quit
# Create a traffic behavior named behavior_1, and configure the traffic filtering action to drop packets.
[Switch] traffic behavior behavior_1
[Switch-behavior-behavior_1] filter deny
[Switch-behavior-behavior_1] quit
# Create a QoS policy named policy, and associate traffic class classifier_1 with traffic behavior
behavior_1 in the QoS policy.
[Switch] qos policy policy
[Switch-qospolicy-policy] classifier classifier_1 behavior behavior_1
[Switch-qospolicy-policy] quit
# Apply the QoS policy named policy to the incoming traffic of Ten-GigabitEthernet 1/0/1.
[Switch] interface ten-gigabitethernet 1/0/1
[Switch-Ten-GigabitEthernet1/0/1] qos apply policy policy inbound
63
Configuring priority marking
Overview
Priority marking sets the priority fields or flag bits of packets to modify the priority of packets. For example,
you can use priority marking to set IP precedence or DSCP for a traffic class of IP packets to control the
forwarding of these packets.
To configure priority marking to set the priority fields or flag bits for a class of packets, perform the
following tasks:
1. Configure a traffic behavior with a priority marking action.
2. Associate the traffic class with the traffic behavior.
Priority marking can be used together with priority mapping. For more information, see "Configuring
priority mapping."
Traffic policing
Traffic policing is a common traffic control technology. Traffic policing uses the token bucket mechanism
to evaluate the incoming or outgoing packets and colors the packets according to the evaluation result.
By configuring different traffic control polices for packets in different colors, you can provide
differentiated services for different traffic flows and ensure that the network resources are well utilized.
The device supports evaluating traffic by using two token buckets (bucket C and bucket E), and it colors
a packet according to the number of tokens in the token buckets.
The device supports coloring packets by using either of the following traffic policing functions: common
CAR and aggregate CAR. For more information about coloring packets by using token buckets and
about common CAR and aggregate CAR, see "Configuring traffic policing, GTS, and rate limit" and
"Configuring aggregate CAR."
64
Configuring color-based priority marking
Configuring priority marking based on colors obtained through traffic policing
After traffic policing evaluates and colors packets, the switch can mark traffic with various priority values
(including DSCP values, 802.1p priority values, and local precedence values) by color. Configure
priority marking by using either of the following methods:
• Configuring the priority marking actions by color in the traffic policing action.
• Configuring the priority marking actions by color in the behavior where the traffic policing action is
configured.
You can use both methods to mark multiple priority values for packets in the same color. However, do not
use the two methods to mark different values of the same priority type for packets. Otherwise, the QoS
policy configured with the behavior cannot be applied normally.
In a traffic behavior, an aggregate CAR action cannot be configured together with a priority marking
action. Otherwise, the QoS policy configured with the behavior cannot be applied normally.
The switch implements both common CAR and aggregate CAR by using a QoS policy. For more
information about configuring classes and behaviors in a QoS policy, see "Configuring traffic policing,
GTS, and rate limit" and "Configuring aggregate CAR."
Configuring priority marking based on colors obtained through mapping drop precedence
When packets are colored based on drop precedence values, you can create priority marking actions
for packets in different colors in a traffic behavior and mark DSCP values, 802.1p priority values, and
local precedence values for packets.
Configuration procedure
To configure priority marking:
By default, no match
criterion is configured.
For more information
3. Configure match criteria. if-match match-criteria about the if-match
command, see ACL and
QoS Command
Reference.
4. Return to system view. quit N/A
5. Create a traffic behavior
By default, no traffic
and enter traffic behavior traffic behavior behavior-name
behavior is configured.
view.
65
Step Command Remarks
By default, no priority
• Set the DSCP value for packets: marking action is
remark [ green | red | yellow ] dscp configured.
dscp-value
The switch supports local
• Set the 802.1p priority for packets or
QoS IDs in the range of 1
configure the inner-to-outer tag priority
to 3999.
copying function:
remark [ green | red | yellow ] dot1p The remark
dot1p-value local-precedence, remark
remark dot1p customer-dot1p-trust qos-local-id, and remark
drop-precedence
• Set the drop priority for packets:
commands apply only to
remark drop-precedence
6. Configure a priority the incoming traffic.
drop-precedence-value
marking action. The customer VLAN
• Set the IP precedence for packets:
remark ip-precedence ip-precedence-value (CVLAN) is the private
network VLAN of the
• Set the local precedence for packets:
customer, and the service
remark[ green | red | yellow ]
provider VLAN (SVLAN)
local-precedence local-precedence-value
is the public network
• Set the local QoS ID for packets: VLAN assigned by the
remark qos-local-id local-id-value service provider to the
• Set the CVLAN for packets: customer. For more
remark customer-vlan-id vlan-id information about the
• Set the SVLAN for packets: CVLAN and SVLAN, see
remark service-vlan-id vlan-id Layer 2—LAN Switching
Configuration Guide.
7. Return to system view. quit N/A
8. Create a QoS policy and By default, no QoS policy
qos policy policy-name
enter QoS policy view. is configured.
9. Associate the traffic class classifier classifier-name behavior By default, a traffic class
with the traffic behavior in behavior-name [ insert-before is not associated with a
the QoS policy. before-classifier-name ] traffic behavior.
10. Return to system view. quit N/A
66
Traffic source Destination Processing priority
Host A, B Data server High
Configuration procedure
# Create advanced ACL 3000, and configure a rule to match packets with destination IP address
192.168.0.1.
<Switch> system-view
[Switch] acl number 3000
[Switch-acl-adv-3000] rule permit ip destination 192.168.0.1 0
[Switch-acl-adv-3000] quit
# Create advanced ACL 3001, and configure a rule to match packets with destination IP address
192.168.0.2.
[Switch] acl number 3001
[Switch-acl-adv-3001] rule permit ip destination 192.168.0.2 0
[Switch-acl-adv-3001] quit
# Create advanced ACL 3002, and configure a rule to match packets with destination IP address
192.168.0.3.
[Switch] acl number 3002
[Switch-acl-adv-3002] rule permit ip destination 192.168.0.3 0
[Switch-acl-adv-3002] quit
# Create a traffic class named classifier_dbserver, and use ACL 3000 as the match criterion in the traffic
class.
[Switch] traffic classifier classifier_dbserver
[Switch-classifier-classifier_dbserver] if-match acl 3000
[Switch-classifier-classifier_dbserver] quit
# Create a traffic class named classifier_mserver, and use ACL 3001 as the match criterion in the traffic
class.
[Switch] traffic classifier classifier_mserver
[Switch-classifier-classifier_mserver] if-match acl 3001
67
[Switch-classifier-classifier_mserver] quit
# Create a traffic class named classifier_fserver, and use ACL 3002 as the match criterion in the traffic
class.
[Switch] traffic classifier classifier_fserver
[Switch-classifier-classifier_fserver] if-match acl 3002
[Switch-classifier-classifier_fserver] quit
# Create a traffic behavior named behavior_dbserver, and configure the action of setting the local
precedence value to 4.
[Switch] traffic behavior behavior_dbserver
[Switch-behavior-behavior_dbserver] remark local-precedence 4
[Switch-behavior-behavior_dbserver] quit
# Create a traffic behavior named behavior_mserver, and configure the action of setting the local
precedence value to 3.
[Switch] traffic behavior behavior_mserver
[Switch-behavior-behavior_mserver] remark local-precedence 3
[Switch-behavior-behavior_mserver] quit
# Create a traffic behavior named behavior_fserver, and configure the action of setting the local
precedence value to 2.
[Switch] traffic behavior behavior_fserver
[Switch-behavior-behavior_fserver] remark local-precedence 2
[Switch-behavior-behavior_fserver] quit
# Create a QoS policy named policy_server, and associate traffic classes with traffic behaviors in the
QoS policy.
[Switch] qos policy policy_server
[Switch-qospolicy-policy_server] classifier classifier_dbserver behavior
behavior_dbserver
[Switch-qospolicy-policy_server] classifier classifier_mserver behavior
behavior_mserver
[Switch-qospolicy-policy_server] classifier classifier_fserver behavior
behavior_fserver
[Switch-qospolicy-policy_server] quit
# Apply the QoS policy named policy_server to the incoming traffic of Ten-GigabitEthernet 1/0/1.
[Switch] interface Ten-GigabitEthernet 1/0/1
[Switch-Ten-GigabitEthernet1/0/1] qos apply policy policy_server inbound
[Switch-Ten-GigabitEthernet1/0/1] quit
Network requirements
As shown in Figure 19, configure local QoS ID marking and traffic policing to limit the outgoing traffic of
the Management department and the R&D department to 102400 kbps, respectively, and limit the
outgoing traffic of the Marketing department (containing two sub-departments) to 204800 kbps.
68
Figure 19 Network diagram
IP network
Switch A
XGE1/0/1
Configuration considerations
• Configure two classes to match the traffic from the Management department and the R&D
department, respectively, and then configure traffic policing behaviors for the two classes.
• Mark the same local QoS ID for the traffic from the two sub-departments of the Marketing
department, configure a class to match packets with the local QoS ID, and then configure a traffic
policing behavior for the class to limit the outgoing traffic of the two sub-departments.
Configuration procedure
1. Limit the upstream traffic of the Management department and R&D department:
# Configure IPv4 basic ACL 2001 to match the outgoing traffic of the Management department.
<SwitchA> system-view
[SwitchA] acl number 2001
[SwitchA-acl-basic-2001] rule permit source 192.168.1.0 0.0.0.255
[SwitchA-acl-basic-2001] quit
# Configure IPv4 basic ACL 2002 to match the outgoing traffic of the R&D department.
[SwitchA] acl number 2002
[SwitchA-acl-basic-2002] rule permit source 192.168.2.0 0.0.0.255
[SwitchA-acl-basic-2002] quit
# Create class admin, and use ACL 2001 as the match criterion.
[SwitchA] traffic classifier admin
[SwitchA-classifier-admin] if-match acl 2001
[SwitchA-classifier-admin] quit
# Create class rd, and use ACL 2002 as the match criterion.
[SwitchA] traffic classifier rd
69
[SwitchA-classifier-rd] if-match acl 2002
[SwitchA-classifier-rd] quit
# Create traffic behavior car_admin_rd, and configure traffic policing to limit the traffic rate to
102400 kbps.
[SwitchA] traffic behavior car_admin_rd
[SwitchA-behavior-car_admin_rd] car cir 102400
[SwitchA-behavior-car_admin_rd] quit
# Create QoS policy car, and associate classes admin and rd with behavior car_admin_rd.
[SwitchA] qos policy car
[SwitchA-qospolicy-car] classifier admin behavior car_admin_rd
[SwitchA-qospolicy-car] classifier rd behavior car_admin_rd
[SwitchA-qospolicy-car] quit
2. Limit the upstream traffic of the marketing department:
# Configure IPv4 basic ACL 2003 to match the outgoing traffic of the sub-department 1 of the
marketing department.
[SwitchA] acl number 2003
[SwitchA-acl-basic-2003] rule permit source 192.168.3.0 0.0.0.255
[SwitchA-acl-basic-2003] quit
# Configure IPv4 basic ACL 2004 to match the outgoing traffic of the sub-department 2 of the
Marketing department.
[SwitchA] acl number 2004
[SwitchA-acl-basic-2004] rule permit source 192.168.4.0 0.0.0.255
[SwitchA-acl-basic-2004] quit
# Configure class marketing to match the outgoing traffic of the two sub-departments of the
marketing department.
[SwitchA] traffic classifier marketing operator or
[SwitchA-classifier-marketing] if-match acl 2003
[SwitchA-classifier-marketing] if-match acl 2004
[SwitchA-classifier-marketing] quit
# Configure behavior remark_local_id to mark traffic with local QoS ID 100.
[SwitchA] traffic behavior remark_local_id
[SwitchA-behavior-remark_local_id] remark qos-local-id 100
[SwitchA-behavior-remark_local_id] quit
# Configure class marketing_car to match the outgoing traffic of the two sub-departments of the
Marketing department.
[SwitchA] traffic classifier marketing_car
[SwitchA-classifier-marketing_car] if-match qos-local-id 100
[SwitchA-classifier-marketing_car] quit
# Create behavior marketing_car, and configure traffic policing to limit the traffic rate to 204800
kbps.
[SwitchA] traffic behavior marketing_car
[SwitchA-behavior-marketing_car] car cir 204800
[SwitchA-behavior-marketing_car] quit
# In QoS policy car, associate class marketing with behavior remark_local_id to mark the
outgoing traffic of the Marketing department with local QoS ID 100.
[SwitchA] qos policy car
[SwitchA-qospolicy-car] classifier marketing behavior remark_local_id
70
# In QoS policy car, associate class marketing_car with behavior marketing_car to limit the traffic
rate of traffic with local QoS ID 100.
[SwitchA-qospolicy-car] classifier marketing_car behavior marketing_car
[SwitchA-qospolicy-car] quit
# Apply QoS policy car to the incoming traffic of Ten-GigabitEthernet1/0/1.
[SwitchA] interface ten-gigabitethernet 1/0/1
[SwitchA-Ten-GigabitEthernet1/0/1] qos apply policy car inbound
71
Configuring nesting
Nesting adds a VLAN tag to the matching packets to allow the VLAN-tagged packets to pass through the
corresponding VLAN. For example, you can add an outer VLAN tag to packets from a customer network
to a service provider network. This allows the packets to pass through the service provider network by
carrying a VLAN tag assigned by the service provider.
Configuration procedure
To configure nesting:
By default, no match
criterion is configured for
a traffic class.
For more information
3. Configure match criteria. if-match match-criteria about the match criteria,
see the if-match
command in ACL and
QoS Command
Reference.
4. Return to system view. quit N/A
5. Create a traffic behavior
By default, no traffic
and enter traffic behavior traffic behavior behavior-name
behavior exists.
view.
By default, no
9. Associate the traffic class classifier classifier-name behavior
class-behavior
with the traffic behavior in behavior-name [ insert-before
association is configured
the QoS policy. before-classifier-name ]
for a QoS policy.
10. Return to system view. quit N/A
72
Step Command Remarks
Choose one of the
• Applying the QoS policy to an interface application destinations
11. Apply the QoS policy. • Applying the QoS policy to a VLAN as needed.
• Applying the QoS policy globally By default, a QoS policy
is not applied.
Configuration example
Network requirements
As shown in Figure 20, Site 1 and Site 2 in VPN A are two branches of a company, and they use VLAN
5 to transmit traffic. Because Site 1 and Site 2 are located in different areas, the two sites use the VPN
access service of a service provider. The service provider assigns VLAN 100 to the two sites.
Configure nesting, so that the two branches can communicate through the service provider network.
Figure 20 Network diagram
Public network
XGE1/0/2 XGE1/0/2
PE 1 IP network PE 2
XGE1/0/1 VLAN 100 VLAN 5 Data VLAN 100 VLAN 5 Data XGE1/0/1
VPN A VPN A
CE 1 CE 2
VLAN 5 Site 1 Site 2
Configuration procedure
Configuring PE 1
# Create a class named test to match packets with VLAN ID 5.
<PE1> system-view
[PE1] traffic classifier test
[PE1-classifier-test] if-match service-vlan-id 5
[PE1-classifier-test] quit
# Configure an action to add outer VLAN tag 100 in the traffic behavior named test.
[PE1] traffic behavior test
[PE1-behavior-test] nest top-most vlan 100
[PE1-behavior-test] quit
73
# Create a QoS policy named test, and associate class test with behavior test in the QoS policy.
[PE1] qos policy test
[PE1-qospolicy-test] classifier test behavior test
[PE1-qospolicy-test] quit
# Configure the downlink port Ten-GigabitEthernet 1/0/1 as a hybrid port, and assign the port to VLAN
100 as an untagged member.
[PE1] interface Ten-GigabitEthernet 1/0/1
[PE1-Ten-GigabitEthernet1/0/1] port link-type hybrid
[PE1-Ten-GigabitEthernet1/0/1] port hybrid vlan 100 untagged
# Apply QoS policy test to the incoming traffic of the downlink port Ten-GigabitEthernet 1/0/1.
[PE1-Ten-GigabitEthernet1/0/1] qos apply policy test inbound
[PE1-Ten-GigabitEthernet1/0/1] quit
# Configure the uplink port Ten-GigabitEthernet 1/0/2 as a trunk port, and assign it to VLAN 100.
[PE1] interface Ten-GigabitEthernet 1/0/2
[PE1-Ten-GigabitEthernet1/0/2] port link-type trunk
[PE1-Ten-GigabitEthernet1/0/2] port trunk permit vlan 100
[PE1-Ten-GigabitEthernet1/0/2] quit
Configuring PE 2
Configure PE 2 in the same way PE 1 is configured.
74
Configuring traffic redirecting
Traffic redirecting redirects packets matching the specified match criteria to a location for processing.
The following redirect actions are supported:
• Redirecting traffic to the CPU—Redirects packets that require processing by the CPU to the CPU.
• Redirecting traffic to an interface—Redirects packets that require processing by an interface to the
interface. This action applies only to Layer 2 packets, and the target interface must be a Layer 2
interface.
Configuration procedure
To configure traffic redirecting:
By default, no match
criterion is configured for
a traffic class.
For more information
3. Configure match criteria. if-match match-criteria about the match criteria,
see the if-match
command in ACL and
QoS Command
Reference.
4. Return to system view. quit N/A
5. Create a traffic behavior
By default, no traffic
and enter traffic behavior traffic behavior behavior-name
behavior exists.
view.
By default, no traffic
redirecting action is
configured for a traffic
behavior.
The actions of redirecting
6. Configure a traffic redirect { cpu | interface interface-type traffic to the CPU and
redirecting action. interface-number } redirecting traffic to an
interface are mutually
exclusive with each other
in the same traffic
behavior. The last
redirecting action
configured takes effect.
7. Return to system view. quit N/A
75
Step Command Remarks
8. Create a QoS policy and By default, no QoS policy
qos policy policy-name
enter QoS policy view. exists.
By default, no
9. Associate the traffic class classifier classifier-name behavior
class-behavior
with the traffic behavior in behavior-name [ insert-before
association is configured
the QoS policy. before-classifier-name ]
for a QoS policy.
10. Return to system view. quit N/A
Configuration example
Network requirements
As shown in Figure 21:
• Switch A is connected to Switch B through two links. Switch A and Switch B are each connected to
other devices.
• Ten-GigabitEthernet 1/0/2 of Switch A and Ten-GigabitEthernet 1/0/2 of Switch B belong to
VLAN 200.
• Ten-GigabitEthernet 1/0/3 of Switch A and Ten-GigabitEthernet 1/0/3 of Switch B belong to
VLAN 201.
• On Switch A, the IP address of VLAN-interface 200 is 200.1.1.1/24, and that of VLAN-interface
201 is 201.1.1.1/24.
• On Switch B, the IP address of VLAN-interface 200 is 200.1.1.2/24, and that of VLAN-interface
201 is 201.1.1.2/24.
Configure the actions of redirecting traffic to an interface to meet the following requirements:
• Packets with source IP address 2.1.1.1 received on Ten-GigabitEthernet 1/0/1 of Switch A are
forwarded to Ten-GigabitEthernet 1/0/2.
• Packets with source IP address 2.1.1.2 received on Ten-GigabitEthernet 1/0/1 of Switch A are
forwarded to Ten-GigabitEthernet 1/0/3.
• Other packets received on Ten-GigabitEthernet 1/0/1 of Switch A are forwarded according to the
routing table.
76
Figure 21 Network diagram
XGE1/0/2 XGE1/0/2
VLAN 200 VLAN 200
Vlan-int200 Vlan-int200
200.1.1.1/24 200.1.1.2/24
XGE1/0/1 XGE1/0/1
Configuration procedure
# Create basic ACL 2000, and configure a rule to match packets with source IP address 2.1.1.1.
<SwitchA> system-view
[SwitchA] acl number 2000
[SwitchA-acl-basic-2000] rule permit source 2.1.1.1 0
[SwitchA-acl-basic-2000] quit
# Create basic ACL 2001, and configure a rule to match packets with source IP address 2.1.1.2.
[SwitchA] acl number 2001
[SwitchA-acl-basic-2001] rule permit source 2.1.1.2 0
[SwitchA-acl-basic-2001] quit
# Create a traffic class named classifier_1, and use ACL 2000 as the match criterion in the traffic class.
[SwitchA] traffic classifier classifier_1
[SwitchA-classifier-classifier_1] if-match acl 2000
[SwitchA-classifier-classifier_1] quit
# Create a traffic class named classifier_2, and use ACL 2001 as the match criterion in the traffic class.
[SwitchA] traffic classifier classifier_2
[SwitchA-classifier-classifier_2] if-match acl 2001
[SwitchA-classifier-classifier_2] quit
# Create a traffic behavior named behavior_1, and configure the action of redirecting traffic to
Ten-GigabitEthernet 1/0/2.
[SwitchA] traffic behavior behavior_1
[SwitchA-behavior-behavior_1] redirect interface ten-gigabitethernet 1/0/2
[SwitchA-behavior-behavior_1] quit
# Create a traffic behavior named behavior_2, and configure the action of redirecting traffic to
Ten-GigabitEthernet 1/0/3.
[SwitchA] traffic behavior behavior_2
[SwitchA-behavior-behavior_2] redirect interface ten-gigabitethernet 1/0/3
[SwitchA-behavior-behavior_2] quit
# Create a QoS policy named policy, associate traffic class classifier_1 with traffic behavior behavior_1,
and associate traffic class classifier_2 with traffic behavior behavior_2 in the QoS policy.
[SwitchA] qos policy policy
[SwitchA-qospolicy-policy] classifier classifier_1 behavior behavior_1
[SwitchA-qospolicy-policy] classifier classifier_2 behavior behavior_2
[SwitchA-qospolicy-policy] quit
# Apply the QoS policy named policy to the incoming traffic of Ten-GigabitEthernet 1/0/1.
77
[SwitchA] interface ten-gigabitethernet 1/0/1
[SwitchA-Ten-GigabitEthernet1/0/1] qos apply policy policy inbound
78
Configuring aggregate CAR
An aggregate CAR action is created globally and can be directly applied to interfaces or used in the
traffic behaviors associated with different traffic classes to police multiple traffic flows as a whole. The
total rate of the traffic flows must conform to the traffic policing specifications set in the aggregate CAR
action.
Configuration procedure
Step Command Remarks
1. Enter system view. system-view N/A
Task Command
Display statistics for aggregate CAR actions. display qos car name [ car-name ]
Clear statistics for aggregate CAR actions. reset qos car name [ car-name ]
79
Figure 22 Network diagram
Internet
Switch
XGE1/0/1
Configuration procedure
# Configure an aggregate CAR according to the rate limit requirements.
<Switch> system-view
[Switch] qos car aggcar-1 aggregative cir 2560 cbs 20480 red discard
# Create class 1 to match traffic of VLAN 10. Create behavior 1 and use the aggregate CAR in the
behavior.
[Switch] traffic classifier 1
[Switch-classifier-1] if-match customer-vlan-id 10
[Switch-classifier-1] quit
[Switch] traffic behavior 1
[Switch-behavior-1] car name aggcar-1
[Switch-behavior-1] quit
# Create class 2 to match traffic of VLAN 100. Create behavior 2 and use the aggregate CAR in the
behavior.
[Switch] traffic classifier 2
[Switch-classifier-2] if-match customer-vlan-id 100
[Switch-classifier-2] quit
[Switch] traffic behavior 2
[Switch-behavior-2] car name aggcar-1
[Switch-behavior-2] quit
# Create QoS policy car, associate class 1 with behavior 1, and associate class 2 with behavior 2.
[Switch] qos policy car
[Switch-qospolicy-car] classifier 1 behavior 1
[Switch-qospolicy-car] classifier 2 behavior 2
[Switch-qospolicy-car] quit
80
# Apply the QoS policy to the incoming traffic of Ten-GigabitEthernet 1/0/1.
[Switch] interface ten-gigabitethernet 1/0/1
[Switch-Ten-GigabitEthernet1/0/1]qos apply policy car inbound
81
Configuring class-based accounting
Class-based accounting collects statistics (in packets or bytes) on a per-traffic class basis. For example,
you can define the action to collect statistics for traffic sourced from a certain IP address. By analyzing
the statistics, you can determine whether anomalies have occurred and what action to take.
Configuration procedure
To configure class-based accounting:
By default, no traffic
6. Configure the accounting
accounting { byte | packet } * accounting action is
action.
configured.
7. Return to system view. quit N/A
8. Create a QoS policy and By default, no QoS policy is
qos policy policy-name
enter QoS policy view. configured.
9. Associate the traffic class classifier classifier-name behavior By default, a traffic class is not
with the traffic behavior in behavior-name [ insert-before associated with a traffic
the QoS policy. before-classifier-name ] behavior.
10. Return to system view. quit N/A
• Applying the QoS policy to an
interface
• Applying the QoS policy to a VLAN Choose one of the application
• Applying the QoS policy globally destinations as needed.
11. Apply the QoS policy.
• Applying the QoS policy to a control By default, no QoS policy is
plane applied.
• Applying the QoS policy to a user
profile
82
Step Command Remarks
• display qos policy control-plane slot
slot-number
• display qos policy global [ slot
slot-number ] [ inbound | outbound ]
12. Display traffic accounting • display qos policy interface
Available in any view.
configuration. [ interface-type interface-number ]
[ inbound | outbound ]
• display qos vlan-policy { name
policy-name | vlan [ vlan-id ] } [ slot
slot-number ] [ inbound | outbound ]
Configuration example
Network requirements
As shown in Figure 23, configure class-based accounting on Ten-GigabitEthernet 1/0/1 to collect
statistics for the incoming packets with 1.1.1.1/24 as the source IP address.
Figure 23 Network diagram
Configuration procedure
# Create basic ACL 2000, and configure a rule to match packets with source IP address 1.1.1.1.
<Switch> system-view
[Switch] acl number 2000
[Switch-acl-basic-2000] rule permit source 1.1.1.1 0
[Switch-acl-basic-2000] quit
# Create a traffic class named classifier_1, and use ACL 2000 as the match criterion in the traffic class.
[Switch] traffic classifier classifier_1
[Switch-classifier-classifier_1] if-match acl 2000
[Switch-classifier-classifier_1] quit
# Create a traffic behavior named behavior_1, and configure the class-based accounting action.
[Switch] traffic behavior behavior_1
[Switch-behavior-behavior_1] accounting packet
[Switch-behavior-behavior_1] quit
# Create a QoS policy named policy, and associate traffic class classifier_1 with traffic behavior
behavior_1 in the QoS policy.
[Switch] qos policy policy
[Switch-qospolicy-policy] classifier classifier_1 behavior behavior_1
[Switch-qospolicy-policy] quit
# Apply the QoS policy named policy to the incoming traffic of Ten-GigabitEthernet 1/0/1.
83
[Switch] interface Ten-GigabitEthernet 1/0/1
[Switch-Ten-GigabitEthernet1/0/1] qos apply policy policy inbound
[Switch-Ten-GigabitEthernet1/0/1] quit
Interface: Ten-GigabitEthernet1/0/1
Direction: Inbound
Policy: policy
Classifier: classifier_1
Operator: AND
Rule(s) :
If-match acl 2000
Behavior: behavior_1
Accounting enable:
28529 (Packets)
84
Appendixes
1 0 0
2 1 0
3 3 0
4 4 0
5 5 0
6 6 0
7 7 0
8 to 15 0 1
16 to 23 0 2
24 to 31 0 3
32 to 39 0 4
40 to 47 0 5
48 to 55 0 6
56 to 63 0 7
85
Appendix B Introduction to packet precedences
IP precedence and DSCP values
Figure 24 ToS and DS fields
Bits: 0 1 2 3 4 5 6 7 Bits: 0 1 2 3 4 5 6 7
M
Preced Type of
IPv4 ToS B DS-Field DSCP CU
ence Service Z (for IPv4,ToS
byte
octet,and for
IPv6,Traffic
Must Class octet ) Class Selector Currently
RFC 1349 Be codepoints Unused
RFC 1122
Zero
As shown in Figure 24, the ToS field in the IP header contains eight bits. The first three bits (0 to 2)
represent IP precedence from 0 to 7. According to RFC 2474, the ToS field is redefined as the
differentiated services (DS) field, where a DSCP value is represented by the first six bits (0 to 5) and is in
the range 0 to 63. The remaining two bits (6 and 7) are reserved.
Table 9 IP precedence
1 001 priority
2 010 immediate
3 011 flash
4 100 flash-override
5 101 critical
6 110 internet
7 111 network
10 001010 af11
12 001100 af12
14 001110 af13
18 010010 af21
20 010100 af22
22 010110 af23
26 011010 af31
86
DSCP value (decimal) DSCP value (binary) Description
28 011100 af32
30 011110 af33
34 100010 af41
36 100100 af42
38 100110 af43
8 001000 cs1
16 010000 cs2
24 011000 cs3
32 100000 cs4
40 101000 cs5
48 110000 cs6
56 111000 cs7
0 000000 be (default)
802.1p priority
802.1p priority lies in the Layer 2 header. It applies to occasions where Layer 3 header analysis is not
needed and QoS must be assured at Layer 2.
Figure 25 An Ethernet frame with an 802.1Q tag header
As shown in Figure 25, the 4-byte 802.1Q tag header consists of the 2-byte tag protocol identifier (TPID)
and the 2-byte tag control information (TCI). The value of the TPID is 0x8100. Figure 26 shows the format
of the 802.1Q tag header. The Priority field in the 802.1Q tag header is called the "802.1p priority",
because its use is defined in IEEE 802.1p. Table 11 shows the values for 802.1p priority.
Figure 26 802.1Q tag header
87
Table 11 Description on 802.1p priority
1 001 background
2 010 spare
3 011 excellent-effort
4 100 controlled-load
5 101 video
6 110 voice
7 111 network-management
88
Configuring time ranges
You can implement a service based on the time of the day by applying a time range to it. A time-based
service takes effect only in time periods specified by the time range. For example, you can implement
time-based ACL rules by applying a time range to them. If a time range does not exist, the service based
on the time range does not take effect.
The following basic types of time ranges are available:
• Periodic time range—Recurs periodically on a day or days of the week.
• Absolute time range—Represents only a period of time and does not recur.
A time range is uniquely identified by the time range name. You can create a maximum of 1024 time
ranges, each with a maximum of 32 periodic statements and 12 absolute statements. The active period
of a time range is calculated as follows:
1. Combining all periodic statements.
2. Combining all absolute statements.
3. Taking the intersection of the two statement sets as the active period of the time range.
Configuration procedure
Step Command Remarks
1. Enter system view. system-view N/A
Task Command
Display time range configuration and status. display time-range { time-range-name | all }
89
Figure 27 Network diagram
Server
Device A 192.168.0.100/24
Host B
192.168.1.3/24
Configuration procedure
# Create a periodic time range during 8:00 and 18:00 on working days from June 2011 to the end of
the year.
<DeviceA> system-view
[DeviceA] time-range work 8:0 to 18:0 working-day from 0:0 6/1/2011 to 24:0 12/31/2011
# Create an IPv4 basic ACL numbered 2001, and configure a rule in the ACL to permit packets only from
192.168.1.2/32 during the time range work.
[DeviceA] acl number 2001
[DeviceA-acl-basic-2001] rule permit source 192.168.1.2 0 time-range work
[DeviceA-acl-basic-2001] rule deny source any time-range work
[DeviceA-acl-basic-2001] quit
# Apply IPv4 basic ACL 2001 to filter outgoing packets on interface Ten-GigabitEthernet 1/0/2.
[DeviceA] interface Ten-GigabitEthernet 1/0/2
[DeviceA-Ten-GigabitEthernet1/0/2] packet-filter 2001 outbound
[DeviceA-Ten-GigabitEthernet1/0/2] quit
90
Configuring data buffers
An interface stores outgoing packets in the egress buffer when congestion occurs.
An egress buffer uses the following types of resources:
• Cell resources—Store packets. The buffer uses cell resources based on packet sizes. Suppose a cell
resource provides 208 bytes. The buffer allocates one cell resource to a 128-byte packet and two
cell resources to a 300-byte packet.
• Packet resources—Store packet pointers. A packet pointer indicates where the packet is located in
cell resources. The buffer uses one packet resource for each incoming or outgoing packet.
Each type of resources has a fixed area and a shared area.
• Fixed area—Partitioned into queues, each of which is equally divided by all the interfaces on a
device, as shown in Figure 28. When congestion occurs, the following rules apply:
a. An interface first uses the relevant queues of the fixed area to store packets.
b. When a queue is full, the interface uses the space for the queue in the shared area.
c. When the queue in the shared area is also full, the interface discards subsequent packets.
The system allocates the fixed area among queues as specified by the user. Even if a queue is not
full, other queues cannot preempt its space. Similarly, the share of a queue for an interface cannot
be preempted by other interfaces even if it is not full.
• Shared area—Partitioned into queues, each of which is not equally divided by the interfaces, as
shown in Figure 28. The system determines the actual shared-area ratio for each queue according
to user configuration and the number of packets actually sent. If a queue is not full, other queues can
preempt its space.
The system puts packets received on all interfaces into a queue in the order they arrive. When the
queue is full, subsequent packets are dropped.
Figure 28 Fixed area and shared area
91
If you have configured data buffers in one way, delete the configuration before using the other way.
Otherwise, the new configuration does not take effect.
To configure the data buffer, perform the following tasks:
Tasks at a glance
Perform one of the following tasks:
• Enabling the Burst function
• Configuring data buffers manually
{ Configuring the total shared-area ratio
{ Setting the maximum shared-area ratio for a queue
{ Setting the fixed-area ratio for a queue
{ Applying data buffer configuration
92
Configuring the total shared-area ratio
Each type of resources of a buffer, packet or cell, has a fixed size. After you set the total shared-area ratio
for a type of resources, the rest is automatically assigned to the fixed area.
To configure the total shared-area ratio:
For the maximum shared-area ratio for a queue, the percentage values 0 to 100 are divided into 10
ranges. Table 12 shows the effective values that correspond to the configured values of ratio-value.
Table 12 Mapping between values of ratio-value and effective values
2 to 3 3
4 to 7 6
8 to 16 11
17 to 29 20
30 to 42 33
43 to 60 50
61 to 76 67
77 to 86 80
87 to 100 89
93
Setting the fixed-area ratio for a queue
By default, all queues have an equal share of the fixed area. This task allows you to change the fixed-area
ratio for a queue. The unconfigured queues equally share the remaining part.
The fixed-area space for a queue cannot be used by other queues. It is also called the minimum
guaranteed buffer.
When you set the fixed-area ratio for a queue, follow these restrictions and guidelines:
• The sum of ratios configured for all queues cannot be greater than or equal to 100%. Queues 5, 6,
and 7 must have available fixed-area space.
• After you configure the fixed-area ratios for some queues, the other queues each are assigned an
equal share of the remaining part of the fixed area. The display buffer queue command displays
the preceding whole number for each assignment result. Therefore, the sum of the ratios for all
queues might be less than 100%.
To set the fixed-area ratio for a queue:
Step Command
1. Enter system view. system-view
2. Apply data buffer configuration. buffer apply
Task Command
Display data buffer configuration. display buffer [ slot slot-number ] [ queue [ queue-id ] ]
94
Configuring QCN
Quantized Congestion Notification (QCN) is an end-to-end congestion notification mechanism that can
reduce packet loss and delay in Layer 2 networks by actively sending reverse notifications. As part of
data center standards, QCN is primarily used in data center networks.
Basic concepts
• Reaction point (RP)—A source end host that supports QCN.
• Congestion point (CP)—A congestion detection device that is enabled with QCN.
• Congestion notification message (CNM)—A message transmitted by a CP to an RP when a queue
on the CP is congested.
• Congestion controlled flow (CCF)—A flow of frames with the same priority value. A CP assigns
frames of the same CCF to one queue before forwarding them.
• Congestion notification tag (CN tag)—Identifies a CCF. Devices in a CND must be able to process
packets with a CN tag.
• Congestion notification priority (CNP)—An 802.1p priority that is enabled with QCN. The value of
that 802.1p priority is called a Congestion Notification Priority Value (CNPV).
• Congestion notification domain (CND)—A set of RPs and CPs with QCN enabled for a CNPV.
• Congestion point identifier (CPID)—An 8-byte unique identifier for a CP in the network.
• Quantized feedback (QntzFb)—A 6-bit quantized feedback value indicating the extent of
congestion.
95
Figure 29 Data flow format
CNM format
When a CP detects the congestion state by sampling frames, it sends CNMs to the RPs.
The CP constructs a CNM as follows:
• Uses the source MAC address of the sampled frame as the destination MAC address.
• Uses the destination MAC address of the sampled frame as the source MAC addresses.
• Copies the VLAN tag and CN tag of the sampled frame.
• Places the data as shown in Figure 30.
{ PDU EtherType—2 bytes in length. It indicates the Ethernet type of the PDU and has a value of
0x22E7.
{ CNM PDU—24 to 88 bytes of payload of the PDU.
Figure 30 CNM PDU format
Encapsulated priority 2 bytes Priority of the sampled frame that triggered the CNM.
Encapsulated destination MAC Destination MAC address of the sampled frame that
6 bytes
address triggered the CNM.
96
Figure 31 CNM PDU format
Octet Length
Version 1 4 bits
ReservedV 1, 2 6 bits
Quantized Feedback 2 6 bits
cnmQOffset 11 2
cnmQDelta 13 2
Encapsulated priority 15 2
97
QCN algorithm
The QCN algorithm includes the CP algorithm and the RP algorithm.
CP algorithm
The CP measures the queue size by periodically sampling frames and computes the congestion state
based on the sampling result.
As shown in Figure 33, the CP algorithm includes the following parameters:
• Q—Indicates the instantaneous queue size at the sampling point.
• Qeq—Indicates the desired queue size.
• Qold—Indicates the queue size at the previous sampling point.
• Fb—Indicates the extent of congestion in the form of a quantized value.
The following formulas apply:
• Qoff = Q – Qeq
• Qδ = Q – Qold
• Fb = – (Qoff + wQδ)
where w is a constant to control the weight of Qδ in determining the value of Fb.
The CP determines whether to generate CNMs based on the Fb value.
• When Fb ≥ 0, no congestion occurs, and the CP does not generate a CNM.
• When Fb < 0, congestion occurs, and the CP generates an CNM containing the QntzFb. QntzFb
is the quantized value of |Fb| and is calculated according to the following rules:
{ If Fb < – Qeq x (2 x w + 1), QntzFb takes the maximum value of 63.
{ Otherwise, QntzFb = – Fb x 63/(Qeq x (2 x w + 1)).
Figure 33 Congestion detection
RP algorithm
An RP decreases its transmission rate based on the value of |Fb| in the received CNM. The greater the
Fb value, the lower the RP reduces its transmission rate. After the RP reduces its transmission rate, the RP
gradually increases the transmission rate to the original level.
98
CND
A CND is a set of RPs and CPs enabled with QCN for a CNPV. CNDs are identified based on CNPVs.
Devices enabled with QCN for a CNPV are assigned to the corresponding CND. A CNPV-based CND
prevents traffic from outside the CND from entering the CND. If a frame from outside the CND includes
the CNPV, the 802.1p priority value of the frame is mapped to a configured alternate priority value.
Priority mapping
Incoming frames with a CNPV are assigned to the corresponding output queue enabled with QCN.
Traffic with other priority values cannot enter that output queue. Priority-to-queue mappings are
determined by the QoS priority mapping table (see "Configuring priority mapping").
Modifying the priority mapping table for traffic with specific CNPVs might cause the system to fail to
detect congestion.
When you map multiple 802.1p priorities to one queue, all packets with these 802.1p priorities will be
included when determining congestion conditions. Therefore, do not map 802.1p priorities not enabled
with QCN to a queue enabled with QCN.
Marking actions configured in QoS policies affect priority mapping. For information about marking
actions, see "Configuring priority marking."
The priority trust mode must be configured as the 802.1p priority. For information about configuring trust
modes, see "Configuring priority mapping."
The default port priority cannot be the same as the CNPV. For information about port priority, see
"Configuring priority mapping."
99
QCN configuration task list
Tasks at a glance
(Required.) Enabling QCN globally
Configuration prerequisites
Before you enable QCN globally, enable LLDP. For more information about LLDP, see Layer 2—LAN
Switching Configuration Guide.
Configuration procedure
To enable QCN globally:
100
Configuring global CND settings
Perform this task to assign a switch to a CND identified by the specified CNPV.
After you assign a switch to a CND, the switch can detect congestion for packets within the CND.
You can assign a switch to multiple CNDs by specifying multiple CNPVs for the switch. For example, a
switch can be assigned to CND 1, CND 2, and CND 3 and have an alternate priority of 0 in all three
CNDs. The following table shows priority mappings:
1 1 0
2 2 0
3 3 0
4 N/A N/A
5 N/A N/A
6 N/A N/A
7 N/A N/A
101
Configuring congestion detection parameters
Perform this task to detect congestion for packets in a CND. You configure congestion detection
parameters in a profile.
Before you configure congestion detection parameters, you must assign the switch to the CND.
To configure congestion detection parameters:
Task Command
Display global CND settings. display qcn global [ slot slot-number ]
Display the CND settings for an interface. display qcn global [ interface-type interface-number ]
102
Figure 34 Network diagram
IP network
XGE1/0/2
CND 1 Switch B
XGE1/0/1 XGE1/0/3
Switch A Switch C
RP 1 RP 2
Configuration procedure
1. Configure Switch A:
# Create VLAN 100, and assign Ten-GigabitEthernet 1/0/1 to the VLAN.
<SwitchA> system-view
[SwitchA] vlan 100
[SwitchA-vlan100] port ten-gigabitethernet 1/0/1
[SwitchA-vlan100] quit
# Configure Ten-GigabitEthernet 1/0/2 as a trunk port, and assign it to VLAN 100.
[SwitchA] interface ten-gigabitethernet 1/0/2
[SwitchA-Ten-GigabitEthernet1/0/2] port link-type trunk
[SwitchA-Ten-GigabitEthernet1/0/2] port trunk permit vlan 100
[SwitchA-Ten-GigabitEthernet1/0/2] quit
# Enable LLDP globally.
[SwitchA] lldp global enable
# Enable CN TLV advertising on Ten-GigabitEthernet 1/0/1.
[SwitchA] interface ten-gigabitethernet 1/0/1
[SwitchA-Ten-GigabitEthernet1/0/1] lldp tlv-enable dot1-tlv congestion-notification
[SwitchA-Ten-GigabitEthernet1/0/1] quit
# Enable CN TLV advertising on Ten-GigabitEthernet 1/0/2.
[SwitchA] interface ten-gigabitethernet 1/0/2
[SwitchA-Ten-GigabitEthernet1/0/2] lldp tlv-enable dot1-tlv congestion-notification
[SwitchA-Ten-GigabitEthernet1/0/2] quit
# Enable QCN globally.
[SwitchA] qcn enable
# Assign the switch to the CND with CNPV 1, and configure all interfaces to negotiate the defense
mode and alternate priority by using LLDP.
[SwitchA] qcn priority 1 auto
103
2. Configure Switch B:
# Create VLAN 100.
<SwitchB> system-view
[SwitchB] vlan 100
[SwitchB-vlan100] quit
# Configure the following interfaces as trunk ports, and assign all of them to VLAN 100:
{ Ten-GigabitEthernet 1/0/1.
{ Ten-GigabitEthernet 1/0/2.
{ Ten-GigabitEthernet 1/0/3.
[SwitchB] interface ten-gigabitethernet 1/0/1
[SwitchB-Ten-GigabitEthernet1/0/1] port link-type trunk
[SwitchB-Ten-GigabitEthernet1/0/1] port trunk permit vlan 100
[SwitchB-Ten-GigabitEthernet1/0/1] quit
[SwitchB] interface ten-gigabitethernet 1/0/2
[SwitchB-Ten-GigabitEthernet1/0/2] port link-type trunk
[SwitchB-Ten-GigabitEthernet1/0/2] port trunk permit vlan 100
[SwitchB-Ten-GigabitEthernet1/0/2] quit
[SwitchB] interface ten-gigabitethernet 1/0/3
[SwitchB-Ten-GigabitEthernet1/0/3] port link-type trunk
[SwitchB-Ten-GigabitEthernet1/0/3] port trunk permit vlan 100
[SwitchB-Ten-GigabitEthernet1/0/3] quit
# Enable LLDP globally.
[SwitchB] lldp global enable
# Enable CN TLV advertising on Ten-GigabitEthernet 1/0/1 and Ten-GigabitEthernet 1/0/2.
[SwitchB] interface ten-gigabitethernet 1/0/1
[SwitchB-Ten-GigabitEthernet1/0/1] lldp tlv-enable dot1-tlv congestion-notification
[SwitchB-Ten-GigabitEthernet1/0/1] quit
[SwitchB] interface ten-gigabitethernet 1/0/3
[SwitchB-Ten-GigabitEthernet1/0/3] lldp tlv-enable dot1-tlv congestion-notification
[SwitchB-Ten-GigabitEthernet1/0/3] quit
# Enable QCN globally.
[SwitchB] qcn enable
# Assign the switch to the CND with CNPV 1.
[SwitchB] qcn priority 1 auto
# Configure the CND defense mode edge and alternate value 0 for interface Ten-GigabitEthernet
1/0/2.
[SwitchB-Ten-GigabitEthernet1/0/2] qcn port priority 1 admin defense-mode edge
alternate 0
[SwitchB-Ten-GigabitEthernet1/0/2] quit
# Assign the switch to the CND with CNPV 1, and configure all interfaces to negotiate the defense
mode and alternate priority by using LLDP.
[SwitchB] qcn priority 1 auto
3. Configure Switch C in the same way Switch A is configured. (Details not shown.)
104
[SwitchA] display qcn interface
Interface: Ten-GigabitEthernet1/0/1
CNPV Mode Defense-mode Alternate
---------------------------------------------------
1 comp interior 0
Interface: Ten-GigabitEthernet1/0/2
CNPV Mode Defense-mode Alternate
---------------------------------------------------
1 comp interior 0
Interface: Ten-GigabitEthernet1/0/2
CNPV Mode Defense-mode Alternate
---------------------------------------------------
1 admin edge 0
Interface: Ten-GigabitEthernet1/0/3
CNPV Mode Defense-mode Alternate
---------------------------------------------------
1 comp interior 0
Interface: Ten-GigabitEthernet1/0/2
CNPV Mode Defense-mode Alternate
---------------------------------------------------
1 comp interior 0
105
Configure QCN for CNPV 1 to meet the following requirements:
• Switch A, Switch B, and Switch C detect congestion for traffic with 802.1p priority 1.
• Switch A and Switch B do not detect congestion for traffic with 802.1p priority 5.
Configure QCN for CNPV 5 to meet the following requirements:
• Switch C, Switch D, and Switch E detect congestion for traffic with 802.1p priority 5.
• Switch D and Switch E do not detect congestion for traffic with 802.1p priority 1.
Figure 35 Network diagram
CND 1
Switch A Switch B
XGE1/0/1 XGE1/0/1
XGE1/0/2 XGE1/0/2
RP 1 RP 2
XGE1/0/1 XGE1/0/2
XGE1/0/3 XGE1/0/4
Switch C
Switch D Switch E
RP 3 RP 4
CND 2
Configuration procedure
1. Configure Switch A:
# Create VLAN 100, and assign Ten-GigabitEthernet 1/0/1 to the VLAN.
<SwitchA> system-view
[SwitchA] vlan 100
[SwitchA-vlan100] port ten-gigabitethernet 1/0/1
[SwitchA-vlan100] quit
# Configure Ten-GigabitEthernet 1/0/2 as a trunk port, and assign it to VLAN 100.
[SwitchA] interface ten-gigabitethernet 1/0/2
[SwitchA-Ten-GigabitEthernet1/0/2] port link-type trunk
[SwitchA-Ten-GigabitEthernet1/0/2] port trunk permit vlan 100
[SwitchA-Ten-GigabitEthernet1/0/2] quit
# Enable LLDP globally.
[SwitchA] lldp global enable
# Enable CN TLV advertising on Ten-GigabitEthernet 1/0/1.
[SwitchA] interface ten-gigabitethernet 1/0/1
[SwitchA-Ten-GigabitEthernet1/0/1] lldp tlv-enable dot1-tlv congestion-notification
[SwitchA-Ten-GigabitEthernet1/0/1] quit
# Enable CN TLV advertising on Ten-GigabitEthernet 1/0/2.
[SwitchA] interface ten-gigabitethernet 1/0/2
[SwitchA-Ten-GigabitEthernet1/0/2] lldp tlv-enable dot1-tlv congestion-notification
106
[SwitchA-Ten-GigabitEthernet1/0/2] quit
# Enable QCN globally.
[SwitchA] qcn enable
# Assign the switch to the CND with CNPV 1, and configure all interfaces to negotiate the defense
mode and alternate priority by using LLDP.
[SwitchA] qcn priority 1 auto
2. Configure Switch B in the same way Switch A is configured. (Details not shown.)
3. Configure Switch C:
# Create VLAN 100 and VLAN 200.
<SwitchC> system-view
[SwitchC] vlan 100
[SwitchC-vlan100] quit
[SwitchC] vlan 200
[SwitchC-vlan200] quit
# Configure the following interfaces as trunk ports, and assign all of them to VLAN 100 and VLAN
200:
{ Ten-GigabitEthernet 1/0/1.
{ Ten-GigabitEthernet 1/0/2.
{ Ten-GigabitEthernet 1/0/3.
{ Ten-GigabitEthernet 1/0/4.
[SwitchC] interface ten-gigabitethernet 1/0/1
[SwitchC-Ten-GigabitEthernet1/0/1] port link-type trunk
[SwitchC-Ten-GigabitEthernet1/0/1] port trunk permit vlan 100 200
[SwitchC-Ten-GigabitEthernet1/0/1] quit
[SwitchC] interface ten-gigabitethernet 1/0/2
[SwitchC-Ten-GigabitEthernet1/0/2] port link-type trunk
[SwitchC-Ten-GigabitEthernet1/0/2] port trunk permit vlan 100 200
[SwitchC-Ten-GigabitEthernet1/0/2] quit
[SwitchC] interface ten-gigabitethernet 1/0/3
[SwitchC-Ten-GigabitEthernet1/0/3] port link-type trunk
[SwitchC-Ten-GigabitEthernet1/0/3] port trunk permit vlan 100 200
[SwitchC-Ten-GigabitEthernet1/0/3] quit
[SwitchC] interface ten-gigabitethernet 1/0/4
[SwitchC-Ten-GigabitEthernet1/0/4] port link-type trunk
[SwitchC-Ten-GigabitEthernet1/0/4] port trunk permit vlan 100 200
[SwitchC-Ten-GigabitEthernet1/0/4] quit
# Enable LLDP globally.
[SwitchC] lldp global enable
# Enable CN TLV advertising on the following interfaces:
{ Ten-GigabitEthernet 1/0/1.
{ Ten-GigabitEthernet 1/0/2.
{ Ten-GigabitEthernet 1/0/3.
{ Ten-GigabitEthernet 1/0/4.
[SwitchC] interface ten-gigabitethernet 1/0/1
[SwitchC-Ten-GigabitEthernet1/0/1] lldp tlv-enable dot1-tlv congestion-notification
107
[SwitchC-Ten-GigabitEthernet1/0/1] quit
[SwitchC] interface ten-gigabitethernet 1/0/2
[SwitchC-Ten-GigabitEthernet1/0/2] lldp tlv-enable dot1-tlv congestion-notification
[SwitchC-Ten-GigabitEthernet1/0/2] quit
[SwitchC] interface ten-gigabitethernet 1/0/3
[SwitchC-Ten-GigabitEthernet1/0/3] lldp tlv-enable dot1-tlv congestion-notification
[SwitchC-Ten-GigabitEthernet1/0/3] quit
[SwitchC] interface ten-gigabitethernet 1/0/4
[SwitchC-Ten-GigabitEthernet1/0/4] lldp tlv-enable dot1-tlv congestion-notification
[SwitchC-Ten-GigabitEthernet1/0/4] quit
# Enable QCN globally.
[SwitchC] qcn enable
# Assign the switch to the CNDs with CNPV 1 and CNPV 5.
[SwitchC] qcn priority 1 auto
[SwitchC] qcn priority 5 admin defense-mode interior-ready alternate 4
# Configure the CND defense mode edge and alternate value 4 for Ten-GigabitEthernet 1/0/1
and Ten-GigabitEthernet 1/0/2.
[SwitchC] interface ten-gigabitethernet 1/0/1
[SwitchC-Ten-GigabitEthernet1/0/1] qcn port priority 5 admin defense-mode edge
alternate 4
[SwitchC-Ten-GigabitEthernet1/0/1] quit
[SwitchC] interface ten-gigabitethernet 1/0/2
[SwitchC-Ten-GigabitEthernet1/0/2] qcn port priority 5 admin defense-mode edge
alternate 4
[SwitchC-Ten-GigabitEthernet1/0/2] quit
# Assign the switch to the CND with CNPV 1, and configure all interfaces to negotiate the defense
mode and alternate priority by using LLDP.
[SwitchC] qcn priority 1 auto
4. Configure Switch D:
# Create VLAN 200, and assign Ten-GigabitEthernet 1/0/1 to the VLAN.
<SwitchD> system-view
[SwitchD] vlan 200
[SwitchD-vlan200] port ten-gigabitethernet 1/0/1
[SwitchD-vlan200] quit
# Configure Ten-GigabitEthernet 1/0/2 as a trunk port, and assign it to VLAN 200.
[SwitchD] interface ten-gigabitethernet 1/0/2
[SwitchD-Ten-GigabitEthernet1/0/2] port link-type trunk
[SwitchD-Ten-GigabitEthernet1/0/2] port trunk permit vlan 200
[SwitchD-Ten-GigabitEthernet1/0/2] quit
# Enable QCN globally.
[SwitchD] qcn enable
# Assign the switch to the CND with CNPV 5.
[SwitchD] qcn priority 5 admin defense-mode interior-ready alternate 4
5. Configure Switch E in the same way Switch D is configured. (Details not shown.)
108
Interface: Ten-GigabitEthernet1/0/1
CNPV Mode Defense-mode Alternate
---------------------------------------------------
1 comp interior 0
Interface: Ten-GigabitEthernet1/0/2
CNPV Mode Defense-mode Alternate
---------------------------------------------------
1 comp interior 0
Interface: Ten-GigabitEthernet1/0/2
CNPV Mode Defense-mode Alternate
---------------------------------------------------
1 comp interior 0
Interface: Ten-GigabitEthernet1/0/2
CNPV Mode Defense-mode Alternate
---------------------------------------------------
1 comp interior-ready 0
5 admin edge 4
Interface: Ten-GigabitEthernet1/0/3
CNPV Mode Defense-mode Alternate
---------------------------------------------------
1 comp edge 0
5 comp interior-ready 4
Interface: Ten-GigabitEthernet1/0/4
CNPV Mode Defense-mode Alternate
---------------------------------------------------
1 comp edge 0
5 comp interior-ready 4
109
Interface: Ten-GigabitEthernet1/0/1
CNPV Mode Defense-mode Alternate
---------------------------------------------------
5 comp interior-ready 4
Interface: Ten-GigabitEthernet1/0/2
CNPV Mode Defense-mode Alternate
---------------------------------------------------
5 comp interior-ready 4
Interface: Ten-GigabitEthernet1/0/2
CNPV Mode Defense-mode Alternate
---------------------------------------------------
5 comp interior-ready 4
110
Support and other resources
Contacting HP
For worldwide technical support information, see the HP support website:
http://www.hp.com/support
Before contacting HP, collect the following information:
• Product model names and numbers
• Technical support registration number (if applicable)
• Product serial numbers
• Error messages
• Operating system type and revision level
• Detailed questions
Subscription service
HP recommends that you register your product at the Subscriber's Choice for Business website:
http://www.hp.com/go/wwalerts
After registering, you will receive email notification of product enhancements, new driver versions,
firmware updates, and other product resources.
Related information
Documents
To find related documents, browse to the Manuals page of the HP Business Support Center website:
http://www.hp.com/support/manuals
• For related documentation, navigate to the Networking section, and select a networking category.
• For a complete list of acronyms and their definitions, see HP FlexNetwork Technology Acronyms.
Websites
• HP.com http://www.hp.com
• HP Networking http://www.hp.com/go/networking
• HP manuals http://www.hp.com/support/manuals
• HP download drivers and software http://www.hp.com/support/downloads
• HP software depot http://www.software.hp.com
• HP Education http://www.hp.com/learn
111
Conventions
This section describes the conventions used in this documentation set.
Command conventions
Convention Description
Boldface Bold text represents commands and keywords that you enter literally as shown.
Italic Italic text represents arguments that you replace with actual values.
[] Square brackets enclose syntax choices (keywords or arguments) that are optional.
Braces enclose a set of required syntax choices separated by vertical bars, from which
{ x | y | ... }
you select one.
Square brackets enclose a set of optional syntax choices separated by vertical bars, from
[ x | y | ... ]
which you select one or none.
The argument or keyword and argument combination before the ampersand (&) sign can
&<1-n>
be entered 1 to n times.
GUI conventions
Convention Description
Window names, button names, field names, and menu items are in bold text. For
Boldface
example, the New User window appears; click OK.
> Multi-level menus are separated by angle brackets. For example, File > Create > Folder.
Symbols
Convention Description
An alert that calls attention to important information that if not understood or followed can
WARNING result in personal injury.
An alert that calls attention to important information that if not understood or followed can
CAUTION result in data loss, data corruption, or damage to hardware or software.
112
Network topology icons
Represents a generic switch, such as a Layer 2 or Layer 3 switch, or a router that supports
Layer 2 forwarding and other Layer 2 features.
Represents a mesh access point.
Represents omnidirectional signals.
Represents a security card, such as a firewall, load-balancing, NetStream, SSL VPN, IPS,
or ACG card.
113
Index
114
bandwidth committed access rate. Use CAR
QoS overview, 15 common CAR
QoS policy configuration, 18 priority marking configuration, 65
basic ACL configuring
category, 1 ACL, 1, 4, 12
configuration, 4 ACL (advanced), 5
behavior ACL (basic), 4
QoS traffic behavior definition, 20 ACL (Ethernet frame header), 8
best-effort QoS service model, 15 ACL (user-defined), 9
buffer ACL packet filtering, 10
data. See data buffer ACL packet filtering applicable scope (VLAN
burst function (data buffer), 92 interface), 11
aggregate CAR, 79
C
color-based priority marking, 65
CAR
data buffer, 91, 91
aggregate CAR configuration, 79, 79
data buffers manually, 92
global CAR configuration, 79
IPv4 ACL (advanced), 6
QoS aggregate CAR configuration, 79
IPv4 ACL (basic), 4
category
IPv6 ACL (advanced), 7
ACL advanced, 1
IPv6 ACL (basic), 5
ACL auto match order sort, 2
local precedence marking, 66
ACL basic, 1
local QoS ID marking, 68
ACL config match order sort, 2
multi-CND QCN, 105
ACL Ethernet frame header, 1
priority marking based on colors obtained through
ACL user-defined, 1 mapping drop precedence, 65
cell priority marking based on colors obtained through
data buffer burst function, 92 traffic policing, 65
data buffer configuration, 91, 91 QCN, 95, 100, 102
changing QCN basics, 102
QoS priority mapping interface port priority, 31 QCN CND congestion detection parameter, 102
classifying QCN CND settings, 100
QoS class-based accounting, 82, 83 QCN CND settings (global), 101
QoS traffic class definition, 19 QCN CND settings (interface), 101
CND QoS aggregate CAR, 79, 79
algorithms, 99 QoS class-based accounting, 82, 83
congestion detection parameter, 102 QoS congestion avoidance, 58
defense mode, 99 QoS congestion avoidance WRED, 60
multi-CND QCN configuration, 105 QoS congestion management, 46, 50
priority mapping, 99 QoS congestion management queue scheduling
settings configuration, 100 profile, 55, 57
settings configuration (global), 101 QoS congestion management queue-based WRED
settings configuration (interface), 101 table, 59
CNM QoS congestion management queuing, 50
CNM PDU format, 96 QoS congestion management SP queuing, 50
PDU EtherType format, 96 QoS congestion management SP+WFQ
queuing, 53
115
QoS congestion management SP+WRR Domain. Use CND
queuing, 52 Message. Use CNM
QoS congestion management WFQ control plane
queuing, 51 QoS policy application, 21
QoS congestion management WRR QoS policy application (control plane), 23
queuing, 50
copying
QoS data buffer total shared-area ratio, 93
ACL, 10
QoS global CAR, 79
D
QoS GTS, 36, 41
QoS nesting, 72, 73 data
QoS policy, 18 buffer. See data buffer
QoS priority mapping, 26, 29 multi-CND QCN configuration, 105
QoS priority mapping map, 30 QCN basic configuration, 102
QoS priority mapping priority trust mode, 31 QCN configuration, 95, 100, 102
QoS priority mapping table+priority QCN data flow format, 95
marking, 32 data buffer
QoS priority mapping trusted port packet burst function enable, 92
priority, 30 configuration, 91, 91
QoS priority marking, 64, 66 configuration (manual), 92
QoS rate limit, 36, 42, 42 configuration application, 94
QoS traffic filtering, 62, 63 display, 94
QoS traffic policing, 36, 40, 42 fixed-area max queue ratio, 94
QoS traffic redirection, 75, 76 shared-area max queue ratio, 93
time range, 89, 89 total shared-area ratio, 93
congestion avoidance default
configuration, 58 ACL packet filtering default action, 12
ECN, 59 defining
queue-based WRED table, 59 QoS policy, 21
RED, 58 QoS traffic behavior, 20
tail drop, 58 QoS traffic class, 19
WRED, 58 detecting
WRED configuration, 60 QCN CND congestion detection parameter, 102
congestion management QoS congestion avoidance RED, 58
configuration, 46, 50 QoS congestion avoidance WRED, 58
queue aging time setting, 57 device
queue scheduling profile, 55, 57, 88 ACL packet filtering applicable scope (VLAN
queuing, 50 interface), 11
SP queuing, 46, 50 ACL packet filtering application (interface), 11
SP+WFQ queuing, 49 ACL packet filtering configuration, 10
SP+WFQ queuing configuration, 53 ACL packet filtering default action, 12
SP+WRR queuing, 49 ACL packet filtering log interval, 11
SP+WRR queuing configuration, 52 ACL switch applications, 1
WFQ queuing, 49, 51 QoS congestion management configuration, 50
WRR queuing, 47, 50 QoS policy application (control plane), 23
Congestion Notification QoS policy application (global), 23
116
QoS policy application (user profile), 24 data buffer configuration, 91, 91
QoS policy application (VLAN), 22 QoS data buffer max queue ratio, 94
QoS policy interface application, 22 format
DiffServ QoS service model, 15 QCN CNM format, 96
displaying QCN data flow format, 95
ACL, 12 QCN message, 95
data buffer, 94 forwarding
QCN, 102 ACL configuration, 1, 4, 12
QoS aggregate CAR, 79 ACL configuration (advanced), 5
QoS congestion avoidance WRED, 61 ACL configuration (basic), 4
QoS congestion management queue ACL configuration (Ethernet frame header), 8
scheduling profile, 56 ACL configuration (user-defined), 9
QoS congestion management queuing, 55 QoS token bucket, 36
QoS GTS, 42 fragment filtering (ACL), 3
QoS policies, 24
G
QoS priority mapping, 31
General Traffic Shaping. Use GTS
QoS rate limit, 42
global
QoS traffic policing, 42
QoS policy application (global), 23
time range, 89
global CAR
drop precedence
aggregate CAR configuration, 79, 79
priority marking configuration, 65
configuration, 79
drop priority (QoS priority mapping), 26
green packet
DSCP
drop precedence, 64
QoS packet IP precedence and DSCP
values, 86 GTS
QoS ACL-based, 41
E
QoS all-traffic, 41
ECN QoS display, 42
QoS congestion avoidance, 59 QoS GTS configuration, 36
enabling QoS MQC GTS, 41
data buffer burst function, 92 QoS non-MQC GTS, 41
QCN, 100 QoS queue-based, 41
Ethernet frame header QoS traffic policing, 42
ACL category, 1 QoS traffic shaping, 38
ACL configuration, 8
I
evaluating
QoS traffic, 36 IntServ QoS service model, 15
QoS traffic with token bucket, 36, 36, 36 IP addressing
Explicit Congestion Notification. Use ECN ACL configuration, 1, 4, 12
ACL configuration (advanced), 5
F
ACL configuration (Ethernet frame header), 8
filtering ACL configuration (user-defined), 9
ACL packet fragments, 3 QoS class-based accounting configuration, 82, 83
QoS traffic filtering configuration, 62, 63 QoS traffic filtering configuration, 62, 63
QoS traffic redirection configuration, 75, 76 IPv4
fixed area ACL configuration (IPv4 advanced), 6
117
ACL configuration (IPv4 basic), 4 QCN CND defense interior, 99
ACL naming, 2 QCN CND defense interiorReady, 99
ACL numbering, 2 modular QoS. Use MQC
ACL packet filtering configuration, 10 MQC
IPv6 QoS GTS, 41
ACL configuration (IPv6 advanced), 7 MQC QoS
ACL configuration (IPv6 basic), 5 traffic policing, 40
ACL naming, 2 multi-CND QCN, 105
ACL numbering, 2 N
ACL packet filtering configuration, 10
naming
L ACL, 2
Layer 2 ACL copy, 10
multi-CND QCN configuration, 105 nesting
QCN basic configuration, 102 QoS configuration, 72, 73
QCN configuration, 95, 100, 102 network
limiting ACL configuration (basic), 4
QoS rate limit, 42 ACL configuration (Ethernet frame header), 8
local ACL configuration (user-defined), 9
QoS priority mapping local precedence, 26 ACL copy, 10
local precedence ACL packet filtering applicable scope (VLAN
priority marking configuration, 65 interface), 11
local precedence marking ACL packet filtering application (interface), 11
configuration, 66 ACL packet filtering configuration, 10
local QoS ID marking, 68 ACL packet filtering default action, 12
logging ACL packet filtering log interval, 11
ACL packet filtering log interval, 11 ACL packet fragment filtering, 3
ACL switch applications, 1
M
data buffer burst function, 92
maintaining
data buffer configuration application, 94
ACL, 12
multi-CND QCN configuration, 105
QCN, 102
QCN basic configuration, 102
QoS aggregate CAR, 79
QoS aggregate CAR configuration, 79, 79, 79
QoS policies, 24
QoS class-based accounting configuration, 82, 83
mapping
QoS congestion avoidance configuration, 58
QCN CND priority mapping, 99
QoS congestion avoidance WRED queue-based
match order table, 59
ACL auto, 2 QoS congestion avoidance+ECN, 59
ACL config, 2 QoS congestion management configuration, 46
message QoS congestion management queue scheduling
QCN CNM format, 96 profile, 55, 57, 88
QCN data flow format, 95 QoS congestion management queuing, 50
QCN format, 95 QoS congestion management SP queuing, 50
mode QoS congestion management SP+WFQ queuing
QCN CND defense disabled, 99 configuration, 53
QCN CND defense edge, 99
118
QoS congestion management SP+WRR QoS priority marking configuration, 66
queuing configuration, 52 QoS service models, 15
QoS congestion management WFQ QoS techniques, 16
queuing, 51 time range configuration, 89, 89
QoS congestion management WRR non-modular QoS. Use non-MQC
queuing, 50
non-MQC
QoS data buffer fixed-area max queue ratio, 94
QoS GTS, 41
QoS data buffer shared-area max queue
QoS traffic policing, 40
ratio, 93
notifying
QoS data buffer total shared-area ratio, 93
multi-CND QCN configuration, 105
QoS GTS, 38, 41
QCN basic configuration, 102
QoS GTS configuration, 36
QCN configuration, 95, 100, 102
QoS MQC, 18
QoS congestion avoidance+ECN, 59
QoS nesting configuration, 72, 73
numbering
QoS non-MQC, 18
ACL, 2
QoS policy application, 21
ACL automatic rule numbering, 3
QoS policy configuration, 18
ACL automatic rule renumbering, 3
QoS policy definition, 21
ACL copy, 10
QoS priority mapping configuration, 26, 29
ACL rule numbering, 3
QoS priority mapping drop priority, 26
ACL rule numbering step, 3
QoS priority mapping interface port priority, 31
QoS priority mapping map, 30 P
QoS priority mapping trusted port packet packet
priority, 30 ACL configuration, 4, 12
QoS priority marking configuration, 64 ACL filtering application (interface), 11
QoS rate limit, 39, 42 ACL packet fragment filtering, 3
QoS rate limit configuration, 36 ACL switch applications, 1
QoS traffic behavior definition, 20 data buffer burst function, 92
QoS traffic class definition, 19 data buffer configuration, 91, 91
QoS traffic evaluation, 36 local precedence marking configuration, 66
QoS traffic filtering configuration, 62, 63 multi-CND QCN configuration, 105
QoS traffic policing, 37, 40, 42 QCN basic configuration, 102
QoS traffic policing configuration, 36 QCN configuration, 95, 100, 102
QoS traffic redirection configuration, 75, 76 QoS aggregate CAR configuration, 79, 79, 79
network management QoS class-based accounting configuration, 82, 83
ACL configuration, 1, 4, 12 QoS congestion avoidance configuration, 58
ACL configuration (advanced), 5 QoS congestion avoidance+ECN, 59
data buffer configuration, 91, 91 QoS global CAR configuration, 79
local precedence marking configuration, 66 QoS GTS, 38
local QoS ID marking, 68 QoS nesting configuration, 72, 73
QCN configuration, 95, 100, 102 QoS overview, 15
QoS global CAR configuration, 79 QoS policy configuration, 18
QoS overview, 15 QoS priority mapping configuration, 26, 29
QoS priority mapping priority trust mode, 31 QoS priority mapping priority trust mode, 31
QoS priority mapping table+priority QoS priority mapping table+priority marking, 32
marking, 32
119
QoS priority marking configuration, 64, 66 marking. See priority marking
QoS rate limit, 39 QCN CND priority mapping, 99
QoS traffic evaluation, 36 QoS packet 802.1p priority, 87
QoS traffic filtering configuration, 62, 63 QoS packet IP precedence and DSCP values, 86
QoS traffic policing, 37 priority mapping
QoS traffic redirection configuration, 75, 76 configuration, 26, 29
QoS trusted port packet priority, 30 drop priority, 26
packet coloring interface port priority, 31
drop precedence, 64 local precedence, 26
traffic policing, 64 map, 26
packet filtering map configuration, 30
ACL applicable scope (VLAN interface), 11 mapping table+priority marking, 32
ACL configuration, 1, 10 priority trust mode, 27, 31
ACL configuration (advanced), 5 process, 28
ACL configuration (Ethernet frame header), 8 trusted port packet priority, 30
ACL configuration (user-defined), 9 user priority, 26
ACL default action, 12 priority mapping table
ACL log generation+output interval, 11 drop precedence, 64
parameter priority marking
QCN CND congestion detection, 102 configuration, 64, 66
QoS MQC, 18 procedure
QoS non-MQC, 18 applying ACL packet filtering (interface), 11
periodic time range (ACL), 89, 89 applying data buffer configuration, 94
policy applying QoS congestion avoidance queue-based
QoS application, 21 WRED table, 59
QoS application (control plane), 23 applying QoS policy, 21
QoS application (global), 23 applying QoS policy (control plane), 23
QoS application (user profile), 24 applying QoS policy (global), 23
QoS application (VLAN), 22 applying QoS policy (user profile), 24
QoS definition, 21 applying QoS policy (VLAN), 22
QoS interface application, 22 applying QoS policy to interface, 22
QoS MQC, 18 changing QoS priority mapping interface port
QoS non-MQC, 18 priority, 31
QoS policy configuration, 18 configuring ACL, 4, 12
port configuring ACL (advanced), 5
QoS priority mapping interface port priority, 31 configuring ACL (basic), 4
QoS trusted port packet priority, 30 configuring ACL (Ethernet frame header), 8
precedence configuring ACL (IPv4 advanced), 6
QoS priority mapping configuration, 26, 29 configuring ACL (IPv4 basic), 4
QoS priority mapping local precedence, 26 configuring ACL (IPv6 advanced), 7
QoS priority mapping priority trust mode, 31 configuring ACL (IPv6 basic), 5
QoS priority mapping table+priority configuring ACL (user-defined), 9
marking, 32 configuring ACL packet filtering, 10
priority configuring ACL packet filtering applicable scope
mapping. See priority mapping (VLAN interface), 11
120
configuring color-based priority marking, 65 configuring QoS priority mapping priority trust
configuring data buffer, 91 mode, 31
configuring data buffers manually, 92 configuring QoS priority mapping table+priority
configuring local precedence marking, 66 marking, 32
configuring multi-CND QCN, 105 configuring QoS priority mapping trusted port
packet priority, 30
configuring priority marking based on colors
obtained through mapping drop configuring QoS priority marking, 64, 66
precedence, 65 configuring QoS rate limit, 42
configuring priority marking based on colors configuring QoS traffic filtering, 62, 63
obtained through traffic policing, 65 configuring QoS traffic policing, 40, 42
configuring QCN, 100 configuring QoS traffic redirection, 75, 76
configuring QCN basics, 102 configuring time range, 89, 89
configuring QCN CND congestion detection copying ACL, 10
parameter, 102 defining QoS policy, 21
configuring QCN CND settings, 100 defining QoS traffic behavior, 20
configuring QCN CND settings (global), 101 defining QoS traffic class, 19
configuring QCN CND settings (interface), 101 displaying ACL, 12
configuring QoS aggregate CAR, 79, 79, 79 displaying data buffer, 94
configuring QoS class-based displaying QCN, 102
accounting, 82, 83 displaying QoS aggregate CAR, 79
configuring QoS congestion avoidance displaying QoS congestion avoidance WRED, 61
queue-based WRED table, 59
displaying QoS congestion management queue
configuring QoS congestion avoidance scheduling profile, 56
WRED, 60
displaying QoS congestion management
configuring QoS congestion management, 50 queuing, 55
configuring QoS congestion management displaying QoS GTS, 42
queue scheduling profile, 55, 57, 88
displaying QoS policies, 24
configuring QoS congestion management
displaying QoS priority mapping, 31
queuing, 50
displaying QoS rate limit, 42
configuring QoS congestion management SP
displaying QoS traffic policing, 42
queuing, 50
displaying time range, 89
configuring QoS congestion management
SP+WFQ queuing, 53 DSCP, 65
configuring QoS congestion management enabling data buffer burst function, 92
SP+WRR queuing, 52 enabling QCN, 100
configuring QoS congestion management maintaining ACL, 12
WFQ queuing, 51 maintaining QCN, 102
configuring QoS congestion management WRR maintaining QoS aggregate CAR, 79
queuing, 50 maintaining QoS policies, 24
configuring QoS data buffer total shared-area setting ACL packet filtering default action, 12
ratio, 93 setting ACL packet filtering log generation+output
configuring QoS global CAR, 79 interval, 11
configuring QoS GTS, 41 setting QoS congestion management queuing, 57
configuring QoS nesting, 72, 73 setting QoS data buffer fixed-area max queue
configuring QoS priority mapping, 29 ratio, 94
configuring QoS priority mapping map, 30 setting QoS data buffer shared-area max queue
ratio, 93
121
profile congestion avoidance WRED display, 61
QoS policy application (user profile), 24 congestion avoidance WRED queue-based
protocols and standards table, 59
QCN, 99 congestion avoidance+ECN, 59
congestion management configuration, 46, 50
Q
congestion management queue scheduling
QCN profile, 55, 57, 88
algorithm, 98 congestion management queuing, 50
algorithm (CP), 98 congestion management SP queuing, 46, 50
algorithm (RP), 98 congestion management SP+WFQ queuing
basic concepts, 95 configuration, 53
basic configuration, 102 congestion management SP+WRR queuing
CND, 99 configuration, 52
CND congestion detection parameter, 102 congestion management WFQ queuing, 49, 51
CND defense mode, 99 congestion management WRR queuing, 47, 50
CND priority mapping, 99 data buffer burst function, 92
CND settings configuration, 100 data buffer configuration, 91, 91
CNM format, 96 data buffer configuration (manual), 92
configuration, 95, 100, 102 data buffer configuration application, 94
data flow format, 95 data buffer display, 94
display, 102 data buffer fixed-area max queue ratio, 94
enabling, 100 data buffer shared-area max queue ratio, 93
how it works, 97 data buffer total shared-area ratio, 93
maintain, 102 DiffServ service model, 15
message format, 95 displaying aggregate CAR, 79
multi-CND configuration, 105 displaying congestion management queue
protocols and standards, 99 scheduling profile, 56
QoS displaying congestion management queuing, 55
ACL configuration, 1, 4, 12 global CAR configuration, 79
ACL configuration (advanced), 5 GTS, 38
ACL configuration (Ethernet frame header), 8 GTS configuration, 36, 41
ACL configuration (user-defined), 9 GTS display, 42
ACL switch applications, 1 IntServ service model, 15
aggregate CAR configuration, 79, 79, 79 local precedence marking configuration, 66
Appendix A (Default priority maps), 85 local QoS ID marking, 68
Appendix B (Packet precedence), 86 maintaining aggregate CAR, 79
best-effort service model, 15 MQC configuration, 18
class-based accounting configuration, 82, 83 multi-CND QCN configuration, 105
complicated traffic evaluation with token nesting configuration, 72, 73
bucket, 36 non-MQC, 18
congestion avoidance configuration, 58 overview, 15
congestion avoidance RED, 58 policy application, 21
congestion avoidance tail drop, 58 policy application (control plane), 23
congestion avoidance WRED, 58 policy application (global), 23
congestion avoidance WRED configuration, 60 policy application (user profile), 24
122
policy application (VLAN), 22 traffic evaluation, 36
policy configuration, 18 traffic evaluation with token bucket, 36, 36
policy definition, 21 traffic filtering configuration, 62, 63
policy display, 24 traffic policing, 37, 40, 42
policy interface application, 22 traffic policing configuration, 36
policy maintain, 24 traffic policing display, 42
priority mapping configuration, 26, 29 traffic redirection configuration, 75, 76
priority mapping display, 31 QoS policy
priority mapping drop priority, 26 priority marking configuration, 65
priority mapping interface port priority, 31 Quality of Service. Use QoS
priority mapping local precedence, 26 Quantized Congestion Notification. Use QCN
priority mapping map, 26, 30 queuing
priority mapping priority trust mode, 31 configuration, 50
priority mapping process, 28 data buffer burst function, 92
priority mapping table+priority marking, 32 data buffer configuration, 91, 91
priority mapping trusted port packet priority, 30 QoS congestion avoidance RED, 58
priority mapping user priority, 26 QoS congestion avoidance WRED, 58
priority marking configuration, 64, 66 QoS congestion management scheduling
priority trust mode, 27 profile, 55, 57, 88
QCN algorithm, 98 QoS congestion management SP queuing, 46, 50
QCN basic concepts, 95 QoS congestion management SP+WFQ queuing
QCN basic configuration, 102 configuration, 53
QCN CND, 99 QoS congestion management SP+WRR queuing
configuration, 52
QCN CND congestion detection
parameter, 102 QoS congestion management WFQ
queuing, 49, 51
QCN CND settings, 100
QoS congestion management WRR
QCN CNM format, 96
queuing, 47, 50
QCN configuration, 95, 100, 102
QoS data buffer fixed-area max queue ratio, 94
QCN data flow format, 95
QoS data buffer shared-area max queue ratio, 93
QCN display, 102
queue aging time setting, 57
QCN enable, 100
SP+WFQ queuing, 49
QCN maintain, 102
SP+WRR queuing, 49
QCN message format, 95
QCN protocols and standards, 99 R
queue aging time setting, 57 random early detection. Use RED
rate limit, 39, 42 rate limiting
rate limit configuration, 36 QoS rate limit, 42
rate limit display, 42 QoS rate limit display, 42
service models, 15 QoS rate limiting, 39
SP+WFQ queuing, 49 QoS rate limiting configuration, 36
SP+WRR queuing, 49 redirecting
techniques, 16 QoS traffic redirection to CPU, 75, 76
token bucket, 36 QoS traffic redirection to interface, 75, 76
traffic behavior definition, 20 routing
traffic class definition, 19 ACL configuration, 1, 4, 12
123
ACL configuration (advanced), 5 QoS models, 15
ACL configuration (basic), 4 QoS nesting configuration, 72, 73
ACL configuration (Ethernet frame header), 8 QoS overview, 15
ACL configuration (user-defined), 9 QoS policy configuration, 18
QoS congestion management configuration, 50 QoS priority marking configuration, 64, 66
QoS GTS configuration, 36 QoS techniques, 16
QoS priority mapping configuration, 26, 29 QoS traffic filtering configuration, 62, 63
QoS priority mapping priority trust mode, 31 setting
QoS priority mapping table+priority ACL packet filtering default action, 12
marking, 32 ACL packet filtering log interval, 11
QoS rate limit configuration, 36 QoS congestion management queue aging
QoS traffic policing, 42 time, 57
QoS traffic policing configuration, 36 QoS data buffer fixed-area max queue ratio, 94
rule QoS data buffer shared-area max queue ratio, 93
ACL auto match order sort, 2 shared area
ACL automatic rule numbering, 3 data buffer configuration, 91, 91
ACL automatic rule renumbering, 3 QoS data buffer max queue ratio, 93
ACL config match order sort, 2 QoS data buffer total ratio, 93
ACL naming, 2 SNMP
ACL numbering, 2 ACL switch applications, 1
ACL numbering step, 3 sorting
ACL rule numbering, 3 ACL auto match order sort, 2
S ACL config match order sort, 2
SP queuing
scheduling
classifications, 46
QoS congestion management queue
configuration, 50
scheduling profile, 55, 57, 88
SP+WFQ queuing
security
configuration, 53
ACL configuration, 1, 4, 12
SP+WRR queuing
ACL configuration (advanced), 5
configuration, 52
ACL configuration (basic), 4
statistics
ACL configuration (Ethernet frame header), 8
QoS class-based accounting configuration, 82, 83
ACL configuration (IPv4 advanced), 6
switch
ACL configuration (IPv4 basic), 4
ACL applications, 1
ACL configuration (IPv6 advanced), 7
switching
ACL configuration (IPv6 basic), 5
QoS congestion management configuration, 46
ACL configuration (user-defined), 9
service T
local precedence marking configuration, 66 tail drop (QoS), 58
QoS best-effort service model, 15 TCP
QoS congestion avoidance configuration, 58 QoS congestion avoidance RED, 58
QoS congestion management configuration, 46 QoS congestion avoidance tail drop, 58
QoS DiffServ service model, 15 Telnet
QoS global CAR configuration, 79 ACL switch applications, 1
QoS IntServ service model, 15 time
124
time range configuration, 89, 89 QoS policy application (control plane), 23
time range QoS policy application (global), 23
configuration, 89, 89 QoS policy application (user profile), 24
display, 89 QoS policy application (VLAN), 22
token bucket QoS policy configuration, 18
QoS complicated traffic evaluation, 36 QoS policy definition, 21
QoS traffic evaluation, 36, 36 QoS policy interface application, 22
QoS traffic forwarding, 36 QoS priority map, 26
traffic QoS priority mapping interface port priority, 31
ACL configuration, 1, 4, 12 QoS priority mapping map, 30
ACL configuration (advanced), 5 QoS priority mapping priority trust mode, 31
ACL configuration (Ethernet frame header), 8 QoS priority mapping process, 28
ACL configuration (user-defined), 9 QoS priority mapping table+priority marking, 32
ACL switch applications, 1 QoS priority mapping trusted port packet
local precedence marking configuration, 66 priority, 30
local QoS ID marking, 68 QoS priority marking configuration, 64, 66
QoS aggregate CAR configuration, 79, 79, 79 QoS priority trust mode, 27
QoS class-based accounting QoS rate limit, 39, 42
configuration, 82, 83 QoS rate limit configuration, 36
QoS congestion avoidance configuration, 58 QoS token bucket, 36
QoS congestion avoidance WRED QoS traffic behavior definition, 20
queue-based table, 59 QoS traffic class definition, 19
QoS congestion avoidance+ECN, 59 QoS traffic evaluation, 36
QoS congestion management, 46, See QoS traffic filtering configuration, 62, 63
also congestion management QoS traffic policing, 37, 40, 42
QoS congestion management configuration, 50 QoS traffic policing configuration, 36
QoS congestion management queue QoS traffic redirection configuration, 75, 76
scheduling profile, 55, 57, 88
traffic behavior
QoS congestion management queuing, 50
priority marking configuration, 65
QoS congestion management SP queuing, 50
traffic policing
QoS congestion management SP+WFQ
drop precedence, 64
queuing configuration, 53
drop precedence mapping, 64
QoS congestion management SP+WRR
priority marking configuration, 65
queuing configuration, 52
QoS display, 42
QoS congestion management WFQ
queuing, 51 trusted port packet priority (QoS), 30
QoS congestion management WRR U
queuing, 50
user
QoS global CAR configuration, 79
QoS policy application (user profile), 24
QoS GTS, 38, 41
QoS priority mapping user priority, 26
QoS GTS configuration, 36
user-defined ACL
QoS MQC, 18
category, 1
QoS nesting configuration, 72, 73
QoS non-MQC, 18 V
QoS overview, 15 VLAN
QoS policy application, 21
125
ACL packet filtering applicable scope (VLAN
interface), 11
QoS nesting configuration, 72, 73
QoS policy application, 21
QoS policy application (VLAN), 22
W
Web
ACL switch applications, 1
weighted
random early detection. Use WRED
WFQ queuing
bandwidth, 49
configuration, 51
WRED
configuration, 60
congestion avoidance+ECN, 59
display, 61
queue-based WRED table, 59
WRR queuing
basic queuing, 47
configuration, 50
group-based queuing, 47
Y
yellow packet
drop precedence, 64
126