- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
04-HQoS configuration | 118.34 KB |
Configuring a forwarding profile
Configuring a forwarding group
Restrictions and guidelines for forwarding group configuration
Configuring a forwarding group at a child branch node
Configuring a forwarding group at the parent branch node
Configuring a scheduler policy
Applying a scheduler policy to a subinterface
Display and maintenance commands for HQoS
Configuring HQoS
About HQoS
Hierarchical QoS (HQoS) can hierarchically classify and schedule traffic, for example, by both user and application. HQoS provides more granular and flexible traffic control and quality assurance services than traditional QoS.
As shown in Figure 1, HQoS uses a tree structure and has the following nodes:
· Leaf node—Corresponds to a predefined forwarding class (FC), which is a scheduling queue, for example, BE, AF, and NC in Figure 1. After receiving a packet, an interface looks up the up-fc priority map according to the user priority and assigns the packet to the corresponding forwarding class.
· Branch node—Corresponds to a forwarding group (FG). A forwarding group (parent branch node) can have multiple nested forwarding groups (child branch nodes) or predefined forwarding classes.
· Root node—Corresponds to a scheduler policy (SP). A scheduler policy can have multiple nested forwarding groups. After a scheduler policy is applied to an interface, the interface can perform hierarchical traffic scheduling from the leaf nodes to the root node.
A child branch node can specify a forwarding profile for lead nodes. Then, the child branch node can schedule the traffic of leaf nodes according to the scheduling priority, scheduling weight, shaping parameters, and bandwidth setting in the forwarding profile.
Similarly, the root node and parent branch node can specify match criteria and forwarding profiles for their lower-level nodes.
The VLAN range next to a node is the match criteria specified by its higher-level node. The forwarding profile in the arrow pointing to a higher-level node is the control action to take on the traffic traversing the node.
Figure 1 HQoS scheduling model
HQoS tasks at a glance
To configure HQoS, perform the following tasks:
A drop profile must be nested in a forwarding profile to take effect.
1. Configuring a forwarding profile
2. Configuring a forwarding group
¡ Configuring a forwarding group at a child branch node
Perform this task to associate the predefined forwarding classes with forwarding profiles for leaf nodes.
¡ Configuring a forwarding group at the parent branch node
Perform this task to associate child branch nodes with forwarding profiles.
3. Configuring a scheduler policy
Perform this task to associate forwarding groups with forwarding profiles.
4. Applying a scheduler policy to
Configuring a forwarding profile
About this task
A forwarding profile sets the policing or control actions to take on the traffic passing through a node. In a scheduler policy tree, each node (forwarding group or forwarding class) must have a forwarding profile.
The system automatically creates a predefined forwarding profile when you create the first forwarding profile. A predefined forwarding profile cannot be modified. Table 1 shows the predefined forwarding profiles.
Table 1 Predefined forwarding profiles
Forwarding profile name |
Forwarding profile ID |
Scheduling priority and weight |
Drop profile |
default |
0 |
WFQ weight 1 |
N/A |
wrr-pri-2 |
1 |
WRR weight 1 |
default |
wrr-pri-3 |
2 |
WRR weight 1 |
default |
wrr-pri-4 |
3 |
WRR weight 1 |
default |
sp |
4 |
SP |
default |
Restrictions and guidelines
A forwarding profile might be associated with different scheduling entities (including forwarding groups or forwarding classes) in a scheduler policy tree. Scheduling entities at different layers have different requirements for their associated forwarding profiles. When you modify a forwarding profile associated with a scheduling entity, the system checks the conformance of the modification with the requirement of the scheduling entity. Even if the CLI allows you to modify a forwarding profile parameter setting, your modification attempt might fail due to nonconformity.
In addition, modifying a forwarding profile already applied to an interface might fail due to insufficient hardware resources.
Procedure
1. Enter system view.
system-view
2. Create a forwarding profile and enter forwarding profile view.
qos forwarding-profile fp-name
3. (Optional.) Perform at least one of the following tasks to configure the queuing mode:
¡ Enable SP queuing:
sp
¡ Configure WRR queuing:
wrr [ weight weight-value ]
By default, no queuing mode is configured for a forwarding profile.
These commands overwrite one another, and whichever is configured last takes effect.
4. (Optional.) Configure the GTS parameters.
gts cir cir-value
By default, no GTS parameter is configured for a forwarding profile, and the traffic rate is not limited.
Configuring a forwarding group
About forwarding groups
Forwarding groups include forwarding groups at child branch nodes and forwarding groups at parent branch nodes. Because forwarding groups are basic scheduling entities in a scheduler policy tree, creating forwarding groups is required in scheduler policy configuration.
A parent branch node specifies match criteria and forwarding profiles for child branch nodes. A child branch node nests a predefined forwarding class in the forwarding group and associates the forwarding class with a forwarding profile.
The system automatically creates a predefined forwarding group when you create the first forwarding group. The predefined forwarding group is named default and numbered 0. The predefined forwarding group nests the predefined forwarding classes and associates each nested forwarding class with a forwarding profile. The predefined forwarding group cannot be modified.
Restrictions and guidelines for forwarding group configuration
You can nest multiple predefined forwarding classes in a forwarding group. However, you cannot nest both predefined forwarding classes and forwarding groups in a forwarding group.
A predefined forwarding class can be nested in multiple forwarding groups and associated with a different forwarding profile in each forwarding group.
If you associate different forwarding profiles when nesting the same predefined forwarding class or forwarding group in a forwarding group, the most recent nesting takes effect.
If you associate different forwarding profiles with one predefined forwarding class or forwarding group nested in a forwarding group, the most recent configuration takes effect.
Each time you associate a predefined forwarding class or a forwarding group with a forwarding profile, the system checks the contents of the forwarding profile for conflict. If the forwarding profile conflicts with the predefined forwarding class or the forwarding group, your association attempt will fail.
The system limits both the number of nesting layers and the number of forwarding groups nested at a layer in a scheduler policy tree. When either limit is exceeded, your nesting attempt will fail.
When you execute the display current-configuration command after configuring a forwarding group, the following rules apply:
· If the forwarding group is nested with a forwarding group or forwarding class, this command displays both forwarding group configuration and forwarding group nesting information.
· If the forwarding group is not nested with a forwarding group or forwarding class, this command displays only forwarding group configuration.
Configuring a forwarding group at a child branch node
Prerequisites
Make sure the forwarding profile to be associated with the predefined forwarding class already exists.
Procedure
1. Enter system view.
system-view
2. Create a forwarding group and enter forwarding group view.
qos forwarding-group fg-name
3. Nest a predefined forwarding class in the forwarding group and associate the forwarding class with a forwarding profile.
forwarding-class fc-name profile fp-name
By default, a user-defined forwarding group does not have nested forwarding classes.
Configuring a forwarding group at the parent branch node
Prerequisites
Make sure the forwarding group to be nested and the forwarding profile to be associated with forwarding group already exist.
Restrictions and guidelines
The match criteria for nested forwarding groups of a forwarding group cannot overlap.
Removing match criteria in forwarding group view also removes the nested forwarding groups.
Procedure
1. Enter system view.
system-view
2. Enter forwarding group view.
qos forwarding-group fg-name
3. Configure a match criterion and enter forwarding group match criterion view.
match match-criteria
By default, no match criterion is configured.
For more information about the match command, see ACL and QoS Command Reference.
4. Nest a child forwarding group in the match criterion of the forwarding group and associate the child forwarding group with a forwarding profile.
forwarding-group sub-fg-name profile fp-name
By default, a user-defined forwarding group does not have child forwarding groups.
Configuring a scheduler policy
Restrictions and guidelines
Scheduler policy configuration
The system does not automatically nest the predefined forwarding group or associate the predefined forwarding group with a predefined forwarding profile in a scheduler policy on creation of the scheduler policy.
You can nest multiple forwarding groups in a scheduler policy.
A forwarding group can be nested in multiple scheduler policies and associated with a different forwarding profile in each scheduler policy.
If you associate different forwarding profiles with one forwarding group in a scheduler policy, the most recent configuration takes effect.
Each time you associate a forwarding group with a forwarding profile, the system checks the contents of the forwarding profile. If the forwarding profile conflicts with the forwarding group, your association attempt will fail.
The system has a limit on the number of forwarding groups that can be nested at a layer in the scheduler policy tree. When the limit is exceeded, your nesting attempt will fail.
Match criteria configuration
The match criteria for nested forwarding groups of a scheduler policy cannot overlap.
Removing match criteria in scheduler policy view also removes the nested forwarding groups.
Procedure
1. Enter system view.
system-view
2. Create a scheduler policy and enter scheduler policy view.
qos scheduler-policy sp-name
3. Configure a match criterion and enter scheduler policy match criterion view.
match match-criteria
By default, no match criterion is configured.
For more information about the match command, see ACL and QoS Command Reference.
4. Nest a forwarding group in the match criterion of the scheduler policy, and associate the forwarding group with a forwarding profile.
forwarding-group fg-name profile fp-name
By default, the predefined forwarding group is nested in a scheduler policy in group mode.
Applying a scheduler policy to a subinterface
About this task
After you apply a scheduler policy to a subinterface, the scheduler policy takes effect only on complete branch nodes. Table 2 shows the conditions for complete branch nodes.
Table 2 Conditions for complete branch nodes
Branch node |
Conditions to be met |
Forwarding group node with nested forwarding classes |
All predefined forwarding classes are nested. NOTE: The number of child forwarding class nodes that can be nested varies by device model. |
Forwarding group node with child forwarding groups |
· All predefined forwarding classes are nested in each child forwarding group. · The match criteria of the forwarding group node are the union of the match criteria of all child forwarding groups. |
Restrictions and guidelines
Only one scheduler policy can be applied to one direction of a subinterface.
You can modify a scheduler policy that has been applied to a subinterface. The modification takes effect immediately.
Procedure
1. Enter system view.
system-view
2. Enter subinterface view.
interface interface-type interface-number.subnumber
3. Apply a scheduler policy to the subinterface.
qos apply scheduler-policy sp-name outbound
By default, a scheduler policy is not applied to a subinterface.
Display and maintenance commands for HQoS
Execute the display commands in any view.
Task |
Command |
Display predefined forwarding class information. |
display qos forwarding-class [ name fc-name ] |
Display forwarding group information. |
display qos forwarding-group [ name fg-name ] |
Display forwarding profile information. |
display qos forwarding-profile [ name fp-name ] |
Display scheduler policy information. |
display qos scheduler-policy name [ name sp-name ] |
Display the scheduler policy information and traffic statistics for interfaces. |
display qos scheduler-policy interface [ interface-type interface-number ] outbound |
Display diagnostic information about subinterfaces. |
display qos scheduler-policy diagnosis interface [ interface-type interface-number.subnumber ] [ outbound ] |