Configuring MQC to Implement Congestion Management
Context
- AF: ensures a low drop probability of packets when the rate of outgoing service traffic does not exceed the minimum bandwidth. It is applied to services of heavy traffic that needs to be ensured.
EF/LLQ: is applied to services requiring a low delay, low drop probability, and assured bandwidth. EF or LLQ is also applied to services occupying low bandwidth, for example, voice packets. After packets matching traffic classification rules enter EF or LLQ queues, they are scheduled in Strict Priority (SP) mode. Packets in other queues are scheduled only after all the packets in EF or LLQ queues are scheduled. When AF or BE queues have idle bandwidth, EF queues can occupy the idle bandwidth.
If an EF queue is configured in a traffic behavior of a parent traffic policy, the EF queue does not preempt the idle bandwidth.
Compared with EF, LLQ provides shorter delay.
- BE: is used with the default traffic classifier. The remaining packets that do not enter AF or EF queues enter BE queues. BE queues use WFQ scheduling. When a greater number of queues are configured, WFQ allocates bandwidth more evenly but more resources are occupied. WFQ is applied to the services insensitive to the delay and packet loss, for example, Internet access services.
- When the default traffic classifier is associated with AF queues:
- The total bandwidth used by AF and EF queues cannot exceed the interface bandwidth.
AF queues share the remaining bandwidth based on their weights. The remaining bandwidth is calculated as follows:
Remaining bandwidth = Available bandwidth — Bandwidth used by EF queues
- When the default traffic classifier is associated with BE queues:
- If the bandwidth percentage is used to configure the minimum bandwidth
for AF queues:
- The system allocates 10% of the interface's available bandwidth to BE queues.
- The bandwidth used by AF and EF queues cannot exceed 99% of the interface bandwidth.
- When the percentage of bandwidths of AF and EF queues to the interface's available bandwidth is less than 90%, the system allocates 10% of the interface's available bandwidth to BE queues by default.
- When the percentage of bandwidths of AF and EF queues to the interface's available bandwidth is larger than 90% (for example, A%), the system allocates A% subtracted from 100% of the bandwidth to BE queues by default.
AF and BE queues share the remaining bandwidth based on their weights. The remaining bandwidth is calculated as follows:
Remaining bandwidth = Available bandwidth — Bandwidth used by EF queues
- If the bandwidth is used to configure the minimum bandwidth for AF queues, AF and BE queues share the remaining bandwidth in the ratio of 9:1. The remaining bandwidth refers to the bandwidth occupied by EF queues that is subtracted from the available bandwidth.
- If the bandwidth percentage is used to configure the minimum bandwidth
for AF queues:
The system allocates bandwidth to queues based on their weights.
Table 4-4 provides an example of bandwidth allocation.
Interface's Available Bandwidth | Configuration |
---|---|
100 Mbit/s | EF queues: a minimum of 50% of the interface bandwidth |
AF queues: a minimum bandwidth of 30 Mbit/s | |
BE queues: 1/9 of the bandwidth for AF queues by default when the default traffic classifier is associated with BE queues |
- Bandwidth of EF queues: 100 Mbit/s x 50% = 50 Mbit/s
- Remaining bandwidth: 100 Mbit/s - 50 Mbit/s = 50 Mbit/s
- AF queues and BE queues share the remaining bandwidth in the proportion
of 9:1:
- Bandwidth of AF queues: 50 Mbit/s x [9/(9+1)]= 45 Mbit/s
- Bandwidth of BE queues: 50 Mbit/s x [1/(9+1)]= 5 Mbit/s
CBQ Configuration |
Whether the Queue Profile Can Be Configured (qos queue-profile (interface view)) |
Whether Traffic Shaping Can Be Configured (qos gts or qos gts adaptation-profile) |
---|---|---|
Main interface |
Main interface: No |
Main interface: Yes |
Sub-interface: No |
Sub-interface: No |
|
Sub-interface |
Main interface: Yes |
Main interface: Yes |
Sub-interface: No |
Sub-interface: Yes |
Flow-based congestion management can be configured on WAN interfaces and layer 2 VE interfaces.
Procedure
- Configure a traffic classifier.
Run system-view
The system view is displayed.
Run traffic classifier classifier-name [ operator { and | or } ]
A traffic classifier is created and the traffic classifier view is displayed.
and indicates that rules are ANDed with each other.If a traffic classifier contains ACL rules, packets match the traffic classifier only when they match one ACL rule and all the non-ACL rules.
If a traffic classifier does not contain ACL rules, packets match the traffic classifier only when the packets match all the non-ACL rules.
By default, the relationship between rules in a traffic classifier is OR.
- Run the following commands as required.
Matching Rule
Command
Outer VLAN ID
if-match vlan-id start-vlan-id [ to end-vlan-id ] Inner VLAN IDs in QinQ packets
if-match cvlan-id start-vlan-id [ to end-vlan-id ] 802.1p priority in VLAN packets
if-match 8021p 8021p-value &<1-8> Inner 802.1p priority in QinQ packets
if-match cvlan-8021p 8021p-value &<1-8> Destination MAC address
if-match destination-mac mac-address [ mac-address-mask mac-address-mask ] Source MAC address
if-match source-mac mac-address [ mac-address-mask mac-address-mask ] Protocol type field encapsulated in the Ethernet frame header
if-match l2-protocol { arp | ip | rarp | protocol-value } All packets
if-match any DSCP priority in IP packets
if-match [ ipv6 ] dscp dscp-value &<1-8> NOTE:The AR510 series (except AR515CGW-L and AR515GW-LM9-D) do not support IPv6.
IP precedence in IP packets
if-match ip-precedence ip-precedence-value &<1-8> NOTE:if-match [ ipv6 ] dscp and if-match ip-precedence cannot be configured simultaneously in a traffic classifier where the relationship between rules is AND.
Layer 3 protocol type
if-match protocol { ip | ipv6 } NOTE:The AR510 series (except AR515CGW-L and AR515GW-LM9-D) do not support IPv6.
QoS group index of packets
if-match qos-group qos-group-value IPv4 packet length
if-match packet-length min-length [ to max-length ] PVC information in ATM packets
if-match pvc vpi-number/vci-number NOTE:The AR550 series do not support this configuration.
RTP port number
if-match rtp start-port start-port-number end-port end-port-number SYN Flag in the TCP packet header
if-match tcp syn-flag { ack | fin | psh | rst | syn | urg } *
Inbound interface
if-match inbound-interface interface-type interface-number Outbound interface
if-match outbound-interface Cellular interface-number:channel ACL rule
if-match acl { acl-number | acl-name } NOTE:Before defining a matching rule for traffic classification based on an ACL, create the ACL.
To use an ACL in a traffic classifier to match the source IP address, run the qos pre-nat command on an interface to configure NAT pre-classification. NAT pre-classification enables the NAT-enabled device to carry the private IP address before translation on the outbound interface so that the NAT-enabled device can classify IP packets based on private IP addresses and provide differentiated services.
ACL6 rule
if-match ipv6 acl { acl-number | acl-name } NOTE:- The AR510 series (except AR515CGW-L and AR515GW-LM9-D) do not support IPv6.
Before defining a matching rule for traffic classification based on an ACL, create the ACL.
To use an ACL in a traffic classifier to match the source IP address, run the qos pre-nat command on an interface to configure NAT pre-classification. NAT pre-classification enables the NAT-enabled device to carry the private IP address before translation on the outbound interface so that the NAT-enabled device can classify IP packets based on private IP addresses and provide differentiated services.
Application protocol
if-match application application-name [ time-range time-name ]
NOTE:- Only the AR503GW-LcM7, AR503GW-LM7, AR503GW-Lo, AR503HGW-L, AR503HGW-Lc, and AR510 series support this configuration.
Before defining a matching rule based on an application protocol, enable Smart Application Control (SA) and load the signature file.
SA group
if-match category category-name [ time-range time-name ]
NOTE:- Only the AR503GW-LcM7, AR503GW-LM7, AR503GW-Lo, AR503HGW-L, AR503HGW-Lc, and AR510 series support this configuration.
Before defining a matching rule based on an application protocol, enable Smart Application Control (SA) and load the signature file.
User group
if-match user-set user-set-name [ time-range time-range-name ]
NOTE:Only AR550-8FE-D-H, AR550-24FE-D-H, AR550C-4GE, AR550C-2C6GE and AR550C-2C6GE-2D support this configuration.
Run quit
Exit from the traffic classifier view.
- Configure a traffic behavior.
Run traffic behavior behavior-name
A traffic behavior is created and the traffic behavior view is displayed.
Run the following commands as required.
Run queue af bandwidth [ remaining ] { bandwidth | pct percentage }
AF is configured for packets of a certain type and the minimum bandwidth is set.
Run queue ef bandwidth { bandwidth [ cbs cbs-value ] | pct percentage [ cbs cbs-value ] }
EF is configured for packets of a certain type and the minimum bandwidth is set.
Run queue llq bandwidth { bandwidth [ cbs cbs-value ] | pct percentage [ cbs cbs-value ] }
LLQ is configured for packets of a certain type and the maximum bandwidth is set.
Run queue wfq [ queue-number total-queue-number ]
The device is configured to send packets matching the default traffic classifier to BE queues in WFQ mode and the number of queues is set.
(Optional) Run queue-length { bytes bytes-value | packets packets-value }*
The maximum length of a queue is set.
You cannot use the queue-length command to set the length for LLQ queues.
(Optional) Run statistic enable
The traffic statistics function is enabled.
Run quit
Exit from the traffic behavior view.
Run quit
Exit from the system view.
- Configure a traffic policy.
Run system-view
The system view is displayed.
Run traffic policy policy-name
A traffic policy is created and the traffic policy view is displayed, or the view of an existing traffic policy is displayed.
By default, no traffic policy is created in the system.
Run classifier classifier-name behavior behavior-name [ precedence precedence-value ]
A traffic behavior is bound to a traffic classifier in a traffic policy.
By default, no traffic classifier or traffic behavior is bound to a traffic policy.
Run quit
Exit from the traffic policy view.
Run quit
Exit from the system view.
- Apply the traffic policy.
Apply the traffic policy to an interface.
Run system-view
The system view is displayed.
Run interface interface-type interface-number[.subinterface-number ]
The interface view is displayed.
Run traffic-policy policy-name { inbound | outbound }
The traffic policy is applied to the inbound or outbound direction on the interface.
By default, no traffic policy is applied to an interface.
Apply the traffic policy in the system view.
Run system-view
The system view is displayed.
Run traffic-policy policy-name global bind interface { interface-type interface-number }&<1-16>
The traffic policy is applied to the system and bound to the interface.
By default, no traffic policy is applied to the system or bound to any interface of an AR.
Classifiers in a global traffic policy cannot be used to match the EXP field of MPLS packets or applied to IPv6 packets. The remark mpls-exp action cannot be configured in a global traffic policy.
If an interface-based traffic policy is applied to the interface where a global traffic policy is applied, the traffic policies take effect according to the following rules:- If the redirecting action is configured in both traffic policies, only the redirecting behavior in the interface-based traffic policy is valid.
- In other cases, the device executes the traffic behavior in the interface-based traffic policy and then the traffic behavior in the global traffic policy.